Understanding Diffusion Models: A Unified Perspective

Calvin LuoarXiv 2022 · DOI

Introduction

Diffusion models have emerged as the state-of-the-art in generative modeling, powering high-profile systems like DALL-E 2 and Stable Diffusion. However, their mathematical underpinnings are often presented through disparate lenses: either as deep Markovian hierarchies (from the VAE community) or as score-matching systems (from the physics and differential equations communities). This paper provides a unified mathematical bridge, demonstrating that these perspectives are fundamentally equivalent.

Foundations: From VAEs to Hierarchical Models

The journey begins with the Evidence Lower Bound (ELBO), the core objective for Variational Autoencoders (VAEs). To model complex data distributions, a standard VAE can be generalized into a Markovian Hierarchical VAE (MHVAE). In this framework, data is transformed through a sequential chain of latent variables, where each step depends only on the previous one.

A Markovian Hierarchical VAE (MHVAE) structure showing the chain of latent variables from data x to z_T.

Variational Diffusion Models (VDMs)

Variational Diffusion Models are a specific, restricted class of MHVAEs. They simplify the hierarchical structure by imposing three key constraints:

  1. The latent space dimension is identical to the data dimension.
  2. The "forward" noising process ($q$) is a fixed linear Gaussian model rather than a learned encoder.
  3. The final latent state $x_T$ is forced to be standard Gaussian noise.
The full diffusion process illustrating the forward noising process q and the reverse generative process p across T steps, showing an image degrading into noise.

By fixing the forward process, the complex ELBO optimization becomes a more tractable problem of learning the reverse "denoising" steps. This allows the model to focus entirely on learning the generative distribution $p(x_{t-1}|x_t)$.

The Three Equivalent Interpretations

The paper's primary contribution is the rigorous derivation showing that three common training objectives are mathematically dual:

  • Predicting $x_0$: Learning to reconstruct the original clean image from any noisy intermediate state.
  • Predicting $\epsilon$: Learning to identify the specific noise added at a given timestep.
  • Predicting the Score: Learning the gradient of the log-density ($\nabla \log p(x)$), which points toward regions of higher data density.

Using Tweedie’s Formula, the author proves that the denoising mean (the VAE perspective) and the score function (the score-based perspective) are two sides of the same coin. This unification explains why models trained on noise prediction effectively learn the underlying data manifold.

Key Insights and Guidance

A major insight is that diffusion models trade encoder flexibility for mathematical tractability. By using a fixed Gaussian noising schedule, the ELBO decomposes into a simple sum of KL divergences. Furthermore, the paper clarifies Classifier-Free Guidance, showing it to be a method of mixing conditional and unconditional score estimates to steer generation without an external classifier.

Limitations and Future Directions

Despite their success, diffusion models face several challenges:

  • Computational Cost: Sampling requires hundreds of iterative denoising steps, making it significantly slower than GANs.
  • Lack of Semantic Latents: Intermediate states are just noisy versions of the input, lacking the compressed semantic representations found in standard VAEs.
  • Biological Plausibility: The iterative denoising process does not mirror known human generative processes.

Future work may lie in "General Hierarchical VAEs," which aim to combine the high-quality generation of diffusion with the interpretable, compressed latent spaces of traditional VAEs.

Summary updated

BibTeX
@misc{luo2022understanding,
  author = {Calvin Luo},
  title = {{Understanding Diffusion Models: A Unified Perspective}},
  year = {2022},
  eprint = {2208.11970},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.11970},
}
Figure