How do you derive the evidence lower bound (ELBO), and what is the gap?
Probabilistic models, Variational inference
Level L3 Intermediate. Length Long. Nature Th+Mat Both.
What's being asked
Whether you can derive the ELBO in two ways and explain why maximising it performs approximate inference.
Key idea
Let be the observed data, the latent (hidden) variables and an approximate posterior. Then . The first term is the ELBO. KL is non-negative, so the ELBO is a lower bound on the evidence , and the gap is exactly the KL divergence to the true posterior.
Steps
- Start from , and multiply and divide by . This turns the integral into an expectation under .
- Apply Jensen’s inequality (log is concave) to get .
- Derive the exact identity by expanding with .
- Rewrite the ELBO as : reconstruction minus a regulariser, as in VAEs (variational autoencoders).
- Conclude that because does not depend on , maximising the ELBO over minimises the KL to the posterior.
Common mistakes
- Writing the KL in the wrong direction. Variational inference uses .
- Giving only the Jensen derivation and never identifying the gap.
- Forgetting that the bound is tight exactly when .
How long your answer should be
One page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probabilistic models: You want samples from on (the Beta(2,2) density) using a Uniform(0,1) proposal. Find the smallest valid envelope constant , the acceptance rule and the acceptance probability. What changes if you only know the unnormalised density ?
Next in Probabilistic models: How is the forward recursion for a hidden Markov model derived? For the HMM with states Rainy (R) and Sunny (S), , transitions , , , , and emissions , , , , what is ?