In one line: Reparameterising the diffusion ELBO as noise prediction (L_simple, epsilon-MSE) gave diffusion models a state-of-the-art FID on unconditional CIFAR-10 (3.17) and LSUN 256x256 samples on par with ProgressiveGAN, though not competitive log-likelihoods, and founded the modern diffusion era.
How far to trust it: Believe the recipe: it was reproduced independently within a year (FID 3.29 against 3.17) and every diffusion model since descends from it. Read the 3.17 itself as one training run whose checkpoint was chosen by the same FID, against a GAN baseline that later beat it, and take the paper at its word that its likelihoods are not competitive. The evidence, point by point.
The idea in one sentence: destroy data with a fixed chain of small Gaussian noise steps, and train one network to predict the noise that was added at a random step with a plain squared error; run backwards from pure noise, 1,000 such denoising steps generate images, and this parameterisation, not a new model, is what took diffusion from a likelihood curiosity to FID 3.17 on CIFAR10.
Two chains over the same points: a fixed one that adds noise, a learned one that removes it. Fig. 1 is the paper's Figure 2 rebuilt on this page's 2-D Swiss roll as two stacks of plates along t: the data in front, pure noise at the back. Drag it to turn it.
Forward plates: exact arithmetic, one seeded noise draw. Reverse plates: the ε-predicting toy model trained with Lsimple (seed 42; the JavaScript is checked against PyTorch, see the Sample tab), the same chain the animation in Idea replays.
You need: the evidence lower bound and why a KL between two Gaussians has a closed form (Variational inference and generative models). New terms: βt (the noise variance added at step t); ᾱt (the share of the signal's variance left after t steps); ε (the Gaussian noise drawn for one example); εθ (the network's guess of it); μ̃t (the mean of the true reverse step given x0); Lsimple (the unweighted noise MSE); FID (Fréchet Inception Distance, lower is better; how it is computed and where it fails is on Evaluating generative models).
Diffusion probabilistic models (Sohl-Dickstein et al. 2015) were an elegant latent-variable model, a Markov chain trained by variational inference to turn noise into data, "straightforward to define and efficient to train", but "there has been no demonstration that they are capable of generating high quality samples" (§1). In Table 1 the original has only a likelihood bound (≤ 5.40 bits per dimension on CIFAR10) and no sample score (Table 1).
The field was split. GANs had the best samples but no likelihood, and are fragile to train (with limited data, training "typically leads to discriminator overfitting, causing training to diverge", Karras et al. 2020). Autoregressive models and flows had likelihoods but weaker samples: Gated PixelCNN has 3.03 bits per dimension and FID 65.93; the Sparse Transformer's 2.80 bits, the table's best, comes with no FID (Table 1).
The question: can a diffusion model, trained with plain variational inference, actually generate high-quality images, and what parameterisation makes that work?
Forward: each point keeps one fixed noise draw ε, so xt = √ᾱt x0 + √(1 − ᾱt) ε traces its path. Reverse: Algorithm 2 with σt² = βt, every one of the 1,000 steps computed by the toy network (seed 42; the JavaScript is checked against PyTorch, see the Sample tab). "On the roll" is the share of points within 0.04 of the noiseless curve; real data from the same distribution scores . It plays once when scrolled into view and stops off screen; any control stops it.
Two Markov chains over T steps. The forward chain is fixed: it adds a little Gaussian noise at each step until the data is destroyed. The reverse chain is learned: it starts from noise and removes it step by step. When each forward step is small, its true reversal is close to Gaussian, so the learned steps can be Gaussians whose means the network supplies (§1, §2).
The contribution is how to parameterise that mean: the network predicts the noise that was added, and the loss drops the bound's per-step weights. That gave the best samples, and shows the model is denoising score matching over many noise levels, sampled like annealed Langevin dynamics, an equivalence the authors count "one of our primary contributions" (§1).
The animation runs one 2-D Swiss roll through both chains: the forward chain is exact arithmetic (Eq. 4); the reverse chains are toy models trained for this page (the paper's recipe, and a variant Table 2 reports as failing), sampled live from the same noise. The three buttons above it switch chains; each has its own steps:
The forward or diffusion process is a fixed Markov chain that adds Gaussian noise under a variance schedule β1, …, βT:
With αt = 1 − βt and ᾱt = ∏s≤t αs, the chain collapses to a closed form, so any timestep can be reached in one jump:
Training is therefore cheap: pick a random t and noise x0 in one shot (§2). The paper fixes T = 1,000 (matching earlier work's number of evaluations) and βt linear from 10−4 to 0.02: small against data in [−1, 1], so reverse steps stay nearly Gaussian, while ᾱT ≈ 0, so xT ≈ 𝒩(0, I) (§4). The βt could be learned; fixing them makes q parameter-free and LT a constant (§3.1). Why the linear schedule wastes steps and what replaced it (cosine, SNR-based schedules) is on Diffusion from zero.
Try: drag t. The first chart is the schedule (signal √ᾱt and noise √(1 − ᾱt)); the second is q(xt | x0) for 600 roll points. Halfway, at t = 500, only √ᾱ = of the signal is left.
The defaults reproduce the paper's "LT ≈ 10−5 bits per dimension" (§4) by recomputation from the schedule: ᾱT = , so KL(q(xT | x0) ‖ 𝒩(0, I)) per dimension is bits for a pixel at ±1 and bits for an illustrative mean square x0² = 0.25 (the paper does not give its pixels' mean square). The toy data's own LT is bits per dimension.
The reverse process is a Markov chain with learned Gaussian transitions, starting at p(xT) = 𝒩(0, I):
Training minimises the usual variational bound on −log pθ(x0) (Eq. 3), rewritten for lower variance as a sum of per-step terms:
Each KL compares the model's step with the forward process posterior, which is Gaussian and known in closed form once x0 is given:
The variances are fixed. Σθ = σt²I with σt² = βt (optimal for x0 ~ 𝒩(0, I)) or β̃t (optimal for one fixed x0), the two extremes of reverse-process entropy; "both … had similar results" (§3.2). Learning a diagonal Σθ was unstable (Table 2). On the toy, β̃ gives slightly tighter samples but a worse bound ().
With fixed variances, each term of the bound is a weighted squared distance between means, plus a constant C that does not depend on θ:
Substituting Eq. 4 into Eq. 7, the target is (1/√αt)(xt − (βt/√(1 − ᾱt)) ε) (Eq. 10); xt is an input, so only ε is unknown, and a network εθ predicts it:
Why this is score matching. From Eq. 4, ∇ log q(xt | x0) = −ε / √(1 − ᾱt) (one line, not printed in the paper), so εθ is a scaled score estimate. Eq. 12 "resembles denoising score matching over multiple noise scales", the objective of NCSN, and sampling with Eq. 11,
"resembles Langevin dynamics with εθ as a learned gradient of the data density". Since Eq. 12 is one term of the bound for this sampler, denoising score matching here is variational inference on a sampling chain (§3.2). It is "just another parameterization", hence Table 2's test; predicting x0 instead gave worse samples early on. The toy's learned score:
The ε-network is a score model: −εθ(xt, t) / √(1 − ᾱt) estimates ∇ log q(xt) (§3.2, and the one-line derivation above). Fig. 2 draws q(xt) as a surface over the data plane and the network's arrows on it:
Surface: exact for those 600 points, on a 57 × 57 grid over [−1.6, 1.6]²; points outside it are not drawn. Arrows and dots: the ε-predicting toy model trained with Lsimple; arrow length is proportional to |εθ|, capped at 2.5 (far from the data at small t it is much larger).
The widget draws the same field for any of the four toy models: arrows show its direction on a grid; points are noised data q(xt | x0) at the same t.
Try: at large t every arrow points to the centre (the data's mean); lower t and the field bends into the spiral. Switch to a μ̃ model and the field is read from its mean by inverting Eq. 11.
Arrow length is proportional to the score's size times √(1 − ᾱt) (that is, to |εθ|), so lengths are comparable across t.
The bound of Eqs. 12 and 13 trains fine, but dropping the weight of Eq. 12 was "beneficial to sample quality (and simpler to implement)":
It is a weighted bound that emphasises different aspects of reconstruction. Which targets (ε, x0, v) and weightings came after, and why, is on Diffusion from zero.
Large t. With the paper's schedule the true bound's weight is largest at the smallest t and falls by a factor of about by t = 500; Lsimple weights every t the same, so relative to the bound it "down-weight[s] loss terms corresponding to small t", which "train the network to denoise data with very small amounts of noise", and lets the network "focus on more difficult denoising tasks at larger t" (§3.4). The chart shows each objective's share of its total weight at each t, from the weight of Eq. 12.
Share at t: wt / Σw, wt = βt² / (2σt² αt (1 − ᾱt)) for t ≥ 2 (Eq. 12); Lsimple: 1/1,000 each. Only the shape matters.
The ablation below shows this reweighting is exactly what sample quality needs (§3.4, Table 2).
Training is one forward pass and one MSE per example; sampling is the expensive part, 1,000 sequential network evaluations per sample (Algorithms 1 and 2).
All four tables, sortable and with every derived number recomputed, are in the tables tab.
Table 2 holds the network fixed and changes two things: what it predicts (μ̃ or ε) and what it is trained on (the true bound with learned or fixed variances, or a plain unweighted MSE) (Table 2).
| Predicts | Trained on | IS | FID |
|---|---|---|---|
| μ̃ (baseline) | L, learned diagonal Σ | 7.28 ± 0.10 | 23.69 |
| μ̃ | L, fixed isotropic Σ | 8.06 ± 0.09 | 13.22 |
| μ̃ | ‖μ̃ − μ̃θ‖² | – | – |
| ε (ours) | L, learned diagonal Σ | – | – |
| ε | L, fixed isotropic Σ | 7.67 ± 0.13 | 13.51 |
| ε | ‖ε̃ − εθ‖² (Lsimple) | 9.46 ± 0.11 | 3.17 |
Blank entries "were unstable to train and generated poor samples with out-of-range scores" (Table 2). Lower FID is better; higher IS is better.
So (§4.2): μ̃ works only on the true bound; learned variances are unstable; ε matches μ̃ on the bound (13.51 against 13.22) and is far better with Lsimple (3.17), the recipe behind the headline.
It fails: that row of Table 2 is blank, unstable with poor samples. The toy models trained for this page show the same thing on the Swiss roll. Here are 300 samples from each, from the same starting noise, computed now in your browser:
On 2,000 samples in Python, on the roll: . Not reproduced: the paper's μ̃ + true bound works (FID 13.22); ours fails too (). Our guess, not the paper's: a small MLP predicting μ̃ must output almost exactly its input plus a β-sized correction, while ε is order one. All four variants: Sample tab.
The train-test gap is at most 0.03 bits per dimension, so no overfitting; yet codelengths are poor while samples are excellent: "diffusion models have an inductive bias that makes them excellent lossy compressors" (§4.3). With L1 + … + LT as rate and L0 as distortion, the best-sample model has rate 1.78 and distortion 1.97 bits per dimension (RMSE 0.95 of 255); 1.78 + 1.97 = 3.75, its whole codelength, so "more than half … describes imperceptible distortions" (, recomputed).
A progressive code. Algorithms 3 and 4 send xT, then each xt, then x0, each in about KL(q ‖ p) bits (minimal random coding): total, exactly Eq. 5. The receiver can estimate at any time
Under 10%: of the final 1.776 bits per dimension, while the distortion has already fallen from 67.6 to 12.0 (on 0 to 255). Most of the bits go to the last 100 steps, the fine detail. Figure 5, rebuilt from the printed values of Table 4 (the toy curve is this page's model, measured the same way):
CIFAR10 points are the ten rows of Table 4 (reverse time T − t + 1 = 100, 200, …, 1,000), joined by straight lines; Figure 5's full curves exist only as images, so they are not traced. The toy's rate and distortion are computed from its bound terms and from Eq. 15 on 2,000 held-out points every 10 steps (rd.py); its own final values are .
Progressive generation. Running Algorithm 2 and showing x̂0 along the way, large-scale features appear first and details last (Figure 6). Freezing xt and sampling x0 ~ pθ(x0 | xt) several times, CelebA-HQ samples share high-level attributes (gender, hair colour, eyewear, pose, expression) when the chain is split late and differ greatly when split at x1000, "hints of conceptual compression" (Figure 7, Appendix D). The Sample tab can show x̂0 instead of xt while it samples.
A generalised autoregressive model. The bound can be rewritten as Eq. 16 (§4.3). Set T to the data dimension, let each forward step mask out one more coordinate, and the reverse process must copy the unmasked coordinates and predict the next one: training it is training an autoregressive model. Gaussian diffusion is then "a kind of autoregressive model with a generalized bit ordering that cannot be expressed by reordering data coordinates", and its length is free: T = 1,000 is less than the 3,072 or 196,608 dimensions of the 32 × 32 × 3 and 256 × 256 × 3 images, and can be shorter for speed or longer for expressiveness (§4.3).
Interpolation. Noise two images to xt and x′t with the same noise, mix them linearly, and decode with the reverse process: the reverse process removes the artifacts of mixing, giving plausible interpolations of pose, skin tone, hairstyle, expression and background (but not eyewear) at t = 500, coarser and more varied ones at larger t, and novel samples at t = 1,000 (§4.4, Figure 8).
How it differs from NCSN (Appendix C): a U-Net with self-attention rather than a RefineNet with dilated convolutions; every layer conditioned on t; the forward process scales the data down so the variance does not grow; the forward process destroys the signal (prior and aggregate posterior of xT match) with very small βt, which prevents distribution shift when sampling; and the sampler's coefficients come from βt and are trained by variational inference, where NCSN's are set by hand after training.
What holds up, and why.
What to read with care.
Verdict: believe the recipe and the ablation's direction completely; they were reproduced and became the field's default. Read the 3.17 as one well-tuned run, selected on its own metric, that briefly led an unconditional benchmark by a margin a stronger GAN run later reversed; take the likelihoods as the paper does: honest, and not competitive.
It turned a dormant 2015 idea into the dominant generative paradigm by finding the parameterisation that works: a fixed forward process, ε-prediction, an unweighted MSE. Nearly everything since descends from it:
What changed and what survived, step by step: Then and now.
The live ingredient: four small diffusion models, one per row of Table 2 that differs only in what the network predicts and what it is trained on, trained for this page and running here in plain JavaScript: every one of the 1,000 reverse steps of Algorithm 2 is a real network evaluation in your browser.
Pick a variant and press Sample. The chain runs only when you ask: the outcome of a run is the point, so the card has no step list and does not play by itself. Switch to x̂0 to watch the network's running guess of the final sample (Eq. 15), and drag the slider afterwards to look back at any stored step.
Dashed square: the data range [−1, 1]²; the view zooms out with the noise. "On the roll": within 0.04 of the noiseless curve (real data: ). Sampling runs in short slices so the page stays responsive; the slider shows any stored step (every 10).
Bound on 2,000 held-out points with every t (bits per dimension, lower is better), and samples measured on 2,000 draws in PyTorch: precision is the share of samples within 0.04 of some test point, recall the share of test points within 0.04 of some sample (a simple form of Kynkäänniemi et al. 2019).
All four tables, transcribed from the arXiv HTML (v2) with the printed precision kept (tables.json), and every derived number recomputed (recompute.py). Click a column heading to sort.
IS: Inception Score, higher is better. FID: Fréchet Inception Distance against the training set, lower is better (against the test set the Lsimple model gets 5.24, §4.1). NLL in bits per dimension, test (train), lower is better; "≤" marks a variational bound. Bold as printed. Empty cells are empty in the paper. Baseline numbers are as the paper quotes them from each model's own paper.
"–": "unstable to train and generated poor samples with out-of-range scores". The toy columns are this page's models on the 2-D Swiss roll (Sample tab): learned-variance rows were not trained. The toy reproduces the order of the two extreme rows (ε + Lsimple best, μ̃ + MSE failing) independently; it does not reproduce μ̃ + true bound working.
Lower is better; the best value in each column is outlined. "∗": "reported by StyleGAN2 as baselines"; other scores are "reported by their respective authors" (Extra information). "-" means not reported. "Ours (Lsimple, large)" is the roughly 256M-parameter Bedroom model (Appendix B).
Derived columns: share of the final rate received so far, and distortion as a share of its value after the first 100 reverse steps. The defaults reproduce §4.3's "rate of 1.78 bits/dim and a distortion of … 0.95" independently (from Table 4's last row) and its "1.97 bits/dim" only by construction (1.97 is not in Table 4; 3.75 − 1.78 = 1.97). Figure 5's continuous curves are images, so only the ten printed points are drawn.
DDPM's recipe as a card, changed paper by paper from 2020 to 2024, in seven stretches. Highlighted lines are what the papers of that stretch changed; everything else is carried over. It plays once when scrolled into view; any control stops it. Each change is quoted or paraphrased from the paper's own abstract or tables (inputs/later_abstracts.txt, inputs/later_extracts.txt).
The forward process as Gaussian noise added in closed form, training by drawing a random noise level and regressing a noise-like target with a plain MSE, and the idea of generation as many small denoising steps (shortened to a few, or one, by later samplers and distillation). What did not: pixel space and the U-Net in the largest systems (latent space and Transformers in Stable Diffusion 3 and Sora), the linear schedule and 1,000 sampling steps, fixed variances, and unconditional generation as the goal.
FID values across steps are on different datasets and resolutions and are not comparable with each other; each is the paper's own headline.
Every link opens in a new tab. Reading time of the resources below: 5h 50m.
NeurIPS 2020, the paper itself; the HTML version has the anchors this page links to. abstract page, PDF.
(1h)
the authors' TensorFlow code (repo, about 15 minutes for the README and entry path); GitHub shows no licence file.
(15 min)
Lilian Weng: the canonical walkthrough of the full derivation, from ELBO to L_simple, plus DDIM and guidance follow-ups.
(1h)
Calvin Luo (tutorial paper, arXiv 2208.11970): derives VAE, hierarchical VAE, DDPM and the score-based view as one framework; best for making the three equivalent parameterisations (x_0, epsilon, score) click.
(1h 30m)
Hugging Face: a line-by-line PyTorch implementation of this exact paper, including the U-Net.
(1h)
Yang Song (blog): the score-matching side of the story from the NCSN author; explains why DDPM's objective is denoising score matching in disguise.
(45 min)
Polo Club, Georgia Tech: an interactive walk through Stable Diffusion's denoising loop on real prompts: the latent-space descendant of this paper, step by step.
(20 min)
2021-12: runs this exact DDPM machinery in a compressed VAE latent space, making high-resolution text-to-image tractable.
2021-02: supplies the text conditioning that later diffusion systems bolt onto the DDPM backbone (DALL-E 2 samples from CLIP latents).
2020-10: the DiT line replaces DDPM's U-Net with this Transformer architecture, on latent patches.
2017: the sinusoidal position embedding DDPM uses to tell its network the timestep t.
2026: diffusion applied to text generation, where the recipe's denoise-in-parallel idea meets language models.
diffusion and flow models in context.
the ELBO, KL divergence between Gaussians and score matching that the derivation rests on.
This page is one row of the Papers database; its properties (Paper, Takeaway, Topics, Year) live there.