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, September.
    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. 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).
    13. 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. Luis Gruber & Gregor Kastner, 2022. "Forecasting macroeconomic data with Bayesian VARs: Sparse or dense? It depends!," Papers 2206.04902, arXiv.org, revised Nov 2024.
    7. 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.
    8. Bruno Jacobs & Dennis Fok & Bas Donkers, 2021. "Understanding Large-Scale Dynamic Purchase Behavior," Marketing Science, INFORMS, vol. 40(5), pages 844-870, September.
    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. 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.
    11. 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.
    12. 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).
    13. Andrea Carriero & Todd E. Clark & Massimiliano Marcellino, 2015. "Large Vector Autoregressions with Asymmetric Priors," Working Papers 759, Queen Mary University of London, School of Economics and Finance.
    14. Gregor Kastner & Florian Huber, 2020. "Sparse Bayesian vector autoregressions in huge dimensions," Journal of Forecasting, John Wiley & Sons, Ltd., vol. 39(7), pages 1142-1165, November.
    15. Deborah Gefang & Gary Koop & Aubrey Poon, 2019. "Variational Bayesian Inference in Large Vector Autoregressions with Hierarchical Shrinkage," Discussion Papers in Economics 19/05, Division of Economics, School of Business, University of Leicester.
    16. Smith, Michael Stanley, 2023. "Implicit Copulas: An Overview," Econometrics and Statistics, Elsevier, vol. 28(C), pages 81-104.
    17. Andrea Carriero & Todd E. Clark & Massimiliano Marcellino, 2024. "Capturing Macro‐Economic Tail Risks with Bayesian Vector Autoregressions," Journal of Money, Credit and Banking, Blackwell Publishing, vol. 56(5), pages 1099-1127, August.
    18. Hauzenberger Niko & Huber Florian & Koop Gary, 2024. "Dynamic Shrinkage Priors for Large Time-Varying Parameter Regressions Using Scalable Markov Chain Monte Carlo Methods," Studies in Nonlinear Dynamics & Econometrics, De Gruyter, vol. 28(2), pages 201-225, April.
    19. Petropoulos, Fotios & Apiletti, Daniele & Assimakopoulos, Vassilios & Babai, Mohamed Zied & Barrow, Devon K. & Ben Taieb, Souhaib & Bergmeir, Christoph & Bessa, Ricardo J. & Bijak, Jakub & Boylan, Joh, 2022. "Forecasting: theory and practice," International Journal of Forecasting, Elsevier, vol. 38(3), pages 705-871.
      • Fotios Petropoulos & Daniele Apiletti & Vassilios Assimakopoulos & Mohamed Zied Babai & Devon K. Barrow & Souhaib Ben Taieb & Christoph Bergmeir & Ricardo J. Bessa & Jakub Bijak & John E. Boylan & Jet, 2020. "Forecasting: theory and practice," Papers 2012.03854, arXiv.org, revised Jan 2022.
    20. Cross, Jamie L. & Hou, Chenghan & Poon, Aubrey, 2020. "Macroeconomic forecasting with large Bayesian VARs: Global-local priors and the illusion of sparsity," International Journal of Forecasting, Elsevier, vol. 36(3), pages 899-915.

    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.