Applied AI Vol. 2 · 5 min read
Two generators can have the same overall score for opposite reasons: one makes sharp images of only a few kinds, the other covers everything but looks blurry. You want to tell them apart.
Two questions
Precision asks what fraction of generated samples look like real data, which is a fidelity question. Recall asks what fraction of real data the generator can produce, which is a coverage or diversity question.
A neighborhood-based estimate
One common approach works in a feature space. Approximate the support of the real data by the union of balls around each real sample, with radius set by the distance to its k-th nearest real neighbor. Precision is the fraction of generated samples that fall inside the real support. Recall is the fraction of real samples that fall inside the generated support, built the same way.
Reading the results
- High precision with low recall: realistic but repetitive, a sign of mode collapse or aggressive guidance.
- Low precision with high recall: broad coverage but many unrealistic samples.
- Both depend on the feature space, the value of k and the sample size, so keep these fixed when comparing models.
- Outliers in the real data can inflate the estimated support.
Use them with care
These are estimates with noise. Report them with intervals, evaluate across settings such as guidance scale to see the trade-off curve, and confirm important conclusions with human judgments of quality and variety.
