Introduction to Stochastic Differential Equations for Generative Machine Learning: A Variational Perspective

Ole Winther, Paul Jeha, Sander Dieleman, Andriy Mnih, Manfred Opper, Andrea DittadiarXiv 2026

This paper serves as a "Rosetta Stone" for the rapidly evolving world of generative modeling. By deriving popular methods like diffusion, score matching, and flow matching from a single variational framework based on Stochastic Differential Equations (SDEs), the authors provide a self-contained tutorial that bridges the gap between rigorous stochastic calculus and practical machine learning implementation.

TL;DR

The paper provides a unified variational derivation of modern generative models, showing that diffusion, score matching, and flow matching are all specific parameterizations of the same Evidence Lower Bound (ELBO). It offers a self-contained mathematical bridge for researchers to move from basic probability to advanced SDE-based generative modeling without needing a deep background in formal stochastic calculus.

What Problem Does This Paper Address?

Generative modeling has seen a massive shift toward using Ordinary and Stochastic Differential Equations (ODEs/SDEs) to transform simple noise into complex data like images or proteins. However, the literature is often fragmented:

  1. High Barrier to Entry: Many papers assume an advanced understanding of stochastic processes (e.g., Itô calculus, Girsanov theorem).
  2. Heuristic vs. Formal: Some primers offer strong intuition but lack a connection to probabilistic foundations, while formal texts are often too dense for practical ML application.
  3. Lack of Unity: It isn't always clear how a "Score Matcher" relates to a "Flow Matcher" or a "Diffusion Model" at a fundamental mathematical level.

This paper addresses these gaps by providing an informal yet mathematically grounded introduction that treats these models as different ways to optimize a variational lower bound.

Methods

The authors build their framework through several key steps:

  • The Variational Perspective: They define generative modeling as a latent process governed by an SDE. They then derive the Evidence Lower Bound (ELBO) for this process.
  • Fokker-Planck Equation (FPE): The FPE is used as the central tool to describe how probability densities evolve over time. Crucially, they show how to construct an ODE and an SDE that share the same "marginal" distributions—explaining why we can train with noise (SDE) but sample deterministically (ODE).
  • Simulation-Free Training: A major contribution is showing how to derive a tractable "diffusion term" (a time-averaged mean-squared error loss). By choosing specific variational marginals (like Gaussians or Normalizing Flows), they show how to train these models without ever having to solve a differential equation during the learning phase.
  • Unification: The paper explicitly demonstrates that:
  • Diffusion Models arise when using Gaussian variational marginals.
  • Score Matching is the result of matching a learnable score function to a conditional score.
  • Flow Matching is a parameterization focused on the velocity (drift) of the ODE.

Datasets

As a methodological and tutorial paper, it focuses on a synthetic benchmark rather than large-scale image datasets:

  • 1D Toy Example: A mixture of $k=5$ Laplace distributions. This simple setup allows for precise calculation of the true log-likelihood, providing a clear "ground truth" to compare the tightness of the ELBO across different model types (ODE, VDM, and general SDE).

Key Insights and Ideas

  • "Secretly ELBOs": The most significant "aha moment" is that the heuristic MSE losses used in score and flow matching are not just clever tricks—they are mathematically equivalent to terms in the SDE ELBO under specific conditions.
  • The Probability Flow ODE: The authors clarify the relationship between SDEs and ODEs. They show that for any SDE, there exists a "Probability Flow ODE" that follows the exact same density path, which is the theoretical foundation for fast, deterministic sampling in models like Stable Diffusion.
  • Beyond Gaussians: While most current models use Gaussian noise, the authors' derivation shows that the framework is flexible. They demonstrate how to use mixtures of normalizing flows as marginals, potentially opening the door for more expressive generative processes.
  • Path-Space Interpretation: The diffusion loss term is revealed to be a path-space Kullback-Leibler (KL) divergence, measuring the discrepancy between the generative trajectory and the variational trajectory.

Key Results

  • Tightness of the Bound: In the 1D experiments, the "general parameterization" of the SDE (learning the variational distribution freely) achieved a better validation ELBO (-3.052) than the standard Variational Diffusion Model (VDM) (-3.256).
  • Visual Convergence: The paper shows that while VDM, Flow Matching, and Latent ODEs use different objectives, they converge to very similar density estimates, validating the unified theory.
  • Simulation-Free Efficiency: The authors demonstrate that the SDE-based ELBO allows for training that is significantly more efficient than the simulation-based ODE approach, as it avoids the need for numerical solvers during the gradient descent steps.

Limitations and Future Work

  • The "One Observation" Constraint: The authors note that almost all current ML generative models focus on the "one observation" case (mapping a single noise vector to a single image). Applying these variational SDE techniques to time-series modeling (where the SDE describes a continuous, observed process) remains a difficult and largely unexplored frontier.
  • Identifiability: In flow matching, the parameters of the likelihood and the diffusion coefficient are not always identifiable, which can make direct ELBO comparisons between different architectures challenging.
  • Mathematical Prerequisite: Despite the "informal" goal, the paper still requires a solid grasp of multivariable calculus and basic probability, which may still be a hurdle for some practitioners.

For those looking to dive deeper, the authors have provided Jupyter notebooks to reproduce their 1D experiments at github.com/olewinther/generative-ode-sde.

Summary updated

BibTeX
@misc{winther2026introduction,
  author = {Ole Winther and Paul Jeha and Sander Dieleman and Andriy Mnih and Manfred Opper and Andrea Dittadi},
  title = {{Introduction to Stochastic Differential Equations for Generative Machine Learning: A Variational Perspective}},
  year = {2026},
  eprint = {2606.31576},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.31576},
}
Figure