Evaluation, Robustness & Ethics

frechet inception distance

FID is the dominant metric for judging how good a generative image model is — GANs, diffusion models, and the like. The challenge is that 'is this generated image good?' has no single ground-truth answer, so you cannot score it like a classifier. Instead FID compares two collections of images — a large set of real images and a large set of generated ones — and asks how similar the two distributions are. Lower FID is better: it means the generated images are, statistically, indistinguishable from real ones in both quality (each image looks plausible) and diversity (the set covers the same variety as reality).

It works by not comparing pixels at all. Pixel differences are meaningless for generation. Instead FID passes every image through a pretrained Inception-v3 network and reads out a high-dimensional feature vector from a late layer (the 2048-dimensional pool3 activations). These features encode semantic content — objects, textures, structure — rather than exact pixels. You then summarize the real features and the generated features each as a multivariate Gaussian, computing a mean vector and a covariance matrix for each set.

The score is the Fréchet distance (also called the 2-Wasserstein distance) between those two Gaussians, which has a closed form: FID = ||μ_r − μ_g||² + Tr(Σ_r + Σ_g − 2(Σ_r Σ_g)^{1/2}), where μ_r, μ_g are the mean feature vectors of real and generated sets and Σ_r, Σ_g are their covariance matrices. The first term penalizes a shift in average content (quality); the second penalizes a mismatch in spread and correlations (diversity). Both must match to get a low score, which is why FID captures mode collapse — a model that generates only a few image types has too-small covariance and is penalized.

FID's practical caveats are important. It is biased by sample size: estimates fall as you use more generated images, so you must compare models at the same sample count (commonly 50,000) to be fair. It inherits the Inception network's ImageNet biases, so it is least reliable on domains far from natural photos (faces, medical, art), where alternatives like FID computed with a CLIP feature extractor are gaining favor. It assumes Gaussian feature distributions, which is only an approximation. And FID conflates fidelity and diversity into one number; to disentangle them, researchers also report precision and recall for generative models, KID (an unbiased kernel variant), and human evaluation. Despite these limits, FID remains the standard because it correlates reasonably with perceived quality and is cheap to compute.

FID is a relative, not absolute, score: a value of '8' is only meaningful versus another model's FID computed with the identical feature network, sample size, and image preprocessing/resizing. Subtle resizing or library differences can shift FID by several points, so reproduce the exact protocol when comparing papers.

Also called
FIDFréchet distanceInception distance