IDEAS home Printed from https://ideas.repec.org/a/eee/econom/v230y2022i2p339-362.html
   My bibliography  Save this article

Fast and accurate variational inference for models with many latent variables

Author

Listed:
  • Loaiza-Maya, Rubén
  • Smith, Michael Stanley
  • Nott, David J.
  • Danaher, Peter J.

Abstract

Models with a large number of latent variables are often used to utilize the information in big or complex data, but can be difficult to estimate. Variational inference methods provide an attractive solution. These methods use an approximation to the posterior density, yet for large latent variable models existing choices can be inaccurate or slow to calibrate. Here, we propose a family of tractable variational approximations that are more accurate and faster to calibrate for this case. It combines a parsimonious 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 optimization algorithms used for calibration. Implementation only requires exact or approximate generation from the conditional posterior of the latent variables, rather than computation of their density. In effect, our method provides a new way to employ Markov chain Monte Carlo (MCMC) within variational inference. 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 consumer panel. In both cases, our approximating family is considerably more accurate than mean field or structured Gaussian approximations, and faster than MCMC. Last, we show how to implement data sub-sampling in variational inference for our approximation, further reducing computation time. MATLAB code implementing the method is provided.

Suggested Citation

  • Loaiza-Maya, Rubén & Smith, Michael Stanley & Nott, David J. & Danaher, Peter J., 2022. "Fast and accurate variational inference for models with many latent variables," Journal of Econometrics, Elsevier, vol. 230(2), pages 339-362.
  • Handle: RePEc:eee:econom:v:230:y:2022:i:2:p:339-362
    DOI: 10.1016/j.jeconom.2021.05.002
    as

    Download full text from publisher

    File URL: http://www.sciencedirect.com/science/article/pii/S0304407621001330
    Download Restriction: Full text for ScienceDirect subscribers only

    File URL: https://libkey.io/10.1016/j.jeconom.2021.05.002?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    As the access to this document is restricted, you may want to look for a different version below or search for a different version of it.

    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. repec:taf:jnlasa:v:108:y:2013:i:502:p:656-665 is not listed on IDEAS
    3. 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.
    4. 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.
    5. 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.
    6. 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.
    7. 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.
    8. Durbin, James & Koopman, Siem Jan, 2012. "Time Series Analysis by State Space Methods," OUP Catalogue, Oxford University Press, edition 2, number 9780199641178.
    9. 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.
    10. Train,Kenneth E., 2009. "Discrete Choice Methods with Simulation," Cambridge Books, Cambridge University Press, number 9780521747387, October.
    11. 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.
    12. 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.
    13. 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.
    14. Ormerod, J. T. & Wand, M. P., 2010. "Explaining Variational Approximations," The American Statistician, American Statistical Association, vol. 64(2), pages 140-153.
    15. 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.
    16. Allenby, Greg M. & Rossi, Peter E., 1998. "Marketing models of consumer heterogeneity," Journal of Econometrics, Elsevier, vol. 89(1-2), pages 57-78, November.
    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. 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.
    5. Rub'en Loaiza-Maya & Didier Nibbering, 2022. "Fast variational Bayes methods for multinomial probit models," Papers 2202.12495, arXiv.org, revised Oct 2022.
    6. 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.
    7. 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.
    8. 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.
    9. 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.
    10. Rub'en Loaiza-Maya & Didier Nibbering, 2022. "Efficient variational approximations for state space models," Papers 2210.11010, arXiv.org, revised Jun 2023.
    11. 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.
    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.

    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 Oct 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).

    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:eee:econom:v:230:y:2022:i:2:p:339-362. 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: Catherine Liu (email available below). General contact details of provider: http://www.elsevier.com/locate/jeconom .

    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.