{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/batch-and-match-black-box-variational","title":"Batch and match: black-box variational inference with a score-based divergence","arxiv_id":"2402.14758","date":"2024-02-22","proceeding":null,"authors":["Diana Cai","Chirag Modi","Loucas Pillaud-Vivien","Charles C. Margossian","Robert M. Gower","David M. Blei","Lawrence K. Saul"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2402.14758v2","url_pdf":"https://arxiv.org/pdf/2402.14758v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"batch-and-match-black-box-variational","repo_url":"https://github.com/modichirag/gsm-vi","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"batch-and-match-black-box-variational","repo_url":"https://github.com/roualdes/bridgestan","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[{"task_slug":"variational-inference","task_name":"Variational Inference"}],"methods":[{"method_slug":"bam","method_name":"BAM"},{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.14758","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.14758"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/modichirag/GSM-VI","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/roualdes/bridgestan","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/modichirag/gsm-vi","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":5,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"e4104749d59e0980","entry":"compute_Q_host","repo":"modichirag/gsm-vi","repo_kind":"official","path":"gsmvi/bam.py","file_url":"https://github.com/modichirag/gsm-vi/blob/HEAD/gsmvi/bam.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4104749d59e0980"}},{"code_sha256_prefix":"fd2c2158f3e92920","entry":"forward_kl","repo":"modichirag/GSM-VI","repo_kind":"official","path":"gsmvi/monitors.py","file_url":"https://github.com/modichirag/GSM-VI/blob/HEAD/gsmvi/monitors.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fd2c2158f3e92920"}},{"code_sha256_prefix":"de01b3676876a474","entry":"generate_so_name","repo":"roualdes/bridgestan","repo_kind":"official","path":"python/bridgestan/compile.py","file_url":"https://github.com/roualdes/bridgestan/blob/HEAD/python/bridgestan/compile.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"de01b3676876a474"}},{"code_sha256_prefix":"f44f72dc66d7deaa","entry":"gsm_update","repo":"modichirag/GSM-VI","repo_kind":"official","path":"gsmvi/gsm.py","file_url":"https://github.com/modichirag/GSM-VI/blob/HEAD/gsmvi/gsm.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f44f72dc66d7deaa"}},{"code_sha256_prefix":"6ddd611d572d26fd","entry":"gsm_update","repo":"modichirag/GSM-VI","repo_kind":"official","path":"gsmvi/gsm_numpy.py","file_url":"https://github.com/modichirag/GSM-VI/blob/HEAD/gsmvi/gsm_numpy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ddd611d572d26fd"}},{"code_sha256_prefix":"2f3a4b958db69b05","entry":"lbfgs_init","repo":"modichirag/GSM-VI","repo_kind":"official","path":"gsmvi/initializers.py","file_url":"https://github.com/modichirag/GSM-VI/blob/HEAD/gsmvi/initializers.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f3a4b958db69b05"}},{"code_sha256_prefix":"7648c68a28ade9ce","entry":"reverse_kl","repo":"modichirag/GSM-VI","repo_kind":"official","path":"gsmvi/monitors.py","file_url":"https://github.com/modichirag/GSM-VI/blob/HEAD/gsmvi/monitors.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7648c68a28ade9ce"}},{"code_sha256_prefix":"2886b3ba1cf892e9","entry":"compile_model","repo":"roualdes/bridgestan","repo_kind":"official","path":"python/bridgestan/compile.py","file_url":"https://github.com/roualdes/bridgestan/blob/HEAD/python/bridgestan/compile.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"2886b3ba1cf892e9"}},{"code_sha256_prefix":"9684d6283c9cb0f0","entry":"compute_Q","repo":"modichirag/gsm-vi","repo_kind":"official","path":"gsmvi/bam.py","file_url":"https://github.com/modichirag/gsm-vi/blob/HEAD/gsmvi/bam.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9684d6283c9cb0f0"}},{"code_sha256_prefix":"9203180cea4cc0bf","entry":"get_bridgestan_path","repo":"roualdes/bridgestan","repo_kind":"official","path":"python/bridgestan/compile.py","file_url":"https://github.com/roualdes/bridgestan/blob/HEAD/python/bridgestan/compile.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"9203180cea4cc0bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}