The interactive film is in the book's Companion

Play it, pause it, turn it and drag it with Mathematics for AI and Machine Learning.

Get the book

MALA: Removing Discretization Bias with Accept-Reject

Chapter 18 · Mathematics for AI and Machine Learning · Advanced · 1:42

An interactive live film: Metropolis-adjusted Langevin algorithm; rejected proposals flash red, and Metropolis-Hastings acceptance eliminates discretization bias even under large step sizes.

Narration

Unadjusted Langevin algorithm discretizes continuous physics into finite steps. This approximation introduces a systematic bias, causing the sampled cloud to drift away from the true distribution.

Look at the orange particles moving with unadjusted Langevin. When step size eta is large, the particles scatter too broadly, wider than the true distribution, drawn in blue on the walls.

The rest of the narration is in the book's Companion.

More from Chapter 18

Interactive1:22Langevin Sampling: Drift Uphill, Kick at RandomChapter 18Preview1:24Metropolis-Hastings: A Random Walk That SamplesChapter 18Preview1:40Underdamped Langevin and HMC: Momentum-Driven ExplorationChapter 18Preview1:29Langevin Dynamics and SGLD: Sampling vs OptimizationChapter 18Preview1:46Speculative Decoding: Exact Sampling With a Draft ModelChapter 18