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

Guidance Does Not Sample the Sharpened Distribution

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

An interactive live film: classifier-free guidance uses the exact score of a sharpened density at every noise level, yet its samples end further right and narrower than that density; move w and compare.

Narration

On the front wall, the grey curve is the unconditional data, centred at zero, and the blue curve is the data with label c, centred at one.

Classifier free guidance runs the reverse dynamics with one plus w times the conditional score, minus w times the unconditional score. The orange paths on the floor start in pure noise at the back and flow forward to the data.

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

More from Chapter 21

Interactive1:35Fokker-Planck: A Random Cloud, a Deterministic DensityChapter 21Preview1:29Detailed Balance: Stationary Is Not the Same as StillChapter 21Preview1:28Forward Diffusion and the Heat Equation: All Distributions Become GaussianChapter 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