Score-based generative models are provably robust: an uncertainty quantification perspective

Nikiforos Mimikos-Stamatopoulos, Benjamin Zhang, Markos Katsoulakis

Abstract

Through an uncertainty quantification (UQ) perspective, we show that score-based generative models (SGMs) are provably robust to the multiple sources of error in practical implementation. Our primary tool is the Wasserstein uncertainty propagation (WUP) theorem, a model-form UQ bound that describes how the $L^2$ error from learning the score function propagates to a Wasserstein-1 ($d_1$) ball around the true data distribution under the evolution of the Fokker-Planck equation. We show how errors due to finite sample approximation, early stopping, score-matching objective choice, score function parametrization expressiveness, and reference distribution choice impact the quality of the generative model in terms of a $d_1$ bound of computable quantities. The WUP theorem relies on Bernstein estimates for Hamilton-Jacobi-Bellman partial differential equations (PDE) and the regularizing properties of diffusion processes. Specifically, PDE regularity theory shows that stochasticity is the key mechanism ensuring SGM algorithms are provably robust. Our approach requires minimal assumptions, is agnostic to the manifold hypothesis, and avoids absolute continuity assumptions for the target distribution.

Introduction

Score-based generative models (SGMs), the underlying technology for state-of-the-art systems like Stable Diffusion and DALL-E, have demonstrated remarkable empirical success. However, the theoretical understanding of their robustness—specifically why they remain stable despite various implementation errors—has lagged behind their practical application. Most existing theoretical frameworks rely on idealized conditions, such as infinite training data or the assumption that data distributions possess smooth densities everywhere.

In practice, researchers face "messy" realities: limited datasets, early stopping during training, and the "manifold hypothesis," where high-dimensional data actually resides on low-dimensional surfaces. This paper addresses these gaps by providing a rigorous theoretical foundation for SGM robustness through the lens of Uncertainty Quantification (UQ).

The Problem: Theoretical Gaps in Generative Modeling

Traditional statistical metrics, such as Kullback-Leibler (KL) divergence, often fail when applied to real-world data. If the model distribution and the true data distribution do not overlap perfectly—a common occurrence when data lives on a low-dimensional manifold—KL divergence can become infinite, rendering it useless for measuring convergence. Furthermore, existing proofs often ignore the cumulative impact of practical errors:

  1. Finite Samples: The discrepancy between the true distribution and the empirical distribution.
  2. Early Stopping: The bias introduced by halting training before the score function is perfectly learned.
  3. Parametrization: The inherent limitations in the expressiveness of neural networks.

Methods: The WUP Theorem and PDE Regularity

To bridge the gap between AI practice and mathematical theory, this research utilizes the regularity theory of partial differential equations (PDEs). The central contribution is the Wasserstein Uncertainty Propagation (WUP) theorem.

The WUP Theorem

The WUP theorem quantifies how $L^2$ errors in the learned score function propagate through the generative process. It establishes that an $L^2$ neighborhood around the true score function maps to a Wasserstein-1 ($d_1$) neighborhood around the true data distribution. Unlike KL divergence, the Wasserstein distance (an Integral Probability Metric) remains well-defined even when distributions have non-overlapping supports, making it ideal for data satisfying the manifold hypothesis.

PDE Tools and Bernstein Estimates

The proof relies on the Kolmogorov backward equation and Hamilton-Jacobi-Bellman (HJB) equations. By tracking how a "test function" evolves backward in time through the diffusion process, the authors employ classical Bernstein estimates. These estimates prove that the gradients of these test functions remain bounded, effectively demonstrating that the diffusion process "smooths out" errors in the learned score function.

Key Insights: Stochasticity as a Shield

The most significant insight of this work is that the inherent randomness (stochasticity) of SGMs is not a drawback, but a vital feature. The noise in the diffusion process acts as a powerful regularizer. This stochasticity ensures that the model is not overly sensitive to the "roughness" or inaccuracies of the learned score function, providing a mathematical "safety net" for practitioners.

Robustness to Implementation Choices

  • Early Stopping Trade-off: The paper provides a mathematical justification for early stopping. While stopping early introduces a predictable bias, it prevents the model from "memorizing" discrete training samples, which would otherwise lead to a model that merely replicates training data rather than generating new samples.
  • Objective Choice: The authors show that Denoising Score Matching (DSM)—the standard practical training objective—is provably robust, even though it is an approximation of the more theoretically "ideal" Explicit Score Matching (ESM).
  • Sample Complexity: The derived generalization bounds show that the number of samples required to train a robust SGM scales predictably, offering theoretical guarantees for models trained on limited data.

Conclusion

By reframing score-based generative models as a problem of uncertainty propagation in PDEs, this research provides a robust theoretical framework that aligns with empirical observations. The WUP theorem demonstrates that SGMs are naturally shielded from common implementation errors by the very diffusion processes they employ. This work moves the field beyond idealized assumptions, offering computable bounds and a deeper understanding of the trade-offs involved in training modern generative AI.

Summary updated

BibTeX
@inproceedings{mimikosstamatopoulos2024score,
  author = {Nikiforos Mimikos-Stamatopoulos and Benjamin Zhang and Markos Katsoulakis},
  title = {{Score-based generative models are provably robust: an uncertainty quantification perspective}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=KI5TANE02e},
}
Figure