Variational Inference with Gaussian Score Matching
Chirag Modi, Robert M. Gower, Charles Margossian, Yuling Yao, David M. Blei, Lawrence K. Saul
Abstract
Variational inference (VI) is a method to approximate the computationally intractable posterior distributions that arise in Bayesian statistics. Typically, VI fits a simple parametric distribution to be close to the target posterior, minimizing an appropriate objective such as the evidence lower bound (ELBO). In this work, we present a new approach to VI. Our method is based on the principle of score matching, that if two distributions are equal then their score functions (i.e., gradients of the log density) are equal at every point on their support. With this principle, we develop score matching VI, an iterative algorithm that seeks to match the scores between the variational approximation and the exact posterior. At each iteration, score matching VI solves an inner optimization, one that minimally adjusts the current variational estimate to match the scores at a newly sampled value of the latent variables. We show that when the variational family is a Gaussian, this inner optimization enjoys a closed form solution, which we call Gaussian score matching VI (GSM-VI). GSM-VI is also a "black box" variational algorithm in that it only requires a differentiable joint distribution, and as such it can be applied to a wide class of models. We compare GSM-VI to black box variational inference (BBVI), which has similar requirements but instead optimizes the ELBO. We first study how GSM-VI behaves as a function of the problem dimensionality, the condition number of the target covariance matrix (when the target is Gaussian), and the degree of mismatch between the approximating and exact posterior distribution. We then study GSM-VI on a collection of real-world Bayesian inference problems from the posteriorDB database of datasets and models. In all of our studies we find that GSM-VI is faster than BBVI, but without sacrificing accuracy. It requires 10-100x fewer gradient evaluations to obtain a comparable quality of approximation 1 . 1 We provide a Python implementation of GSM-VI algorithm at https://github.com/modichirag/GSM-VI . Preprint. Under review.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext f560f498-29b7-4bcf-ac39-92237f49e8d8Cited by top-tier papers6
- FOOGD: Federated Collaboration for Both Out-of-distribution Generalization and DetectionXinting Liao, Weiming Liu, Pengyang Zhou, Fengyuan Yu et al.NeurIPS 2024 · 24 citations
- Batch and match: black-box variational inference with a score-based divergenceDiana Cai, Chirag Modi, Loucas Pillaud-Vivien, Charles Margossian et al.ICML 2024 · 18 citations
- EigenVI: score-based variational inference with orthogonal function expansionsDiana Cai, Chirag Modi, Charles Margossian, Robert M. Gower et al.NeurIPS 2024 · 17 citations
- Fisher meets Feynman: score-based variational inference with a product of expertsDiana Cai, Robert M. Gower, David M. Blei, Lawrence K. SaulNeurIPS 2025 · 3 citations
- Stochastic variance-reduced Gaussian variational inference on the Bures-Wasserstein manifoldHoang Phuc Hau Luu, Hanlin Yu, Bernardo Williams, Marcelo Hartmann et al.ICLR 2025
Builds on4
- Training Neural Networks for and by InterpolationLeonard Berrada, Andrew Zisserman, M. Pawan KumarICML 2020 · 71 citations
- Markovian Score Climbing: Variational Inference with KL(p||q)Christian A. Naesseth, Fredrik Lindsten, David M. BleiNeurIPS 2020 · 67 citations
- Challenges and Opportunities in High Dimensional Variational InferenceAkash Kumar Dhaka, Alejandro Catalina, Manushi Welandawe, Michael Riis Andersen et al.NeurIPS 2021 · 54 citations
- Provable Smoothness Guarantees for Black-Box Variational InferenceJustin DomkeICML 2020 · 41 citations
Related papers
- Semi-Implicit Variational Inference via Score MatchingLonglin Yu, Cheng ZhangICLR 2023
- Practical and Matching Gradient Variance Bounds for Black-Box Variational Bayesian InferenceKyurae Kim, Kaiwen Wu, Jisu Oh, Jacob R. GardnerICML 2023 · 8 citations
- Bi-level Score Matching for Learning Energy-based Latent Variable ModelsFan Bao, Chongxuan Li, Taufik Xu, Hang Su et al.NeurIPS 2020 · 16 citations
- On the Convergence of Black-Box Variational InferenceKyurae Kim, Jisu Oh, Kaiwen Wu, Yi-An Ma et al.NeurIPS 2023 · 27 citations
- Stochastic Gradient Variational Inference with Price's Gradient Estimator from Bures-Wasserstein to Parameter SpaceKyurae Kim, Qiang Fu, Yian Ma, Jacob Gardner et al.ICML 2026
