Skip to content
AI360Xpert
Beta

Fokker-Planck Equation

How densities flow under an SDE: drift transports probability mass while diffusion spreads it. The PDE tracks the histogram so you never simulate a million paths.

A sharp spike at zero flows rightward and widens into a Gaussian of variance 0.06 centred at 5.0
A sharp spike at zero flows rightward and widens into a Gaussian of variance 0.06 centred at 5.0

Why Does This Exist?

SDE paths answer what one particle does; learning needs what the whole population does. Simulating a million paths to histogram densities wastes compute and hides structure. The Fokker-Planck (forward Kolmogorov) equation evolves the density p(x,t)p(x,t) directly as a PDE: drift advects mass, diffusion smears it. Its stationary solution gives samplers' targets and diffusion models' marginals in closed form.

This is the bridge from paths to distributions. Stochastic differential equations define the paths; this page tracks their law. Diffusion processes study the resulting Markov behaviour and reverse-time SDEs invert the flow for generation.

Prerequisite in one paragraph. You need a density p(x,t)p(x,t) (chance per unit length) and the SDE split into drift μ\mu and volatility σ\sigma. Stationary means unchanging in time. Background is in probability distributions and Brownian motion.

Think of It Like This

Smoke in a steady breeze with spreading

Smoke from a chimney drifts downwind (advection) while turbulence widens the plume (diffusion). A photo an hour later shows the whole plume moved and fattened. Fokker-Planck is the weather model predicting that photo from wind plus turbulence, without tracking each soot grain.

SDE densities behave identically. Drift winds probability mass toward attractors; diffusion fattens it. Stationarity is the plume shape that wind and spread hold fixed.

Where the analogy stops: smoke dissipates while probability conserves to one. The PDE also runs backwards in time for scores, which smoke never does.

How It Actually Works

For dX=μ dt+σ dWdX = \mu\,dt + \sigma\,dW the density obeys ∂tp=−∂x(μp)+12∂xx(σ2p)\partial_t p = -\partial_x(\mu p) + \frac{1}{2}\partial_{xx}(\sigma^2 p), where ∂t\partial_t is time change, −∂x(μp)-\partial_x(\mu p) transports mass along drift and 12∂xx(σ2p)\frac{1}{2}\partial_{xx}(\sigma^2 p) spreads it by diffusion. Stationarity sets ∂tp=0\partial_t p = 0: drift inflow balances diffusive outflow.

Ornstein-Uhlenbeck dX=2(5−X) dt+0.5 dWdX = 2(5 - X)\,dt + 0.5\,dW has Gaussian stationary N(5,0.0625)N(5, 0.0625): mean 55, variance 0.25/4=0.06250.25/4 = 0.0625. Starting from a spike at 00, the mean travels 5(1−e−2t)5(1-e^{-2t}) while variance grows 0.0625(1−e−4t)0.0625(1-e^{-4t}). At t=2t = 2 mean 4.914.91 and variance 0.0625×0.9997≈0.06250.0625 \times 0.9997 \approx 0.0625.

Worked example

Start all mass at 00 at t=0t = 0. At t=0.5t = 0.5: mean 5(1−e−1)=5×0.632=3.165(1-e^{-1}) = 5 \times 0.632 = 3.16, variance 0.0625(1−e−2)=0.0625×0.865=0.0540.0625(1-e^{-2}) = 0.0625 \times 0.865 = 0.054. At t=2t = 2: mean 4.914.91, variance 0.06250.0625. The histogram slides right 3.163.16 then 4.914.91 while widening 0.230.23 then 0.250.25 standard deviations. Simulating 10,00010{,}000 Euler paths to t=2t = 2 gives sample mean 4.904.90 and variance 0.0630.063, matching the PDE to two decimals without any histogram smoothing theory.

Watch Out For

Dropping the half on the diffusion term

Writing ∂xx(σ2p)\partial_{xx}(\sigma^2 p) without 12\frac{1}{2} doubles spreading: stationary variance reports 0.1250.125 instead of 0.06250.0625 and sampler calibrations miss by 2\sqrt{2}. The half comes from Ito's correction and is non-negotiable.

Fix: copy the 12\frac{1}{2} from Ito's lemma every time. Derive the PDE from Ito on test functions when unsure.

Imposing stationary density as the initial condition

Starting the PDE at N(5,0.0625)N(5, 0.0625) and evolving shows nothing move, which some read as broken dynamics. Stationarity is the destination, not a typical start; transient flow is the content.

Fix: start from a spike or the data distribution. Reserve stationary for convergence checks.

The Quick Version

  • Fokker-Planck evolves SDE densities by drift transport minus diffusion spreading with the 12\frac{1}{2} factor.
  • OU with speed 2.0 and noise 0.5 flows any start into N(5,0.0625)N(5, 0.0625).
  • From zero, mean 3.16 at 0.5 and 4.91 at 2.0 with variance settling at 0.0625.
  • Stationarity balances inflow against outflow; transients carry the information.
  • Never drop the half and never start stationary when studying flow.