Papers › Batch and match: black-box variational inference with a score-based divergence

Batch and match: black-box variational inference with a score-based divergence

22 Feb 2024arXiv:2402.14758archive 2025-07-28

Diana Cai, Chirag Modi, Loucas Pillaud-Vivien, Charles C. Margossian, Robert M. Gower, David M. Blei, Lawrence K. Saul

Most leading implementations of black-box variational inference (BBVI) are based on optimizing a stochastic evidence lower bound (ELBO). But such approaches to BBVI often converge slowly due to the high variance of their gradient estimates and their sensitivity to hyperparameters. In this work, we propose batch and match (BaM), an alternative approach to BBVI based on a score-based divergence. Notably, this score-based divergence can be optimized by a closed-form proximal update for Gaussian variational families with full covariance matrices. We analyze the convergence of BaM when the target distribution is Gaussian, and we prove that in the limit of infinite batch size the variational parameter updates converge exponentially quickly to the target mean and covariance. We also evaluate the performance of BaM on Gaussian and non-Gaussian target distributions that arise from posterior inference in hierarchical and deep generative models. In these experiments, we find that BaM typically converges in fewer (and sometimes significantly fewer) gradient evaluations than leading implementations of BBVI based on ELBO maximization.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.14758")

Code

Syntology Ran 7 of 10 code samples harvested from 2 repositories linked to this paper; 3 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 10 samples from 2 repositories, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

modichirag/gsm-vi officialmentioned in papermentioned on GitHubjaxMIT report
roualdes/bridgestan officialmentioned in papermentioned on GitHubBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 7 ran; 1 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
5ran
3unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

compute_Q_host modichirag/gsm-vi/gsmvi/bam.py official repository ran · honoured contract MIT (permissive) · e4104749d59e0980 · report
forward_kl modichirag/GSM-VI/gsmvi/monitors.py official repository ran MIT (permissive) · fd2c2158f3e92920 · report
generate_so_name roualdes/bridgestan/python/bridgestan/compile.py official repository ran BSD-3-Clause (permissive) · de01b3676876a474 · report
gsm_update modichirag/GSM-VI/gsmvi/gsm.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · f44f72dc66d7deaa · report
gsm_update modichirag/GSM-VI/gsmvi/gsm_numpy.py official repository ran MIT (permissive) · 6ddd611d572d26fd · report
lbfgs_init modichirag/GSM-VI/gsmvi/initializers.py official repository ran MIT (permissive) · 2f3a4b958db69b05 · report
reverse_kl modichirag/GSM-VI/gsmvi/monitors.py official repository ran MIT (permissive) · 7648c68a28ade9ce · report
compile_model roualdes/bridgestan/python/bridgestan/compile.py official repository unverified BSD-3-Clause (permissive) · 2886b3ba1cf892e9 · report
compute_Q modichirag/gsm-vi/gsmvi/bam.py official repository unverified MIT (permissive) · 9684d6283c9cb0f0 · report
get_bridgestan_path roualdes/bridgestan/python/bridgestan/compile.py official repository unverified BSD-3-Clause (permissive) · 9203180cea4cc0bf · report

Tasks

Variational Inference

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

BAMVariational Inference

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections