Gaussian Mean Field Variational Inference can Overestimate Predictive Variance
Abstract
Mean Field Variational Inference (MFVI) is widely understood to underestimate posterior variance. By analysing conjugate Bayesian linear regression, we show that this characterisation is incomplete: while MFVI underestimates the variance in parameter space, it can overestimate the predictive variance compared to the exact posterior. We show that if the MFVI posterior underestimates predictive variances in some directions, it necessarily overestimates them in others. Crucially, this overestimation occurs in directions where the training data concentrates. This leads to the surprising result that, for a test point drawn from the training distribution, MFVI's expected predictive variance exceeds that of the exact posterior. We demonstrate a pathological case of this effect, where the MFVI posterior fails to reduce predictive variance compared to the prior on i.i.d. data. We connect these results to the Cold Posterior Effect, arguing that varying the temperature can correct this overestimation, yielding predictions closer to those of the exact posterior. We validate our theory on synthetic and real-world regression tasks.
Lay Summary
18:46Claude responded: When we use machine learning models to make predictions, it's useful to know not just what the model predicts but how confident it is.When we use machine learning models to make predictions, it's useful to know not just what the model predicts but how confident it is. One popular way of getting these confidence estimates, called mean field variational inference (MFVI), has a well-known flaw: it tends to be overconfident, claiming more certainty than is warranted. Our paper shows that this story is incomplete. While MFVI is overconfident on average, on the kind of data the model was actually trained on it does the opposite — it becomes underconfident, reporting more uncertainty than it should. We give a clean mathematical explanation for why this happens, show it gets worse in higher dimensions (to the point where the model can effectively ignore its training data), and use this to shed light on a longstanding puzzle in the field known as the cold posterior effect, where deliberately making the model more confident improves its predictions.