TL;DR
Diffusion models generate images by running a learned denoising chain for many steps, and DDPM needed 1000 of them. DDIM shows that the same trained network can be sampled along a different, deterministic path, and that the path can skip most steps. The result is samples of close to full quality in 20 to 100 steps, a 10 to 50 times speed-up, and no change to training.
Where you'll see it: in the fast samplers used by image generators, and in the idea that a real image can be encoded to a noise vector and decoded again, which the paper uses for interpolation.
The problem
DDPM, from Ho and colleagues in 2020, produced image quality that rivalled GANs. Its cost was sampling. Generating one image meant running the network once for each of the 1000 steps of the chain, one after another, so a single batch took far longer than a GAN forward pass. That made diffusion models impractical for any task with a latency budget.
Two things were fixed in the design of DDPM. The forward noising chain was Markovian, so each step depended only on the step before. The reverse chain was therefore forced to match it step by step. Speeding up sampling by just taking fewer steps of the stochastic DDPM sampler gave poor images, because each big step adds randomness the model was not trained to correct. The question was whether the training could be kept and the sampler changed.
Key idea
The training objective of DDPM depends only on the marginal distributions , the noisy version of the data at each noise level. It does not depend on how the steps link together. Many different chains share the same marginals. The paper builds a family of non-Markovian forward chains, indexed by a vector , that all have those marginals. Each one leads to a different reverse sampler. Because the training objective is the same for all of them, one trained network works for every sampler in the family.
Among these samplers, one choice of makes the reverse path deterministic. The paper calls this the denoising diffusion implicit model, DDIM. Its sampler is the one described in the DDIM Sampler lesson. The picture to hold is simple: the network says where the clean image probably is, and the sampler moves the current point toward that guess along a fixed curve. Because the curve is fixed, the sampler can use a coarse set of steps and still follow it.
The method
Forward chains with the same marginals
The DDPM forward chain satisfies , where is the cumulative product of the per-step retention factors. The paper keeps this marginal but changes the joint distribution over the chain. For a parameter vector , the reverse conditional of the new chain is
The mean is chosen so that the marginals still match. The forward step from to is then implied by Bayes rule, and it is no longer Markovian. A large makes the chain noisy; a near zero makes almost determined by and .
The objective is the same
The variational objective for each differs from the DDPM objective only by terms that do not depend on the network, and the paper shows that equals a weighted noise-prediction loss for some positive weights (Theorem 1). The simplified unweighted loss , which DDPM used, is therefore a valid surrogate for every . The network is trained once, with the familiar mean squared error on noise.
The generative update
Given a trained noise predictor , the paper writes the predicted clean image as , and the sampling update as
with . Choosing removes the last term. When takes the value that makes the forward chain Markovian, the update is exactly the DDPM sampler, so DDPM is one member of the family.
Skipping steps
The paper also allows the forward chain to be defined on a subsequence of the training steps. The same marginal argument applies to the subsequence, so the same network can be used, and sampling only visits the chosen steps. Training still uses all steps.
The ODE view
With , the update is a discretised ODE. Rewriting it in the variables and gives , which is one Euler step for an Ordinary Differential Equation. The paper's Section 4.3 (Relevance to Neural ODEs) states this and notes that the same ODE can be run in reverse to encode an image into a latent . Proposition 1 shows that, with the optimal network, this ODE is equivalent to the probability flow ODE of the score-based SDE work of Song and colleagues. The two Euler discretisations differ, though: the DDIM steps are taken in , the probability flow steps in , so the samplers are not identical at few steps.
Results
The experiments use one trained model per dataset, with , and vary only the sampler: the subsequence length and the parameter , where is DDIM and is DDPM. Quality is measured by Fréchet Inception Distance (FID), where lower is better.
On CIFAR-10 with , DDIM gives FID 13.36, and the stochastic DDPM () gives 41.07. At the numbers are 6.84 and 18.36. At they are 4.16 and 5.78. With the full , DDIM gives 4.04 and DDPM 4.73.
On CelebA at , the 20-step DDIM gives FID 13.73, close to the 100-step DDPM at 13.93. The paper reports that DDIM reaches quality comparable to the 1000-step model within 20 to 100 steps, which it describes as a 10 to 50 times speed-up over DDPM. Figure 4 shows that sampling time scales linearly with the number of steps.
Two further results matter. First, DDIM samples from the same starting noise keep their high-level features when the number of steps changes, so acts as a latent code. Interpolating between two starting noises gives smooth changes in the images. Second, encoding a test image to and decoding it again reconstructs it, with per-dimension mean squared error falling from 0.014 at 10 steps to 0.0001 at 500 steps. The paper notes that a stochastic DDPM sampler cannot do this, because its output varies with the random draws.
Why it mattered
DDIM showed that the quality of a diffusion model is not fixed by its sampler, and that the sampler could be chosen after training. That changed the practical cost of diffusion models: fast generation became a question of choosing a sampler and a step count, not retraining. Later work on faster ODE solvers and distilled one-step models builds on the same view of sampling as solving an ODE. The deterministic latent also made diffusion models usable for editing and interpolation, which the stochastic sampler could not support in the same way. The paper's non-Markovian framework also suggested that other forward processes, not only Gaussian ones, could be used, which the authors note in the discussion.
Reading guide
Read these in order. Each row lists the paper section and the prerequisites it depends on.
- Section 1, Introduction. Needs Diffusion Model for the idea of a noising chain with a learned reverse, and Denoising Diffusion Probabilistic Models (DDPM) for the baseline the paper improves on.
- Section 2, Background. Needs Markov Chain for the forward and reverse chains, Gaussian (Normal) Distribution for every step, and Variational Lower Bound (ELBO) for the objective in Equation 2.
- Section 2, Equations 3 to 5. Needs Reparameterization Trick for writing as a mix of and noise, and Mean Squared Error for the simplified loss .
- Section 3, Variational inference for non-Markovian forward processes. Needs Conditional Probability for the reverse conditional and Bayes rule for the implied forward step. Theorem 1 needs no further prerequisites beyond the objective.
- Section 4.1, DDIM. Needs DDIM Sampler for the update in practice. The role of is clearest after reading the Gaussian (Normal) Distribution term again.
- Section 4.2, Accelerated generation. Needs the idea of a subsequence of steps. Nothing new beyond Section 4.1.
- Section 4.3, Relevance to Neural ODEs. Needs Ordinary Differential Equation and Euler Method. Needs Neural Ordinary Differential Equation for the continuous-depth comparison in the related work.
- Section 5, Experiments. Needs Generative Model for what FID measures against real images, and U-Net for the denoising network used in the image experiments.
Check yourself
QuestionRecall: what does the DDIM paper change, and what does it keep fixed?Show answer
It changes the sampler, by choosing a non-Markovian reverse process with for a deterministic path, and by allowing that path to skip steps. It keeps the trained network and its objective, which is the DDPM noise-prediction loss. The same network serves the whole family of samplers.
QuestionCompute: from the CIFAR-10 numbers in the paper, how many times fewer network calls does 20-step DDIM use than 1000-step DDPM, and how many FID points does the 20-step DDIM give up relative to the full 1000-step DDIM?Show answer
Network calls: times fewer. FID cost: points. These are the numbers reported in Table 1 of the paper, and the second comparison is between two DDIM settings, not DDPM and DDIM.
QuestionWhy: why does the paper's theorem matter for practice, rather than being an aside?Show answer
Theorem 1 says that every sampler in the family optimises an objective equal to the DDPM loss up to weights and a constant. So a practitioner does not need to retrain a model to try a different sampler. Without the theorem, each new would look like a new training problem, and the speed-up would cost a full training run per setting.
QuestionApplied: you want to encode a real image into a latent and decode it later from a different number of steps. Which sampler do you use, and what should you expect?Show answer
Use the deterministic DDIM sampler, run in the forward direction to encode and in the reverse direction to decode, with the same step subsequence on both sides. Expect reconstruction error that falls as the number of steps grows, from about 0.014 per dimension at 10 steps to about 0.0001 at 500 steps in the paper's CIFAR-10 test. A stochastic DDPM sampler cannot be used this way, because its output changes with the random draws.