Sampling is as easy as learning the score: theory for diffusion models with minimal data assumptions

Sitan Chen, Sinho Chewi, Jerry Li, Yuanzhi Li, Adil Salim, Anru Zhang

Diffusion models, the technology powering state-of-the-art image generators like DALL-E 2 and Stable Diffusion, have achieved stunning empirical success. However, our theoretical understanding of why they work so well has historically lagged behind their practical applications. This paper provides a rigorous theoretical foundation for score-based generative models (SGMs), proving that sampling is computationally "as easy" as the neural network training task itself.

The Theoretical Gap in Diffusion Models

Previous mathematical proofs of convergence for diffusion models suffered from three major flaws that disconnected theory from practice:

  1. Unrealistic Assumptions: Prior works often required the data distribution to be "well-behaved" (e.g., log-concave or satisfying a Log-Sobolev Inequality). This effectively rules out the complex, multi-modal data distributions found in the real world, such as datasets containing distinct images of cats and dogs.
  2. The $L^\infty$ Gap: Previous theories assumed the neural network learns the score function perfectly everywhere ($L^\infty$ error). In reality, networks are trained using an $L^2$ loss, meaning they might be highly inaccurate in "empty" regions of the data space where no training samples exist.
  3. Exponential Scaling: Many previous bounds suggested that the time needed to generate a sample might grow exponentially with the dimension of the data, directly contradicting the fast, scalable performance observed in practice.

Methodology: SDEs and Minimal Assumptions

The authors analyze Denoising Diffusion Probabilistic Models (DDPMs) through the lens of stochastic differential equations (SDEs). The process is modeled as a "forward" SDE that gradually turns data into noise (the Ornstein-Uhlenbeck process) and a "reverse" SDE that iteratively turns noise back into data.

To bridge the gap between theory and practice, the authors rely on minimal assumptions. They only assume that the score function is Lipschitz continuous, the data has finite moments, and it has a finite KL divergence from a Gaussian distribution. Crucially, they do not assume the distribution is unimodal or simple.

The core technical approach utilizes Girsanov’s Theorem, a tool from stochastic calculus, to compare the probability measures of the "true" reverse process and the "algorithmic" process (which relies on discrete time steps and an estimated score). To handle the "Manifold Hypothesis"—the idea that high-dimensional data like images actually lives on a low-dimensional surface—they employ an early-stopping technique to provide robust guarantees in Wasserstein and Total Variation distances.

Key Theoretical Results

The paper's central mantra is that "sampling is as easy as learning the score." It demonstrates that the generative phase of the model is highly robust: if a neural network successfully minimizes the standard training objective (score matching), the sampling algorithm is mathematically guaranteed to produce high-quality results.

Error bound decomposition showing the three main components of the theoretical guarantee.

The authors prove that the total error bound decomposes cleanly into three parts: the convergence of the forward process, the discretization error from taking finite steps, and the score estimation error.

Key takeaways from these bounds include:

  • $L^2$ is Enough: The authors prove that uniform accuracy is not required. As long as the score estimate is accurate on average (the $L^2$ error minimized by standard training), the sampler will stay on track and converge.
  • Polynomial Complexity: The paper establishes that the number of iterations needed to reach an $\epsilon$-accurate sample scales polynomially as $\tilde{O}(L^2 d / \epsilon^2)$, where $d$ is the dimension and $L$ is a smoothness constant. This matches state-of-the-art complexity guarantees for Langevin Monte Carlo but applies to a much wider, more realistic class of distributions.
  • The CLD Paradox: The authors also investigated Critically Damped Langevin Diffusion (CLD), which many hypothesized would speed up sampling (akin to how "momentum" accelerates optimization). Surprisingly, they provide evidence that CLD does not improve the fundamental complexity of diffusion models because the reverse-process velocity lacks sufficient smoothness.

Limitations and Future Directions

While this work serves as a landmark end-to-end justification for why diffusion models can sample from complex distributions in polynomial time, several open questions remain:

  • The "Learning" Black Box: The paper proves sampling is efficient if you have a good score estimate, but it does not explain how or when a neural network can successfully learn that score function. Understanding the non-convex dynamics of the neural network training phase remains a major open challenge.
  • Lipschitz Assumption: The proof relies on the score function of the forward process being Lipschitz. While generally true for diffused data, relaxing this assumption could lead to even broader theoretical generalizations.
  • CLD Lower Bound: The evidence against CLD is compelling but relies on a specific proof technique (Girsanov-based KL bounds). Future research might uncover alternative frameworks proving that CLD-based models can indeed achieve faster sampling.

Summary updated

BibTeX
@inproceedings{chen2023sampling,
  author = {Sitan Chen and Sinho Chewi and Jerry Li and Yuanzhi Li and Adil Salim and Anru Zhang},
  title = {{Sampling is as easy as learning the score: theory for diffusion models with minimal data assumptions}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=zyLVMgsZ0U_},
}
Figure