Mean-field variational inference 2026-10-06
Mean-field variational inference restricts the trial probability density function to . With the other factors fixed, , provided this expression has a finite positive normalization constant. Subtracting the objective at leaves , proving the update is optimal when the terms are well defined.
Past exam of the mathematics course of the University of Cambridge 2017 iii Paper 216 4 a Solution Created 2026-10-03 Updated 2026-10-06
Write . Mean-field variational inference minimizes the reverse Kullback-Leibler divergenceEach is a probability density function; without further parametric restrictions, the optimization is over all such product probability distributions. Equivalently it maximizes the evidence lower bound for any unnormalized posterior density . Its difference from is exactly the Kullback-Leibler divergence.
Fix and writeAssume and that the displayed expected values and objective decomposition are well defined. The optimal factor isIndeed, the part of the objective depending on isThe remaining term is fixed. Gibbs inequality gives nonnegativity of the Kullback-Leibler divergence, with equality precisely at almost everywhere. This proves global optimality of that coordinate update; it does not assert global optimality of a sequence of coordinate updates for the full nonconvex product-family problem.
The printed upper index in the list of remaining coordinates is inconsistent with the dimension ; the natural interpretation is . Also, if the exponential expression has zero or infinite normalizing constant, or the expected values are undefined, the usual coordinate formula needs additional support or integrability hypotheses. A restricted parametric factor family need not contain this unrestricted optimal factor.
Variational inference replaces exact Bayesian inference by an optimization problem over a tractable family . A guide program samples from this approximating family. Optimizing an evidence lower bound is equivalent to minimizing . Its appeal is that a fitted approximation can be cheap to sample and may scale well when an exact posterior distribution is inaccessible. A restricted family, such as mean-field variational inference, can miss dependence or entire modes; a local optimum can add further error. More optimization cannot remove approximation error caused by an inadequate family.
Monte Carlo method inference instead estimates posterior expectations using simulated values or weighted values. Examples include rejection sampling, importance sampling and Markov chain Monte Carlo. Under their respective support and convergence assumptions, increasing computation can yield consistent estimates without choosing a finite-dimensional posterior family. Their uncertainty includes simulation error; an inefficient proposal or slow mixing time can make that error large. Markov chain Monte Carlo additionally requires convergence and dependence diagnostics.
The central trade-off is optimization within an approximate family versus simulation under a target probability distribution. It is not an absolute distinction between deterministic and random computation: variational inference often uses Monte Carlo method estimates of its gradient, while Monte Carlo method inference may use fitted proposals. Neither method automatically guarantees accurate uncertainty estimates or superiority at a fixed computational budget.