Every time a diffusion model needs to connect its random, jittering particles to the smooth density they belong to, it reaches for the same equation: Fokker-Planck. We have used it more than once, the SDE and the distribution \( p_t \) are "the same story," the law of the noising process at each instant "is" \( p_t \). An SDE describes one particle taking one noisy step after another, all jitter and randomness. Fokker-Planck describes the entire cloud of those particles as a single deterministic flow of probability, smooth and lawful. How do you get from the one to the other? Through a single surprising fact about how rough Brownian motion really is, and that one fact is the whole reason the equation has the shape it does. It is, honestly, quite mystical.
One particle, and the crowd it belongs to
Our object is a particle whose position \( X_t \in \mathbb{R}^d \) wanders according to
a deterministic drift \( u_t \) nudging it along, and a Brownian term \( \sigma_t\, dW_t \) shoving it around at random. One run of this is one jagged trajectory. But run it from many starting points, or many times over, and at each instant \( t \) the particle's position has a distribution; call its density \( p_t(x) \). The drift and the noise are a rule for the particle. What we want is the law of motion for the density: a partial differential equation saying how \( p_t \) sloshes and spreads over time. That equation is the target,
and the only honest way to truly understand it is to start from the particle and let the crowd emerge.
Don't just look at the density, inspect it
Going straight at \( p_t \) is awkward: the thing we know how to push forward in time is the particle, not its density. So we use a classic piece of misdirection, and it feels a little like cheating right up until you see why. Pick any smooth test function \( f : \mathbb{R}^d \to \mathbb{R} \), think of it as a measurement you take on the particle, a probe, and instead of tracking \( p_t \) directly, track how the average reading \( \mathbb{E}[f(X_t)] \) changes in time. Two payoffs come from this. The particle's motion tells us how \( f(X_t) \) changes, which we can actually compute. And because
anything we learn about the average is secretly a statement about \( p_t \), once we shuffle the derivatives off \( f \) and onto \( p_t \) at the very end. We interrogate the density through every possible probe, then let the probes go.
A single step, Taylor expanded
Freeze the particle at \( X_t \) and let it take one small step of duration \( h \). Discretized, the SDE moves it by
the drift contributing a clean \( h\, u_t \), the noise contributing a Gaussian kick \( \Delta W \) of variance \( h \). The reading changes by \( f(X_t + \delta) - f(X_t) \), and since \( \delta \) is small we Taylor expand, keeping two orders:
Substitute \( \delta = h\, u + \sigma_t \Delta W \) (writing \( u = u_t(X_t) \) and \( A = \nabla^2 f(X_t) \) for the Hessian), and the right-hand side fans out into five pieces:
Five terms. Now we average, and watch which ones survive.
Where Brownian roughness refuses to vanish
Take the conditional expectation \( \mathbb{E}[\,\cdot \mid X_t] \): freeze the current position, average only over the fresh noise \( \Delta W \). With \( X_t \) fixed, \( u \), \( \nabla f \), and \( A \) are all constants, and the only random object left is \( \Delta W \), which Brownian motion hands us in two facts,
Run down the five terms. The lone-\( \Delta W \) term (second) and the drift-noise cross term (fourth) each carry a single factor of \( \Delta W \), so they average to zero. The drift-drift term (third) is \( O(h^2) \), obliterated the instant we divide by \( h \). The drift term (first) survives as \( h\, \nabla f^T u \). And then there is the last one, the noise-noise term, and this is what we want.
Naively you would expect a product of two \( \Delta W \)'s to be negligible, second order, gone. It is not, and the reason is that Brownian motion is confusing: \( \Delta W \) scales like \( \sqrt{h} \), not \( h \), so \( \Delta W^2 \) scales like \( h \), the very same order as the drift. Make it precise with \( \Delta W = \sqrt{h}\, \varepsilon \), \( \varepsilon \sim \mathcal{N}(0, I_d) \), and the Gaussian quadratic-form identity \( \mathbb{E}[\varepsilon^T A \varepsilon] = \operatorname{tr}(A) \):
using \( \operatorname{tr}(\nabla^2 f) = \Delta f \), the trace of the Hessian is the Laplacian. Let us stop to think for a second. A term you would have thrown away survives, and it survives as the Laplacian. The entire diffusion half of Fokker-Planck is born right here, out of a quantity you almost discarded.
The Ito term
\( \mathbb{E}[\Delta W^T \nabla^2 f\, \Delta W \mid X_t] = h\, \Delta f. \) Brownian motion's \( \sqrt{h} \) roughness makes a second-order term survive as a first-order one, and lo and behold, you have the Laplacian!
From the particle to the density
Finding the gold among glitter,
Divide by \( h \) and let \( h \to 0 \). The \( O(h^2) \) drift-drift term drops, and the left side becomes the time derivative of the average reading:
This is already a complete description of the dynamics, told from the particle's side. To turn it into a statement about \( p_t \), write both expectations as integrals against the density,
Every derivative here still sits on the probe \( f \). The last move is to hand them back to \( p_t \).
Hand the derivatives back to the density
This is integration by parts, the powerhouse (mitochondria) of the whole derivation, and it does exactly the one thing we need: it converts "derivatives of the probe" into "derivatives of the density." For the drift term, the identity \( \int \nabla f^T F\, dx = -\int f\, \operatorname{div}(F)\, dx \) with \( F = p_t u_t \) gives
The minus sign and the divergence are not there to just stare at you: integration by parts always flips a sign, and summing the per-coordinate derivatives \( \sum_i \partial_i F_i \) is precisely \( \operatorname{div}(F) \). For the diffusion term, integrate by parts twice (Green's identity), \( \int p_t \Delta f\, dx = \int f \Delta p_t\, dx \):
Both steps quietly assume the density and its gradient decay at infinity, so the boundary terms vanish, which holds for any distribution worth the name. Putting the two together, the whole right-hand side is now a single integral with every derivative resting on \( p_t \):
Strip it, and the PDE is forced
One thread remains. The left side, \( \partial_t \mathbb{E}[f(X_t)] \), is also \( \partial_t \int f\, p_t\, dx = \int f\, \partial_t p_t\, dx \), since \( f \) does not depend on time. So
and this holds for every smooth test function \( f \). A function that, integrated against everything, always agrees with another must equal it pointwise. The probes have done their job; let them go, and what is left standing is the equation:
Fokker-Planck
\( \partial_t p_t(x) = -\operatorname{div}\!\big(p_t(x)\, u_t(x)\big) + \dfrac{\sigma_t^2}{2}\, \Delta p_t(x). \)
What it says, and why we needed it
Let us read the two terms. The first, \( -\operatorname{div}(p_t u_t) \), is transport: the drift \( u_t \) carries probability mass around, exactly the continuity equation of a flowing fluid. The second, \( \tfrac{\sigma_t^2}{2} \Delta p_t \), is diffusion: the Laplacian, that presents from Brownian roughness, smooths and spreads the density, flattening peaks and filling valleys. Density change is transport by drift plus diffusion by noise, and now we know exactly where each half came from.
This is the support vector the rest of diffusion swings on. It is what licenses the claim, made all over the five views, that the SDE's law at every instant is the distribution \( p_t \): the density is not a separate model, it is the deterministic shadow this PDE casts from the particle's random walk. And it is the doorway to the probability-flow ODE, where you take this very equation, fold the diffusion term into the transport term with \( \Delta p_t = \operatorname{div}(p_t \nabla \log p_t) \), and watch the noise turn into a velocity. (Map the names back: there the drift \( u_t \) is written \( f \), the noise \( \sigma_t \) is written \( g \), and \( \Delta \) is written \( \nabla^2 \).)
So the best part of discovering this equation is that Planck is not just popular for the Planck constant...