Abstract
We propose a general algorithm for approximating nonstandard Bayesian posterior distributions by minimizing the Kullback-Leibler (KL) divergence to the intractable posterior. Our method reinterprets Variational Bayes (VB) as a stochastic linear regression problem, allowing for fast, accurate approximations of any posterior given in closed form up to a proportionality constant. Using exponential family distributions or their mixtures, the method achieves high precision across diverse models, including non-conjugate ones.
Introduction
In Bayesian statistics, the central challenge is the estimation of the posterior distribution—the updated belief regarding model parameters after observing data. Traditionally, researchers have faced a trade-off between accuracy and computational efficiency. Markov Chain Monte Carlo (MCMC) methods provide high accuracy but are often prohibitively slow for large datasets. Conversely, Variational Bayes (VB) offers significant speed but is typically restricted to "conjugate" models where specific integrals can be solved analytically.
Salimans and Knowles bridge this "generality gap" by introducing a method that maintains the speed of VB while offering the flexibility of MCMC. Their approach allows for the approximation of nearly any posterior distribution, provided its unnormalized density is known.
The Variational-Regression Equivalence
The fundamental insight of this work is the mathematical equivalence between minimizing the KL divergence—the standard objective in variational inference—and performing a linear regression. By framing the optimization this way, the authors transform a complex integration problem into a familiar statistical estimation task.
In this regression framework:
- Dependent Variable ($Y$): The (unnormalized) log-posterior density of the target distribution.
- Explanatory Variables ($X$): The sufficient statistics of the chosen approximating distribution (e.g., the mean and variance terms for a Gaussian).
- Regression Coefficients ($\beta$): The natural parameters of the approximating distribution.
This perspective provides a geometric intuition for VB and enables the use of standard regression diagnostics, such as $R^2$, to assess the quality of the posterior approximation.
Algorithmic Innovations
The authors present two primary algorithms to implement this framework:
- Algorithm 1 (Stochastic Optimization): This general-purpose algorithm iteratively updates the approximation using Monte Carlo samples. A key innovation is the "same randomness" trick: by using the same set of random samples to estimate both the design matrix and the target vector, the authors cancel out significant noise. This stabilizes the stochastic gradient descent, leading to faster and more robust convergence.
- Algorithm 2 (Gaussian Optimization): Specifically tailored for Gaussian approximations, this version leverages gradients and Hessians (second derivatives) to further accelerate the optimization process.
Empirical Performance
The method was evaluated across three distinct scenarios to demonstrate its versatility:
- Binary Probit Regression: In comparisons using synthetic data, the proposed method outperformed standard Variational Bayesian Expectation Maximization (VBEM) in terms of Root Mean Square Error (RMSE). This improvement stems from the method's ability to avoid the restrictive factorization assumptions often required by traditional VB.
- Stochastic Volatility Modeling: Using real-world exchange rate data (GBP/USD), the algorithm handled a high-dimensional model with approximately 2,000 parameters. It achieved convergence in just 0.5 seconds on a standard 3GHz processor, representing a massive speedup over traditional MCMC methods.
- Cancer Mortality Data: To address highly skewed distributions in a beta-binomial model of Missouri stomach cancer rates, the authors utilized a mixture of eight Gaussians. This approach improved the $R^2$ fit from 0.82 (single Gaussian) to 0.997, demonstrating the method's ability to capture complex, non-symmetric posterior shapes.
Discussion and Future Work
By moving beyond the requirements of conjugacy, this method simplifies the implementation of Bayesian inference for complex models. The ability to use mixtures of exponential families allows for the approximation of multi-modal or heavy-tailed distributions that single-component distributions cannot capture.
However, some challenges remain. The algorithm may struggle with very high-dimensional discrete spaces that lack a clear factor structure. Additionally, like all variational methods, it is susceptible to local optima in multi-modal landscapes. Future research may focus on the automatic selection of the approximating family to further reduce the need for manual tuning.
Conclusion
Salimans and Knowles provide a powerful new tool for Bayesian computation. By re-interpreting variational inference through the lens of stochastic linear regression, they offer a general, fast, and accurate framework that significantly expands the range of models accessible to variational methods.
Summary updated