The last chapter's reverse process only ever moved one adjacent timestep at a time: , over and over, a full Markov chain's worth of model calls to generate a single sample. What if the model's noise prediction let you jump straight from to any earlier timestep — skipping most of the chain — and still land in exactly the same place?
Toggle between Deterministic (DDIM) and Stochastic (DDPM-style), then step through the same 4-step schedule with the same starting noise and the same (perfect) predictor. The deterministic path retraces a single fixed trajectory back to every time. The stochastic path, built from the exact same ingredients plus one injected random draw per step, wanders off that trajectory and never quite gets back.
Every reverse step first estimates directly from the current , then rebuilds from that estimate using the forward process's own closed form:
- — the cumulative signal-retained fraction at timestep : how much of the original signal survives, all the way from .
- — the model's predicted noise direction at , assumed here to be exactly correct.
- — the estimate of the clean data, computed directly from and , regardless of which path reached .
- — the noise-injection knob. is DDIM: fully deterministic. replaces the predicted direction with an injected draw , a DDPM-style stochastic step.
- — the next timestep in the schedule — any earlier timestep, not necessarily .
- x0 is estimated the same way no matter how x_t was reached
Because depends only on — never on the sequence of steps that produced — a perfect predictor recovers the exact same whether is one step back or ten.
- That's what makes skipping timesteps free
Since can be any earlier timestep in the formula above, a schedule can skip straight from to to , using the model only twice instead of four times, and land on the identical trajectory a full step-by-step schedule would trace.
- Injected noise breaks that guarantee
Setting swaps part of the deterministic direction for a random draw . Once is knocked off the clean marginal it was estimated from, the next step's estimate inherits that error — which is exactly why a stochastic path drifts even from identical starting noise and an identical predictor.
Drag from up to . At (pure DDIM) the reconstruction is exact. As rises, more of each step's direction comes from the fixed random draws instead of the predictor, and the final reconstructed drifts further from the true value — even though the predictor itself never changes.
With , always correct, and for :
- Full schedule: every step, t = 4 -> 3 -> 2 -> 1 -> 0
Each hop estimates (since ), then rebuilds :
- : ;
- : ;
- : ;
- : ;
Every hop's lands exactly on — the perfect predictor recovers the true regardless of which timestep it's called from.
- Skip schedule: t = 4 -> 2 -> 0, two model calls instead of four
Starting from the identical :
- : (same computation as the full schedule's first hop, since it depends only on ); — the exact same value the full schedule passed through
- : ; exactly
- Single jump: t = 4 -> 0
(the same estimate every schedule above computed from ); exactly. With a perfect predictor, the number of steps only changes the compute cost — never the destination.
- Now inject noise: eta = 1, fixed draws
Running the same full schedule with (direction instead of ) and fixed draws :
- : (unchanged, from ); direction ;
- : — already off the true , since was knocked off the clean marginal; direction ;
- : ; direction ;
- : ; direction ;
Final — an error of , because each step's injected noise knocks the next step's estimate off the clean marginal it assumes.
Bring η down until the reconstructed x0 is within 0.1 of the true value, 5.
DDIM doesn't change what the model learns — it's trained exactly like the DDPM from the last chapter, to predict noise. What changes is sampling: because the reverse update estimates directly and is path-independent, the same trained model can generate in 50 steps instead of 1000, trading a small amount of quality for a large amount of speed, purely by choosing a different schedule at inference time. The next chapter asks what happens when the U-Net doing that noise prediction is replaced with a plain transformer.