IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2005.07430.html
   My bibliography  Save this paper

Fast and Accurate Variational Inference for Models with Many Latent Variables

Author

Listed:
  • Rub'en Loaiza-Maya
  • Michael Stanley Smith
  • David J. Nott
  • Peter J. Danaher

Abstract

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.

Suggested Citation

  • Rub'en Loaiza-Maya & Michael Stanley Smith & David J. Nott & Peter J. Danaher, 2020. "Fast and Accurate Variational Inference for Models with Many Latent Variables," Papers 2005.07430, arXiv.org, revised Apr 2021.
  • Handle: RePEc:arx:papers:2005.07430
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2005.07430
    File Function: Latest version
    Download Restriction: no
    ---><---

    Other versions of this item:

    References listed on IDEAS

    as
    1. David M. Blei & Alp Kucukelbir & Jon D. McAuliffe, 2017. "Variational Inference: A Review for Statisticians," Journal of the American Statistical Association, Taylor & Francis Journals, vol. 112(518), pages 859-877, April.
    2. Sangjoon Kim & Neil Shephard & Siddhartha Chib, 1998. "Stochastic Volatility: Likelihood Inference and Comparison with ARCH Models," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 65(3), pages 361-393.
    3. repec:taf:jnlasa:v:108:y:2013:i:502:p:656-665 is not listed on IDEAS
    4. Dong Hwan Oh & Andrew J. Patton, 2017. "Modeling Dependence in High Dimensions With Factor Copulas," Journal of Business & Economic Statistics, Taylor & Francis Journals, vol. 35(1), pages 139-154, January.
    5. Carlos M. Carvalho & Nicholas G. Polson & James G. Scott, 2010. "The horseshoe estimator for sparse signals," Biometrika, Biometrika Trust, vol. 97(2), pages 465-480.
    6. George Poyiadjis & Arnaud Doucet & Sumeetpal S. Singh, 2011. "Particle approximations of the score and observed information matrix in state space models with application to parameter estimation," Biometrika, Biometrika Trust, vol. 98(1), pages 65-80.
    7. Train,Kenneth E., 2009. "Discrete Choice Methods with Simulation," Cambridge Books, Cambridge University Press, number 9780521766555.
    8. Todd E. Clark & Francesco Ravazzolo, 2015. "Macroeconomic Forecasting Performance under Alternative Specifications of Time‐Varying Volatility," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 30(4), pages 551-575, June.
    9. Asim Ansari & Yang Li & Jonathan Z. Zhang, 2018. "Probabilistic Topic Model for Hybrid Recommender Systems: A Stochastic Variational Bayesian Approach," Marketing Science, INFORMS, vol. 37(6), pages 987-1008, November.
    10. Braun, Michael & McAuliffe, Jon, 2010. "Variational Inference for Large-Scale Models of Discrete Choice," Journal of the American Statistical Association, American Statistical Association, vol. 105(489), pages 324-335.
    11. Nathaniel Tomasetti & Catherine Forbes & Anastasios Panagiotelis, 2019. "Updating Variational Bayes: Fast Sequential Posterior Inference," Monash Econometrics and Business Statistics Working Papers 13/19, Monash University, Department of Econometrics and Business Statistics.
    12. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178.
    13. Ormerod, J. T. & Wand, M. P., 2010. "Explaining Variational Approximations," The American Statistician, American Statistical Association, vol. 64(2), pages 140-153.
    14. Giorgio E. Primiceri, 2005. "Time Varying Structural Vector Autoregressions and Monetary Policy," The Review of Economic Studies, Review of Economic Studies Ltd, vol. 72(3), pages 821-852.
    15. Allenby, Greg M. & Rossi, Peter E., 1998. "Marketing models of consumer heterogeneity," Journal of Econometrics, Elsevier, vol. 89(1-2), pages 57-78, November.
    16. Carriero, Andrea & Clark, Todd E. & Marcellino, Massimiliano, 2019. "Large Bayesian vector autoregressions with stochastic volatility and non-conjugate priors," Journal of Econometrics, Elsevier, vol. 212(1), pages 137-154.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Ruben Loaiza-Maya & Didier Nibbering & Dan Zhu, 2023. "Hybrid unadjusted Langevin methods for high-dimensional latent variable models," Papers 2306.14445, arXiv.org.
    2. Chan, Joshua C.C. & Yu, Xuewen, 2022. "Fast and Accurate Variational Inference for Large Bayesian VARs with Stochastic Volatility," Journal of Economic Dynamics and Control, Elsevier, vol. 143(C).
    3. Gefang, Deborah & Koop, Gary & Poon, Aubrey, 2023. "Forecasting using variational Bayesian inference in large vector autoregressions with hierarchical shrinkage," International Journal of Forecasting, Elsevier, vol. 39(1), pages 346-363.
    4. Chaya Weerasinghe & Ruben Loaiza-Maya & Gael M. Martin & David T. Frazier, 2023. "ABC-based Forecasting in State Space Models," Monash Econometrics and Business Statistics Working Papers 12/23, Monash University, Department of Econometrics and Business Statistics.
    5. Loaiza-Maya, Rubén & Nibbering, Didier & Zhu, Dan, 2024. "Hybrid unadjusted Langevin methods for high-dimensional latent variable models," Journal of Econometrics, Elsevier, vol. 241(2).
    6. David T. Frazier & Ruben Loaiza-Maya & Gael M. Martin, 2021. "Variational Bayes in State Space Models: Inferential and Predictive Accuracy," Papers 2106.12262, arXiv.org, revised Feb 2022.
    7. Rub'en Loaiza-Maya & Didier Nibbering, 2022. "Efficient variational approximations for state space models," Papers 2210.11010, arXiv.org, revised Jun 2023.
    8. Rub'en Loaiza-Maya & Didier Nibbering, 2022. "Fast variational Bayes methods for multinomial probit models," Papers 2202.12495, arXiv.org, revised Oct 2022.
    9. Lin Deng & Michael Stanley Smith & Worapree Maneesoonthorn, 2023. "Large Skew-t Copula Models and Asymmetric Dependence in Intraday Equity Returns," Papers 2308.05564, arXiv.org, revised Jul 2024.
    10. Martin, Gael M. & Frazier, David T. & Maneesoonthorn, Worapree & Loaiza-Maya, Rubén & Huber, Florian & Koop, Gary & Maheu, John & Nibbering, Didier & Panagiotelis, Anastasios, 2024. "Bayesian forecasting in economics and finance: A modern review," International Journal of Forecasting, Elsevier, vol. 40(2), pages 811-839.
    11. Gael M. Martin & David T. Frazier & Ruben Loaiza-Maya & Florian Huber & Gary Koop & John Maheu & Didier Nibbering & Anastasios Panagiotelis, 2023. "Bayesian Forecasting in the 21st Century: A Modern Review," Monash Econometrics and Business Statistics Working Papers 1/23, Monash University, Department of Econometrics and Business Statistics.
    12. Gael M. Martin & David T. Frazier & Christian P. Robert, 2021. "Approximating Bayes in the 21st Century," Monash Econometrics and Business Statistics Working Papers 24/21, Monash University, Department of Econometrics and Business Statistics.
    13. Deborah Gefang & Stephen G. Hall & George S. Tavlas, 2022. "Fast Two-Stage Variational Bayesian Approach to Estimating Panel Spatial Autoregressive Models with Unrestricted Spatial Weights Matrices," Papers 2205.15420, arXiv.org, revised Aug 2023.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Gael M. Martin & David T. Frazier & Ruben Loaiza-Maya & Florian Huber & Gary Koop & John Maheu & Didier Nibbering & Anastasios Panagiotelis, 2023. "Bayesian Forecasting in the 21st Century: A Modern Review," Monash Econometrics and Business Statistics Working Papers 1/23, Monash University, Department of Econometrics and Business Statistics.
    2. Martin, Gael M. & Frazier, David T. & Maneesoonthorn, Worapree & Loaiza-Maya, Rubén & Huber, Florian & Koop, Gary & Maheu, John & Nibbering, Didier & Panagiotelis, Anastasios, 2024. "Bayesian forecasting in economics and finance: A modern review," International Journal of Forecasting, Elsevier, vol. 40(2), pages 811-839.
    3. Joshua Chan, 2023. "BVARs and Stochastic Volatility," Papers 2310.14438, arXiv.org.
    4. Yu Bai & Andrea Carriero & Todd E. Clark & Massimiliano Marcellino, 2022. "Macroeconomic forecasting in a multi‐country context," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(6), pages 1230-1255, September.
    5. Gefang, Deborah & Koop, Gary & Poon, Aubrey, 2023. "Forecasting using variational Bayesian inference in large vector autoregressions with hierarchical shrinkage," International Journal of Forecasting, Elsevier, vol. 39(1), pages 346-363.
    6. Bruno Jacobs & Dennis Fok & Bas Donkers, 2021. "Understanding Large-Scale Dynamic Purchase Behavior," Marketing Science, INFORMS, vol. 40(5), pages 844-870, September.
    7. Luis Gruber & Gregor Kastner, 2022. "Forecasting macroeconomic data with Bayesian VARs: Sparse or dense? It depends!," Papers 2206.04902, arXiv.org, revised Nov 2024.
    8. Joshua C.C. Chan & Rodney W. Strachan, 2023. "Bayesian State Space Models In Macroeconometrics," Journal of Economic Surveys, Wiley Blackwell, vol. 37(1), pages 58-75, February.
    9. Magnus Reif, 2020. "Macroeconomics, Nonlinearities, and the Business Cycle," ifo Beiträge zur Wirtschaftsforschung, ifo Institute - Leibniz Institute for Economic Research at the University of Munich, number 87.
    10. Gael M. Martin & David T. Frazier & Christian P. Robert, 2020. "Computing Bayes: Bayesian Computation from 1763 to the 21st Century," Monash Econometrics and Business Statistics Working Papers 14/20, Monash University, Department of Econometrics and Business Statistics.
    11. Todd E. Clark & Florian Huber & Gary Koop & Massimiliano Marcellino & Michael Pfarrhofer, 2023. "Tail Forecasting With Multivariate Bayesian Additive Regression Trees," International Economic Review, Department of Economics, University of Pennsylvania and Osaka University Institute of Social and Economic Research Association, vol. 64(3), pages 979-1022, August.
    12. Chan, Joshua C.C., 2021. "Minnesota-type adaptive hierarchical priors for large Bayesian VARs," International Journal of Forecasting, Elsevier, vol. 37(3), pages 1212-1226.
    13. Lukas Berend & Jan Pruser, 2024. "The Transmission of Monetary Policy via Common Cycles in the Euro Area," Papers 2410.05741, arXiv.org, revised Nov 2024.
    14. Smith, Michael Stanley & Maneesoonthorn, Worapree, 2018. "Inversion copulas from nonlinear state space models with an application to inflation forecasting," International Journal of Forecasting, Elsevier, vol. 34(3), pages 389-407.
    15. Ramis Khabibullin & Sergei Seleznev, 2022. "Fast Estimation of Bayesian State Space Models Using Amortized Simulation-Based Inference," Papers 2210.07154, arXiv.org.
    16. David T. Frazier & Ruben Loaiza-Maya & Gael M. Martin, 2021. "Variational Bayes in State Space Models: Inferential and Predictive Accuracy," Papers 2106.12262, arXiv.org, revised Feb 2022.
    17. Deborah Gefang & Gary Koop & Aubrey Poon, 2019. "Variational Bayesian Inference in Large Vector Autoregressions with Hierarchical Shrinkage," Economic Statistics Centre of Excellence (ESCoE) Discussion Papers ESCoE DP-2019-07, Economic Statistics Centre of Excellence (ESCoE).
    18. Gunawan, David & Kohn, Robert & Nott, David, 2021. "Variational Bayes approximation of factor stochastic volatility models," International Journal of Forecasting, Elsevier, vol. 37(4), pages 1355-1375.
    19. Antolín-Díaz, Juan & Drechsel, Thomas & Petrella, Ivan, 2024. "Advances in nowcasting economic activity: The role of heterogeneous dynamics and fat tails," Journal of Econometrics, Elsevier, vol. 238(2).
    20. Zheng, Tingguo & Ye, Shiqi & Hong, Yongmiao, 2023. "Fast estimation of a large TVP-VAR model with score-driven volatilities," Journal of Economic Dynamics and Control, Elsevier, vol. 157(C).

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2005.07430. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.