A Mathematical Introduction to Diffusion Models

This lightning talk unpacks the rigorous mathematical foundations underlying modern diffusion models, revealing how they bridge classical sampling theory, stochastic processes, and score-based generative modeling. We'll explore how forward noising SDEs and reverse-time sampling connect to Langevin dynamics, how the Tweedie identity transforms denoising into score estimation, and how geometric covariance budgets control discretization error. The talk culminates with inference-time control mechanisms that steer pretrained diffusion samplers toward reward-tilted targets without sacrificing mathematical rigor.
Script
Sampling from complex distributions is hard, but what if we could transform the problem into something trivial and then reverse the process? Diffusion models do exactly this by corrupting data with noise until it becomes Gaussian, then learning to denoise step by step.
The authors formalize forward noising as stochastic differential equations driven by Gaussian channels, with reverse sampling expressed as either stochastic SDEs incorporating score-driven denoising terms or deterministic probability-flow ODEs that transport marginals exactly. The Tweedie identity reveals that learning to denoise is mathematically equivalent to estimating the score function of the noised distribution.
Rigorous error decomposition splits sampling failure into three sources: initialization bias from starting too noisy, per-step discretization error from freezing the score, and cumulative score mismatch from imperfect denoising estimation. The key insight is that total discretization cost scales with cumulative posterior covariance along the path, not naive Lipschitz constants, enabling time-adaptive step sizes that balance error efficiently.
First-order rejection sampling introduces a score-only correction mechanism that uses randomized accept-reject steps to achieve high accuracy without computing densities directly. This yields polylogarithmic dependence on target accuracy for the total number of reverse steps, in contrast to polynomial costs under standard Euler-Maruyama discretization.
Inference-time control formalizes how to steer pretrained diffusion samplers toward reward-tilted targets using only additive score corrections computable as gradients of noisy likelihoods or backward-propagated value functions. The Doob h-transform construction establishes the optimal guided process under a KL-regularized objective, unifying sequential Monte Carlo, Feynman-Kac reweighting, and reinforcement learning methods within a single mathematical framework.
This work reveals diffusion models as a rigorous unification of classical sampling theory, Langevin dynamics, and modern score-based generation, with every algorithmic step grounded in explicit error bounds and geometric budget identities. To dive deeper into the mathematical infrastructure of generative models and create your own visual explainers, explore more at EmergentMind.com.