Quiz: samplers, steps, and judging the samples
Before this unit: Noise levels, denoisers and the score (previous unit); Day 41: Modern deep learning; Day 39: Variational autoencoders; Day 5: Deconvolution.
See also: Day 28: Ising model and Markov random fields; Day 35: Gaussian mixtures.
Short questions to test your understanding. Try each on paper first, then open the answer.
Q1. A deterministic and a stochastic sampler use the same exact denoiser and many steps. Do they produce the same images? The same distribution of images?
Paths against marginals.
Not the same images: from the same start the paths differ (smooth against jittery). The same distribution: at every noise level both have the distribution of the noised data, and at the end that of the data.
Q2. Why does a sampler with very few steps produce samples with too little spread?
What does one step straight to the end return?
Each step follows the arrows in a straight line from where it is; the true paths bend. A big step lands near the denoiser’s answer at a high noise level, which is an average of many images. So samples are pulled towards averages: too narrow, and between modes when there are several.
Q3. Two samplers each use 10 network evaluations; one puts its steps evenly in log-SNR, the other follows the cosine schedule evenly in time. Can they differ in quality?
Where do the paths bend most?
Yes: quality depends on where the steps are. Steps wasted at extreme noise (where little happens) or at noise far below the scale of the data are missing where the paths bend. In the demo with three modes, 5 steps uniform in log-SNR give sd 0.78 against 1.18 for the cosine schedule (data 1.38).
Q4. What does “stochastic sampling forgets” mean, and what does it not fix?
A wrong position against a wrong denoiser.
Fresh noise added at later steps washes out an error in the position (a bad start, a too-large step), and the following denoising steps pull the point back to the right distribution. It does not fix a wrong denoiser: the error in the arrows is applied at every step.
Q5. What is inversion, and why does it need a deterministic sampler?
A map and its inverse.
Running the sampler backwards from a real image to the noise that would generate it. A deterministic sampler is a fixed, invertible map noise → image, so the way back is well defined; with fresh noise at every step the same image can come from many starts.
Q6. A generator places all samples between the two modes of the data, matched in mean and covariance. Which metric catches it: precision, recall, or the Fréchet distance?
What does a fitted Gaussian see?
Precision: many samples lie where no real data are. Recall can stay high (the samples cover the data region), and the Fréchet distance can be near zero, since the fitted Gaussians are the same.
Q7. A generator returns slightly jittered copies of 50 training images. Which check is the clearest alarm?
Compare with the training set, not the test set.
The distance of each sample to its nearest training image: much smaller than for held-out real images. Precision and the Fréchet distance can look fine (recall drops with k-NN balls, but less clearly).
Q8. (math) What is the 1D Fréchet distance between \mathcal N(0, 1) and \mathcal N(0.5, 0.25)?
(\mu_1-\mu_2)^2 + (s_1-s_2)^2.
0.25 + (1 - 0.5)^2 = 0.5.