I first encountered this equation while I co-authored a paper where we investigated a particle-based optimiser with noise. I only later understood the significance of this formula and its connections to basic probability, thermodynamics, and really anything that evolves in time.
I want to try to convey my fascination with this formula at a level understandable at an undergraduate level, which is why I wrote this post. I hope that it is approachable and would love your feedback (You can find my contact info at my homepage.)
Anyways, let's get to it. The equation above is not the one most people write down. The typical form is
$$\frac{\partial \rho}{\partial t} \;=\; \nabla\!\cdot\!\big(\rho\,\nabla V\big)\;+\;T\,\Delta \rho,$$
and it describes what happens to any system that is pulled in some direction while being randomly kicked around: pollen in water, a neuron's membrane voltage, a chemical reaction, an interest rate, a star drifting through a cluster, a weight in a neural network under noisy gradients. Coarse-grain almost anything and this is what you get.
What I want to lay out in this post is that this equation is secretly doing something more significant. There is a quantity \(F\), the Helmholtz free energy, that turns out to be one of the most reusable objects in all of science, showing up in thermodynamics, in Bayesian statistics, in neuroscience, and in the diffusion models currently flooding the internet. And the assertion \(\partial_t\rho = \nabla\!\cdot\!(\rho\,\nabla\,\delta F/\delta\rho)\) says that diffusion is the descent of \(F\), performed as steeply as possible, in a geometry we are going to learn about below.
The essay has three parts. First we meet the Fokker–Planck equation and see why it is nearly universal. Then we meet the free energy, and see why it is nearly universal. Then we prove they are the same thing, with a theorem worth this ode. The essay also has ten interactive figures; you can click underlined terms to open derivations and definition, so not much is asserted here that we do not show.
In 1827, the botanist Robert Brown watched pollen grains tremble in still water with no apparent cause. Einstein explained their motion in 1905: each grain is struck by water molecules millions of times per second, the impacts do not perfectly cancel, and the surviving imbalance is a visible, erratic dance. Watching a pollen grain jitter is as close as we come to seeing molecules with the naked eye.
To model this, let \(X_t\) be the position of one particle. Two influences act. First a landscape: a \(V(x)\), whose slope pulls the particle downhill with force \(-\nabla V\). Second the bombardment, idealized as \(W_t\), scaled by the temperature. Together they give the ,
A scalar function \(V:\mathbb{R}^d\to\mathbb{R}\) assigning an energy to each position. Its gradient \(\nabla V\) points uphill, so a particle feeling the force \(-\nabla V\) rolls downhill, like a marble in a bowl. Valleys of \(V\) are stable resting places; ridges are barriers. In our figures we draw \(V\) as a curve and the particles literally sit on it.
The restriction that the force is minus the gradient of something is not innocent. It is called a conservative or gradient force, and it is exactly the condition that will later make the free energy story work. Forces that are not gradients (a rotating stir, a circulating current) are perfectly legal in the Fokker–Planck equation but break everything in Part III. We return to this in the final section, because it is the sharpest limit on the whole picture.
The canonical model of pure noise. \(W_t\) is the random process with \(W_0=0\), independent increments, \(W_t-W_s \sim \mathcal N(0,\,t-s)\), and continuous paths. Two properties do all the work below.
Variance grows linearly in time. A displacement over \(\Delta t\) has typical size \(\sqrt{\Delta t}\), not \(\Delta t\). This is why noise dominates over drift at short times, and it is the origin of the second derivative in everything that follows: a term of size \((\Delta W)^2 \approx \Delta t\) is first order in time, not negligible.
It is the universal limit of random walks. Donsker's invariance principle: rescale any random walk with finite-variance steps and its path converges to \(W_t\). Brownian motion is to paths what the Gaussian is to sums, and this is the first source of the universality we are chasing.
The notation \(\mathrm dX_t = b(X_t)\mathrm dt + \sigma\,\mathrm dW_t\) is shorthand for the integral equation \(X_t = X_0 + \int_0^t b(X_s)\mathrm ds + \sigma W_t\). Read it as a recipe: each tick, take a small step along the drift \(b\), then add an independent random kick of size \(\sigma\sqrt{\mathrm dt}\). Simulating it by literally doing that is the Euler–Maruyama scheme, which is what runs in every figure on this page.
The calculus of such objects is not ordinary calculus, because \((\mathrm dW)^2 = \mathrm dt\) rather than zero. That single rule generates , the chain rule for random paths, and it is the engine of the derivation in the next subsection.
$$\mathrm{d}X_t \;=\; -\nabla V(X_t)\,\mathrm{d}t \;+\; \sqrt{2T}\;\mathrm{d}W_t.$$
Here \(T\) is the temperature, controlling how violent the kicks are. The figure below runs exactly this recipe. Its landscape is a blank canvas by default, so draw one: sketch a valley, a ridge, a staircase, and watch the crowd respond. One particle is highlighted and drags a trail, so we can follow a single life story against the mass.
Drawing is on: sketch a landscape across the panel with your pointer. Each green dot then obeys the Langevin equation on it, and the dark dot drags a trail so one trajectory is visible. Cool the system and the dots settle into the valleys, still shivering. The shiver is the temperature.
Before we go on, why should this toy deserve the range promised in the introduction? Because of a coarse-graining argument that repeats across science. Take any quantity pushed around by many small, fast, weakly dependent influences. By the logic of the central limit theorem, their net effect over a short time looks Gaussian: a systematic part (the drift) plus noise. Name the drift, name the noise strength, and we have written a Langevin equation, whether the "particle" is a stock price, a reaction coordinate, or a network weight. Drift plus white noise is what nearly everything looks like once we stop resolving details. We will make this precise, and find its exact limits, at the end of Part I.
A single trajectory is unrepeatable: run Figure 1 twice from the same start and we get two different stories. But watch the crowd and something remarkable happens. Its shape evolves the same way every time. Randomness in the individual, determinism in the population. Our task is to find the law governing the shape.
The object is the probability density \(\rho(x,t)\), the idealized histogram of infinitely many independent copies. We derive its equation twice, because the two derivations teach different things.
The physicist's derivation: bookkeeping plus two constitutive laws. Probability cannot be created or destroyed, since each particle is always somewhere. So \(\rho\) can only change by flowing, which means there exists a flux \(J(x,t)\), the rate at which probability streams past a point, satisfying the
Take any fixed region \(\Omega\). The probability inside it can change only by crossing the boundary, so \(\frac{\mathrm d}{\mathrm dt}\int_\Omega \rho = -\oint_{\partial\Omega} J\cdot n\,\mathrm dS\). The divergence theorem turns the right side into \(-\int_\Omega \nabla\!\cdot\!J\), and since \(\Omega\) was arbitrary, the integrands agree: \(\partial_t\rho = -\nabla\!\cdot\!J\).
This is pure accounting and contains no physics. The identical statement governs fluid mass, electric charge, and cars on a highway. All the physics of a specific system lives in what we say \(J\) is, which is why the next two paragraphs, not this one, are where the model is actually chosen.
$$\frac{\partial\rho}{\partial t} \;=\; -\nabla\!\cdot J.$$
Now the physics, in two pieces, one per term of the Langevin equation. The drift carries probability downhill like a current, contributing \(J_{\text{drift}} = -\rho\,\nabla V\): the local density times the local velocity. The noise smooths, because random kicks move probability from crowded regions to empty ones at a rate set by how steep the crowding is. That is , \(J_{\text{noise}} = -T\nabla\rho\). Adding them and substituting gives the :
Why should the diffusive flux be proportional to \(-\nabla\rho\)? Consider a line of bins and let each particle hop left or right with equal probability. The net flow across the wall between bin \(i\) and bin \(i+1\) is proportional to \(\rho_i-\rho_{i+1}\), the imbalance in how many candidates each side has to send. In the continuum limit that difference becomes \(-\partial_x\rho\) times the bin width. Diffusion does not know where the crowd is; it only knows the local slope of the crowd.
Feeding \(J=-T\nabla\rho\) into the continuity equation yields \(\partial_t\rho = T\,\nabla\!\cdot\!\nabla\rho = T\Delta\rho\), the heat equation. The Laplacian \(\Delta\rho=\sum_i \partial^2_{x_i}\rho\) measures how much \(\rho\) at a point falls below its local average, so the equation says: rise where you are below average, fall where you are above. Smoothing, written in symbols.
Probabilists call this Kolmogorov's forward equation and pair it with a backward equation for expectations of the same process. Physicists call it Fokker–Planck, after the 1914 and 1917 papers on electrons in a radiation field. The Smoluchowski equation is the same thing in the overdamped setting we use here. If inertia is retained, one gets the Kramers equation, which is a Fokker–Planck equation on the larger space of position and velocity.
The general form allows a state-dependent drift \(b(x)\) and a state-dependent diffusion matrix \(a(x)\):
$$\partial_t\rho = -\nabla\!\cdot\!(b\,\rho) + \tfrac12\sum_{ij}\partial_i\partial_j (a_{ij}\rho).$$
Our version is the special case \(b=-\nabla V\), \(a = 2T\,\mathrm{Id}\). The specialization is not cosmetic; it is precisely what Part III needs.
$$\boxed{\;\frac{\partial \rho}{\partial t} \;=\; \nabla\!\cdot\!\big(\rho\,\nabla V\big)\;+\;T\,\Delta \rho\;}$$
Read it aloud: the shape of the crowd changes by flowing downhill and diffusing with heat. Set \(V=0\) and it is the heat equation. Set \(T=0\) and it is pure transport.
The probabilist's derivation: test functions and Itô. The physical argument needed Fick's law as an input. The following one needs nothing but the Langevin equation, which is why it is the honest proof. Take any smooth test function \(\varphi\) that vanishes at infinity, and ask how its average \(\mathbb E[\varphi(X_t)] = \int \varphi\,\rho\,\mathrm dx\) evolves. gives
Expand \(\varphi(X_{t+\mathrm dt})\) to second order in the increment \(\mathrm dX = b\,\mathrm dt + \sigma\,\mathrm dW\):
$$\mathrm d\varphi = \varphi'(X)\,\mathrm dX + \tfrac12\varphi''(X)\,(\mathrm dX)^2 + \cdots$$
In ordinary calculus \((\mathrm dX)^2\) is second order and gets dropped. Here it cannot be, because \((\mathrm dW)^2=\mathrm dt\): the noise is so rough that its square is first order in time. Keeping the surviving terms,
$$\mathrm d\varphi = \big(b\,\varphi' + \tfrac12\sigma^2\varphi''\big)\mathrm dt + \sigma\varphi'\,\mathrm dW.$$
Taking expectations kills the \(\mathrm dW\) term (it is a martingale increment, mean zero), leaving \(\frac{\mathrm d}{\mathrm dt}\mathbb E[\varphi] = \mathbb E[\mathcal L\varphi]\) with \(\mathcal L = b\cdot\nabla + \tfrac12\sigma^2\Delta\). This operator \(\mathcal L\) is the generator of the process, and it is the central object of Part I's final subsection.
Every second derivative in this essay, and the entire existence of diffusion terms in physics, traces back to the single line \((\mathrm dW)^2=\mathrm dt\).
$$\frac{\mathrm d}{\mathrm dt}\int \varphi\,\rho\,\mathrm dx \;=\; \int \big(\underbrace{-\nabla V\cdot\nabla \varphi + T\,\Delta \varphi}_{\textstyle \mathcal L\varphi}\big)\,\rho \,\mathrm dx.$$
The left side is \(\int \varphi\,\partial_t\rho\). On the right, we move the derivatives off \(\varphi\) and onto \(\rho\) by : once for the first term, twice for the second. The result is
All boundary terms vanish because \(\varphi\) has compact support and \(\rho\) decays. First term:
$$\int (-\nabla V\cdot\nabla\varphi)\,\rho \;=\; -\int \nabla\varphi\cdot(\rho\,\nabla V) \;=\; \int \varphi\;\nabla\!\cdot\!(\rho\,\nabla V).$$
Second term, integrating by parts twice:
$$\int T\,(\Delta\varphi)\,\rho \;=\; -\int T\,\nabla\varphi\cdot\nabla\rho \;=\; \int \varphi\; T\Delta\rho.$$
Hence \(\int \varphi\,\partial_t\rho = \int \varphi\,\big[\nabla\!\cdot\!(\rho\nabla V) + T\Delta\rho\big]\) for every test function \(\varphi\), and the fundamental lemma of the calculus of variations lets us strip the \(\varphi\) and equate the rest.
What we have really computed is the adjoint \(\mathcal L^{*}\) of the generator: the backward equation runs on observables with \(\mathcal L\), and the forward equation runs on densities with \(\mathcal L^{*}\). Fokker–Planck is the adjoint of Itô. That is the whole content of the derivation.
$$\int \varphi \;\Big[\partial_t \rho - \nabla\!\cdot\!(\rho\,\nabla V) - T\,\Delta\rho\Big]\,\mathrm dx \;=\;0 \qquad \text{for every } \varphi,$$
and a quantity integrating to zero against every test function is zero. The bracket vanishes, and the Fokker–Planck equation drops out with no constitutive assumption anywhere. Notice what happened to Fick's law: it was never assumed, it was derived, and its true origin is the Itô rule \((\mathrm dW)^2=\mathrm dt\).
The next figure puts the whole story on trial. The green histogram comes from a few thousand dice-rolling particles. The blue curve is the PDE, solved with no randomness anywhere. They track each other, because they are the same physics at two altitudes. Draw a landscape and watch both descriptions follow the hand.
Top: particles obeying the Langevin equation. Bottom: their histogram in green, the Fokker–Planck density in blue, and the equilibrium law dashed in grey. The two descriptions are independent computations; they agree because the theorem says they must.
Leave any landscape running and both curves settle onto the dashed one. That resting shape has a name and a one-line derivation. At equilibrium nothing flows, so the flux itself vanishes, , and solving this ODE gives
Rearrange: \(\nabla\rho/\rho = -\nabla V/T\), i.e. \(\nabla \log\rho = -\nabla V/T\). Integrate: \(\log\rho = -V/T + \text{const}\), so \(\rho \propto e^{-V/T}\), and the constant is fixed by \(\int\rho=1\).
We asked for something stronger than a steady state. A steady state only needs \(\nabla\!\cdot\!J=0\), which permits a nonzero divergence-free current circulating forever. We demanded \(J=0\) outright, which is detailed balance: nothing flows anywhere, and every microscopic transition is balanced by its reverse. For a gradient drift the two coincide in one dimension, but in higher dimensions with a non-gradient drift they part ways, and the difference is the entire subject of nonequilibrium statistical mechanics. Flag this; it returns as the sharpest limit on Part III.
$$\rho_\infty(x)\;=\;\frac{1}{Z}\,e^{-V(x)/T},\qquad Z=\int e^{-V(y)/T}\,\mathrm{d}y,$$
the , cornerstone of statistical mechanics, obtained here as the fixed point of a diffusion. States are punished exponentially for their energy, in units of temperature. Cold systems sit in the deepest valley; hot systems barely notice the terrain. That is exactly what the slider does in Figure 1.
Everything about the equilibrium hides in the normalizer \(Z=\int e^{-V/T}\), the partition function. It looks like an accounting nuisance and is in fact the generating function of the whole theory: \(-T\log Z\) is the equilibrium free energy, derivatives of \(\log Z\) with respect to \(T\) give the mean energy and the heat capacity, and in statistics the same integral appears as the marginal likelihood, or evidence. Part II will show that "evidence" and "free energy" are the same quantity in different clothes.
Two limits are worth holding. As \(T\to 0\) the distribution concentrates on the global minimum of \(V\), which is why simulated annealing works. As \(T\to\infty\) it becomes uniform: the landscape is invisible to a hot enough particle.
Notice what the formula does not say. It names the destination and stays silent about the journey: how equilibrium is approached, how long it takes, what is spent on the way. Part II builds the object that answers all three.
We promised precision, so here is the theorem behind the slogan. The right object is not the SDE but the \(\mathcal L\) that appeared in the Itô derivation. Ask which operators can generate a Markov process at all, and there is a complete classification: says every such generator is a drift term, plus a second-order diffusion term, plus an integral term accounting for jumps. The first two pieces are exactly Fokker–Planck. The jump term is nonlocal, and it vanishes if and only if the process has continuous paths. Therefore:
For a Markov process, define \((\mathcal L\varphi)(x) = \lim_{t\to 0}\frac{\mathbb E_x[\varphi(X_t)]-\varphi(x)}{t}\): the instantaneous rate of change of the expectation of an observable. The generator determines the process completely, and every question about the dynamics becomes a question about this one operator. The Itô computation above showed that for the Langevin equation, \(\mathcal L = -\nabla V\cdot\nabla + T\Delta\).
Courrège's theorem: any operator generating a Feller–Markov process (equivalently, any operator satisfying the positive maximum principle, which is what "probabilities stay positive" means analytically) has the form
$$\mathcal L\varphi = \underbrace{b\cdot\nabla\varphi + \tfrac12 a:\nabla^2\varphi}_{\text{Fokker–Planck}} + \underbrace{\int \big[\varphi(x+y)-\varphi(x) - \nabla\varphi\cdot y\,\mathbf 1_{|y|<1}\big]\nu(x,\mathrm dy)}_{\text{jumps}}.$$
Fokker–Planck is precisely the local part of the most general Markov generator. Nothing else is possible.
Pawula's theorem sharpens the point. Expand any Markov forward equation as a series \(\partial_t\rho = \sum_{n\ge1}(-\partial_x)^n[D_n\rho]\). Positivity of \(\rho\) forces a dichotomy: the series stops at \(n=1\) (deterministic transport), or stops at \(n=2\) (Fokker–Planck), or never stops. There is no positivity-preserving equation of order three, or seven, or any finite order above two. The equation is second order not by approximation but by rigidity.
Markov, plus continuous paths, implies Fokker–Planck.
That is the universality claim with its hypotheses visible, and the hypotheses tell us exactly where the world escapes. Break continuity and we get jumps: heavy-tailed Lévy flights, whose forward equation is nonlocal (a fractional Laplacian in place of \(\Delta\)). Break the and we get memory: the generalized Langevin equation, subdiffusion, fractional time derivatives, and in the worst cases no local PDE at all. Break classical positivity and we get quantum mechanics, where the phase-space evolution of the Wigner function contains precisely the third-and-higher-order terms Pawula forbids, and correspondingly goes negative. Each escape route is a broken hypothesis, and there are no others.
Markov means the future depends on the present only, not on how the present was reached. It is what makes \(\rho(x,t)\) a sufficient description, and hence what makes a closed PDE for \(\rho\) possible at all.
It is also fragile in exactly the situation where we most want it. The Mori–Zwanzig formalism shows that if we eliminate fast variables from an exactly Markovian system, the reduced dynamics of the slow variables is not Markovian: it acquires a memory kernel and colored noise. Coarse-graining, the very move that makes Langevin models universal, generically destroys the property they need.
The rescue, and its limit: memory can often be traded for extra dimensions. A memory kernel that is a finite sum of exponentials can be represented exactly by adding finitely many auxiliary variables, and the enlarged system is Markovian, hence Fokker–Planck. This fails for power-law memory. Fractional Brownian motion admits no finite-dimensional Markov embedding at all. Timescale separation is what buys Markovianity, and where it fails (glasses, turbulence, active matter, aging systems) the Fokker–Planck description fails with it.
The honest summary: the Fokker–Planck equation is the unique local, positivity-preserving forward equation of a Markov process, and it is universal for continuous-path Markov dynamics in exactly the sense that the Gaussian is universal for finite-variance sums. It is not universal in the sense of describing literally everything, and knowing which hypothesis fails is how we know which generalization to reach for.
We now set the Fokker–Planck equation aside completely. Forget particles, forget diffusion. What follows is a construction on distributions alone, and its point is that it is not a piece of physics but a piece of mathematics that physics happens to use. We will find in Part III that it was the same subject all along.
Fix a landscape \(V\) and a temperature \(T\). To each probability density \(\rho\) we assign two numbers. Its energy,
$$E[\rho] \;=\; \int V(x)\,\rho(x)\,\mathrm dx,$$
the average height of the landscape under \(\rho\), which is small when \(\rho\) hides in the valleys. And its ,
\(S[\rho] = -\int\rho\log\rho\) measures how spread out, how noncommittal, a distribution is. A sharp spike has very negative \(\int\rho\log\rho\) contributions concentrated in one place and hence low entropy; a broad smear has high entropy. Three readings, all the same formula:
Combinatorial (Boltzmann). Distribute \(N\) particles among bins with occupancies \(\rho_i\). The number of microscopic arrangements consistent with that macroscopic profile is \(N!/\prod (N\rho_i)!\), and Stirling's formula turns \(\frac1N\log\) of it into \(-\sum \rho_i\log\rho_i\). Entropy counts the ways.
Informational (Shannon). The same expression is the average number of nats needed to encode a sample from \(\rho\). Entropy counts the surprise.
Statistical. It is the functional whose maximization, subject to constraints, yields the least-committed distribution consistent with what we know (Jaynes' maximum entropy principle).
One technical caveat, since we are being careful: for continuous densities \(-\int\rho\log\rho\) is differential entropy, which is not coordinate-invariant and can be negative. Every use of it in this essay appears inside a difference where the offending term cancels, which is exactly the point of the KL identity below. The properly invariant object is always a relative entropy.
$$S[\rho] \;=\; -\int \rho(x)\,\log\rho(x)\,\mathrm dx,$$
the amount of spread, which is large when \(\rho\) is smeared out. These two want opposite things. Helmholtz's move, and it is one of the great moves in the history of science, is to price them in a common currency, using temperature as the exchange rate:
$$\boxed{\;F[\rho] \;=\; E[\rho] \;-\; T\,S[\rho]\;}$$
That is the whole definition. What follows are three theorems, and then the reason this modest-looking expression keeps appearing in fields that have nothing to do with heat.
Minimize \(F\) over all probability densities. Using a for the constraint \(\int\rho=1\) and setting the to zero,
The gradient of an ordinary function tells us how \(f\) responds to nudging a coordinate. The functional derivative \(\delta F/\delta\rho\) tells us how a functional responds to nudging the value of \(\rho\) at a point: it is the unique function such that \(\frac{\mathrm d}{\mathrm d\epsilon}F[\rho+\epsilon\,\eta]\big|_{\epsilon=0} = \int \frac{\delta F}{\delta\rho}(x)\,\eta(x)\,\mathrm dx\) for all perturbations \(\eta\).
For our two pieces: \(\frac{\delta}{\delta\rho}\int V\rho = V\), and \(\frac{\delta}{\delta\rho}\int\rho\log\rho = \log\rho + 1\). Hence
$$\frac{\delta F}{\delta\rho} \;=\; V + T\big(\log\rho + 1\big).$$
Memorize this line. It is the single most important computation in the essay: it is what appears in the title equation, and Part III is essentially the observation that taking its gradient produces the Fokker–Planck equation.
Minimize \(F[\rho] - \lambda\big(\int\rho - 1\big)\). Stationarity requires the functional derivative to vanish pointwise:
$$V + T\log\rho + T - \lambda \;=\; 0 \quad\Longrightarrow\quad \log\rho = \frac{\lambda - T}{T} - \frac{V}{T} \quad\Longrightarrow\quad \rho \propto e^{-V/T}.$$
Normalizing fixes the constant and gives \(\rho_\infty = e^{-V/T}/Z\). Substituting back,
$$F[\rho_\infty] = \int V\rho_\infty + T\int \rho_\infty\big(\!-\tfrac{V}{T} - \log Z\big) = -T\log Z \;=:\; F_\infty.$$
The minimum is genuine, not merely stationary: \(F\) is strictly convex in \(\rho\), because \(E\) is linear and \(-TS = T\int\rho\log\rho\) is strictly convex. So the minimizer is unique and there are no spurious critical points anywhere.
the unique minimizer is \(\rho_\infty = e^{-V/T}/Z\), with minimal value \(F_\infty = -T\log Z\). We have met this distribution before, in Part I, as the state where the Fokker–Planck flux vanishes. Here it arrives from a completely different direction, as the solution of an optimization problem: settle low, stay spread, and trade between the two at exchange rate \(T\). Equilibrium stops being an ansatz and becomes a variational principle. That the two derivations agree is the first hint of Part III, and we should find it suspicious.
Take any density \(\rho\) and compare its free energy to the minimum. Substituting \(V = -T\log\rho_\infty - T\log Z\) into the definition and simplifying, two lines
From \(\rho_\infty = e^{-V/T}/Z\) we get \(V = -T\log\rho_\infty - T\log Z\). Then
$$F[\rho] = \int V\rho + T\int\rho\log\rho = -T\int \rho\log\rho_\infty - T\log Z + T\int\rho\log\rho$$
$$= T\int \rho \log\frac{\rho}{\rho_\infty} \;-\; T\log Z \;=\; T\,\mathrm{KL}(\rho\,\|\,\rho_\infty) + F_\infty.$$
The \(-T\log Z\) is exactly \(F_\infty\), so \(F[\rho] - F_\infty = T\cdot\mathrm{KL}(\rho\|\rho_\infty)\). Note that the coordinate-dependence of differential entropy cancelled: what survives is a relative entropy, which is invariant. Since \(\mathrm{KL}\ge 0\) with equality iff \(\rho=\rho_\infty\) (Gibbs' inequality, a two-line consequence of Jensen), this re-proves Theorem 1 without any Lagrange multipliers.
$$\boxed{\;F[\rho] - F_\infty \;=\; T\cdot \mathrm{KL}\!\left(\rho\,\|\,\rho_\infty\right)\;},\qquad \mathrm{KL}(\rho\,\|\,\pi) = \int \rho\log\frac{\rho}{\pi}\,\mathrm dx,$$
where the is information theory's measure of how distinguishable two distributions are. Sit with this. A thermodynamic potential from the 1880s and an information measure from the 1950s are the same object up to a factor of temperature. How far a system sits from equilibrium, measured in joules, is how surprised equilibrium would be to meet it, measured in nats.
\(\mathrm{KL}(\rho\|\pi) = \int\rho\log(\rho/\pi)\) is the expected log-likelihood ratio between \(\rho\) and \(\pi\) under \(\rho\): the average evidence, per sample, that we are drawing from \(\rho\) rather than \(\pi\). It is nonnegative and zero only when the distributions coincide. It is not a metric: it is asymmetric and violates the triangle inequality, so calling it a "distance" is an abuse we permit ourselves and will pay for in Part III, where we need a real one.
It also has a coding interpretation: \(\mathrm{KL}(\rho\|\pi)\) is the number of extra nats per sample we waste by encoding data from \(\rho\) using a code optimized for \(\pi\). Free energy, in this reading, is the cost of a mistaken belief about equilibrium.
The identity above is why the free energy escaped physics. Watch what it becomes when we rename the symbols. Set \(T=1\), let \(x\) be an unknown parameter, and let the landscape be a negative log joint density, \(V(x) = -\log p(x, \mathcal D)\) for observed data \(\mathcal D\). Then \(\rho_\infty\) is the Bayesian posterior \(p(x\mid \mathcal D)\), the partition function \(Z\) is the model evidence \(p(\mathcal D)\), and \(F_\infty = -\log Z\) is the negative log-evidence. Theorem 2 now reads
$$\underbrace{F[q]}_{\text{free energy of a guess }q} \;=\; \underbrace{-\log p(\mathcal D)}_{\text{what we want}} \;+\; \underbrace{\mathrm{KL}\big(q \,\big\|\, p(\cdot\mid\mathcal D)\big)}_{\ge 0},$$
which is, exactly and not by analogy, the of variational inference. Minimizing free energy over a family of guesses \(q\) is simultaneously the tightest possible bound on the evidence and the closest possible approximation to the posterior. Every variational autoencoder ever trained is minimizing a Helmholtz free energy with \(T=1\).
Conventionally one writes \(\log p(\mathcal D) \ge \mathbb E_q[\log p(\mathcal D\mid x)] - \mathrm{KL}(q\|p(x))\), and calls the right side the evidence lower bound. Negate it and it is \(F[q] = E[q] - S[q]\) with \(V=-\log p(x,\mathcal D)\): the "reconstruction term" is the energy, the entropy term is the entropy. The names differ; the functional does not.
The temperature, invisible in the standard ELBO because it is set to one, is precisely the knob that trades fidelity against spread. Raising it is what \(\beta\)-VAEs do; lowering it is what temperature-scaled sampling does at generation time. In statistical mechanics this dial was known for a century before it was rediscovered as a hyperparameter.
The same functional then reappears, still wearing its own name, in two more places worth flagging.
Left: the free energy over the two-parameter Gaussian family, as an honest landscape. Right: the best Gaussian so far (solid) against the true equilibrium (dashed). The vertical gap between the ball and the floor of the landscape is exactly \(T\cdot\mathrm{KL}\): the variational gap.
Active inference. The free-energy principle in theoretical neuroscience posits that a brain (or any self-maintaining system) minimizes a variational free energy of exactly the form \(F = E - S\), where the "energy" is the mismatch between predictions and sensations, and the entropy keeps beliefs from collapsing into overconfidence. Perception is minimizing \(F\) by changing beliefs; action is minimizing the same \(F\) by changing the sensations themselves. Whatever one makes of the framework's ambitions, the mathematical object at its center is the one on this page, and the reason it can be at the center is Theorem 2: minimizing free energy is the only thing a system that cannot compute \(Z\) can actually do.
Diffusion models. The generative models producing most of the AI images in the world are trained by minimizing a bound that is, again, this functional, and they sample by descending it. We will be able to say something much sharper than that in Part III, once we know what the descent is, so we leave the claim as a promissory note.
Here we permit ourselves one glance back at the Fokker–Planck equation, because the free energy has a property that is invisible from inside Part II. Let \(\rho(t)\) evolve by Fokker–Planck and :
Chain rule for functionals, then substitute the equation, then integrate by parts:
$$\frac{\mathrm dF}{\mathrm dt} = \int \frac{\delta F}{\delta\rho}\,\partial_t\rho \;=\; \int \frac{\delta F}{\delta\rho}\;\nabla\!\cdot\!\Big(\rho\,\nabla\frac{\delta F}{\delta\rho}\Big) \;=\; -\int \rho\,\Big|\nabla \frac{\delta F}{\delta\rho}\Big|^2 \;\le\; 0,$$
where the middle step uses the title equation, which Part III proves is the same as the Fokker–Planck equation. Writing it out with \(\delta F/\delta\rho = V + T(\log\rho+1)\), and noting the constant dies under the gradient,
$$\frac{\mathrm dF}{\mathrm dt} \;=\; -\int \rho\,\big|\nabla V + T\,\nabla\log\rho\big|^2\,\mathrm dx.$$
The right side is manifestly nonpositive and vanishes only when \(\nabla(V + T\log\rho)=0\) everywhere, which is exactly the equilibrium condition of Part I. The integrand is a relative Fisher information, and the identity \(\frac{\mathrm d}{\mathrm dt}\mathrm{KL} = -\text{(Fisher information)}\) is called the de Bruijn identity. Combined with Theorem 2, this says the KL divergence to equilibrium decays monotonically, with a rate we can compute.
$$\frac{\mathrm dF}{\mathrm dt} \;=\; -\int \rho\,\big|\nabla\big(V + T\log\rho\big)\big|^2\,\mathrm dx \;\le\; 0.$$
Energy alone can rise. Entropy alone can fall. Their weighted difference cannot. This is an H-theorem: a one-line arrow of time, with an explicit formula for the current rate of irreversibility. In the figure, gather the crowd into a heap (low entropy, high free energy) and watch the ledger. Green and blue, energy and entropy, rise and fall and trade places freely. Their sum, in black, only descends. The dashed curve is the KL divergence on a log scale, counting down the nats to equilibrium. Try to make the black curve rise. The attempt is instructive precisely because it fails.
Left: the density descending toward equilibrium. Right: the ledger of \(F=E-TS\), with the KL divergence to equilibrium beneath it. The black curve is a Lyapunov function, which is a formal way of saying it is the arrow of time.
Two experiments repay the time. Gather the density in a double well at low temperature and \(F\) drops fast, then stalls on a long plateau: that plateau is , probability trapped in the wrong valley, waiting for a kick large enough to cross. Then quench a hot, spread-out system and watch energy and entropy violently exchange roles while their weighted sum glides down as though nothing happened. The equation permits no drama the free energy has not already priced.
To leave a well of depth \(\Delta V\), a particle must be carried uphill by noise alone. The probability of such a fluctuation is Boltzmann-suppressed, and Kramers showed in 1940 that the mean escape time grows like \(\tau \sim e^{\Delta V / T}\), with a prefactor set by the curvatures at the well bottom and at the saddle.
This single exponential is why chemistry has rates at all, why proteins fold on human timescales rather than cosmological ones, why magnetic memories are stable for years, and why simulated annealing must cool slowly. It also predicts the plateau in Figure 4: on the plateau, the free energy is waiting for an exponentially rare event, and the length of the wait is not a numerical artifact but the physics.
We have two objects. A PDE, universal for continuous-path Markov dynamics. A functional, universal for reasoning under uncertainty. They were built independently and they keep colliding: the same Boltzmann distribution shows up as the flux-free state of one and the minimizer of the other, and the functional mysteriously decreases along the PDE. Something is going on.
Take the functional derivative from Part II,
$$\frac{\delta F}{\delta \rho} \;=\; V + T\big(\log\rho + 1\big),$$
and simply take its gradient in \(x\). The constant dies, and \(\nabla\log\rho = \nabla\rho/\rho\), so
$$\nabla \frac{\delta F}{\delta \rho} \;=\; \nabla V + T\,\frac{\nabla\rho}{\rho}.$$
Multiply by \(\rho\), and the density cancels the denominator:
$$\rho\,\nabla \frac{\delta F}{\delta \rho} \;=\; \rho\,\nabla V + T\,\nabla\rho.$$
But this is exactly minus the flux from Part I: the drift flux plus the Fick flux. Taking the divergence and applying the continuity equation,
$$\frac{\partial \rho}{\partial t} \;=\; \nabla\!\cdot\!\Big(\rho\,\nabla \frac{\delta F}{\delta \rho}\Big) \;=\; \nabla\!\cdot\!\big(\rho\,\nabla V\big) + T\,\Delta\rho.$$
The two equations are identically the same equation. No approximation, no limit, no analogy. The Fokker–Planck equation is the statement that probability flows downhill along the gradient of the free energy's derivative, carried at a rate proportional to how much probability is there to carry.
That is a three-line computation and it is the heart of the essay. The rest of Part III is about understanding what we just wrote, because the phrase "flows downhill along the derivative of \(F\)" is doing something subtler than it looks.
In ordinary calculus, the steepest descent of a function \(f\) is \(\dot x = -\nabla f(x)\). It is tempting to read this as a definition, but it is a theorem, and it hides a choice. Steepest descent means: among all steps of a given length, take the one that decreases \(f\) most. The notion of length is an input. Change the and the same function has an entirely different steepest-descent direction.
Formally, the gradient is defined by the requirement \(\langle \nabla f, v\rangle = \mathrm df(v)\) for all directions \(v\). The differential \(\mathrm df\) is metric-independent, the inner product is not, so the gradient is a metric-dependent object. On a Riemannian manifold with metric tensor \(g\), steepest descent reads \(\dot x = -g^{-1}\nabla f\).
A familiar example: natural gradient descent in machine learning is ordinary gradient descent under the Fisher–Rao metric instead of the Euclidean one. Same loss, same parameters, different flow, because the ruler changed. Preconditioning, Newton's method, and mirror descent are all this same observation.
So "diffusion is gradient descent of free energy" is a claim that is empty until the ruler is named. Naming the ruler is the content of the theorem, and it is optimal transport.
So which ruler makes Fokker–Planck the steepest descent of \(F\)? The space we move in is the space of probability densities, where each "point" is an entire shape. To do calculus there we must say how far apart two shapes are. And the correct answer is not KL, which we already have and which compares densities pointwise, height against height, blind to geography. The correct answer comes from an eighteenth-century logistics problem.
In 1781 Monge asked: given a pile of sand and a hole of the same volume, what is the cheapest way to fill the hole, paying for each grain by the distance it travels? Take the price of moving a grain a distance \(d\) to be \(d^2\), minimize over all ways of matching pile to hole, and the minimum cost defines the \(W_2(\mu,\nu)\). This is optimal transport. Unlike KL, it is a genuine metric, and unlike KL, it is nothing but geography: it knows how far mass has to physically move.
The static (Kantorovich) definition: \(W_2^2(\mu,\nu) = \min_{\gamma}\int |x-y|^2\,\mathrm d\gamma(x,y)\), minimizing over couplings \(\gamma\), which are joint distributions with marginals \(\mu\) and \(\nu\). A coupling is a transport plan: \(\gamma(x,y)\) says how much mass moves from \(x\) to \(y\).
The dynamic (Benamou–Brenier, 1999) definition is the one that matters here:
$$W_2^2(\mu,\nu) = \min_{(\rho_t, v_t)} \int_0^1\!\!\int \rho_t\,|v_t|^2\,\mathrm dx\,\mathrm dt, \qquad \partial_t\rho_t + \nabla\!\cdot\!(\rho_t v_t) = 0,$$
minimizing over all ways of continuously morphing \(\mu\) into \(\nu\) by transporting mass with a velocity field. The cost is the total kinetic energy of the motion. This reformulation is why Wasserstein space has a Riemannian flavor at all: it says the distance is the length of a shortest path, and shortest paths need a metric on velocities.
And it tells us what the tangent space is. A perturbation of \(\rho\) is a velocity field \(v\), acting through the continuity equation, with squared length \(\int\rho|v|^2\). Every Fokker–Planck evolution is of this form with \(v = -\nabla\,\delta F/\delta\rho\), which is the observation that generates the entire theorem.
Now compare the two rulers on one example, because the contrast is the reason any of this works. Take two narrow spikes, far apart, with no overlap. Their KL divergence is infinite, and moving one spike slightly closer does not change it at all: KL cannot see the approach. Their \(W_2\) distance is the distance between the spikes, and shrinks smoothly as they approach. If we want a geometry in which "moving mass a little" is a small step, KL is useless and \(W_2\) is exactly right. Diffusion moves mass. It therefore lives in \(W_2\).
Slide the width down at fixed separation. \(W_2\) does not move: the mass still has to travel exactly \(d\). KL explodes, because the overlap vanishes. KL measures disagreement; \(W_2\) measures distance.
Now we can state what the three-line computation means. takes the Benamou–Brenier picture seriously: the tangent space at \(\rho\) consists of velocity fields \(v\) acting through the continuity equation, with squared norm \(\int \rho|v|^2\). Compute the gradient of \(F\) in that geometry and the answer is \(-\nabla\,\delta F/\delta\rho\). Steepest descent then reads
The claim is that under the metric \(\|\dot\rho\|^2_\rho = \int\rho|v|^2\) (with \(\dot\rho = -\nabla\!\cdot\!(\rho v)\)), the Riemannian gradient of \(F\) is the vector field \(-\nabla\,\delta F/\delta\rho\). One line of verification: the differential of \(F\) along \(\dot\rho\) is \(\int \frac{\delta F}{\delta\rho}\dot\rho = -\int\frac{\delta F}{\delta\rho}\nabla\!\cdot\!(\rho v) = \int \rho\,\nabla\frac{\delta F}{\delta\rho}\cdot v\), which is exactly the metric inner product of \(v\) with \(\nabla\frac{\delta F}{\delta\rho}\). So that vector field is the gradient, by the defining property of gradients.
The honesty clause: this "infinite-dimensional Riemannian manifold" is a formal device. The space of probability measures with the \(W_2\) metric is a metric space, not a smooth manifold, and there is no theorem underwriting the calculus above at the level of rigor a differential geometer would want. What is rigorous is the JKO scheme below, which reconstructs the same dynamics using only distances and minimization, no derivatives on the manifold at all. The formalism is a superb intuition pump and the theorem is proved elsewhere. Both facts matter.
$$\partial_t \rho \;=\; -\,\mathrm{grad}_{W_2} F[\rho] \;=\; \nabla\!\cdot\!\Big(\rho\,\nabla\frac{\delta F}{\delta\rho}\Big),$$
which is the equation we started this essay with, and which we have just shown is the Fokker–Planck equation. In words:
Diffusion is the steepest descent of the Helmholtz free energy, in the geometry of optimal transport.
The rigorous version, and the one to remember, is due to Jordan, Kinderlehrer and Otto in 1998. Discretize time into steps \(\tau\) and define a sequence of densities by the :
In \(\mathbb R^n\), the backward Euler step for \(\dot x = -\nabla f\) can be written variationally:
$$x_{k+1} = \arg\min_x \Big\{\frac{|x-x_k|^2}{2\tau} + f(x)\Big\},$$
since setting the derivative to zero gives \((x_{k+1}-x_k)/\tau = -\nabla f(x_{k+1})\). This is called the proximal point method, and it makes sense on any metric space, because it only ever uses a distance and a function, never a derivative.
JKO is precisely this scheme with the metric \(W_2\) and the function \(F\). The theorem (Jordan–Kinderlehrer–Otto, 1998) is that as \(\tau\to0\) the interpolated sequence converges to the solution of the Fokker–Planck equation. This is what makes "gradient flow" a theorem rather than a metaphor: the entire Otto formalism can be bypassed, and only the metric survives.
The construction generalizes far past our setting. Replace \(F\) with other functionals and the same scheme generates the porous medium equation, the heat flow on manifolds, aggregation equations, chemotaxis models, and (with an interaction term) McKean–Vlasov dynamics. This one recipe organizes a large part of modern PDE theory.
$$\rho_{k+1} \;=\; \underset{\rho}{\arg\min}\;\Big\{\,\underbrace{\frac{1}{2\tau}\,W_2^2(\rho,\rho_k)}_{\text{cost of moving}} \;+\; \underbrace{F[\rho]}_{\text{free energy}}\Big\}.$$
Each step lowers the free energy, but pays for transport. As \(\tau\to 0\), this converges to the Fokker–Planck equation. Diffusion, one of the most fundamental irreversible processes in nature, is a system repeatedly asking: how do I most cheaply become a little more like equilibrium?
Each JKO step is a minimization, and we are watching it happen: the blue candidate deforms until the sum of transport cost and free energy stops falling, then it is accepted and becomes the next \(\rho_k\). Shrink \(\tau\) and the staircase converges onto the dotted PDE solution.
We can now test the claim that the metric is the whole story, by running the same free energy down three different geometries, from the same starting heap, on the same landscape. All three are honest gradient flows of \(F\). All three converge to the same Boltzmann minimizer, since the minimizer is a property of \(F\) alone and knows nothing about metrics. Only the paths differ, and the paths differ wildly.
The first is the naive one: treat densities as vectors and use the ordinary \(L^2\) distance, \(\|\rho-\sigma\|^2 = \int|\rho-\sigma|^2\). The flow is \(\partial_t\rho = -(\delta F/\delta\rho - \lambda)\), the constant \(\lambda\) enforcing conservation of mass. The second is the metric, the natural geometry of statistics, whose flow is \(\partial_t\rho = -\rho\big(\delta F/\delta\rho - \mathbb E_\rho[\delta F/\delta\rho]\big)\). The third is Wasserstein, which is Fokker–Planck. Start all three from a bump that is exactly zero outside the left well, and watch what each one does about the barrier.
The Fisher–Rao metric measures the distance between distributions by how distinguishable they are from samples, \(\|\dot\rho\|^2_{FR} = \int \dot\rho^2/\rho\). It is the metric behind the Cramér–Rao bound, and its gradient flow is multiplicative: mass is reweighted, never moved. If you know evolutionary game theory, you have met this flow before: it is the replicator equation, with \(-\delta F/\delta\rho\) playing the role of fitness. In statistics, it is Bayesian updating, which likewise only reweights hypotheses it already entertained.
Hence the pathology on display in the figure. Where \(\rho=0\), the update is \(0\times(\dots)=0\), so the density stays exactly zero forever. A Fisher–Rao flow can never populate a region it started empty in, no matter how deep the valley there. It is the "zero prior, zero posterior" problem, written as a PDE, and it is the exact opposite failure from \(L^2\), which populates distant regions instantly. Wasserstein is the only one of the three that has to walk.
Watch the barrier. Under \(L^2\), the right well fills before the barrier does: mass teleports. Under Fisher–Rao, the right well never fills at all, because mass can only be reweighted where it already is. Only under Wasserstein does anything actually cross.
The velocity field the theorem hands us is worth staring at:
$$v \;=\; -\nabla \frac{\delta F}{\delta\rho} \;=\; \underbrace{-\nabla V}_{\text{drift}} \;\underbrace{-\;T\,\nabla \log \rho}_{\text{the noise, as a velocity}}.$$
The diffusion term is gone. Where the Fokker–Planck equation had \(T\Delta\rho\), a second-order smoothing operator with no interpretation as motion, the gradient flow has an honest velocity field pointing away from crowded regions. And this predicts something falsifiable: a crowd of particles carrying no noise at all, each simply following \(v\), must reproduce the same evolving density as the dice-rolling Langevin crowd. Two completely different microscopic stories, one macroscopic law. The next figure runs both at once.
Green particles roll dice at every instant. Blue particles never do: they follow \(v=-\nabla(V+T\log\rho)\), drawn as arrows. Their histograms trace the same curve, because both are portraits of the same descent. Individual paths are unrelated; the density is identical.
The quantity \(\nabla\log\rho\) has a name: the . And now the promissory note from Part II comes due. A diffusion model is trained by taking data, adding noise until it becomes a featureless Gaussian, and learning the score of the noised density with a neural network. Generation then runs the blue crowd of Figure 8 backwards: start from noise, follow the learned velocity field, and arrive at an image. The training objective is a bound on the free energy of Part II; the sampler is the gradient flow of Part III, integrated in reverse. When we said the free energy is central to diffusion models, this is the precise sense: they learn the geometry of the descent, and then climb it.
The score of a density is \(s(x) = \nabla\log\rho(x)\), the gradient of the log-density. It points toward higher probability, it does not require knowing the normalizing constant \(Z\) (since \(\nabla\log(\rho/Z) = \nabla\log\rho\)), and that last property is the entire reason it is learnable: score matching estimates \(s\) from samples alone, never touching the intractable \(Z\).
Given the score, the two crowds in Figure 8 are the two standard samplers. The green one is Langevin dynamics (annealed Langevin sampling). The blue one is the probability flow ODE: a deterministic trajectory whose density matches the stochastic process exactly, which is what makes deterministic samplers like DDIM possible, and what makes latent interpolation and exact likelihood computation possible in diffusion models. The equivalence of the two crowds is not a numerical coincidence in our simulation; it is the reason both samplers exist.
One last look at the H-theorem, now with the geometry switched on. The dissipation rate is
$$-\frac{\mathrm dF}{\mathrm dt} \;=\; \int \rho\,|v|^2\,\mathrm dx \;=\; \big\|\dot\rho\big\|^2_{W_2},$$
which is exactly the squared speed of the curve \(\rho(t)\) through Wasserstein space. Irreversibility, in this picture, is nothing but the kinetic energy of a single point sliding down a landscape whose height is free energy. Entropy production is a speed. Every figure in this essay has been a shadow of that one descent.
Everything so far assumed the landscape \(V\) was given from outside and stayed put. Let us break that, in the gentlest possible way: let each particle be attracted to the average position of all the others. The landscape a particle feels is now
$$V_{\text{eff}}(x)\;=\;V(x)\;+\;\frac{\theta}{2}\big(x - m\big)^2,\qquad m \;=\; \int x\,\rho(x)\,\mathrm dx,$$
which depends on \(\rho\), so the Fokker–Planck equation has become nonlinear in its own solution. This is the , and the whole machine survives the change: it is still a Wasserstein gradient flow, of the free energy
Take \(n\) particles, each feeling the landscape plus a pairwise interaction with all the others, so that \(\mathrm dX^i = \big(\!-\nabla V(X^i) - \tfrac1n\sum_j \nabla W(X^i - X^j)\big)\mathrm dt + \sqrt{2T}\,\mathrm dW^i\). As \(n\to\infty\), any fixed particle sees not its neighbours but the density of its neighbours, and its own law satisfies the nonlinear equation above. This is propagation of chaos: initially independent particles stay asymptotically independent, and the many-body problem collapses into one equation for one density.
This is the mathematics of flocking, of chemotaxis, of opinion dynamics, of mean-field games, and (with \(W\) an attraction toward the mean) of the Desai–Zwanzig model simulated here. It is also the setting of consensus-based optimization, where a swarm of noisy particles is pulled toward a weighted average of itself in order to minimize a nonconvex objective.
$$F[\rho] \;=\; \underbrace{\int V\rho}_{\text{energy}} \;+\; \underbrace{\frac12\iint W(x-y)\,\rho(x)\rho(y)}_{\text{interaction}} \;-\; \underbrace{T\,S[\rho]}_{\text{entropy}},\qquad W(x-y)=\frac{\theta}{2}(x-y)^2 .$$
One line of Part II now fails, and its failure is the entire point. Theorem 1 proved the minimizer of \(F\) is unique, and the proof rested on \(F\) being convex: energy is linear in \(\rho\), entropy is strictly convex, done. The interaction term is quadratic in \(\rho\), and it is not convex. Take away convexity and the theorem's conclusion evaporates: below a critical temperature there are two minimizers, mirror images of each other, and the system has to pick one.
Start hot and cool slowly through \(T_c\). The symmetric state loses stability and the crowd commits to a well, choosing at random which one. Re-randomize and it may choose the other. This is spontaneous symmetry breaking, and the pitchfork on the right is the phase diagram.
What we are watching in the figure is the oldest story in statistical mechanics. At high temperature entropy dominates, the crowd is spread across both wells, and the mean sits at the centre by symmetry. Cool through \(T_c\) and that symmetric state stops being a minimum and becomes a maximum: the crowd's own attraction outweighs its thermal spreading, any accidental imbalance amplifies itself, and the population collapses into one well or the other. The choice is made by noise, and the symmetry of the equations survives only as the fact that both outcomes are equally likely.
This is the Curie point of a ferromagnet, the condensation of a gas, the onset of consensus in a population of agents, and the moment a swarm optimizer commits to a basin. It is also a warning, in the specific technical sense that our beautiful theorems are conditional: everything in Part III still holds here (the flow is still steepest descent of \(F\) in \(W_2\)), and yet the conclusion we most wanted, "the system converges to the unique Boltzmann state", is simply false. The gradient flow structure survives nonconvexity. Uniqueness does not.
An honest ode names what the beloved cannot do. Part I already fenced the Fokker–Planck equation: jumps, memory, and quantum negativity are outside it, each corresponding to a broken hypothesis. Part III has a fence of its own, and it is tighter.
Everything in Part III required the drift to be a gradient, \(b = -\nabla V\). Drop that, allow a rotational component that is not the gradient of anything, and we must be careful about what actually breaks, because the naive guess is wrong. The free energy does not stop falling. For any Markov process with a stationary density \(\rho_\infty\), the relative entropy \(\mathrm{KL}(\rho_t\,\|\,\rho_\infty)\) is still a Lyapunov function, and one can check that the rotational part contributes exactly zero to \(\mathrm dF/\mathrm dt\).
What breaks is the geometry. The flow is no longer steepest descent: it picks up a component that transports probability sideways, orthogonally to \(\nabla\,\delta F/\delta\rho\) in the Wasserstein metric, doing no work on \(F\) whatsoever. The dynamics is a gradient flow plus a rotation, and only the first half is what Part III described. At the stationary state the descent has stopped but the rotation has not, so probability circulates forever in closed loops: a , in which detailed balance fails, time-reversal symmetry is broken, and entropy is produced at a constant nonzero rate for as long as the system is kept running. Most systems in nature, and every living one, are of this kind.
The figure below makes the sharpest version of the point. Both panels have identical stationary densities, identical histograms, identical free energies, and identical everything a static measurement could see. One of them is at equilibrium. The other is a hurricane. A density cannot tell you whether it is at rest; only the currents can.
Decompose a general drift as \(b = -\nabla V + b_\perp\), where \(b_\perp\) is divergence-free with respect to the stationary density: \(\nabla\!\cdot\!(\rho_\infty b_\perp)=0\). Two consequences follow, and they pull in opposite directions.
The good news. The stationary density is unchanged: it is still \(\rho_\infty \propto e^{-V/T}\). And \(F\) still decreases, because the rotational term contributes \(\int \rho_\infty\, b_\perp\cdot\nabla h = -\int h\,\nabla\!\cdot\!(\rho_\infty b_\perp) = 0\) (writing \(h=\rho/\rho_\infty\), integrating by parts). Zero, exactly. The rotation is orthogonal to the descent.
The bad news. The stationary state now carries a nonvanishing current \(J = \rho_\infty b_\perp \neq 0\) with \(\nabla\!\cdot\!J = 0\): probability circulates. The dynamics is no longer a gradient flow of anything, so the identification of the whole evolution with steepest descent, which is the theorem of this essay, is lost. And entropy is produced at rate \(\sigma = \frac1T\int \rho_\infty |b_\perp|^2 > 0\), forever, which must be paid for by whatever drives \(b_\perp\). This is the "housekeeping heat" of stochastic thermodynamics.
The modern theory (fluctuation theorems, the Hatano–Sasa and Gallavotti–Cohen relations) extends parts of the story to this setting, but no single scalar functional plays the role \(F\) plays here. Losing the gradient structure loses the geometry.
Left: gradient drift. Right: the same drift plus a rotation \(\omega J\nabla V\), which is divergence-free against \(\rho_\infty\) and therefore leaves the equilibrium density untouched. Compare the measured variances: they agree. Compare the currents: one is dead, the other turns forever.
What remains is a road. Curvature controls speed: if \(V\) is uniformly convex with curvature at least \(\lambda\), the Bakry–Émery theory gives exponential decay of the KL curve at rate \(2\lambda\), through logarithmic Sobolev inequalities that are secretly statements about the curvature of Wasserstein space. Flatten the landscape in Figure 4 and watch convergence stall; that is geometry, not numerics. Bridges: condition a diffusion on its endpoints and one gets the Schrödinger bridge, an entropic relaxation of optimal transport, solved in practice by the Sinkhorn algorithm and converging to the \(W_2\) geodesic as the noise vanishes; stochastic and deterministic transport are two ends of one dial. Interaction: let the particles feel each other and the free energy grows an interaction term, the equation becomes nonlinear, and the same JKO scheme generates the mathematics of flocking, chemotaxis, and mean-field games. Control: ask how to change a landscape so as to move a system while dissipating as little as possible, and the optimal protocols turn out to be Wasserstein geodesics; the thermodynamics of small systems is transport geometry in disguise.
Praise, then, for an equation that holds lawless trajectories and lawful distributions in one hand, that contains the heat equation, the Boltzmann distribution, and the arrow of time as special cases, that was written down in 1914 for electrons in a radiation field and now spends its days painting pictures, and that waited eighty years to be recognized as geometry. Few objects in mathematics work this hard while looking this calm.