Diffusion Processes
Continuous Markov paths with drift plus noise. Their generators, time scales and stationary laws decide how fast samplers mix and how diffusion models noise data.
Why Does This Exist?
Langevin sampling, diffusion noising, and stochastic optimisation all run diffusions of the form , where is the potential shaping the landscape, its gradient (drift direction), and is Brownian noise. Practitioners set step counts, noise scales, and temperatures by feel. Without mixing theory those choices are blind: too few steps leave bias, too many waste compute, and the wrong temperature targets the wrong law.
Diffusion process theory gives the dials. The generator encodes local motion, the stationary density is proportional to , and curvature (convexity of ) sets exponential contraction rates. Coupling arguments turn curvature into wall-clock mixing times. Stochastic differential equations define the paths and Fokker-Planck tracks their densities; here the focus is the long-run behaviour samplers live on.
Prerequisite in one paragraph. You need the Markov property (the future depends only on now) and the stationary density , meaning the long-run law puts mass where is low. Strong convexity means curves upward at least quadratically. Background is in Markov chains and Brownian motion.
Think of It Like This
Two leaves in a funnel with shaking
Drop two leaves on opposite rims of a funnel and shake the table. Both slide down, jitter sideways, and soon swirl together at the neck. After merging they move jointly: same region, same spread, past starts forgotten. Steeper funnels merge faster; flat trays never merge.
Diffusions couple the same way. Drift funnels paths together, noise shakes them, and curvature is steepness. The merged law is stationarity; the merge time is mixing.
Where the analogy stops: leaves collide physically while couplings are mathematical joint constructions. Multimodal potentials are multi-funnel trays where crossings take exponential time, which one funnel hides.
How It Actually Works
Langevin diffusion has stationary law and generator , where gives the expected local rate of change of any test function and is its Laplacian (sum of second derivatives, the noise contribution). If is -strongly convex, meaning its curvature is at least everywhere, two coupled paths sharing the same noise contract as:
In plain words: the mean squared gap shrinks exponentially at rate . The distance halves every time units.
Worked example
Take , so (standard Gaussian target). Starts at and sit apart. Contraction gives RMS gap : at , ; at , , inside the stationary standard deviation . Halving time units, shown as 0.35 in the diagram. By the starts are forgotten and both paths wander in jointly. Discretised Langevin with step needs about steps to mirror this ( time units) — the sampler budget the theory predicts.
A double-well with barrier instead mixes in about units: same SDE form, exponentially slower from multimodality.
Code
Every number in the worked example, recomputed directly:
import math
gap0 = 8.0 # starts at -4 and +4for t in (1, 2): print(t, round(gap0 * math.exp(-t), 2)) # -> 1 2.94, 2 1.08
print(round(math.log(2) / 2, 3)) # -> 0.347 halving time at alpha = 1.0print(round(math.exp(8))) # -> 2981 double-well crossing timescaleWatch Out For
Assuming convexity mixing on multimodal targets
The rate needs global strong convexity. Mixture targets with separated modes mix by rare barrier crossings, not contraction. Quoting the 0.35 halving time on a two-moon posterior promises 200-step mixing while true runs need millions.
Fix: check modality first. Multimodal targets need tempering, mode-hopping, or exponential-time honesty.
Confusing stationary with converged at finite time
Stationary is the infinite-time limit. At the gap is still , far from , and sampler averages carry transient bias. Reporting them as stationary samples understates error.
Fix: burn past several halving times (here units) before collecting. Diagnose with coupled gaps, not eyeballed traces.
The Quick Version
- Langevin diffusions target with the generator tracking local expected change.
- Strong convexity halves coupled distances every units; opposite starts merge by units.
- Gaps shrink 8 to 2.94 at time 1 and 1.08 at time 2, inside the stationary width of 1.0.
- Discretised runs need about 200 steps of to mirror that mixing.
- Multimodal barriers replace contraction with exponential crossing times near units at barrier .
- Burn past several halving times before treating draws as stationary.