# Fast and Accurate Variational Inference for Models with Many Latent Variables

arXiv: https://arxiv.org/abs/2005.07430 · HTML: https://mlsanity.com/paper/2005.07430/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 15 May 2020.

## Built on by (most cited first, 7 of 7)

- [Partially factorized variational inference for high-dimensional mixed models](https://mlsanity.com/paper/2312.13148/) (2023)
- [Wasserstein Gaussianization and Efficient Variational Bayes for Robust Bayesian Synthetic Likelihood](https://mlsanity.com/paper/2305.14746/) (2023)
- [Large Skew-t Copula Models and Asymmetric Dependence in Intraday Equity Returns](https://mlsanity.com/paper/2308.05564/) (2023)
- [Natural Gradient Hybrid Variational Inference with Application to Deep Mixed Models](https://mlsanity.com/paper/2302.13536/) (2023)
- [Efficient expectation propagation for posterior approximation in high-dimensional probit models](https://mlsanity.com/paper/2309.01619/) (2023)
- [Variational Inference for Bayesian MIDAS Regression](https://mlsanity.com/paper/2602.19610/) (2026)
- [Variational Approximated Restricted Maximum Likelihood Estimation for Spatial Data](https://mlsanity.com/paper/2604.07635/) (2026)

## Abstract (arXiv)

Models with a large number of latent variables are often used to fully utilize the information in big or complex data. However, they can be difficult to estimate using standard approaches, and variational inference methods are a popular alternative. Key to the success of these is the selection of an approximation to the target density that is accurate, tractable and fast to calibrate using optimization methods. Most existing choices can be inaccurate or slow to calibrate when there are many latent variables. Here, we propose a family of tractable variational approximations that are more accurate and faster to calibrate for this case. It combines a parsimonious parametric approximation for the parameter posterior, with the exact conditional posterior of the latent variables. We derive a simplified expression for the re-parameterization gradient of the variational lower bound, which is the main ingredient of efficient optimization algorithms used to implement variational estimation. To do so only requires the ability to generate exactly or approximately from the conditional posterior of the latent variables, rather than to compute its density. We illustrate using two complex contemporary econometric examples. The first is a nonlinear multivariate state space model for U.S. macroeconomic variables. The second is a random coefficients tobit model applied to two million sales by 20,000 individuals in a large consumer panel from a marketing study. In both cases, we show that our approximating family is considerably more accurate than mean field or structured Gaussian approximations, and faster than Markov chain Monte Carlo. Last, we show how to implement data sub-sampling in variational inference for our approximation, which can lead to a further reduction in computation time. MATLAB code implementing the method for our examples is included in supplementary material.
