DDPM,
explained.
Diffusion was a decade-old idea that never quite worked — beautiful in theory, mediocre in practice. Then this paper made one deceptively humble change: instead of predicting complicated distributions, just train a network to guess the noise. That single simplification turned diffusion from a curiosity into the method behind DALL·E, Midjourney, and Stable Diffusion. Here's the original math, made intuitive.
What changes against GANs: the hard part is made fixed and known
Rung 2's difficulty is that both halves of the game are learned, so nothing is stable. This rung's change is to make one direction fixed, simple and known in advance: define a process that takes an image and adds a little Gaussian noise, over and over, for many steps, until nothing is left but noise. That direction involves no learning at all — it is a schedule someone wrote down.
All the model has to learn is to undo one step of it. And because each forward step is a small Gaussian perturbation, the corresponding reverse step is also approximately Gaussian, which makes it something a network can be asked to predict. Generation is then: start from pure noise, apply the learned reverse step many times, arrive at an image.
The training objective is where this becomes remarkable. After simplification, what the network is asked to do is: given a noisy image and how noisy it is, predict the noise that was added — and the loss is a plain squared error on that prediction. Generative modelling has become regression. There is no adversary, so no saddle point and no instability; the loss is a number that decreases and means something; and because every training example is a real image with noise on it, there is no mechanism for mode collapse — the model never gets to choose which parts of the distribution to cover. Stated against rung 2, that is the whole argument, and it is why this family won.
The core intuition
Imagine dropping ink into water. It disperses until the glass is a uniform haze — an easy, predictable process to run forward. Now imagine running it backward: reassembling that haze into the original drop. Impossible to do exactly, but if you learned, at every tiny moment, how to nudge the haze one step back toward order, you could reverse the whole thing.
That's diffusion. The forward direction gradually destroys an image into noise — trivial. The reverse direction rebuilds an image from noise — hard, and exactly what we train a network to do. Generate by starting from pure noise and running the learned reverse steps until a picture appears.
The forward process: adding noise on a schedule
The forward process is a fixed Markov chain with no learnable parameters. Over T steps (the paper uses T = 1000), it repeatedly adds a little Gaussian noise. A noise schedule β₁ … β_T — small numbers that grow over time — sets how much noise each step injects:
In words: each step shrinks the current image slightly and sprinkles in fresh noise. Start with a clean image x₀; after enough steps you reach x_T, which is indistinguishable from pure Gaussian noise. This process is a given — its only purpose is to define the corruption the network must learn to undo.
The trick that makes training cheap
Adding noise a thousand times to make one training example would be painfully slow. A neat property of Gaussians rescues it: you can jump straight to any timestep in one shot. Define α_t = 1−β_t and ᾱ_t = α₁·α₂·…·α_t, and then
So to make a training example at noise level t, you take a clean image, pick a random t, sample one blob of noise ε, and combine them by the formula above — no thousand-step loop needed. This closed form is what makes DDPM training efficient, and it's the key to the objective coming up.
The reverse process: the learned part
Reversing the chain means going from x_t to a slightly cleaner x_{t-1}. The true reverse step is intractable, but if each forward step adds only a little noise, each reverse step is well-approximated by a Gaussian too — so we train a network to predict its mean.
That network is a U-Net: an encoder-decoder with skip connections, well suited to images, that also takes the timestep t as input so it knows how noisy things currently are. Apply it repeatedly — x_T → x_{T-1} → … → x₀ — and noise becomes an image. All the model's intelligence lives in this one denoising network.
The masterstroke: just predict the noise
Earlier diffusion work derived a complicated variational bound and tried to predict full distributions — fiddly and unstable. DDPM's decisive move was to reparameterize the problem. Since x_t = √(ᾱ_t)x₀ + √(1−ᾱ_t)ε, knowing the noise ε is equivalent to knowing the clean image. So just predict ε. The training loss collapses to plain mean-squared error:
The recipe is almost embarrassingly simple: take a clean image, add a known amount of noise, and ask the network to guess the noise you added. Penalize the squared error. That's it. This "simple objective" trained far more stably than the full variational bound and produced dramatically better samples — the entire reason diffusion suddenly worked.
Predicting noise turns generative modeling into ordinary supervised regression. No adversarial game, no delicate distribution matching — just "guess the noise," a loss any practitioner can train reliably. Simplicity was the breakthrough.
The schedule, worked with real numbers
The paper's exact recipe: T = 1000 steps, β rising linearly from 0.0001 to 0.02. Everything interesting lives in the cumulative product ᾱ_t = Π(1−β_s) — the fraction of original signal surviving at step t. Compute it:
| Step t | ᾱ_t | Signal √ᾱ_t | Noise √(1−ᾱ_t) | What the image looks like |
|---|---|---|---|---|
| 10 | 0.998 | 0.999 | 0.04 | essentially clean |
| 100 | 0.897 | 0.947 | 0.32 | visibly grainy, fully recognizable |
| 500 | 0.079 | 0.28 | 0.96 | mostly noise — structure barely ghosts through |
| 1000 | 0.00004 | 0.006 | 1.00 | indistinguishable from pure noise |
Two things to notice. The destruction is front-loaded gently — after 100 of 1000 steps, 95% of the signal amplitude survives; the schedule spends most of its budget in the middle. And at t = 1000 the signal fraction is 0.6% — which is why sampling can start from pure random noise: the endpoint of the forward process genuinely is one.
The reparameterization the whole paper turns on is one line of algebra on the shortcut formula. If you know the noise, you know the image:
Training teaches a network to estimate ε; the identity above converts that estimate back into an image, one denoising step at a time. Generative modeling became regression on noise.
What the authors admit, and what happened next
The cost is stated plainly and it is severe: sampling requires many sequential network evaluations — on the order of a thousand in this paper — where a GAN generates in one. Diffusion traded a training problem for a sampling problem, and at publication that made it orders of magnitude slower to generate with. Rungs 5 and 7 are both attacks on this one sentence.
The objective is also acknowledged to be a reweighted version of the proper variational bound rather than the bound itself — the simplification that makes it a clean regression drops terms, and it is justified because it works better, not because it is exact. An honest and consequential piece of empirical pragmatism.
How it held up: it displaced rung 2 as the default for image generation within about two years, and the reasons are the ones above — stable training and full distribution coverage beat one-shot sampling speed, because speed turned out to be fixable and instability did not. Everything from rung 5 to rung 8 is a refinement of this rung, which makes it the most load-bearing paper on the ladder.
Diffuse and recover, in 25 lines
The full forward process on a 1-D "image," running in your browser through WebAssembly: build the paper's exact β schedule, watch ᾱ decay through the table's checkpoints, then prove the reparameterization — given the true noise, recovery of x₀ is exact at any step. The trained network's entire job is estimating that ε; everything else is this algebra.
Write the body of forward. Everything else in the file is
already written; this is the function the paper is about. Press ▶ Run to check it against
the 5 assertions below — they start red.
- Alpha-bar decays monotonically
- Endpoint is pure noise
- Recovery is exact given true noise
- No noise at t=0: surviving signal fraction is 1
- The linear beta schedule increases over time
Sampling and results
To generate, start from pure noise x_T ~ 𝒩(0, I). At each step, run the network to predict the noise, subtract off a scaled portion to get a cleaner estimate, add a touch of fresh noise for stochasticity, and repeat down to x₀. After all T steps you have a fresh image the model has effectively imagined from static.
| Property | GANs | DDPM |
|---|---|---|
| Generation | one forward pass | many denoising steps |
| Training | adversarial (unstable) | simple MSE (stable) |
| Sample diversity | prone to mode collapse | high, covers the data |
DDPM produced image quality competitive with the best GANs of the time — without the instability or mode collapse — establishing diffusion as a serious, and soon dominant, family of generative models.
The limits
The obvious cost is speed. Generating one image means running the network hundreds or a thousand times — orders of magnitude slower than a GAN's single pass. DDPM also operates directly in pixel space, so high-resolution generation is very expensive in both compute and memory.
Both limits drove the follow-up work. DDIM and other fast samplers cut the step count dramatically; latent diffusion moved the whole process into a compressed space to slash the per-step cost. DDPM is the sturdy foundation those improvements were built on, not the final, efficient product.
Why it still matters
DDPM is the paper that made diffusion work, and it launched the generation era we're living in. Every major image and video generator — DALL·E 2, Imagen, Midjourney, Stable Diffusion — descends from the forward/reverse framework and the noise-prediction objective defined here. When a model "denoises" its way to a picture, it's running DDPM's idea.
Its deeper lesson is about the power of the right reframing: a hard generative problem became a simple supervised one by choosing to predict noise. That move dethroned GANs as the default for high-fidelity generation and reoriented the whole field around iterative denoising.
Pair this with latent diffusion (which made it efficient enough for Stable Diffusion) and DDIM (which cut the 1000 sampling steps to ~50). DDPM is the mathematical bedrock beneath both.
5 questions on this paper
Answer each one out loud before you open it. Recalling an answer is what makes it stick; recognising one you have just read is not. Your score is kept on this device.
What is DDPM?
Show answer
DDPM (Denoising Diffusion Probabilistic Models, Ho et al., 2020) is the paper that made diffusion generative models practical. It defines a fixed forward process that gradually adds Gaussian noise to an image over many steps, and trains a neural network to reverse that process step by step — turning random noise back into a realistic image. Its key contribution was a simple, stable training objective.
What is the forward process in diffusion?
Show answer
The forward process is a fixed Markov chain that adds a small amount of Gaussian noise to the image at each of many timesteps, controlled by a noise schedule. After enough steps the image becomes pure noise. It has no learnable parameters — its only job is to define the corruption the model must learn to undo, and thanks to a math trick you can jump to any noise level in one step.
What is the reverse process?
Show answer
The reverse process is the learned part: a neural network (a U-Net) that takes a noisy image and a timestep and predicts how to make it slightly less noisy. Starting from pure noise and applying this network repeatedly, step by step, gradually produces a clean image. Training teaches the network to invert each small noising step of the forward process.
What does DDPM actually train the network to predict?
Show answer
DDPM's key simplification is that the network is trained to predict the noise that was added, rather than the clean image or a complex distribution. The loss is just the mean-squared error between the true added noise and the network's predicted noise. This simple objective turned out to be far more stable and effective than earlier variational formulations.
How is DDPM different from GANs?
Show answer
GANs generate an image in a single forward pass and train two networks in a delicate adversarial game that is prone to instability and mode collapse. DDPM generates gradually over many denoising steps and trains one network with a simple regression loss, making it far more stable and diverse — at the cost of slower, multi-step sampling.
Generating pixels
Ten papers from the first latent-variable generator to video and real-time 3D. The diffusion half is strictly cumulative — each rung removes a cost the last one paid.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Paper Breakdowns
- Attention Is All You NeedThe paper that introduced the Transformer — the architecture underneath GPT, BERT, Claude, and Gemini. Self-attention, Query/Key/Value, multi-head attention, positional encoding, and the real BLEU results, explained in depth with analogies and animated visuals, not just equations.Read →
- Word2VecHow words became math. Dense word vectors learned from the company a word keeps, so king − man + woman lands near queen. Skip-gram, CBOW, the distributional hypothesis, and the origin of every embedding model powering search and RAG.Read →
- ResNetThe skip connection that made deep learning deep. Why stacking layers made networks worse, and how residual learning let them reach 150+ layers and win ImageNet — the identity shortcut every Transformer still uses inside every block.Read →
- Vision Transformer (ViT)When an image became 16×16 words. Cut a picture into patches, treat each patch as a token, and feed them to a plain Transformer — no convolutions. Patch embeddings, the class token, and why data scale lets attention beat the CNNs that ruled computer vision for a decade.Read →
- Latent DiffusionThe paper behind Stable Diffusion. Compress an image into a small latent space with a VAE, run the diffusion denoising there instead of on pixels for a tens-of-times efficiency win, and steer it with text via cross-attention. The architecture that put text-to-image generation on consumer GPUs.Read →
- GANsThe counterfeiter and the detective. Two networks locked in a game: a generator forging fakes from noise and a discriminator trying to catch them. The minimax objective that taught machines to imagine, its notorious instabilities and mode collapse, and how diffusion later overtook it.Read →