Learn to destroy an image, and you learn to create one.
A diffusion model learns generation by learning destruction in reverse. Take a real image and add a little Gaussian noise, again and again, over T steps — eventually it is pure static. That forward path is fixed and needs no learning. Then train one network to answer a single, humble question at every step: “what noise was just added?” If it can answer that, you can start from pure static and walk backwards, subtracting predicted noise step by step, until a brand-new image appears that was never in your data.
Add noise on a schedule β1..T. No parameters, no training. A closed form jumps straight to any step t, so training samples timesteps at random instead of simulating the whole chain.
A U-Net (or DiT) takes the noisy image plus a timestep embedding and predicts the noise inside it. One network handles every noise level — the timestep tells it how much fog to expect.
Plain mean-squared error between true and predicted noise. A variational bound collapses to this — which is why diffusion trains stably where GANs fight themselves.
DDPM (many steps, high fidelity) vs DDIM/flow samplers (10–50 steps). Classifier-free guidance scales the gap between conditioned and unconditioned predictions to sharpen prompt adherence.
1. Why is diffusion training so much more stable than GAN training, even though both produce images?
Hint: count the networks and the objectives. One is a regression against a target you already know; the other is a moving-target minimax game.2. The network predicts the noise ε rather than the clean image x0 directly. Both are recoverable from each other — so why does predicting noise work better?
Hint: think about what the target looks like at high t. Which parameterisation keeps the target's scale roughly constant across all timesteps?3. Cutting from 1000 sampling steps to 20 makes generation 50× faster. What are you actually trading away, and why can DDIM get away with it?
Hint: each reverse step assumes the change is small enough to be near-Gaussian. Removing the injected noise makes the trajectory deterministic — fewer, larger, straighter strides.
Card 36 of 40 · Phase 8: Modern Architectures · Visual style: chalkboard
Next up: Graph Neural Networks — learning on data that has no grid at all.