Why adding noise and learning to remove it generates data. The forward process and its reverse step, why predicting the noise is a likelihood bound, Tweedie's formula and denoising score matching, the SDE and the probability-flow ODE, why sampling needs many steps, and what guidance really does. Every step derived, on a toy where everything is exact, next to a diffusion model trained on it.
A diffusion model learns to generate data by learning to remove noise. Train a network to clean up slightly noisy data, start from pure noise, and clean it up a little at a time: what comes out looks like the data. Below is the series’ toy, a ring of eight Gaussians. Slide t to add noise; the arrows show the direction the network must learn, the score. Then press Sample to run the process backwards from pure noise:
30
What to try. Slide t up from 0. The ring blurs, shrinks towards the centre, and becomes a single Gaussian at t=1; the arrows (the score, scaled by σt) always point back towards where data are more likely. Now sample. With one step, every point lands at the centre of the ring: the best one-step guess is the average (Section 4). With the exact score, 4 steps put about 72% of the samples on a mode, 8 steps about 96%, and 30 steps 99%. Switch to the trained network: with 30 steps it puts 98% on a mode. Compare ODE and SDE: the ODE’s paths are smooth, the SDE’s jitter, and both end at the same distribution (Section 5).
This is the second post of the series on deep generative models, after the map, which introduced the score, Langevin dynamics and score matching. The toy makes this post unusual. A noised Gaussian mixture is still a Gaussian mixture, so every quantity a diffusion model tries to learn has a closed form here, and each result can be checked exactly, next to a network I trained on the same data. The post answers six questions:
Why does adding noise and learning to remove it generate data at all? (Sections 1 and 2.)
Why is “predict the noise” a likelihood objective? (Section 3.)
What is the network really learning? Noise, clean data, score and velocity are one object. (Section 4.)
How can a deterministic ODE sample the same distribution as a noisy process? (Section 5.)
Why does sampling take so many steps, even with a perfect network? (Section 6.)
What does guidance actually do? (Section 7.)
Every result has a folded proof in numbered steps. Section 8 is the trained model, and Section 9 what has happened since 2022.
Notation
Plain italic letters are scalars, bold italic lower case are vectors. Time runs from data to noise.
Symbol
Meaning
x0∼pdata
a data point; the data are at t=0
xt=αtx0+σtε, ε∼N(0,I)
the noised point at time t∈[0,1]
αt, σt
signal and noise scales; α0=1, σ0=0, and αt2+σt2=1 (variance preserving)
pt
the distribution of xt; p0=pdata
s(x,t)=∇xlogpt(x)
the score of pt
x^0, ε^
a network’s estimates of x0 and ε from xt
βk, αˉk=∏j≤k(1−βj)
the discrete chain’s step variances, and its cumulative signal
α˙t=dαt/dt
time derivatives
The discrete and continuous notations match through αt↔αˉk and σt↔1−αˉk. The toy uses αt=cos(πt/2) and σt=sin(πt/2), so t=1 is pure noise.
1. The forward process: adding noise
Ho, Jain and Abbeel (2020), following Sohl-Dickstein et al. (2015), add noise in K small steps:
q(xk∣xk−1)=N(xk∣1−βkxk−1,βkI),
shrinking the signal slightly and adding a little noise each time. Nothing here is learned. The key fact is that you never need to run the chain:
Step 1. Write one step as a sum.xk=1−βkxk−1+βkξk with ξk∼N(0,I) independent of everything before.
Step 2. Induction hypothesis. Suppose xk−1=αˉk−1x0+1−αˉk−1η with η∼N(0,I) independent of ξk. It holds for k=1 with αˉ0=1.
Step 3. Substitute.xk=1−βkαˉk−1x0+[(1−βk)(1−αˉk−1)η+βkξk]. The coefficient of x0 is αˉk.
Step 4. Add the two independent Gaussians in brackets. Their sum is Gaussian with mean zero and variance (1−βk)(1−αˉk−1)+βk=1−(1−βk)αˉk−1=1−αˉk (variances of independent terms add).
A simulation of 300 steps with the usual schedule (βk from 10−4 to 0.02) gives a residual variance of 0.6051 against the formula’s 0.6036. In continuous time the same statement is simply
xt=αtx0+σtε,ε∼N(0,I),
with any decreasing αt from 1 to (near) 0. The distribution of xt is the data distribution, shrunk by αt and blurred by Gaussian noise of variance σt2:
pt(x)=∫N(x∣αtx0,σt2I)pdata(x0)dx0.
For the toy, pdata=81∑kN(μk,s2I) with s=0.1. Each component, shrunk and blurred, is N(αtμk,(αt2s2+σt2)I) (a scaled Gaussian plus an independent Gaussian), so pt is again a mixture of eight Gaussians. At t=1, α1=0 and p1=N(0,I) exactly: all trace of the data is gone. That is the starting point for generation.
2. Reversing one step: the posterior is Gaussian
To generate, we must go backwards: from xk to xk−1. In general q(xk−1∣xk) is complicated, since it depends on the whole data distribution. But if we also knew the clean point x0, the backward step would be a simple Gaussian.
Proposition 2 (The reverse step, given the clean point)
Step 1. Bayes’ rule. Because the chain is Markov, q(xk∣xk−1,x0)=q(xk∣xk−1), so
q(xk−1∣xk,x0)∝q(xk∣xk−1)q(xk−1∣x0)
as a function of xk−1.
Step 2. Both factors as Gaussians in xk−1. Write c=1−βk. The first factor, exp(−∥xk−cxk−1∥2/(2βk)), has precision c/βk and linear coefficient cxk/βk (read off the quadratic and linear terms in xk−1). The second has precision 1/(1−αˉk−1) and linear coefficient αˉk−1x0/(1−αˉk−1).
Step 3. Precisions add (product of Gaussians in the same variable; the primer’s Lemma 4):
using c(1−αˉk−1)+βk=1−cαˉk−1=1−αˉk. Its inverse is β~k.
Step 4. The mean is the variance times the sum of the linear coefficients:
μ~k=β~k(βkcxk+1−αˉk−1αˉk−1x0),
which multiplies out to the stated coefficients.
So the whole difficulty of generation is in not knowing x0. A diffusion model estimates it from xk and plugs the estimate in: pθ(xk−1∣xk)=q(xk−1∣xk,x^0(xk)). Section 4 shows what the best estimate is. First, why this is a principled way to fit a likelihood.
It is convenient to write the mean through the noise instead of x0:
Corollary 1 (The reverse mean in terms of the noise)
If xk=αˉkx0+1−αˉkε, then μ~k=1−βk1(xk−1−αˉkβkε).
Proof
Step 1. Substitutex0=(xk−1−αˉkε)/αˉk into the mean, using αˉk=1−βkαˉk−1.
Step 2. The coefficient of xk becomes 1−αˉk1−βk(1−αˉk−1)+(1−αˉk)1−βkβk=(1−αˉk)1−βk(1−βk)(1−αˉk−1)+βk=1−βk1.
Step 3. The coefficient of ε is −(1−αˉk)1−βkβk1−αˉk=−1−αˉk1−βkβk.
3. Why “predict the noise” is a likelihood objective
The model is a Markov chain run backwards: p(xK)=N(0,I), then pθ(xk−1∣xk) for k=K,…,1. The noisy states x1:K are latent variables, and the forward chain q is a natural variational posterior for them. The ELBO of the map, Section 4, then becomes a sum of simple terms.
Theorem 1 (The diffusion ELBO (Sohl-Dickstein et al., 2015; Ho et al., 2020))
Step 4. Telescope. In the product over k=2,…,K, the ratios q(xk∣x0)/q(xk−1∣x0) cancel down to q(xK∣x0)/q(x1∣x0). With the k=1 factor q(x1∣x0),
q(x1:K∣x0)=q(xK∣x0)k=2∏Kq(xk−1∣xk,x0).
Step 5. Pair the factors. The log-ratio of Step 1 becomes logq(xK∣x0)p(xK)+∑k≥2logq(xk−1∣xk,x0)pθ(xk−1∣xk)+logpθ(x0∣x1). Taking expectations under q, each paired ratio becomes minus a KL divergence. Multiply by −1.
Each KL compares two Gaussians in xk−1. Give the model the same variance β~k and let it predict only the mean. Then:
Proposition 3 (Each term is a weighted noise-prediction error)
Parametrise the model’s mean like the corollary of Section 2, with a network ε^θ(xk,k) in place of the true noise. Then
Step 1. KL between Gaussians with equal covariance β~kI. The trace and log-determinant terms of the Gaussian KL cancel, leaving ∥μ~k−μθ∥2/(2β~k).
Step 2. The difference of means. Both are 1−βk1(xk−1−αˉkβk⋅), one with ε and one with ε^θ, so μ~k−μθ=1−βk1−αˉkβk(ε^θ−ε).
Step 3. Square and divide by 2β~k.
Training therefore samples a data point, a step k and a noise ε, forms xk, and regresses ε^θ(xk,k) on ε. Ho et al. (2020) dropped the weights λk and found that the unweighted “simple” loss gives better samples. Kingma and Gao (2023) showed that such reweighted losses are still ELBOs, of the data with Gaussian noise added as augmentation, so the simple loss remains a likelihood-based objective with a different emphasis across noise levels. The answer to question 2 is: predicting the noise is fitting a likelihood bound, term by term.
4. What the network learns: denoising is score matching
Tweedie’s formula
What is the best guess of the clean point? For squared error, the conditional mean, and that conditional mean is tied to the score of the noisy distribution.
Proposition 4 (The best guess under squared error)
Over all functions x^0(⋅), the error E∥x0−x^0(xt)∥2 is minimised by x^0(xt)=E[x0∣xt]. Likewise for ε.
Proof
Step 1. Condition on xt. For fixed xt, write m=E[x0∣xt]. Then E[∥x0−a∥2∣xt]=E[∥x0−m∥2∣xt]+∥m−a∥2, because the cross term 2(m−a)⊤E[x0−m∣xt] is zero.
Step 2. Minimise for each xt. The first term does not depend on a, so the minimiser is a=m. Averaging over xt preserves this.
Theorem 2 (Tweedie’s formula (Robbins, 1956; Efron, 2011))
Step 2. Divide by pt(x). By Bayes’ rule, N(x∣αtx0,σt2I)pdata(x0)/pt(x)=p(x0∣xt=x), so
∇logpt(x)=σt2αtE[x0∣xt=x]−x.
Step 3. Rearrange for the first formula. For the second, take conditional expectations of xt=αtx0+σtε: xt=αtE[x0∣xt]+σtE[ε∣xt], and substitute.
On the toy, the exact E[x0∣xt], computed component by component, matches (xt+σt2∇logpt)/αt to machine precision. The best denoiser is the score, rescaled. The animation shows what that means geometrically:
A fixed noisy point x_t. The best guess of the clean point is a posterior-weighted average of the eight modes (line thickness is the weight), and the score points from x_t to α_t times that guess. With much noise the guess is a blurred average; with little, it snaps to the nearest mode; from pure noise it is the mean of the data.
Two consequences matter for the rest of the series:
One denoising step returns the average. At t=1, x1 is independent of x0, so E[x0∣x1]=E[x0]: for the ring, its centre, where there are no data. A perfect denoiser applied once to noise produces the blurry mean. That is why diffusion models take many small steps, and why one-step generation (the last post of the series) needs a different idea.
The network can be trained without ever knowing the score. That is the next result.
with C independent of θ, and ∇xtlogq(xt∣x0)=−ε/σt.
Proof
Step 1. Expand both squares. Each is E∥sθ∥2−2E[sθ⊤g]+E∥g∥2, with g the respective target. The first terms are equal, and the last ones do not depend on θ.
Step 2. The cross terms are equal. By the tower property, E[sθ(xt)⊤∇logq(xt∣x0)]=E[sθ(xt)⊤E[∇logq(xt∣x0)∣xt]].
Step 3. The inner expectation is the true score.∇logq(xt∣x0)=(αtx0−xt)/σt2, whose conditional mean given xt is (αtE[x0∣xt]−xt)/σt2=∇logpt(xt) by Step 2 of Tweedie’s proof.
Step 4. The form of the target.(αtx0−xt)/σt2=−σtε/σt2=−ε/σt.
So regressing sθ(xt) onto the known −ε/σt is the same as regressing it onto the unknown true score, up to a constant. On the toy, the gap between the two objectives is 3.20 for the true score and 3.18 for a deliberately wrong model (s=−x): the same constant, up to Monte Carlo error. Multiplying by σt, this is exactly noise prediction with ε^=−σtsθ, which closes the loop with Section 3.
Four predictions, one object
Given xt and t, a prediction of any one of these determines the others:
predict
in terms of x^0 and ε^
where it is used
clean data
x^0=(xt−σtε^)/αt
denoisers, EDM
noise
ε^=(xt−αtx^0)/σt
DDPM
score
s^=−ε^/σt=(αtx^0−xt)/σt2
score SDEs
velocity
v^=α˙tx^0+σ˙tε^
flow matching (next post)
The first three rows are rearrangements of xt=αtx^0+σtε^ and Tweedie’s formula. The velocity is the time derivative of the path αtx0+σtε with the endpoints held fixed. The choice matters only for how the loss weights different noise levels: for example ∥x^0−x0∥2=(σt/αt)2∥ε^−ε∥2, so x0-prediction puts far more weight on high noise than ε-prediction does.
5. Continuous time: the SDE, Fokker–Planck, and an ODE with the same marginals
The forward process as an SDE
Let the step size go to zero. The noising becomes a stochastic differential equation dx=f(t)xdt+g(t)dW, whose meaning for small h is xt+h=(1+fh)xt+ghξ with ξ∼N(0,I).
Proposition 6 (Which SDE gives the marginals \alpha_t, \sigma_t)
The SDE with f=α˙t/αt and g2=dtdσt2−2αtα˙tσt2, started at x0, has xt∼N(αtx0,σt2I).
Proof
Step 1. The process is Gaussian. Each small step is linear in x plus independent Gaussian noise, so xt stays Gaussian given x0, with some mean mt and covariance vtI.
Step 2. The mean. Taking expectations of the small step, mt+h=(1+fh)mt, so m˙=fm. With f=α˙/α, the solution from m0=x0 is mt=αtx0, because dtd(αtx0)=αtα˙tαtx0.
Step 3. The variance. Variances of independent terms add: vt+h=(1+fh)2vt+g2h=vt+(2fvt+g2)h+O(h2), so v˙=2fv+g2.
Step 4. Check v=σ2. With the stated g2, 2fσ2+g2=2αα˙σ2+dtdσ2−2αα˙σ2=dtdσ2, and v0=0=σ02.
How densities move: the Fokker–Planck equation
An SDE moves samples; the density moves with them. In one dimension, for dx=a(x,t)dt+g(t)dW:
Theorem 3 (Fokker–Planck)
The density pt of xt satisfies ∂tpt=−∂x(apt)+21g2∂x2pt.
Proof
Step 1. Follow a test function. For a smooth φ that vanishes at infinity, look at E[φ(xt+h)] with xt+h=xt+δ and δ=ah+ghξ.
Step 2. Taylor expansion.φ(x+δ)=φ(x)+φ′(x)δ+21φ′′(x)δ2+O(δ3). Given xt, E[δ]=ah, E[δ2]=g2h+O(h2) and E[∣δ∣3]=O(h3/2).
Step 3. Divide by h and let h→0.dtdE[φ(xt)]=E[aφ′(xt)+21g2φ′′(xt)].
Step 4. Write both sides as integrals against pt. The left side is ∫φ∂tptdx. Integrating by parts once and twice on the right (boundary terms vanish), ∫aptφ′dx=−∫φ∂x(apt)dx and ∫ptφ′′dx=∫φ∂x2ptdx.
Step 5. True for every φ. So the integrands agree: ∂tpt=−∂x(apt)+21g2∂x2pt.
With g=0 this is the continuity equation∂tpt=−∂x(apt) of a deterministic flow x˙=a(x,t): mass is carried along without being created or destroyed. The same equations hold in d dimensions with ∂x replaced by the divergence and ∂x2 by the Laplacian.
A deterministic flow with the same marginals
Theorem 4 (The probability-flow ODE (Song et al., 2021))
The ODE
dtdx=f(t)x−21g(t)2∇logpt(x)
moves the density through exactly the same pt as the forward SDE.
Proof
Step 1. The ODE’s density obeys the continuity equation ∂tp=−∂x(bp) with b=fx−21g2∂xlogp (one dimension; the general case is identical with divergences).
Step 2. Simplify bp. Since p∂xlogp=∂xp, bp=fxp−21g2∂xp.
Step 3. Compare with Fokker–Planck.−∂x(bp)=−∂x(fxp)+21g2∂x2p, which is exactly the right-hand side of the Fokker–Planck equation of the forward SDE (drift a=fx).
Step 4. Same equation, same start. Both families of densities satisfy the same equation from the same p0, so they coincide.
That answers question 4. The ODE moves each point deterministically, yet the population of points has the same distribution at every time as under the noisy process. Run backwards from t=1, it maps Gaussian noise to data one-to-one: it is a normalising flow in continuous time, which is where the next post on flow matching begins.
The noisy reverse process can be derived from the ODE in one more line, using Langevin dynamics from the map, Section 6.
Proposition 7 (The reverse-time SDE (Anderson, 1982))
Running time backwards (τ=1−t), the SDE
dx=[−fx+g2∇logpt(x)]dτ+gdWτ
has the same marginals pt, read in reverse.
Proof
Step 1. Reverse the ODE. In backward time the probability-flow ODE is dx/dτ=−fx+21g2∇logpt, and it carries p1 back through pt to p0.
Step 2. Add a Langevin step at rate c=21g2. Langevin dynamics dx=c∇logpdτ+2cdW leaves the current density p unchanged: its Fokker–Planck right-hand side is −∂x(c∂xp)+c∂x2p=0 (the map, Section 6).
Step 3. Add the two motions. The Fokker–Planck right-hand side is linear in the drift and in the diffusion coefficient, so the sum of the two motions changes the density exactly as the ODE alone does.
Step 4. Collect terms. The drift is −fx+21g2∇logp+21g2∇logp=−fx+g2∇logp, and the noise is 2cdW=gdW.
So the reverse SDE is the reverse ODE plus a Langevin corrector that keeps nudging samples back towards the current distribution. That is why the noisy sampler forgives a network’s errors better than the deterministic one, which Section 8 measures.
6. Sampling, and why it takes many steps
DDIM is Euler’s method in the right coordinates
The probability-flow ODE has to be solved numerically. The DDIM update of Song, Meng and Ermon (2021),
xs=αsx^0+σsε^,s<t,
with x^0 and ε^ predicted at (xt,t), is one Euler step of it in well-chosen coordinates.
Proposition 8 (DDIM is Euler’s method for the probability-flow ODE)
With y=x/αt and λ=σt/αt, the probability-flow ODE becomes dλdy=E[ε∣xt], and one Euler step in λ is the DDIM update.
Proof
Step 1. Rewrite g2. With f=α˙/α, g2=2σσ˙−2αα˙σ2=2σ2(σσ˙−αα˙)=2σ2λλ˙, because λλ˙=σσ˙−αα˙.
Step 2. Substitute the score.∇logpt=−ε^/σ (Tweedie), so
dtdx=αα˙x+σ2λλ˙⋅σε^=αα˙x+αλ˙ε^,
using σ/λ=α.
Step 3. Change variables to y=x/α.y˙=α1(x˙−αα˙x)=λ˙ε^, so dy/dλ=ε^.
Step 4. One Euler step from t to s.ys=yt+(λs−λt)ε^, so xs=αtαsxt+(σs−αtαsσt)ε^=αsαtxt−σtε^+σsε^=αsx^0+σsε^.
The step is exact if ε^ stays constant along the path. Its error comes entirely from how much the prediction changes between steps: the curvature of the paths.
How many steps does a perfect network need?
On the toy the exact denoiser is available, so the network error is zero and only the discretisation error remains. Sampling 4000 points with DDIM:
steps
modes covered
samples on a mode
1
0 of 8
0% (all at the centre)
2
0 of 8
5%
4
8 of 8
69%
8
8 of 8
96%
16
8 of 8
99%
One step lands every sample on the mean, as Tweedie predicted. Even with a perfect network, this simple two-dimensional problem needs about ten steps; images need tens. The paths are curved: early on the best guess is the blurry centre, and only later does it commit to a mode, so the direction of travel turns.
Three ways to need fewer steps define the rest of the series:
Better solvers. Higher-order methods use the semi-linear structure of the ODE: Heun’s method in EDM (Karras et al., 2022), DPM-Solver (Lu et al., 2022). They reduce, but cannot remove, the curvature error.
Straighter paths. If the paths from noise to data were straight, one Euler step would be exact. Flow matching and rectified flow learn such paths: the next post.
Learn the jump directly. Train a network to map xt straight to the end of its ODE path: consistency models, flow maps, MeanFlow, and drifting models. The last post.
7. Guidance: what it really does
A conditional model, for a label or a text prompt y, needs the score of pt(x∣y).
Step 2. Take the gradient in x.p(y) does not depend on x, so its term vanishes.
Classifier guidance (Dhariwal and Nichol, 2021) adds a classifier’s gradient to an unconditional score, scaled up to sharpen the effect. Classifier-free guidance (Ho and Salimans, 2022) trains one network both with and without the label (dropping it at random) and combines the two scores:
s~w=(1+w)s(x∣y)−ws(x)=∇log[pt(x)pt(y∣x)1+w].
The second equality follows from the proposition: s(x∣y)−s(x)=∇logpt(y∣x), so s~w=s(x)+(1+w)∇logpt(y∣x). Guidance raises the classifier’s probability to the power 1+w, so it favours points that are very clearly of class y.
That is what it does at each noise level. What it does to the final samples is subtler. The tilted distributions pt(x)pt(y∣x)1+w at different times are not the marginals of any single diffusion, so the sampler does not end at p0(x)p0(y∣x)1+w (Bradley and Nakkiran, 2025; Chidambaram et al., 2024). On the toy it can be watched exactly. Let the class be the three upper modes, and raise w:
At w=0 the samples split evenly over the three class modes (32%, 32%, 35%). As w grows, the middle mode takes over: 68% of the samples at w=2, 83% at w=4. The samples also move outwards, to a mean radius of 2.14 at w=4 against 2.00 for the data, away from the other five modes. Guidance buys samples that are unmistakably of the class, at the price of diversity and of fidelity to the data. Autoguidance (Karras et al., 2024) guides with a weaker version of the same model instead, which its authors report improves quality without reducing variety.
8. A diffusion model, trained
The lab at the top runs either the exact score or a network I trained on the ring. It is a multilayer perceptron with three hidden layers of 128 units, taking the noisy point and sinusoidal features of t, trained for 20,000 steps on the simple noise-prediction loss of Section 3. In the browser it runs as the same weights, reproducing the PyTorch outputs to within 4×10−5. Sampling 4000 points:
steps
DDIM (ODE), exact
DDIM, network
DDPM (SDE), exact
DDPM, network
4
69%
62%
68%
68%
8
96%
89%
96%
91%
16
99%
96%
99%
97%
100
99%
98%
100%
99%
(share of samples on a mode; every run with 8 or more steps covers all 8 modes.) Two things stand out. With enough steps the trained network is close to the exact score. And the noisy sampler is more forgiving of the network’s errors (99% against 98%), as Section 5 predicted: its Langevin part keeps pulling samples back towards the current distribution. Compared with the map’s flow (75% on a mode), VAE (53%) and GAN (68%, 7 modes), the diffusion model covers every mode and lands on them. It pays for this with tens of network evaluations per sample, against one for the others: the trilemma of the previous post, in numbers.
9. What is new, 2022 to 2026
year
work
what it changes
2022
Rombach et al. (latent diffusion)
diffuse in the latent space of an autoencoder, which makes high-resolution images affordable
2022
Karras et al. (EDM)
a clean design space: noise-level parametrisation, preconditioning, Heun sampling
2022
Lu et al. (DPM-Solver)
fast high-order ODE solvers exploiting the semi-linear structure
2023
Peebles and Xie (DiT)
transformers replace U-Nets and scale predictably
2023
Kingma and Gao
weighted diffusion losses are ELBOs with noise augmentation
2024
Karras et al. (EDM2)
better training dynamics and post-hoc averaging of weights
2024
Karras et al. (autoguidance)
guide with a weaker version of the same model instead of the unconditional one
2024
Esser et al. (Stable Diffusion 3)
rectified-flow transformers at scale: flow matching, the next post
2024–25
Chidambaram et al.; Bradley and Nakkiran
what guidance really samples, and why it is not the tilted distribution
2025
Price et al. (GenCast)
a diffusion model for medium-range weather ensembles, better than ECMWF’s ensemble on 97.2% of 1320 targets
2025
Nie et al. (LLaDA)
masked diffusion for language at 8B parameters, competitive with autoregressive models
Questions
Question 1
Why can a diffusion model not generate in one step simply by applying its denoiser to pure noise?
Answer
The best one-step guess under squared error is E[x0∣x1]. At t=1 the noisy point carries no information about the data, so this is E[x0], the mean of the data. For the ring that is its centre; for images it is a grey blur. Many small steps let the guess commit gradually, as the animation in Section 4 shows.
Question 2
The ODE sampler is deterministic. Where does the diversity of its samples come from?
Answer
Entirely from the starting noise x1∼N(0,I). The ODE is a one-to-one map from noise to data, so different starting points end at different samples, distributed as p0 by the probability-flow theorem.
Question 3
With x0-prediction instead of ε-prediction and the same network, why would the samples change, if the two are equivalent?
Answer
They are equivalent at the optimum, but the losses weight noise levels differently: ∥x^0−x0∥2=(σt/αt)2∥ε^−ε∥2. A network of finite capacity spends it where the loss puts weight, so the two parametrisations make different errors at different noise levels, which the sampler then accumulates.
Question 4
In the guidance figure, why does the middle of the three class modes win as w grows?
Answer
Guidance multiplies the density by pt(y∣x)1+w at every noise level. At high noise, the classifier is most confident at points whose nearest modes are all in the class, which is the region around the middle mode, far from the other five. Those regions are amplified first, and the sampler commits to them early. The end result is less diverse than p(x∣y) and is pushed away from the other classes, even off the data.
Question 5
The reverse SDE adds noise while it removes noise. Why does that help?
Answer
Section 5 decomposed it into the reverse probability-flow ODE plus a Langevin corrector at rate 21g2. The corrector leaves the right distribution unchanged but pulls a wrong one towards it, so errors made by an imperfect network or a coarse step are partly undone instead of being carried along. The trained model shows it: 99% of samples on a mode with the SDE, 98% with the ODE.
References
J. Sohl-Dickstein, E. Weiss, N. Maheswaranathan, S. Ganguli. Deep unsupervised learning using nonequilibrium thermodynamics. ICML, 2015.
J. Ho, A. Jain, P. Abbeel. Denoising diffusion probabilistic models. NeurIPS, 2020. arXiv:2006.11239
Y. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon, B. Poole. Score-based generative modeling through stochastic differential equations. ICLR, 2021. arXiv:2011.13456
J. Song, C. Meng, S. Ermon. Denoising diffusion implicit models. ICLR, 2021. arXiv:2010.02502
P. Vincent. A connection between score matching and denoising autoencoders. Neural Computation, 2011.
H. Robbins. An empirical Bayes approach to statistics. Berkeley Symposium, 1956.
B. Efron. Tweedie’s formula and selection bias. JASA, 2011.
B. D. O. Anderson. Reverse-time diffusion equation models. Stochastic Processes and their Applications, 1982.
D. P. Kingma, R. Gao. Understanding diffusion objectives as the ELBO with simple data augmentation. NeurIPS, 2023.
T. Karras, M. Aittala, T. Aila, S. Laine. Elucidating the design space of diffusion-based generative models. NeurIPS, 2022. arXiv:2206.00364
C. Lu, Y. Zhou, F. Bao, J. Chen, C. Li, J. Zhu. DPM-Solver: a fast ODE solver for diffusion probabilistic model sampling in around 10 steps. NeurIPS, 2022.
P. Dhariwal, A. Nichol. Diffusion models beat GANs on image synthesis. NeurIPS, 2021.
J. Ho, T. Salimans. Classifier-free diffusion guidance. 2022. arXiv:2207.12598
M. Chidambaram, K. Gatmiry, S. Chen, H. Lee, J. Lu. What does guidance do? A fine-grained analysis in a simple setting. 2024. arXiv:2409.13074
A. Bradley, P. Nakkiran. Classifier-free guidance is a predictor-corrector. TMLR, 2025. arXiv:2408.09000
R. Rombach, A. Blattmann, D. Lorenz, P. Esser, B. Ommer. High-resolution image synthesis with latent diffusion models. CVPR, 2022.
W. Peebles, S. Xie. Scalable diffusion models with transformers. ICCV, 2023.
T. Karras, M. Aittala, J. Lehtinen, J. Hellsten, T. Aila, S. Laine. Analyzing and improving the training dynamics of diffusion models. CVPR, 2024.
T. Karras, M. Aittala, T. Kynkäänniemi, J. Lehtinen, T. Aila, S. Laine. Guiding a diffusion model with a bad version of itself. NeurIPS, 2024.
P. Esser et al. Scaling rectified flow transformers for high-resolution image synthesis. ICML, 2024.
I. Price et al. Probabilistic weather forecasting with machine learning. Nature, 2025.
S. Nie et al. Large language diffusion models. NeurIPS, 2025. arXiv:2502.09992