Validated Variational Inference via Practical Posterior Error Bounds

Jonathan H. Huggins, Mikolaj Kasprzak, Trevor Campbell, Tamara Broderick

Introduction

Variational Inference (VI) has emerged as a high-speed alternative to Markov Chain Monte Carlo (MCMC) for Bayesian modeling. By transforming the sampling problem into an optimization task, VI offers significant computational advantages. However, it has historically lacked a reliable mechanism to verify the accuracy of its results. This paper addresses the "hidden danger" of VI: standard metrics like Kullback–Leibler (KL) divergence are scale-invariant, meaning a low KL score can coexist with an estimate of the mean that is off by an infinite amount. To solve this, the authors introduce a computationally efficient method to calculate rigorous error bounds on posterior means and uncertainties.

Theoretical Framework: The Wasserstein Distance

The core innovation of this work is the shift from information-theoretic measures to the Wasserstein distance ($W_p$). Unlike KL divergence, the Wasserstein distance is scale-dependent; it accounts for the physical distance between points in the parameter space. This property makes it the ideal tool for bounding errors in means and variances, providing practitioners with error estimates in the actual units of their parameters (e.g., "accurate to within $\pm \epsilon$").

The "Sandwich" Method and Practical Workflow

The authors bridge the gap between easy-to-compute variational objectives and the difficult-to-compute Wasserstein distance using a "sandwiching" technique:

  1. The Sandwich Effect: By calculating both the Evidence Lower Bound (ELBO) and the $\chi$ Upper Bound (CUBO), the true marginal likelihood is trapped between two values.
  2. Moment Constants: The authors prove that if the variational distribution possesses specific tail properties (such as polynomial or exponential moments), the gap between the ELBO and CUBO translates directly into a rigorous $W_p$ bound.
  3. Automated Workflow: The proposed procedure involves using heavy-tailed variational families (like the Student-$t$ distribution), minimizing the CUBO for approximation, and maximizing the ELBO to finalize the bound. This process is automated via the viabel Python package.

Experimental Validation

The Eight Schools Model

The Eight Schools model is a classic hierarchical Bayesian challenge characterized by a "funnel" shaped posterior that is notoriously difficult for simple distributions to fit. The authors used their bounds to evaluate different model parameterizations.

Centered vs. Non-centered parameterizations in the Eight Schools model.

As shown in the figure above, the bounds correctly identified that the "centered" parameterization was a failure (yielding an error bound of 983), while the "non-centered" version allowed for a much tighter fit (error bound of 15). This demonstrates that the bounds are sensitive enough to guide practitioners toward better model formulations.

Robust Regression

In a synthetic robust regression task with strong parameter correlations, the authors tested how different VI approximations performed.

Comparison of variational approximations for robust regression.

The results highlighted that even when a mean-field approximation (which assumes parameter independence) appears visually acceptable, the $W_2$ bound correctly flags the covariance estimates as untrustworthy. Only the full-rank approximations, which capture the diagonal correlation seen in the figure, provided reliable bounds.

Key Insights and Conclusion

This research provides the theoretical "teeth" necessary for high-stakes Bayesian decision-making. Key takeaways include:

  • KL Divergence is Deceptive: A "good" KL score can hide arbitrarily poor estimates, making ELBO alone insufficient for validation.
  • Wasserstein Provides Physical Bounds: It offers the geometric error guarantees that practitioners actually need.
  • Complementary Diagnostics: These bounds work alongside existing heuristics like $\hat{k}$ but provide a more rigorous theoretical foundation.

While the bounds can sometimes be conservative and rely on successful non-convex optimization, they represent the first practical step toward fully validated variational inference.

Summary updated

BibTeX
@inproceedings{huggins2020validated,
  author = {Jonathan H. Huggins and Mikolaj Kasprzak and Trevor Campbell and Tamara Broderick},
  title = {{Validated Variational Inference via Practical Posterior Error Bounds}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2020},
}
Figure