Mathematics for AI and Machine Learning

Foundations for modern AI and machine learning

Langevin Sampling

Chapter 17 Dynamics & diffusion

Chapter 17: Score Function and Energy-Based Models — Langevin Sampling & Score-Based Diffusion (also appears in Ch. 18)

Animated preview (GIF)
Langevin Sampling — animated GIF preview
High-resolution PNG
Langevin Sampling — high-resolution mind-map icon

From the book

Chapter 17: Score Function and Energy-Based Models. In the chapter mind map this icon labels Langevin Sampling & Score-Based Diffusion. The discussion below is excerpted and lightly edited from § From Score to Sampling in Mathematics for AI and Machine Learning. Related material also appears in Chapter 18 (Energy Models: Sampling from EBMs).

Once $\mathbf{s}_\theta(\mathbf{x})$ is learned, we can generate samples by following the score field. The most common approach is Langevin dynamics, which we will study in detail in Chapter the referenced section.

What this drawing shows

What you see. Langevin MCMC chain: each step follows score-driven drift (blue) plus injected noise (red), gradually exploring toward a density mode.

In the mind map. Chapter 17 — Langevin Sampling & Score-Based Diffusion. See From the book above for definitions, figures, and worked examples.

Also appears in Ch. 18 (Energy Models: Sampling from EBMs).

Where to read next

Open Chapter 17 companion →

Read the full definitions, figures, and worked examples in Chapter 17: Score Function and Energy-Based Models — see the mind-map node Langevin Sampling & Score-Based Diffusion.

This concept is also referenced in Chapter 18 (Energy Models: Sampling from EBMs).