4.5.11 · D5Generative Models

Question bank — Denoising diffusion probabilistic models (DDPM)

2,370 words11 min readBack to topic

This is a rapid-fire misconception hunter for Denoising diffusion probabilistic models (DDPM). Every item is a trap the theory sets for you. Read the prompt, answer out loud in one sentence, then reveal. If you can only say "true" or "false" without the why, you haven't understood it yet.

Before we start, a plain-words glossary so no symbol ambushes you:

Figure — Denoising diffusion probabilistic models (DDPM)
Recall Why the closed-form sampler

holds — walk it, don't memorize it What we want: skip all the intermediate steps and land at straight from . Step 1 (one step): . Step 2 (compose): . Substitute : Step 3 (the key merge): two independent zero-mean Gaussians add their variances, so the noisy tail collapses to a single Gaussian with variance . Hence . Step 4 (induction): the same "signal shrinks by , noise fills the rest to keep variance " pattern repeats, giving in front of and in front of the merged noise. Intuition: the signal-share and the noise-share always sum to — the picture below shows one bar splitting into signal (red) and noise (black) as grows.

Figure — Denoising diffusion probabilistic models (DDPM)
Recall The true reverse-posterior parameters

and — where they come from What: conditioned on the clean data , the reverse step is Gaussian. Why Gaussian: by Bayes, — a product of two Gaussians in , and a product of Gaussians is again Gaussian (add the two "" exponents and complete the square). The parameters that fall out of completing the square are Read it: is a weighted blend of "where we came from" () and "where we are" (); the network's job is to reproduce this blend without being told .

Recall Why predicting

and predicting are the same parameterization (invertible linear map) Start from the forward closed form: . Solve for (pure algebra — move terms, divide): Solve for the same way: The point: given the known and the fixed constants , each of and is an affine (straight-line) function of the other — knowing one hands you the other exactly. So a network predicting implicitly predicts ; they carry identical information. Empirically the target is unit-scale for every , so it trains more stably.


True or false — justify

True or false: the forward step is a Gaussian centred at .
True — by definition ; the mean shrinks the previous point and is the added variance.
True or false: the forward diffusion process has parameters the network learns.
False — the forward process is completely fixed by the schedule ; only the reverse process contains learnable weights.
True or false: after infinitely many steps, still remembers a little bit of .
False — as , , so and every trace of the original signal is washed out.
True or false: we can jump straight from to in one line of code.
True — the closed form (derived above by merging the per-step Gaussians) lets us sample any step directly without looping.
True or false: we can likewise jump from straight to in one reverse step.
False — the reverse has no closed form over many steps; the network only approximates one small step at a time, so generation must iterate.
True or false: the true reverse step is Gaussian.
False in general — it is only Gaussian when we also condition on (that is the posterior); unconditioned, it depends on the whole data distribution and is intractable.
True or false: the scaling factor exists to make the images darker.
False — it shrinks the signal so total variance stays bounded (near ); it is a variance-control trick, not a brightness one.
True or false: DDPM training uses the true reverse-time video of an image being denoised as a label.
True in spirit — because has a known Gaussian form, we have a supervised target, which is why the loss reduces to matching that target.
True or false: predicting the noise and predicting the clean image are mathematically equivalent parameterizations.
True — they are related by the invertible affine map derived above (), so either recovers the other; but predicting empirically trains more stably.
True or false: the first KL term needs gradient updates.
False — it contains no learnable parameters (both sides are fixed), so it is a constant we ignore during optimization.
True or false: increasing (more steps) always makes each individual denoising step easier to learn.
True (roughly) — a larger over the same total noise means smaller per-step , so each reverse step is closer to a simple Gaussian, which is the whole point of breaking generation into many tiny steps.

Spot the error

"Since , the variance grows as each step."
Error: it forgets the scaling — variance is , which stays at , not grows.
"To combine two Gaussians we add the standard deviations: ."
Error: independent Gaussians add variances, not standard deviations, so the result is — exactly the merge that gives the closed-form sampler.
"The reverse posterior mean depends on only."
Error: it depends on both and (see the two-term blend above); at generation time we don't have , which is exactly why we need a network to stand in for it.
" where is a clean image."
Error: is the noised image ; feeding a clean image would give the network nothing to denoise.
"Because , larger gives larger ."
Error: each , so multiplying more of them shrinks toward as grows.
"The network outputs a full image at each reverse step, so we discard afterwards."
Error: the -prediction network outputs a noise estimate, which we combine with (via the formula) to get is essential input, not discarded.
"DDPM is a VAE with one latent, so it has one encoder step."
Error: DDPM is like a VAE with a fixed, non-learned encoder unrolled over latents — a deep chain, not a single latent.
"At the last generation step we add fresh Gaussian noise to before outputting."
Error: the final step () uses the mean only, adding no extra noise, otherwise the clean output would be re-corrupted.

Why questions

Why do we condition on to make the reverse step tractable, when at generation time we don't have ?
Step-by-step: (1) the raw reverse needs the whole data distribution, which we don't have; (2) but Bayes lets us write , a product of two known Gaussians; (3) that product is a clean Gaussian we use as a training target; (4) the network learns to imitate from and alone, so at inference it no longer needs .
Why does predicting noise work better than predicting the mean directly?
Because of the affine map derived above, all three targets (, , ) carry the same information, but has fixed unit scale for every , whereas 's magnitude swings with across timesteps; a constant-scale target keeps the loss well-conditioned and the gradients balanced.
Why must the reverse process take many small steps instead of one big learned jump?
A single jump would demand modeling the full, multi-modal data distribution from pure noise in one shot; instead, when each is tiny the true reverse step is provably nearly Gaussian, so a Gaussian network with a mean and variance is an accurate approximation — the Markov-chain framing stitches those easy steps into one hard generation.
Why is the forward process a Markov chain (each step depends only on the previous one)?
(1) The Markov structure lets the joint factor into a product of one-step Gaussians; (2) that factorization is exactly what makes the per-step variances add when we merge them; (3) the merge is what collapses steps into the single closed-form Gaussian — no Markov property, no closed form.
Why can we drop the weighting terms and use the plain loss?
The exact variational bound weights each timestep's KL by a factor that depends on ; Ho et al. found that setting all those weights to (uniform over ) still descends the same landscape and empirically yields better samples, because it stops the loss from over-emphasizing the low-noise steps that already have tiny error.
Why do we normalize input data to roughly unit variance before diffusion?
The variance-preserving schedule keeps only if ; otherwise the endpoint would not match the prior we sample from at generation, and the reverse chain would start from the wrong distribution.
Why is the same U-Net used for all timesteps instead of one network per step?
We inject as an input (via a time embedding), so a single weight-sharing network handles every noise level; with steps, one network per step would be the parameters and impossible to train.

Edge cases

What happens to the reverse posterior variance at ?
With , we get , meaning the last denoising step is deterministic — consistent with adding no noise at the final step.
What is if for some step?
With we have , so exactly — a "do-nothing" step that neither adds noise nor loses signal.
What is if ?
Then , so — the signal is erased in a single step, which is why schedules keep strictly below .
At , what does the "noised" sample equal?
gives — no noise, the original data, as it must be.
If two independent noise draws happened to cancel, is the closed form still valid?
Yes — the closed form describes the distribution of , not any single draw; individual cancellations are just low-probability events within that Gaussian.
What happens at generation if the network's is perfect (zero loss)?
Then exactly matches the true conditional reverse posterior, and iterating it from produces samples from the true data distribution — the ideal but unreachable limit.
For very small (nearly clean image), why is the network's job almost trivial?
With only a whisper of noise is present, so has an easy target and the reverse step barely changes the image.
What is the largest and smallest value can take?
ranges over the finite integers to (with reserved for clean data); there is no step beyond , so is the terminal near-Gaussian and the whole chain has fixed, bounded length.
Recall One-line self-test

Which of and is learned? ::: Only (reverse); (forward) is fixed. Is Gaussian? ::: Only when also conditioned on . Does grow or shrink with ? ::: Shrinks toward . What is the transition ? ::: .

See also: Classifier-free guidance and Latent diffusion models extend this reverse process; the Hinglish note restates these traps in simpler language.