Book 6D

© 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.

39 min read · Updated Oct 23, 2026

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.

In this chapter · 8 sections
  1. 4.1Reversible diffusions and detailed balance
  2. 4.2Entropy and the approach to equilibrium
  3. 4.3Running a diffusion backwards
  4. 4.4Learning the score
  5. 4.5The Schrödinger bridge
  6. 4.6Perelman's entropy as a Fokker–Planck entropy
  7. 4.7History
  8. 4.8Exercises
  9. ↗Free resources

6D.3 Stochastic Differential Equations and Feynman–Kac derived the Fokker–Planck equation ∂tp=L∗p\partial_tp = L^*p 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 ∇log⁡pt\nabla\log p_t 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 ff, defined by u=(4πτ)−n/2e−fu = (4\pi\tau)^{-n/2}e^{-f}, has gradient −∇f=∇log⁡u-\nabla f = \nabla\log u, the score of the conjugate heat kernel; the term ∫∣∇f∣2u\int|\nabla f|^2u in his entropy W\mathcal W is a Fisher information; and W\mathcal W 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 H(pt ∣ π)H(p_t\,|\,\pi) 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 L2L^2 (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 W\mathcal W.

Reversible diffusions and detailed balance

Consider the overdamped Langevin equation on Rn\mathbb{R}^n of 6D.3 Stochastic Differential Equations and Feynman–Kac,

dXt=−∇V(Xt) dt+2 dBt,dX_t = -\nabla V(X_t)\,dt + \sqrt2\,dB_t,

with Z=∫e−V<∞Z = \int e^{-V} < \infty and Gibbs measure π=Z−1e−V\pi = Z^{-1}e^{-V}. Its generator is L=Δ−∇V⋅∇L = \Delta - \nabla V\cdot\nabla and the Fokker–Planck equation for the density ptp_t is

∂tp=div⁡(∇p+p∇V)=div⁡(π∇pπ).\partial_tp = \operatorname{div}(\nabla p + p\nabla V) = \operatorname{div}\Big(\pi\nabla\frac p\pi\Big).

The last form (Exercise 4.4) is the key to everything in this section. Writing ht=ptπh_t = \frac{p_t}{\pi}, the relative density, the equation becomes ∂th=Lh\partial_th = Lh: the relative density solves the backward Kolmogorov equation. And LL is symmetric in L2(π)L^2(\pi),

∫(Lf)g dπ=−∫∇f⋅∇g dπ,\int(Lf)g\,d\pi = -\int\nabla f\cdot\nabla g\,d\pi,

a weighted integration by parts. Symmetry of the generator in L2(π)L^2(\pi) is reversibility: if X0∼πX_0 \sim \pi, 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, π(x)pt(x,y)=π(y)pt(y,x)\pi(x)p_t(x, y) = \pi(y)p_t(y, x): at equilibrium, the flux of probability from xx to yy equals the flux from yy to xx. 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 dX=b dt+σ dBdX = b\,dt + \sigma\,dB is reversible with respect to some π\pi exactly when its drift has the form b=12div⁡a+12a∇log⁡πb = \frac12\operatorname{div}a + \frac12a\nabla\log\pi, with a=σσTa = \sigma\sigma^T (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 a=2Ia = 2I, log⁡π=−V\log\pi = -V.

Entropy and the approach to equilibrium

How fast does ptp_t approach π\pi? There are two natural measures of the distance, and two corresponding inequalities.

L2L^2 and the Poincaré inequality. Since ∂th=Lh\partial_th = Lh with LL symmetric and nonpositive in L2(π)L^2(\pi), the variance Var⁡π(ht)=∫(ht−1)2 dπ\operatorname{Var}_\pi(h_t) = \int(h_t - 1)^2\,d\pi satisfies

ddtVar⁡π(ht)=−2∫∣∇ht∣2 dπ.\frac{d}{dt}\operatorname{Var}_\pi(h_t) = -2\int|\nabla h_t|^2\,d\pi.

If π\pi satisfies a Poincaré inequality Var⁡π(f)≤1κ∫∣∇f∣2 dπ\operatorname{Var}_\pi(f) \leq \frac1\kappa\int|\nabla f|^2\,d\pi, then Var⁡π(ht)≤e−2κtVar⁡π(h0)\operatorname{Var}_\pi(h_t) \leq e^{-2\kappa t}\operatorname{Var}_\pi(h_0): exponential convergence at the rate of the spectral gap κ\kappa of −L-L. For the Gaussian π=N(0,I)\pi = N(0, I) (V=∣x∣22V = \frac{|x|^2}{2}) the gap is κ=1\kappa = 1, the Gaussian Poincaré inequality of 6A.13 Self-Similar Variables and Monotonicity in this normalisation.

Entropy and the logarithmic Sobolev inequality. The L2L^2 distance is finite only for densities with ∫p2π<∞\int\frac{p^2}{\pi} < \infty, a strong condition in high dimensions. The relative entropy

H(p ∣ π)=∫plog⁡pπ dx=∫hlog⁡h dπH(p\,|\,\pi) = \int p\log\frac p\pi\,dx = \int h\log h\,d\pi

is finite much more often, is nonnegative with equality only for p=πp = \pi (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).

Proposition 4.1 Entropy dissipation

Along the Fokker–Planck flow, with enough decay at infinity,

ddtH(pt ∣ π)=−∫pt∣∇log⁡ptπ∣2dx=:−I(pt ∣ π),\frac{d}{dt}H(p_t\,|\,\pi) = -\int p_t\Big|\nabla\log\frac{p_t}{\pi}\Big|^2dx =: -I(p_t\,|\,\pi),

the relative Fisher information.

Proof. ddt∫plog⁡pπ=∫∂tp(log⁡pπ+1)=∫div⁡(π∇pπ)log⁡pπ\frac{d}{dt}\int p\log\frac p\pi = \int\partial_tp\big(\log\frac p\pi + 1\big) = \int\operatorname{div}\big(\pi\nabla\frac p\pi\big)\log\frac p\pi, since ∫∂tp=0\int\partial_tp = 0. Integrating by parts, this is −∫π∇pπ⋅∇log⁡pπ=−∫π∣∇(p/π)∣2p/π=−∫p∣∇log⁡pπ∣2-\int\pi\nabla\frac p\pi\cdot\nabla\log\frac p\pi = -\int\pi\frac{|\nabla(p/\pi)|^2}{p/\pi} = -\int p\big|\nabla\log\frac p\pi\big|^2.

If π\pi satisfies a logarithmic Sobolev inequality with constant κ\kappa,

H(p ∣ π)≤12κI(p ∣ π)for all probability densities p,H(p\,|\,\pi) \leq \frac{1}{2\kappa}I(p\,|\,\pi) \qquad\text{for all probability densities } p,

then ddtH≤−2κH\frac{d}{dt}H \leq -2\kappa H, and

H(pt ∣ π)≤e−2κtH(p0 ∣ π).H(p_t\,|\,\pi) \leq e^{-2\kappa t}H(p_0\,|\,\pi).

For the standard Gaussian this is Gross's inequality (6A.12 Entropy, Information and Diffusion) with κ=1\kappa = 1. When is it true in general? Dominique Bakry and Michel Émery (1985) found a curvature condition.

Theorem 4.2 Bakry–Émery criterion (statement)

If D2V≥κID^2V \geq \kappa I with κ>0\kappa > 0, then π=Z−1e−V\pi = Z^{-1}e^{-V} satisfies the logarithmic Sobolev inequality with constant κ\kappa, hence the Poincaré inequality with constant κ\kappa, and the Fokker–Planck flow converges to π\pi in relative entropy at the rate e−2κte^{-2\kappa t}.

The proof differentiates the Fisher information along the flow and finds ddtI≤−2κI\frac{d}{dt}I \leq -2\kappa I, using the Bochner-type identity 12L∣∇f∣2−∇f⋅∇Lf=∣∇2f∣2+D2V(∇f,∇f)\frac12L|\nabla f|^2 - \nabla f\cdot\nabla Lf = |\nabla^2f|^2 + D^2V(\nabla f, \nabla f) (6D.5 Diffusions on Manifolds and Curvature develops this calculus); integrating II from tt to ∞\infty then gives the inequality. Uniform convexity of the potential is the flat-space form of a lower bound on the Bakry–Émery Ricci curvature Ric⁡+∇2V\operatorname{Ric} + \nabla^2V (6C.11 Optimal Transport and Ricci Curvature): on a manifold with measure e−VdVe^{-V}dV the criterion is Ric⁡+∇2V≥κg\operatorname{Ric} + \nabla^2V \geq \kappa g. 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 VV has deep separated wells: a particle must climb over a barrier to equilibrate, and the time to do so grows like eΔVe^{\Delta V} (the Eyring–Kramers law of chemical reaction rates).

Why entropy rather than L2L^2. In dimension nn, a product measure π⊗n\pi^{\otimes n} satisfies log-Sobolev with the same constant as π\pi (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 L2L^2 distances of natural initial data can be exponentially large in nn. 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, dX=V′ dtdX = V'\,dt in position and dV′=−∇U(X) dt−γV′ dt+2γ dBdV' = -\nabla U(X)\,dt - \gamma V'\,dt + \sqrt{2\gamma}\,dB 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 XtX_t, 0≤t≤T0 \leq t \leq T, solve dXt=b(t,Xt) dt+σ(t) dBtdX_t = b(t, X_t)\,dt + \sigma(t)\,dB_t with noise σ(t)\sigma(t) independent of position, and let ptp_t be the density of XtX_t. Define the reversed process Xˉs=XT−s\bar X_s = X_{T-s}. Is it a diffusion, and with what coefficients?

Theorem 4.3 Time reversal (Anderson 1982; Haussmann–Pardoux 1986)

Under regularity and integrability conditions on bb and pp, the reversed process Xˉs=XT−s\bar X_s = X_{T-s} is a diffusion with the same noise and drift

bˉ(s,x)=−b(T−s,x)+σσT(T−s) ∇log⁡pT−s(x):\bar b(s, x) = -b(T - s, x) + \sigma\sigma^T(T - s)\,\nabla\log p_{T-s}(x):
dXˉs=(−b(T−s,Xˉs)+a(T−s)∇log⁡pT−s(Xˉs))ds+σ(T−s) dBˉs,d\bar X_s = \Big(-b(T - s, \bar X_s) + a(T - s)\nabla\log p_{T-s}(\bar X_s)\Big)ds + \sigma(T - s)\,d\bar B_s,

with a=σσTa = \sigma\sigma^T and Bˉ\bar B 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 pˉs=pT−s\bar p_s = p_{T-s}. We check that pˉ\bar p solves the Fokker–Planck equation of the proposed reversed diffusion. Forward, ∂tp=−div⁡(bp)+12div⁡(a∇p)\partial_tp = -\operatorname{div}(bp) + \frac12\operatorname{div}(a\nabla p), so

∂spˉ=−∂tp=div⁡(bpˉ)−12div⁡(a∇pˉ).\partial_s\bar p = -\partial_tp = \operatorname{div}(b\bar p) - \frac12\operatorname{div}(a\nabla\bar p).

The Fokker–Planck equation for drift bˉ=−b+a∇log⁡pˉ\bar b = -b + a\nabla\log\bar p and diffusion aa is

∂sq=−div⁡(bˉq)+12div⁡(a∇q).\partial_s q = -\operatorname{div}(\bar bq) + \frac12\operatorname{div}(a\nabla q).

Put q=pˉq = \bar p: since a∇log⁡pˉ pˉ=a∇pˉa\nabla\log\bar p\,\bar p = a\nabla\bar p, the right side is div⁡(bpˉ)−div⁡(a∇pˉ)+12div⁡(a∇pˉ)=div⁡(bpˉ)−12div⁡(a∇pˉ)\operatorname{div}(b\bar p) - \operatorname{div}(a\nabla\bar p) + \frac12\operatorname{div}(a\nabla\bar p) = \operatorname{div}(b\bar p) - \frac12\operatorname{div}(a\nabla\bar p), which is ∂spˉ\partial_s\bar p. So the reversed density solves the forward equation of the proposed diffusion with the right initial condition pˉ0=pT\bar p_0 = p_T; uniqueness for that equation and the Markov property give the claim at the level of finite-dimensional distributions.

The correction a∇log⁡pa\nabla\log p 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 x0x_0, ptp_t is a Gaussian centred at x0x_0 and the score ∇log⁡pt=−x−x0t\nabla\log p_t = -\frac{x - x_0}{t} points back to x0x_0, so the reversed process is a Brownian bridge pulled back to the starting point. For a stationary reversible diffusion, bˉ=b\bar b = b (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

dxdt=b(t,x)−12a(t)∇log⁡pt(x)\frac{dx}{dt} = b(t, x) - \frac12a(t)\nabla\log p_t(x)

transports the density p0p_0 into exactly ptp_t at each time (Exercise 4.7), because its continuity equation ∂tp=−div⁡((b−12a∇log⁡p)p)\partial_tp = -\operatorname{div}\big((b - \frac12a\nabla\log p)p\big) 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 log⁡p\log p. For the heat flow (b=0b = 0, a=2Ia = 2I) the velocity is −∇log⁡p-\nabla\log p, 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 ∇log⁡pt\nabla\log p_t at every time. In applications p0p_0 is known only through samples (a collection of photographs, say), and ptp_t 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 X~=X+σZ\tilde X = X + \sigma Z, with Z∼N(0,I)Z \sim N(0, I) independent of XX, and let pσp_\sigma be the density of X~\tilde X. Then

E[X ∣ X~=y]=y+σ2∇log⁡pσ(y)\mathbb{E}[X\,|\,\tilde X = y] = y + \sigma^2\nabla\log p_\sigma(y)

(Exercise 4.8). The posterior mean of the clean signal, given a noisy observation, is the observation plus σ2\sigma^2 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 E∣s(X)−∇log⁡p(X)∣2\mathbb{E}|s(X) - \nabla\log p(X)|^2 of a candidate score ss can be computed, up to a constant independent of ss, without knowing pp:

Ep∣s−∇log⁡p∣2=Ep(∣s∣2+2div⁡s)+Ep∣∇log⁡p∣2,\mathbb{E}_p|s - \nabla\log p|^2 = \mathbb{E}_p\big(|s|^2 + 2\operatorname{div}s\big) + \mathbb{E}_p|\nabla\log p|^2,

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

EX,X~∣s(X~)−∇x~log⁡p(X~ ∣ X)∣2=E∣s(X~)+X~−Xσ2∣2\mathbb{E}_{X,\tilde X}\Big|s(\tilde X) - \nabla_{\tilde x}\log p(\tilde X\,|\,X)\Big|^2 = \mathbb{E}\Big|s(\tilde X) + \frac{\tilde X - X}{\sigma^2}\Big|^2

over ss gives the same minimiser as E∣s(X~)−∇log⁡pσ(X~)∣2\mathbb{E}|s(\tilde X) - \nabla\log p_\sigma(\tilde X)|^2, because the two losses differ by a constant (Exercise 4.10). The target −X~−Xσ2-\frac{\tilde X - X}{\sigma^2} 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.

In the world In use Score-based diffusion models

Generative diffusion models assemble these pieces. Fix a forward noising process, typically an Ornstein–Uhlenbeck process dX=−12β(t)X dt+β(t) dBdX = -\frac12\beta(t)X\,dt + \sqrt{\beta(t)}\,dB that carries the data distribution close to a standard Gaussian by a time TT (6D.3 Stochastic Differential Equations and Feynman–Kac). Train a neural network sθ(x,t)s_\theta(x, t) by denoising score matching at all noise levels at once. To generate, sample xT∼N(0,I)x_T \sim N(0, I) and integrate the reverse-time SDE of Theorem 4.3 with sθs_\theta 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 L2L^2 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 μ0\mu_0 at time 00 and, unexpectedly, μ1\mu_1 at time 11 (not the heat-flow evolution of μ0\mu_0). 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 μ0\mu_0 and μ1\mu_1: the Schrödinger bridge. Its density is a product φ(t,x)φ^(t,x)\varphi(t, x)\hat\varphi(t, x) of a solution of the backward heat equation and a solution of the forward heat equation, the Schrödinger system, and its drift is ∇log⁡φ\nabla\log\varphi, 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 ∫c dπ+εH(π ∣ μ0⊗μ1)\int c\,d\pi + \varepsilon H(\pi\,|\,\mu_0\otimes\mu_1) over plans π\pi, 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 ε→0\varepsilon \to 0 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 g(t)g(t) be a Ricci flow on a closed manifold and τ=T−t\tau = T - t. Perelman's conjugate heat equation for a density uu (with respect to the moving volume dVg(τ)dV_{g(\tau)}),

∂τu=Δu−Ru,\partial_\tau u = \Delta u - Ru,

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 ∫u dV\int u\,dV, the term −Ru-Ru compensating the change of volume ∂τdV=R dV\partial_\tau dV = R\,dV. Write

u=(4πτ)−n/2e−f.u = (4\pi\tau)^{-n/2}e^{-f}.

Then:

  • −∇f-\nabla f is the score. ∇log⁡u=−∇f\nabla\log u = -\nabla f. On flat space, for the backward heat kernel based at x0x_0, f=∣x−x0∣24τf = \frac{|x - x_0|^2}{4\tau} and the score −x−x02τ-\frac{x - x_0}{2\tau} points to the base point, as in the Brownian bridge.
  • ∫∣∇f∣2u\int|\nabla f|^2u is a Fisher information. It is ∫u∣∇log⁡u∣2 dV\int u|\nabla\log u|^2\,dV, the Fisher information of the density uu (6A.12 Entropy, Information and Diffusion). For the Euclidean heat kernel it equals n2τ\frac{n}{2\tau} (Exercise 4.11).
  • ∫fu\int fu is an entropy. ∫fu dV=−∫ulog⁡u dV−n2log⁡(4πτ)\int fu\,dV = -\int u\log u\,dV - \frac n2\log(4\pi\tau): minus the Shannon entropy of uu, shifted by the entropy of the Gaussian of the same scale. Set N(τ)=∫fu dV−n2\mathcal N(\tau) = \int fu\,dV - \frac n2, the Nash entropy; it vanishes for the Euclidean heat kernel.
  • W\mathcal W is the derivative of the Nash entropy. Perelman's entropy is
W=∫[τ(∣∇f∣2+R)+f−n]u dV,\mathcal W = \int\big[\tau(|\nabla f|^2 + R) + f - n\big]u\,dV,

a combination of the Fisher information (plus the curvature term ∫Ru\int Ru), the entropy, and constants. Along the coupled flow (Ricci flow and conjugate heat equation), W=ddτ(τN(τ))\mathcal W = \frac{d}{d\tau}\big(\tau\mathcal N(\tau)\big), equivalently N(τ)=1τ∫0τW(σ) dσ\mathcal N(\tau) = \frac1\tau\int_0^\tau\mathcal W(\sigma)\,d\sigma 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 W\mathcal W (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.

Where this goes Where this goes

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 W\mathcal W, 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.

Recall Where we stand

The Fokker–Planck equation of Langevin dynamics is ∂tp=div⁡(π∇pπ)\partial_tp = \operatorname{div}(\pi\nabla\frac p\pi), so the relative density solves the backward equation, the generator is symmetric in L2(π)L^2(\pi), and the process is reversible (detailed balance). The variance of pπ\frac p\pi decays at the rate of the spectral gap (Poincaré); the relative entropy decays at the rate of the relative Fisher information, ddtH(p ∣ π)=−I(p ∣ π)\frac{d}{dt}H(p\,|\,\pi) = -I(p\,|\,\pi), so a log-Sobolev inequality with constant κ\kappa gives H≤e−2κtH0H \leq e^{-2\kappa t}H_0, and Bakry–Émery gives κ\kappa when D2V≥κD^2V \geq \kappa; entropy tensorises, which is why it suits high dimensions, and hypocoercivity handles kinetic Langevin dynamics. A diffusion run backwards has drift −b+a∇log⁡p-b + a\nabla\log p, with the score as correction, and the probability-flow ODE x˙=b−12a∇log⁡p\dot x = b - \frac12a\nabla\log p 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, −∇f-\nabla f is the score of the conjugate heat kernel, ∫∣∇f∣2u\int|\nabla f|^2u its Fisher information, ∫fu\int fu its entropy, and W=ddτ(τN)\mathcal W = \frac{d}{d\tau}(\tau\mathcal N) the derivative of the Nash entropy. 6D.5 Diffusions on Manifolds and Curvature puts Brownian motion on curved spaces.

Exercises

Exercise 4.4 The gradient form

Show that div⁡(∇p+p∇V)=div⁡(π∇pπ)\operatorname{div}(\nabla p + p\nabla V) = \operatorname{div}\big(\pi\nabla\frac p\pi\big) for π=Z−1e−V\pi = Z^{-1}e^{-V}, and that h=pπh = \frac p\pi satisfies ∂th=Δh−∇V⋅∇h\partial_th = \Delta h - \nabla V\cdot\nabla h.

Solution

π∇pπ=∇p−p∇log⁡π=∇p+p∇V\pi\nabla\frac p\pi = \nabla p - p\nabla\log\pi = \nabla p + p\nabla V. For hh: ∂tp=π∂th\partial_tp = \pi\partial_th and div⁡(π∇h)=πΔh+∇π⋅∇h=π(Δh−∇V⋅∇h)\operatorname{div}(\pi\nabla h) = \pi\Delta h + \nabla\pi\cdot\nabla h = \pi(\Delta h - \nabla V\cdot\nabla h); divide by π\pi.

Exercise 4.5 The Ornstein–Uhlenbeck process in entropy

For dX=−X dt+2 dBdX = -X\,dt + \sqrt2\,dB with X0=x0X_0 = x_0: (a) find the law ptp_t of XtX_t; (b) compute H(pt ∣ π)H(p_t\,|\,\pi) with π=N(0,I)\pi = N(0, I), using H(N(m,sI) ∣ N(0,I))=12(n(s−1−log⁡s)+∣m∣2)H(N(m, sI)\,|\,N(0, I)) = \frac12\big(n(s - 1 - \log s) + |m|^2\big); (c) check that H(pt ∣ π)≤e−2tH(pt0 ∣ π)H(p_t\,|\,\pi) \leq e^{-2t}H(p_{t_0}\,|\,\pi) for t≥t0>0t \geq t_0 > 0, as Bakry–Émery predicts with κ=1\kappa = 1.

Solution

(a) By 6D.3 Stochastic Differential Equations and Feynman–Kac with θ=1\theta = 1, σ=2\sigma = \sqrt2: Xt∼N(e−tx0,(1−e−2t)I)X_t \sim N(e^{-t}x_0, (1 - e^{-2t})I). (b) With s=1−e−2ts = 1 - e^{-2t} and m=e−tx0m = e^{-t}x_0: H=12(n(−e−2t−log⁡(1−e−2t))+e−2t∣x0∣2)H = \frac12\big(n(-e^{-2t} - \log(1 - e^{-2t})) + e^{-2t}|x_0|^2\big). (c) The mean term is exactly 12e−2t∣x0∣2\frac12e^{-2t}|x_0|^2, decaying at the rate e−2te^{-2t}. For the variance term, ϕ(s)=s−1−log⁡s\phi(s) = s - 1 - \log s with 1−s=ε=e−2t1 - s = \varepsilon = e^{-2t} is −ε−log⁡(1−ε)=ε22+ε33+⋯-\varepsilon - \log(1 - \varepsilon) = \frac{\varepsilon^2}{2} + \frac{\varepsilon^3}{3} + \cdots, which decays like e−4te^{-4t}, faster than required; that ϕ(1−ε)/ε\phi(1 - \varepsilon)/\varepsilon is increasing in ε\varepsilon gives ϕ(1−e−2t)≤e−2(t−t0)ϕ(1−e−2t0)\phi(1 - e^{-2t}) \leq e^{-2(t - t_0)}\phi(1 - e^{-2t_0}). The slowest mode is the mean, the first Hermite mode, as in 6A.13 Self-Similar Variables and Monotonicity.

Exercise 4.6 Reversing a stationary process

For the stationary Ornstein–Uhlenbeck process dX=−X dt+2 dBdX = -X\,dt + \sqrt2\,dB with X0∼N(0,I)X_0 \sim N(0, I), compute the reversed drift bˉ=−b+a∇log⁡p\bar b = -b + a\nabla\log p and show bˉ=b\bar b = b. For the same equation started at a point x0x_0, compute the reversed drift at time ss and interpret it.

Solution

Here b=−xb = -x, a=2Ia = 2I, and pt=N(0,I)p_t = N(0, I) for all tt, so ∇log⁡p=−x\nabla\log p = -x and bˉ=x+2(−x)=−x=b\bar b = x + 2(-x) = -x = b. Started at x0x_0, pt=N(e−tx0,(1−e−2t)I)p_t = N(e^{-t}x_0, (1 - e^{-2t})I), ∇log⁡pt=−x−e−tx01−e−2t\nabla\log p_t = -\frac{x - e^{-t}x_0}{1 - e^{-2t}}, and with t=T−st = T - s, bˉ(s,x)=x−2(x−e−tx0)1−e−2t\bar b(s, x) = x - \frac{2(x - e^{-t}x_0)}{1 - e^{-2t}}. As s→Ts \to T (t→0t \to 0) the second term is ≈−x−x0t\approx -\frac{x - x_0}{t}, a strong pull toward x0x_0: the reversed process is a bridge that must end at the starting point.

Exercise 4.7 The probability-flow ODE

Let ptp_t solve ∂tp=−div⁡(bp)+12div⁡(a∇p)\partial_tp = -\operatorname{div}(bp) + \frac12\operatorname{div}(a\nabla p), with aa independent of xx. Show that the velocity field v=b−12a∇log⁡pv = b - \frac12a\nabla\log p satisfies ∂tp+div⁡(pv)=0\partial_tp + \operatorname{div}(pv) = 0, so the flow of x˙=v(t,x)\dot x = v(t, x) pushes p0p_0 to ptp_t. For b=0b = 0, a=2Ia = 2I and p0p_0 a Gaussian N(0,s0I)N(0, s_0I), solve the ODE explicitly.

Solution

div⁡(pv)=div⁡(bp)−12div⁡(a∇p)\operatorname{div}(pv) = \operatorname{div}(bp) - \frac12\operatorname{div}(a\nabla p), since p∇log⁡p=∇pp\nabla\log p = \nabla p; this is −∂tp-\partial_tp. For the heat equation ∂tp=Δp\partial_tp = \Delta p from N(0,s0I)N(0, s_0I): pt=N(0,(s0+2t)I)p_t = N(0, (s_0 + 2t)I), ∇log⁡pt=−xs0+2t\nabla\log p_t = -\frac{x}{s_0 + 2t}, and v=xs0+2tv = \frac{x}{s_0 + 2t}. The ODE x˙=xs0+2t\dot x = \frac{x}{s_0 + 2t} gives x(t)=x(0)s0+2ts0x(t) = x(0)\sqrt{\frac{s_0 + 2t}{s_0}}: every particle moves radially outward, scaling the Gaussian, with no randomness at all.

Exercise 4.8 Tweedie's formula

Let X~=X+σZ\tilde X = X + \sigma Z with Z∼N(0,I)Z \sim N(0, I) independent of X∼μX \sim \mu, so pσ(y)=∫ϕσ(y−x) dμ(x)p_\sigma(y) = \int\phi_\sigma(y - x)\,d\mu(x) with ϕσ\phi_\sigma the N(0,σ2I)N(0, \sigma^2I) density. Show ∇pσ(y)=∫x−yσ2ϕσ(y−x) dμ(x)\nabla p_\sigma(y) = \int\frac{x - y}{\sigma^2}\phi_\sigma(y - x)\,d\mu(x) and deduce E[X ∣ X~=y]=y+σ2∇log⁡pσ(y)\mathbb{E}[X\,|\,\tilde X = y] = y + \sigma^2\nabla\log p_\sigma(y).

Solution

∇yϕσ(y−x)=−y−xσ2ϕσ(y−x)\nabla_y\phi_\sigma(y - x) = -\frac{y - x}{\sigma^2}\phi_\sigma(y - x), so differentiating under the integral gives the first formula. By Bayes, the conditional law of XX given X~=y\tilde X = y is ϕσ(y−x) dμ(x)pσ(y)\frac{\phi_\sigma(y - x)\,d\mu(x)}{p_\sigma(y)}, so E[X−y ∣ X~=y]=1pσ(y)∫(x−y)ϕσ(y−x) dμ(x)=σ2∇pσ(y)pσ(y)\mathbb{E}[X - y\,|\,\tilde X = y] = \frac{1}{p_\sigma(y)}\int(x - y)\phi_\sigma(y - x)\,d\mu(x) = \sigma^2\frac{\nabla p_\sigma(y)}{p_\sigma(y)}.

Exercise 4.9 Hyvärinen's identity

For a smooth vector field ss and a smooth density pp with enough decay, show Ep⟨s,∇log⁡p⟩=−Epdiv⁡s\mathbb{E}_p\langle s, \nabla\log p\rangle = -\mathbb{E}_p\operatorname{div}s, and deduce Ep∣s−∇log⁡p∣2=Ep(∣s∣2+2div⁡s)+Ep∣∇log⁡p∣2\mathbb{E}_p|s - \nabla\log p|^2 = \mathbb{E}_p(|s|^2 + 2\operatorname{div}s) + \mathbb{E}_p|\nabla\log p|^2.

Solution

Ep⟨s,∇log⁡p⟩=∫⟨s,∇p⟩=−∫pdiv⁡s\mathbb{E}_p\langle s, \nabla\log p\rangle = \int\langle s, \nabla p\rangle = -\int p\operatorname{div}s. Expanding the square, E∣s∣2−2E⟨s,∇log⁡p⟩+E∣∇log⁡p∣2=E∣s∣2+2Ediv⁡s+E∣∇log⁡p∣2\mathbb{E}|s|^2 - 2\mathbb{E}\langle s, \nabla\log p\rangle + \mathbb{E}|\nabla\log p|^2 = \mathbb{E}|s|^2 + 2\mathbb{E}\operatorname{div}s + \mathbb{E}|\nabla\log p|^2. The last term does not depend on ss, so minimising the first two, which need only samples from pp, minimises the error.

Exercise 4.10 Denoising score matching

With X~=X+σZ\tilde X = X + \sigma Z as in Exercise 4.8, show that for every ss,

E∣s(X~)+X~−Xσ2∣2=E∣s(X~)−∇log⁡pσ(X~)∣2+C,\mathbb{E}\Big|s(\tilde X) + \frac{\tilde X - X}{\sigma^2}\Big|^2 = \mathbb{E}\big|s(\tilde X) - \nabla\log p_\sigma(\tilde X)\big|^2 + C,

with CC independent of ss. (Hint: condition on X~\tilde X and use Tweedie.)

Solution

Write w=−X~−Xσ2w = -\frac{\tilde X - X}{\sigma^2}. By Tweedie, E[w ∣ X~]=E[X ∣ X~]−X~σ2=∇log⁡pσ(X~)\mathbb{E}[w\,|\,\tilde X] = \frac{\mathbb{E}[X\,|\,\tilde X] - \tilde X}{\sigma^2} = \nabla\log p_\sigma(\tilde X). So w=∇log⁡pσ(X~)+ηw = \nabla\log p_\sigma(\tilde X) + \eta with E[η ∣ X~]=0\mathbb{E}[\eta\,|\,\tilde X] = 0. Then E∣s(X~)−w∣2=E∣s(X~)−∇log⁡pσ(X~)∣2+E∣η∣2\mathbb{E}|s(\tilde X) - w|^2 = \mathbb{E}|s(\tilde X) - \nabla\log p_\sigma(\tilde X)|^2 + \mathbb{E}|\eta|^2, the cross term vanishing after conditioning on X~\tilde X. The constant is C=E∣η∣2C = \mathbb{E}|\eta|^2.

Exercise 4.11 The score and Fisher information of the heat kernel

On Rn\mathbb{R}^n (flat, R=0R = 0), let u=(4πτ)−n/2e−∣x∣2/4τu = (4\pi\tau)^{-n/2}e^{-|x|^2/4\tau}. (a) Find ff and the score ∇log⁡u\nabla\log u. (b) Show ∫∣∇f∣2u dx=n2τ\int|\nabla f|^2u\,dx = \frac{n}{2\tau} and ∫fu dx=n2\int fu\,dx = \frac n2, so N=0\mathcal N = 0. (c) Show W=0\mathcal W = 0, and check W=ddτ(τN)\mathcal W = \frac{d}{d\tau}(\tau\mathcal N).

Solution

(a) f=∣x∣24τf = \frac{|x|^2}{4\tau} and ∇log⁡u=−x2τ\nabla\log u = -\frac{x}{2\tau}. (b) ∣∇f∣2=∣x∣24τ2|\nabla f|^2 = \frac{|x|^2}{4\tau^2} and ∫∣x∣2u=2nτ\int|x|^2u = 2n\tau (variance 2τ2\tau per coordinate), so ∫∣∇f∣2u=2nτ4τ2=n2τ\int|\nabla f|^2u = \frac{2n\tau}{4\tau^2} = \frac{n}{2\tau}; ∫fu=2nτ4τ=n2\int fu = \frac{2n\tau}{4\tau} = \frac n2, so N=n2−n2=0\mathcal N = \frac n2 - \frac n2 = 0. (c) W=τ⋅n2τ+n2−n=0\mathcal W = \tau\cdot\frac{n}{2\tau} + \frac n2 - n = 0, and ddτ(τ⋅0)=0\frac{d}{d\tau}(\tau\cdot0) = 0. The Gaussian is the equality case of every inequality in sight: log-Sobolev, the monotonicity of W\mathcal W, 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.

© 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.