What's the score? Automated Denoising Score Matching for Nonlinear Diffusions

Raghav Singhal, Mark Goldstein, Rajesh Ranganath

Abstract

Reversing a diffusion process by learning its score forms the heart of diffusion-based generative modeling and for estimating properties of scientific systems. The diffusion processes that are tractable center on linear processes with a Gaussian stationary distribution. This limits the kinds of models that can be built to those that target a Gaussian prior or more generally limits the kinds of problems that can be generically solved to those that have conditionally linear score functions. In this work, we introduce a family of tractable denoising score matching objectives, called local-DSM, built using local increments of the diffusion process. We show how local-DSM melded with Taylor expansions enables automated training and score estimation with nonlinear diffusion processes. To demonstrate these ideas, we use automated-DSM to train generative models using non-Gaussian priors on challenging low dimensional distributions and the CIFAR10 image dataset. Additionally, we use the automated-DSM to learn the scores for nonlinear processes studied in statistical physics.

Introduction

Diffusion models have emerged as a dominant paradigm in generative modeling, excelling in tasks ranging from image synthesis to protein folding. These models typically operate by defining a forward process that incrementally transforms data into noise, followed by a learned reverse process that reconstructs the data. However, a significant limitation persists: most current frameworks rely on linear Stochastic Differential Equations (SDEs) with Gaussian stationary distributions. This reliance stems from the mathematical tractability of linear systems, where the transition kernel—the probability of reaching a state at time $t$ from an initial state—is known in closed form.

In many real-world domains, such as statistical physics, biology, and finance, systems are governed by complex, nonlinear SDEs. Applying standard diffusion techniques to these systems is often impossible because the transition kernels are intractable. While Implicit Score Matching (ISM) offers a potential alternative, it is computationally expensive and memory-intensive. This paper introduces local-DSM, a novel training objective that bridges the gap between the efficiency of Denoising Score Matching (DSM) and the flexibility required for nonlinear processes.

Methodology: Local-DSM and Automated Linearization

The core innovation of this work is the decomposition of the global diffusion process into manageable local segments. Instead of attempting to solve the transition kernel from the initial data point ($y_0$) to a distant time ($y_t$), the authors propose a "local" approach.

Local Linearization via Taylor Expansions

Within a sufficiently small time window $[s, t]$, even a highly nonlinear drift function can be approximated as linear. By applying Taylor expansions to the drift of the SDE, the authors create a local linear approximation. This transformation ensures that the local transition kernel becomes Gaussian, making it mathematically tractable for DSM objectives.

The local-DSM framework approximates nonlinear diffusion by treating small time increments as locally linear processes.

Automated Derivations

To make this approach practical for researchers, the authors utilize matrix factorization techniques to automatically derive the mean and covariance equations for these local steps. This automation removes the need for manual, error-prone derivations of complex formulas for every unique SDE, facilitating the exploration of non-Gaussian priors and exotic noise processes.

Error Control and Scheduling

A critical challenge in using local approximations is the accumulation of error. If the interval between $s$ and $t$ is too large, the Taylor expansion fails to accurately represent the underlying nonlinear dynamics. To mitigate this, the authors developed a "scheduled pairs" mechanism. This method dynamically selects time intervals such that the approximation error remains stable and controlled throughout the training process.

The scheduled pairs approach (blue) successfully maintains a low and stable mean estimation error across time, whereas naive scheduling (red) leads to significant error growth.

Experimental Results

The researchers validated local-DSM across three distinct domains, demonstrating its superiority over traditional ISM in both efficiency and accuracy.

  • Generative Modeling (CIFAR-10): On high-dimensional image data, local-DSM achieved superior Bits-Per-Dimension (BPD) scores compared to ISM, indicating a better fit to the underlying data distribution. It also demonstrated faster convergence in low-dimensional synthetic tests, such as the checkerboard distribution.
  • Non-Gaussian Priors: The framework allowed for the use of non-standard starting distributions, such as Logistic distributions or Mixtures of Gaussians (MoG), which can be more appropriate for specific data types than a standard normal "blob."
  • Scientific Fidelity: In modeling interacting particle systems from statistical physics, local-DSM was the only method capable of accurately tracking the ground-truth variance over time. In contrast, ISM-based models diverged from the true physical dynamics as the simulation progressed.

Conclusion

Local-DSM represents a significant advancement in making nonlinear diffusion processes accessible for machine learning. By combining local linearization with automated derivations and intelligent scheduling, the authors provide a robust, efficient alternative to implicit score matching. While the method relies on Taylor approximations—which inherently involve a trade-off between step size and accuracy—it opens new avenues for generative modeling and the study of complex physical systems that do not conform to simple linear paths.

Summary updated

BibTeX
@inproceedings{singhal2024what,
  author = {Raghav Singhal and Mark Goldstein and Rajesh Ranganath},
  title = {{What's the score? Automated Denoising Score Matching for Nonlinear Diffusions}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=wLoESsgZIq},
}
Figure