Improved Denoising Diffusion Probabilistic Models

Alexander Quinn Nichol, Prafulla Dhariwal

Introduction

While diffusion models, such as the original Denoising Diffusion Probabilistic Models (DDPMs), have demonstrated the ability to generate high-quality images rivaling Generative Adversarial Networks (GANs), they historically suffered from two major drawbacks. First, they exhibited poor log-likelihoods compared to likelihood-based models like VAEs or autoregressive models, suggesting they might not capture the full data distribution effectively. Second, they suffered from slow sampling, requiring hundreds or thousands of sequential neural network passes to generate a single image.

This paper introduces key architectural and algorithmic improvements to DDPMs, enabling them to achieve competitive log-likelihoods while maintaining high sample quality. By learning the variances of the reverse process and employing a novel cosine noise schedule, the authors demonstrate a 10x to 50x speedup in sampling with minimal impact on performance.

Core Methodological Improvements

The authors propose three primary modifications to the standard diffusion pipeline to close the gap in log-likelihood and accelerate sampling:

1. Learning the Variances ($\Sigma_\theta$)

In previous work, the variance of the reverse noise step was kept fixed. The authors found that while a fixed variance is sufficient for image quality, it is suboptimal for optimizing log-likelihood. They parameterize the variance as an interpolation between two bounds ($\beta_t$ and $\tilde{\beta}_t$) and learn it using a hybrid objective ($L_{hybrid} = L_{simple} + \lambda L_{vlb}$). This allows the model to dynamically "decide" how much noise to remove at each step.

2. Cosine Noise Schedule

The standard linear noise schedule destroys information too quickly, especially for smaller resolution images (like $64 \times 64$). To address this, the authors introduce a schedule based on a cosine function that degrades the image more gracefully. This ensures that the middle and end of the diffusion process remain useful for learning, preventing the image from turning into pure noise too early in the forward process.

Comparison of linear and cosine noise schedules

3. Importance Sampling for $L_{vlb}$

The Variational Lower Bound (VLB) objective is notoriously noisy during training. To stabilize this optimization, the authors employ an importance sampling technique. By focusing training compute on the timesteps where the loss exhibits the highest variance, the model achieves a much smoother and more stable training curve.

Training log loss stabilized by importance sampling

Key Insights and Results

The models were trained and evaluated on standard generative modeling benchmarks, including CIFAR-10 and ImageNet $64 \times 64$. The improvements yielded several notable insights and state-of-the-art results:

  • The "Aha" Moment for Speed: The authors discovered that once the variances are learned, the model becomes significantly more robust to "striding" (skipping steps during sampling). While fixed-variance models degrade rapidly if sampled in only 50 steps, the improved model maintains high visual quality, allowing for high-quality samples in just 50 to 100 steps (down from 1,000–4,000).
  • State-of-the-Art Log-Likelihood and FID: On ImageNet $64 \times 64$, the improved model achieved a Negative Log-Likelihood (NLL) of 3.53 bits/dim, significantly better than the original DDPM's 3.77 and competitive with specialized models like PixelCNN. Furthermore, the "large" model achieved an FID of 2.92 on class-conditional ImageNet $64 \times 64$, outperforming BigGAN-deep.
  • Diversity over Precision: Using precision and recall metrics, the authors show that diffusion models have much higher recall than GANs. This indicates they are far better at covering the entire target distribution and are less prone to mode collapse.
  • Predictable Scaling: Sample quality (FID) scales according to a power law relative to training compute, providing a clear roadmap: better images can be predictably obtained by increasing model capacity and training time.

Limitations and Future Work

Despite these significant strides, some challenges remain:

  • Still Slower than GANs: Even with a 10x speedup, diffusion models still require dozens of forward passes, whereas GANs require only one. This remains a hurdle for strict real-time applications.
  • Gradient Noise: While importance sampling helped, the $L_{vlb}$ term is still difficult to optimize directly. Training purely on $L_{vlb}$ (without the $L_{simple}$ MSE term) leads to higher gradient noise and slower convergence.
  • High Resolution Scaling: While the paper demonstrates excellent results at $64 \times 64$, the computational cost of scaling these specific improvements to very high resolutions (e.g., $1024 \times 1024$) remains an area for future optimization.

Summary updated

BibTeX
@inproceedings{nichol2021improved,
  author = {Alexander Quinn Nichol and Prafulla Dhariwal},
  title = {{Improved Denoising Diffusion Probabilistic Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
}
Figure