Variational inference
When the posterior can't be computed, pick the closest distribution you can compute, and find it by optimisation. The evidence lower bound derived two ways, mean-field coordinate ascent, why the direction of the KL divergence decides whether you find one mode or smear across all of them, and the stochastic, reparameterised gradients that made VI scale to deep learning.
60 min
After this lesson you can
- Derive the evidence lower bound (ELBO) by Jensen's inequality and by the KL decomposition, and say what the gap is
- Derive the mean-field coordinate-ascent update and apply it to a Gaussian
- Predict whether minimising reverse or forward KL will seek a mode or cover the mass, and explain why
- Estimate ELBO gradients with the reparameterisation trick and with the score function, and explain why the first usually has lower variance
- Weigh variational inference against MCMC
In this lesson
- The objective: a lower bound on the evidence
- Mean-field VI and coordinate ascent
- Which KL? Mode-seeking versus mass-covering
- Stochastic and black-box VI
- VI or MCMC?
- In code
This lesson is part of Descent Pro
Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.