tezvyn:

How FID is calculated versus Inception Score

AI-drafted, machine-checkedSource: interviewintermediate
WHAT IT TESTS

deep grasp of generative metrics.

OUTLINE

FID fits Gaussians to Inception features of real and fake images then measures Frechet distance; it uses real references and detects mode collapse.

RED FLAG

claiming IS uses real data.

WHAT THIS TESTS This probes whether you know the actual computation behind FID and can articulate why the field moved away from Inception Score. It separates candidates who memorized a name from those who understand distribution matching.

A GOOD ANSWER COVERS FID computation in steps: run N real images and N generated images through a pretrained Inception v3 network and collect activations from the final pooling layer, typically 2048-dimensional. Fit a multivariate Gaussian to each set, giving mean vectors and covariance matrices for real and generated features. FID is the squared Frechet distance, which equals the squared difference of means plus the trace of the two covariances minus twice the matrix square root of their product. Lower is better; zero means identical Gaussians. The key contrast with Inception Score: IS only uses generated images, scoring them by how confident the classifier is per image and how uniform the marginal class distribution is, with no comparison to the real dataset. FID is more reliable because it references real data, so it penalizes outputs that look plausible but differ statistically, and it detects mode collapse and diversity loss that IS misses.

COMMON WRONG ANSWERS Claiming IS compares generated images to real ones. Saying FID is just a classifier accuracy. Forgetting the covariance term, which is what captures diversity.

LIKELY FOLLOW-UPS Why is FID biased on small samples, the covariance estimate is noisy. What is KID, an unbiased kernel-based alternative. Can FID be gamed, yes, by overfitting to the feature extractor.

ONE CONCRETE EXAMPLE A model memorizes 50 training images and replays them. IS looks excellent because each image is sharp and classes are varied, but FID stays high once real and generated covariances diverge, revealing the lack of true diversity.

Read the original → en.wikipedia.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.