Skip to main content
This part covers models that move probability mass between a simple latent distribution and a complex data distribution. You have already seen one latent variable model, the mixture of Gaussians, in the Foundations part of the book, where the EM algorithm fits it. This part then covers deep latent variable models trained with variational inference (VAEs). Generative modeling transforms a simple distribution into a data distribution. In the deterministic case you draw Z∼pZZ \sim p_Z and set X=G(Z)X = G(Z), so the data distribution is the pushforward p=G#pZp = G_\# p_Z. More generally, a kernel p(x∣z)p(x \mid z) gives p(x)=∫p(x∣z) pZ(z) dz.p(x) = \int p(x \mid z)\, p_Z(z)\, dz . “Latent Transport Models” is the organizing term of this book. It is not a standard taxonomy, and other texts group these models differently. The rest of the part treats generation as a transport problem: carry samples from a simple source distribution, such as Gaussian noise, to the data distribution. The probability transport introduction states that problem, lists the question each transport method answers, and maps how flow matching and diffusion models relate to optimal transport.

Reading order

The pages follow this sequence, grouped as in the sidebar. Read the left column first, then the right one. Select a box to open its page.

VAE Introduction

Variational inference, calculus of variations, and the deep latent variable modeling problem.

VAE Architecture

Encoder-decoder architecture and amortized variational inference.

VAE Optimization

Derivation of the Evidence Lower Bound and joint training of the encoder and decoder.

Probability transport

Generation as moving probability mass from noise to data.

Maps and couplings

Moving one density into another, and what each way of moving it costs.

Velocity fields

Fields that move particles in continuous time.

Dynamic transport

How mass moves through time, and why constant speed costs least.

Normalizing flows

Exact densities of generated samples from invertible maps.

Flow matching

A learned velocity field that carries noise samples to data.

Flow matching in 1D

Learning the transport field from samples, with three couplings.

Diffusion introduction

Diffusion as transport along random paths.

Brownian motion

Random walks, diffusion flux and drift toward the origin.

Fokker-Planck

Random particles and a deterministic flow that share every density.

Gradient flow

Diffusion as steepest descent of a free energy.

Score-based methods

Score matching, the forward and reverse SDEs and the probability-flow ODE.

Score MoG example

Score-based sampling on a two-dimensional mixture of Gaussians.

DDPM

The forward and reverse processes of DDPM and its training loss.

DDPM MoG example

A DDPM trained on a two-dimensional mixture of Gaussians.

DDIM MoG example

Deterministic DDIM sampling on a two-dimensional mixture of Gaussians.

Found an error on this page? Report an issue.