Fokker-Planck: A Random Cloud, a Deterministic Density

Chapter 21 · Mathematics for AI and Machine Learning · Advanced · 1:35

An interactive live film: Langevin particles for a Gaussian target wander over a (t, x) floor while their density evolves as a 3D surface; a wall at time t shows the histogram and the probability current, whose drift and diffusion parts cancel at the steady state.

Narration

Particles start bunched together, away from the origin, and follow the Langevin equation for a standard Gaussian target: a drift toward the centre, plus noise.

Instead of following each particle, follow their density. Above the floor, p t of x is drawn for every time. It slides toward the centre and spreads out.

That density obeys the Fokker Planck equation. It is a deterministic equation, even though every path is random.

Stand a wall at one time. The histogram of the particles matches the density, and the arrows show the probability current.

The current has two parts. The drift carries probability toward the centre, in red, and diffusion pushes it from high density to low, in blue. Their sum, in green, moves the bump.

As time goes on, the two parts balance at every point, the current vanishes, and the density stops changing. It has become the target, the standard Gaussian.

Your turn. Drag the wall along the time axis, and move the starting point with the slider.

That is why Langevin dynamics samples from p. The target is the density at which drift and diffusion cancel exactly.

More from Chapter 21

Preview1:29Detailed Balance: Stationary Is Not the Same as StillChapter 21Preview1:28Forward Diffusion and the Heat Equation: All Distributions Become GaussianChapter 21Preview1:27Guidance Does Not Sample the Sharpened DistributionChapter 21Preview1:50Metastability and the Kramers Escape RateChapter 21Preview1:26Reverse Time: Why We Must Learn the ScoreChapter 21Preview1:34Unification: SDEs, Probability Flow ODEs, and Fokker-Planck DynamicsChapter 21Preview1:52Discretization Changes the Stationary DistributionChapter 21Preview1:29Stein Variational Gradient Descent: Pull and PushChapter 21