NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An optimal control perspective on diffusion-based generative modeling

Julius Berner, Lorenz Richter, Karen Ullrich

Introduction

Generative modeling has seen a paradigm shift with the advent of diffusion models, primarily driven by their success in high-fidelity image synthesis. However, applying these models to scientific domains like Bayesian statistics, chemistry, and physics requires a deeper understanding of their mathematical foundations. This paper establishes a rigorous bridge between diffusion models and stochastic optimal control, providing new tools for sampling from complex, unnormalized probability densities.

The Mathematical Bridge

The core of this work is the realization that the "score function" used in diffusion models is not just a gradient of the log-density, but a solution to a fundamental equation in control theory.

The theoretical connection between diffusion models and optimal control equations.

By applying the Hopf–Cole transformation, the authors demonstrate that the evolution of a diffusion model's log-density is governed by a Hamilton–Jacobi–Bellman (HJB) equation. As shown in the flowchart above, this connects generative SDEs through the Fokker-Planck and Kolmogorov equations directly to optimal control theory. This perspective allows the authors to prove that the Evidence Lower Bound (ELBO)—a standard objective in variational inference—is mathematically equivalent to the "verification theorem" from control theory. Maximizing the ELBO is thus equivalent to minimizing the energy or cost of a controlled physical process.

Time-reversed Diffusion Sampler (DIS)

Building on this HJB connection, the authors propose the Time-reversed Diffusion Sampler (DIS). DIS is designed to sample from unnormalized densities $\rho$, where the shape is known but the normalizing constant $Z$ is not.

Evolution of densities and drift fields in the DIS framework.

Unlike previous "Path Integral Samplers" (PIS) that attempt to grow a distribution from a single fixed point (leading to numerical instabilities due to unbounded drifts), DIS starts from a tractable reference distribution, such as a standard Gaussian. It then learns a "control" (a drift function) that steers this simple distribution toward the complex target density. As visualized in the drift fields above, this approach ensures mathematical stability and significantly improves training efficiency by avoiding the singularities associated with Dirac delta initializations.

Key Insights and Results

The path space perspective reveals that training objectives can go beyond standard Kullback–Leibler (KL) divergence. The authors show that a log-variance divergence can improve performance by more than an order of magnitude, as it is less prone to "mode collapse."

The method was evaluated on several challenging benchmarks:

  • Gaussian Mixture Model (GMM): Successfully captured 9 well-separated peaks.
  • Funnel Distribution: Handled the 10D distribution's varying scales where MCMC often fails.
  • Double Well (DW): Scaled to 50 dimensions, capturing multimodal structures separated by high energy barriers.

In these tests, DIS consistently provided more accurate estimates of the log-normalizing constant ($\log Z$) than PIS. Furthermore, once trained, DIS can generate thousands of samples per second on a single GPU, offering a massive speedup over traditional MCMC chains.

Limitations and Future Outlook

While powerful, DIS requires access to the unnormalized density function, making it less suitable for "black-box" scenarios where only data samples are available. Additionally, there is a "cold start" overhead, as a new neural network must be trained for each target distribution. Future research into "amortizing" this cost—training models that generalize across families of distributions—and providing formal convergence guarantees for neural PDE solvers will be crucial for broader adoption in scientific computing.

Summary updated

BibTeX
@article{berner2024optimal,
  author = {Julius Berner and Lorenz Richter and Karen Ullrich},
  title = {{An optimal control perspective on diffusion-based generative modeling}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2024},
  url = {https://openreview.net/forum?id=ewh3L6LMQu},
}
Figure