ID-5-02 (TO) · Mathematical Foundations of Diffusion Models · W03 demo
KL divergence is not symmetric, and the asymmetry is not a technicality. Fit the same single Gaussian to the same bimodal data and the two directions give genuinely different answers: one covers everything, the other picks a mode and ignores the rest.
The grey curve is the target p: a mixture of two Gaussians. The model family is deliberately too poor to represent it — a single Gaussian q. There is no fit that is right, so the choice of what "close" means decides everything.
forward: KL(p∥q) = ∫ p log(p/q) reverse: KL(q∥p) = ∫ q log(q/p)
Both optima, drawn together
| fit | μ | σ | KL(p∥q) | KL(q∥p) |
|---|
Drag q yourself and watch the two integrands. Both are integrals of a weighted log-ratio, but the weight differs, and that is the entire story: the forward integrand is weighted by p, the reverse by q.
Pointwise contribution to each integral
Sweep the mean of q across the axis, holding σ at its best value for each μ, and plot both objectives. The shapes are qualitatively different, and that difference is why one optimisation is easy and the other depends on initialisation.
Objective against μ, with σ optimised
Which one you are using is rarely a free choice. Maximum likelihood is forward KL, so likelihood-trained models are mass-covering: they put probability on everything they saw, which is one reason they generate blurry averages. Variational inference and the ELBO minimise reverse KL, so they are zero-forcing: they lock on and underestimate spread. Same data, same family, opposite pathologies — from a single swap of argument order.