The finale of the DDIM series. We've removed the Markov shackle (Part 2) and proven the loss is equivalent to DDPM's (Part 3). But de-Markovianizing is only the surface. To understand why DDIM actually accelerates, we go to the math: with , DDIM's reverse iteration is — remarkably — an ordinary differential equation (ODE).
Which of the three got upgraded?
Back to the experienced-driver framework. What exactly did DDIM improve about DDPM — the route, the car, or the driver?
- The route (forward noising) — unchanged. We even forbade changing the marginal (Part 3). So DDIM did not improve DDPM via the noising process / distribution.
- The driver (optimization target) — unchanged. The target is still predicting noise , and Part 3 proved the loss is equivalent. So DDIM did not touch the optimization objective either.
- The car (reverse denoising iteration) — by elimination, this is the one. DDIM re-tunes the car: set and start from Formula (16).
The only remaining lever is the reverse iteration, and that's exactly where DDIM operates.
Starting from Formula (16) with
Recall the DDIM sampler from Part 2:
Set — the random-noise term vanishes (this is still Eq 16, just with the stochastic term gone):
Our goal is to massage this iteration into an ODE — to prove the SDE became an ODE. (The full rearrangement below is Eq 22 in the lecture.)
Rearranging into a difference
Divide through and regroup so that and terms sit on opposite sides. Concretely, divide by and move the term over. The result comes out strikingly tidy:
Every term now has matching / structure on both sides.
Making time continuous
A differential equation needs continuous time. Replace the unit step "" with a general step "" (the time increment shrinks from to something small):
A change of variables (the trick)
Define two new quantities to clean this up:
⚠️ Note: this is a reparameterization variable (a function of ), not the sampling-noise we set to zero. Same letter, different role.
The equation becomes:
Taking the limit → an ODE
Compare to the canonical ODE form . Without taking the limit, the differential is just . By the same logic, the right-hand difference is a , which in the limit becomes :
- Left side: .
- Right side: .
So instead of dividing by and taking the limit (giving ), we divide by — the "infinitesimal element" is , not . Taking the limit:
(Here and , which is why the network input rewrites as .)
This is manifestly an ODE — no random/stochastic term, just a deterministic differential.
This is the deep reason DDIM accelerates. The reverse denoising formula is an ODE, and ODEs can be solved with large steps. The "car got better" because it became an ODE-car.
The big picture: probability-flow ODE
So DDIM's reverse iteration, in continuous form, is — surprisingly — an ordinary differential equation. This is exactly the probability-flow ODE from Song's consistency-models line of work:
Setting the perturbation (diffusion) coefficient of an SDE to zero converts the SDE into a probability-flow ODE. That's the same move DDIM makes (), and the same engine behind ODE-based step-skipping.
Why ODEs are the better vehicle for fast sampling:
- No perturbation term ⇒ the numerical solution is simpler.
- Faster to solve than an SDE.
- Larger step sizes are possible — i.e. you can skip more steps.
This is the through-line connecting DDIM to flow matching / rectified flow, which push step-skipping to the extreme — all of them ODE-based. (The rare exceptions, like Schrödinger-bridge methods, skip steps with SDEs via much more complex machinery; but as a rule, if you want to skip steps, build on an ODE.) A practical takeaway for designing fast samplers:
Base the modeling on an ODE, not naively on an SDE. ODE/flow models are currently the better solution: kill the SDE's stochasticity → probability-flow ODE → simpler solver, bigger steps, faster sampling.
Series wrap-up
Across four parts, DDIM's full story:
- Core idea & DDPM recap — one letter ("Implicit"); slow because of the Markov shackle; the free-loading constraint.
- Removing Markov & the sampler — posit the reverse distribution, solve by undetermined coefficients, get the step-skipping sampler (Eq 16), and the meaning of Implicit ().
- Loss-equivalence proof — ; DDIM changes the forward joint, not the reverse model, so a pretrained DDPM model is free-loadable.
- This part — with , the reverse iteration is an ODE (a probability-flow ODE); that's the real source of acceleration.
The one-line summary: DDIM keeps DDPM's route and driver, and upgrades only the car — turning the reverse-time SDE into a deterministic ODE, which is what makes large-step, fast sampling possible while free-loading the very same DDPM-trained model.
Notes taken from a video tutorial on DDIM (Part 4 of the series).
References
- Song, J., Meng, C., & Ermon, S. (2021). Denoising Diffusion Implicit Models. ICLR 2021. arXiv:2010.02502
- Ho, J., Jain, A., & Abbeel, P. (2020). Denoising Diffusion Probabilistic Models. NeurIPS 2020. arXiv:2006.11239
- Song, Y., Sohl-Dickstein, J., Kingma, D. P., Kumar, A., Ermon, S., & Poole, B. (2021). Score-Based Generative Modeling through Stochastic Differential Equations. ICLR 2021. arXiv:2011.13456