In mean-field variational inference, with , show that the optimal factor satisfies . How is this used as an algorithm?
Probabilistic models, Variational inference
Level L4 Advanced. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can derive the coordinate-ascent update by isolating one factor in the ELBO and recognising a KL divergence.
Key idea
Fix all factors except . The ELBO becomes , where . It is maximised when .
Steps
- Start from the ELBO with .
- The entropy term splits: . Keep only the terms with and absorb the rest into a constant.
- The first term is . Define the new density .
- Then .
- The KL divergence is non-negative and equals 0 only at . So .
- Algorithm (CAVI): initialise all . Cycle through , recomputing using the current other factors. Each update cannot decrease the ELBO, so it converges, but only to a local optimum because the ELBO is not concave in general.
- For conjugate-exponential models the expectation is easy: the update stays in the same family and only changes its parameters.
Common mistakes
- Taking the expectation over all of including . Only the other factors are averaged.
- Updating all factors at once in parallel from stale values. This can fail to increase the ELBO.
- Believing CAVI finds the global optimum. The solution depends on the initialisation.
How long your answer should be
A page. About 7 minutes.
Last checked on 4 December 2026.
Read this
Previous in Probabilistic models: How does the Metropolis–Hastings acceptance probability follow from detailed balance, and why is Gibbs sampling a special case whose proposals are always accepted?
Next in Probabilistic models: For Bayesian linear regression with prior and noise precision , derive the log evidence . Which terms reward fit, and which penalise complexity?