SoftCVI: Contrastive variational inference with self-generated soft labels
Daniel Ward, Mark Beaumont, Matteo Fasiolo
Abstract
Estimating a distribution given access to its unnormalized density is pivotal in Bayesian inference, where the posterior is generally known only up to an unknown normalizing constant. Variational inference and Markov chain Monte Carlo methods are the predominant tools for this task; however, both are often challenging to apply reliably, particularly when the posterior has complex geometry. Here, we introduce Soft Contrastive Variational Inference (SoftCVI), which allows a family of variational objectives to be derived through a contrastive estimation framework. The approach parameterizes a classifier in terms of a variational distribution, reframing the inference task as a contrastive estimation problem aiming to identify a single true posterior sample among a set of samples. Despite this framing, we do not require positive or negative samples, but rather learn by sampling the variational distribution and computing ground truth soft classification labels from the unnormalized posterior itself. The objectives have zero variance gradient when the variational approximation is exact, without the need for specialized gradient estimators. We empirically investigate the performance on a variety of Bayesian inference tasks, using both simple (e.g. normal) and expressive (normalizing flow) variational distributions. We find that SoftCVI can be used to form objectives which are stable to train and mass-covering, frequently outperforming inference with other variational approaches.
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 7295be30-32b1-4aa7-b016-eec44435e458Builds on12
- Neural Additive Models: Interpretable Machine Learning with Neural NetsRishabh Agarwal, Levi Melnick, Nicholas Frosst, Xuezhou Zhang et al.NeurIPS 2021 · 663 citations
- What Are Bayesian Neural Network Posteriors Really Like?Pavel Izmailov, Sharad Vikram, Matthew D. Hoffman, Andrew Gordon WilsonICML 2021 · 458 citations
- Likelihood-free MCMC with Amortized Approximate Ratio EstimatorsJoeri Hermans, Volodimir Begy, Gilles LouppeICML 2020 · 246 citations
- On Contrastive Learning for Likelihood-free InferenceConor Durkan, Iain Murray, George PapamakariosICML 2020 · 149 citations
- Robust Neural Posterior Estimation and Statistical Model CriticismDaniel Ward, Patrick Cannon, Mark Beaumont, Matteo Fasiolo et al.NeurIPS 2022 · 79 citations
Related papers
- Variational inference via Wasserstein gradient flowsMarc Lambert, Sinho Chewi, Francis R. Bach, Silvère Bonnabel et al.NeurIPS 2022 · 123 citations
- Predictive variational inference: Learn the predictively optimal posterior distributionJinlin Lai, Antonio Linero, Yuling YaoICML 2026
- Path-Gradient Estimators for Continuous Normalizing FlowsLorenz Vaitl, Kim Andrea Nicoli, Shinichi Nakajima, Pan KesselICML 2022 · 14 citations
- Composing Normalizing Flows for Inverse ProblemsJay Whang, Erik M. Lindgren, Alex DimakisICML 2021 · 56 citations
- Variational Transdimensional InferenceLaurence Davies, Daniel MacKinlay, Rafael Oliveira, Scott A. SissonNeurIPS 2025 · 3 citations
