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

  1. The objective: a lower bound on the evidence
  2. Mean-field VI and coordinate ascent
  3. Which KL? Mode-seeking versus mass-covering
  4. Stochastic and black-box VI
  5. VI or MCMC?
  6. 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.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.