© 2026 NeckPinch · www.neckpinch.com · All rights reserved.
Course 6Book 6D: Diffusions, Finance and ComputationChapter 4
Fokker–Planck, Time Reversal and Diffusion Models
How densities of diffusions evolve, relative entropy and convergence to equilibrium, reversing a diffusion in time with the score, and the generative models built on it, with Perelman's conjugate heat equation as the geometric twin.
Read with Pavliotis, Stochastic Processes and Applications (2014), chapter 4 (the Fokker–Planck equation, convergence to equilibrium, reversible diffusions) and chapter 6 (Langevin dynamics); Bakry, Gentil and Ledoux, Analysis and Geometry of Markov Diffusion Operators (2014), chapter 5, for entropy and the logarithmic Sobolev inequality. For time reversal, Anderson, "Reverse-time diffusion equation models" (Stochastic Process. Appl. 12, 1982), and Haussmann and Pardoux, "Time reversal of diffusions" (Ann. Probab. 14, 1986). For diffusion models, Song, Sohl-Dickstein, Kingma, Kumar, Ermon and Poole, "Score-based generative modeling through stochastic differential equations" (ICLR 2021, arXiv:2011.13456), sections 2–4.
6D.3 Stochastic Differential Equations and Feynman–Kac derived the Fokker–Planck equation for the density of a diffusion, found the Gibbs measure as the stationary density of Langevin dynamics, and sketched, in its opening box, how modern image generators run a diffusion backwards in time. This chapter develops the three ideas behind that sketch in full. First, convergence to equilibrium: the relative entropy of the density with respect to the stationary law decreases at a rate given by a relative Fisher information, and a logarithmic Sobolev inequality turns that into exponential convergence. Second, time reversal: a diffusion run backwards is again a diffusion, whose drift is corrected by the score of its own density. Third, learning the score: the score can be estimated from samples alone, by a regression that needs no knowledge of the density, and with it one can sample from the distribution by integrating the reverse dynamics.
Each idea has a twin in Perelman's work, and the chapter ends with the dictionary. Perelman's conjugate heat equation is a Fokker–Planck equation on a manifold moving by the Ricci flow, solved backward in time (6D.3 Stochastic Differential Equations and Feynman–Kac, 9B.7 The Heat Equation on a Manifold); his function , defined by , has gradient , the score of the conjugate heat kernel; the term in his entropy is a Fisher information; and is the derivative of a Nash entropy, in the same way that the Fisher information is the derivative of the Shannon entropy along the heat flow (6A.12 Entropy, Information and Diffusion). The mathematics of how a diffusion forgets its starting point and how it can be made to remember it is the mathematics of Perelman's monotone quantities.
By the end of this chapter you will be able to:
- write the Fokker–Planck equation of a reversible diffusion in gradient form and verify detailed balance;
- prove that the relative entropy decreases at the rate of the relative Fisher information, and deduce exponential convergence from a logarithmic Sobolev inequality, with the Bakry–Émery constant for uniformly convex potentials;
- compare the (Poincaré) and entropy (log-Sobolev) routes to equilibrium, and describe hypocoercivity for kinetic Langevin dynamics;
- derive the time-reversal formula for a diffusion with additive noise from the Fokker–Planck equation, and the probability-flow ordinary differential equation with the same marginals;
- prove Tweedie's formula and the equivalence of explicit, implicit and denoising score matching;
- describe score-based diffusion models and their sampling schemes, and what is and is not proved about them;
- relate the Schrödinger bridge problem to entropic optimal transport;
- identify the score, the Fisher information and the Nash entropy in Perelman's .
Reversible diffusions and detailed balance
Consider the overdamped Langevin equation on of 6D.3 Stochastic Differential Equations and Feynman–Kac,
with and Gibbs measure . Its generator is and the Fokker–Planck equation for the density is
The last form (Exercise 4.4) is the key to everything in this section. Writing , the relative density, the equation becomes : the relative density solves the backward Kolmogorov equation. And is symmetric in ,
a weighted integration by parts. Symmetry of the generator in is reversibility: if , then the process run backwards in time has the same law as the process run forwards. In terms of transition densities it is detailed balance, : at equilibrium, the flux of probability from to equals the flux from to . Physical systems in thermal equilibrium without magnetic fields or external driving are reversible; molecular motors, driven chemical networks and anything powered by an external source are not.
The general diffusion is reversible with respect to some exactly when its drift has the form , with (Kolmogorov's criterion in the diffusion setting): the drift is a gradient with respect to the geometry defined by the noise. Langevin dynamics is the case , .
Entropy and the approach to equilibrium
How fast does approach ? There are two natural measures of the distance, and two corresponding inequalities.
and the Poincaré inequality. Since with symmetric and nonpositive in , the variance satisfies
If satisfies a Poincaré inequality , then : exponential convergence at the rate of the spectral gap of . For the Gaussian () the gap is , the Gaussian Poincaré inequality of 6A.13 Self-Similar Variables and Monotonicity in this normalisation.
Entropy and the logarithmic Sobolev inequality. The distance is finite only for densities with , a strong condition in high dimensions. The relative entropy
is finite much more often, is nonnegative with equality only for (Jensen's inequality, 3A.7 Lᵖ Spaces and Jensen’s Inequality), and is the natural quantity in statistics (the Kullback–Leibler divergence) and in statistical physics (free energy above equilibrium).
Along the Fokker–Planck flow, with enough decay at infinity,
the relative Fisher information.
Proof. , since . Integrating by parts, this is .
If satisfies a logarithmic Sobolev inequality with constant ,
then , and
For the standard Gaussian this is Gross's inequality (6A.12 Entropy, Information and Diffusion) with . When is it true in general? Dominique Bakry and Michel Émery (1985) found a curvature condition.
If with , then satisfies the logarithmic Sobolev inequality with constant , hence the Poincaré inequality with constant , and the Fokker–Planck flow converges to in relative entropy at the rate .
The proof differentiates the Fisher information along the flow and finds , using the Bochner-type identity (6D.5 Diffusions on Manifolds and Curvature develops this calculus); integrating from to then gives the inequality. Uniform convexity of the potential is the flat-space form of a lower bound on the Bakry–Émery Ricci curvature (6C.11 Optimal Transport and Ricci Curvature): on a manifold with measure the criterion is . Holley and Stroock (1987) showed that bounded perturbations preserve the inequality, with a worse constant, so log-Sobolev holds for many non-convex potentials, but with constants that can be exponentially bad when has deep separated wells: a particle must climb over a barrier to equilibrate, and the time to do so grows like (the Eyring–Kramers law of chemical reaction rates).
Why entropy rather than . In dimension , a product measure satisfies log-Sobolev with the same constant as (the inequality tensorises), and the relative entropy of a product is the sum of the relative entropies. So for systems with many degrees of freedom, the entropy method gives convergence times that do not grow with the dimension, while distances of natural initial data can be exponentially large in . This is why entropy methods dominate the analysis of high-dimensional sampling algorithms and of the kinetic equations of statistical physics.
Hypocoercivity. The underdamped (kinetic) Langevin equation, in position and in velocity, is not reversible in the above sense and has noise only in the velocity, so its generator is degenerate: the entropy dissipation controls only velocity gradients. Cédric Villani's theory of hypocoercivity (2009) showed that the interaction between the transport term and the noise nevertheless produces exponential convergence, by constructing a modified entropy that includes mixed position–velocity derivatives. Kinetic Langevin dynamics, with its momentum, often mixes faster than the overdamped version, and is the basis of the Hamiltonian Monte Carlo methods of computational statistics.
Running a diffusion backwards
Let , , solve with noise independent of position, and let be the density of . Define the reversed process . Is it a diffusion, and with what coefficients?
Under regularity and integrability conditions on and , the reversed process is a diffusion with the same noise and drift
with and a Brownian motion in reversed time.
Proof. (The density computation; a full proof of the pathwise statement is Haussmann and Pardoux's.) The reversed process has density . We check that solves the Fokker–Planck equation of the proposed reversed diffusion. Forward, , so
The Fokker–Planck equation for drift and diffusion is
Put : since , the right side is , which is . So the reversed density solves the forward equation of the proposed diffusion with the right initial condition ; uniqueness for that equation and the Markov property give the claim at the level of finite-dimensional distributions.
The correction is the score of the density, multiplied by the diffusion matrix. Its meaning is visible in the simplest example: for Brownian motion started at a point , is a Gaussian centred at and the score points back to , so the reversed process is a Brownian bridge pulled back to the starting point. For a stationary reversible diffusion, (Exercise 4.6): reversibility in the sense of the previous section is exactly the statement that time reversal changes nothing.
The probability-flow ODE. There is also a deterministic way to move along the same family of densities. The ordinary differential equation
transports the density into exactly at each time (Exercise 4.7), because its continuity equation is the Fokker–Planck equation rewritten. It is the deterministic counterpart of the noisy dynamics, with the diffusion turned into a drift down the gradient of . For the heat flow (, ) the velocity is , which is the Wasserstein gradient of entropy of 6C.11 Optimal Transport and Ricci Curvature: the probability-flow ODE of the heat equation is the Otto gradient flow, particle by particle.
Learning the score
To run a diffusion backwards one needs the score at every time. In applications is known only through samples (a collection of photographs, say), and is the law of a noised sample, known only through noised samples. The remarkable fact is that the score can nevertheless be learned by least squares.
Tweedie's formula. Suppose , with independent of , and let be the density of . Then
(Exercise 4.8). The posterior mean of the clean signal, given a noisy observation, is the observation plus times the score. Herbert Robbins (1956) attributed it to Maurice Tweedie; Bradley Efron (2011) made it popular for empirical Bayes estimation. It says that denoising and score estimation are the same problem: the best mean-square denoiser determines the score, and vice versa.
Score matching. Aapo Hyvärinen (2005) observed that the squared error of a candidate score can be computed, up to a constant independent of , without knowing :
by integrating the cross term by parts (Exercise 4.9). Pascal Vincent (2011) showed that for noised data one can do better: minimising the denoising score matching loss
over gives the same minimiser as , because the two losses differ by a constant (Exercise 4.10). The target is computable from a clean sample and its noised version, so the score of the noised distribution is learned by regression on pairs (clean, noisy), which is Tweedie's formula turned into an algorithm.
Generative diffusion models assemble these pieces. Fix a forward noising process, typically an Ornstein–Uhlenbeck process that carries the data distribution close to a standard Gaussian by a time (6D.3 Stochastic Differential Equations and Feynman–Kac). Train a neural network by denoising score matching at all noise levels at once. To generate, sample and integrate the reverse-time SDE of Theorem 4.3 with in place of the score, or the probability-flow ODE, numerically (6D.10 Monte Carlo, Fourier and Finite Element Methods). Jascha Sohl-Dickstein and collaborators introduced the approach in 2015; Jonathan Ho, Ajay Jain and Pieter Abbeel's denoising diffusion probabilistic models (2020) and Yang Song and collaborators' SDE formulation (2021) made it practical, and from 2022 it underlay widely used text-to-image systems. What is proved: if the learned score is accurate in along the forward process and the data distribution has finite second moment, the law of the generated samples is close to the data distribution in total variation or Kullback–Leibler divergence, with polynomial dependence on the dimension and the error (results of Sitan Chen, Sinho Chewi and collaborators, and of others, from 2022 onwards). What is not proved, and is the subject of active research, is why neural networks learn the score well enough, and why the models generalise instead of reproducing their training data.
The Schrödinger bridge
Erwin Schrödinger asked in 1931 a question that connects time reversal with optimal transport. Suppose a cloud of independent Brownian particles is observed with distribution at time and, unexpectedly, at time (not the heat-flow evolution of ). What is the most likely way it got there? By large deviations, the answer is the law on paths that minimises the relative entropy with respect to Brownian motion, among laws with marginals and : the Schrödinger bridge. Its density is a product of a solution of the backward heat equation and a solution of the forward heat equation, the Schrödinger system, and its drift is , a score-like correction, exactly as in time reversal.
Christian Léonard showed (2012–14) that the static version of Schrödinger's problem, the minimisation of over plans , is entropic optimal transport, the problem solved by Sinkhorn's algorithm (6C.10 Fully Nonlinear Equations and Monge–Ampère), and that as the noise level the Schrödinger bridge converges to the displacement interpolation of 6C.11 Optimal Transport and Ricci Curvature. So the three objects of this chapter and the last, time-reversed diffusions, entropic optimal transport and Wasserstein geodesics, are aspects of one variational problem, with the noise level as the parameter. Diffusion "bridges" between two data distributions (rather than between data and noise) are now trained in machine learning by exactly this connection.
Perelman's entropy as a Fokker–Planck entropy
Let be a Ricci flow on a closed manifold and . Perelman's conjugate heat equation for a density (with respect to the moving volume ),
is the Fokker–Planck equation of Brownian motion on the evolving manifold run backward in time (6D.3 Stochastic Differential Equations and Feynman–Kac); it preserves , the term compensating the change of volume . Write
Then:
- is the score. . On flat space, for the backward heat kernel based at , and the score points to the base point, as in the Brownian bridge.
- is a Fisher information. It is , the Fisher information of the density (6A.12 Entropy, Information and Diffusion). For the Euclidean heat kernel it equals (Exercise 4.11).
- is an entropy. : minus the Shannon entropy of , shifted by the entropy of the Gaussian of the same scale. Set , the Nash entropy; it vanishes for the Euclidean heat kernel.
- is the derivative of the Nash entropy. Perelman's entropy is
a combination of the Fisher information (plus the curvature term ), the entropy, and constants. Along the coupled flow (Ricci flow and conjugate heat equation), , equivalently for the conjugate heat kernel; Lei Ni (2004) proved the analogous identity for the linear heat equation on a fixed manifold, and Bamler (2020) made the Nash entropy the basic quantity of his structure theory.
So Perelman's monotone quantity is built from exactly the ingredients of this chapter: a density evolving by a Fokker–Planck equation, its entropy, its score and its Fisher information. The monotonicity of (12A.3 The 𝓦-Entropy) is the geometric analogue of the de Bruijn identity and the convexity of entropy along the heat flow of 6A.12 Entropy, Information and Diffusion, with curvature terms that the Ricci flow is designed to make vanish exactly on shrinking solitons.
6D.5 Diffusions on Manifolds and Curvature moves Brownian motion onto a Riemannian manifold, develops the Bakry–Émery calculus that proves Theorem 4.2, and runs Brownian motion along a Ricci flow. 6D.10 Monte Carlo, Fourier and Finite Element Methods simulates SDEs, including reverse-time ones. 6C.11 Optimal Transport and Ricci Curvature interprets the Fokker–Planck equation as a Wasserstein gradient flow. 12A.3 The 𝓦-Entropy proves the monotonicity of , and 9B.7 The Heat Equation on a Manifold studies the conjugate heat kernel.
History
Fokker (1914) and Planck (1917) wrote the forward equation, and Kolmogorov (1931) both equations in general. Schrödinger posed his bridge problem in 1931–32. Robbins's empirical Bayes paper, with Tweedie's formula, appeared in 1956. Nelson studied time reversal and osmotic velocities in his stochastic mechanics (1966), Anderson proved the reverse-time diffusion formula in 1982, and Haussmann and Pardoux gave the general theorem in 1986. Bakry and Émery introduced their criterion in 1985, and Holley and Stroock their perturbation lemma in 1987. Hyvärinen introduced score matching in 2005, Vincent denoising score matching in 2011, and Villani hypocoercivity in 2009. Léonard connected the Schrödinger problem to optimal transport in 2012–14. Sohl-Dickstein and collaborators proposed diffusion-based generative models in 2015, Ho, Jain and Abbeel's DDPM appeared in 2020 and Song and collaborators' SDE formulation in 2021. Ni's entropy formula for the linear heat equation appeared in 2004, and Bamler's Nash entropy theory from 2020.
The Fokker–Planck equation of Langevin dynamics is , so the relative density solves the backward equation, the generator is symmetric in , and the process is reversible (detailed balance). The variance of decays at the rate of the spectral gap (Poincaré); the relative entropy decays at the rate of the relative Fisher information, , so a log-Sobolev inequality with constant gives , and Bakry–Émery gives when ; entropy tensorises, which is why it suits high dimensions, and hypocoercivity handles kinetic Langevin dynamics. A diffusion run backwards has drift , with the score as correction, and the probability-flow ODE has the same marginals. Tweedie's formula identifies denoising with the score, and score matching and denoising score matching learn it by regression: the basis of diffusion models. The Schrödinger bridge is entropic optimal transport and tends to displacement interpolation as noise vanishes. In Perelman's language, is the score of the conjugate heat kernel, its Fisher information, its entropy, and the derivative of the Nash entropy. 6D.5 Diffusions on Manifolds and Curvature puts Brownian motion on curved spaces.
Exercises
Show that for , and that satisfies .
Solution
. For : and ; divide by .
For with : (a) find the law of ; (b) compute with , using ; (c) check that for , as Bakry–Émery predicts with .
Solution
(a) By 6D.3 Stochastic Differential Equations and Feynman–Kac with , : . (b) With and : . (c) The mean term is exactly , decaying at the rate . For the variance term, with is , which decays like , faster than required; that is increasing in gives . The slowest mode is the mean, the first Hermite mode, as in 6A.13 Self-Similar Variables and Monotonicity.
For the stationary Ornstein–Uhlenbeck process with , compute the reversed drift and show . For the same equation started at a point , compute the reversed drift at time and interpret it.
Solution
Here , , and for all , so and . Started at , , , and with , . As () the second term is , a strong pull toward : the reversed process is a bridge that must end at the starting point.
Let solve , with independent of . Show that the velocity field satisfies , so the flow of pushes to . For , and a Gaussian , solve the ODE explicitly.
Solution
, since ; this is . For the heat equation from : , , and . The ODE gives : every particle moves radially outward, scaling the Gaussian, with no randomness at all.
Let with independent of , so with the density. Show and deduce .
Solution
, so differentiating under the integral gives the first formula. By Bayes, the conditional law of given is , so .
For a smooth vector field and a smooth density with enough decay, show , and deduce .
Solution
. Expanding the square, . The last term does not depend on , so minimising the first two, which need only samples from , minimises the error.
With as in Exercise 4.8, show that for every ,
with independent of . (Hint: condition on and use Tweedie.)
Solution
Write . By Tweedie, . So with . Then , the cross term vanishing after conditioning on . The constant is .
On (flat, ), let . (a) Find and the score . (b) Show and , so . (c) Show , and check .
Solution
(a) and . (b) and (variance per coordinate), so ; , so . (c) , and . The Gaussian is the equality case of every inequality in sight: log-Sobolev, the monotonicity of , and the vanishing of the Nash entropy.
Free resources for this chapter
Chosen for what this chapter covers, and all free to read. Links checked Oct 20, 2026.
- Paper Score-based generative modeling through stochastic differential equationsY. Song, J. Sohl-Dickstein, D. P. Kingma, A. Kumar, S. Ermon and B. Poole, arXiv:2011.13456 (ICLR 2021) · §§2–4The forward SDE, the reverse-time SDE with the score, the probability-flow ODE and denoising score matching.
- Reference Fokker–Planck equationWikipediaThe forward equation, stationary solutions and examples.
- Reference Detailed balanceWikipediaReversibility of Markov processes at equilibrium.
- Reference Diffusion modelWikipediaScore-based and denoising diffusion models in machine learning.
© 2026 NeckPinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.