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

Underdamped Langevin and HMC: Momentum-Driven Exploration

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

An interactive live film: restoring momentum to phase space; leapfrog Hamiltonian dynamics lets particles coast ballistically over potential barriers between modes, far faster than diffusive random walks.

Narration

Standard Langevin dynamics is overdamped. Friction is so strong that any velocity vanishes at once, so the chain explores the way a random walk does.

Look at the red path, starting at the left end of this long, narrow valley. Each step is a small kick, and the displacement grows only like the square root of the number of steps. It takes hundreds of steps to reach the dashed line on the far side.

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:42MALA: Removing Discretization Bias with Accept-RejectChapter 18Preview1:29Langevin Dynamics and SGLD: Sampling vs OptimizationChapter 18Preview1:46Speculative Decoding: Exact Sampling With a Draft ModelChapter 18