Abstract
Approximate Bayesian inference for models with computationally expensive, black-box likelihoods poses a significant challenge, especially when the posterior distribution is complex. Many inference methods struggle to explore the parameter space efficiently under a limited budget of likelihood evaluations. Variational Bayesian Monte Carlo (VBMC) is a sample-efficient method that addresses this by building a local surrogate model of the log-posterior. However, its conservative exploration strategy, while promoting stability, can cause it to miss important regions of the posterior, such as distinct modes or long tails. In this work, we introduce Stacking Variational Bayesian Monte Carlo (S-VBMC), a method that overcomes this limitation by constructing a robust, global posterior approximation from multiple independent VBMC runs. Our approach merges these local approximations through a principled and inexpensive post-processing step that leverages VBMC's mixture posterior representation and per-component evidence estimates. Crucially, S-VBMC requires no additional likelihood evaluations and is naturally parallelisable, fitting seamlessly into existing inference workflows. We demonstrate its effectiveness on two synthetic problems designed to challenge VBMC's exploration and two real-world applications from computational neuroscience, showing substantial improvements in posterior approximation quality across all cases.
Introduction
In scientific modeling—ranging from neuroscience to astrophysics—researchers frequently encounter "black-box" models where calculating the likelihood of parameters is computationally intensive. Variational Bayesian Monte Carlo (VBMC) has emerged as a powerful tool for these scenarios, utilizing Gaussian Process (GP) surrogates to approximate the posterior with minimal samples. However, VBMC's conservative exploration strategy can lead to a "shyness" problem, where a single run may fail to capture multi-modal distributions or elongated tails, becoming trapped in local regions. While practitioners often attempt to mitigate this by performing multiple independent runs from different starting points, a principled method for combining these disparate "local" views into a unified "global" posterior has been lacking.
Methods: The Stacking Approach
We propose Stacking Variational Bayesian Monte Carlo (S-VBMC), adapting the concept of stacking from supervised learning to the domain of variational inference. The S-VBMC workflow consists of three primary stages:
- Parallel Execution: Multiple independent VBMC sessions are run in parallel. Each run produces a posterior approximation represented as a Mixture of Gaussians (MoG).
- Component Pooling: S-VBMC aggregates all Gaussian components from every run into a single global pool.
- Weight Optimization: Rather than simple averaging, S-VBMC re-optimizes the weights of all individual components by maximizing a Stacked Evidence Lower Bound (ELBO).
A key innovation is the use of "per-component evidence estimates" derived via Bayesian Quadrature, which VBMC already computes. This allows the stacking process to function as a purely post-processing step, requiring zero additional calls to the expensive black-box simulator. To handle noisy likelihoods, we introduce a "capping" heuristic that limits the expected log-joint to the median value across runs, preventing the optimization from being biased by overestimated evidence (the "Winner's Curse").
Results
S-VBMC was evaluated against synthetic "torture tests" (GMM and Ring targets) and real-world scientific models from computational neuroscience. The method consistently outperformed standard VBMC and Black-Box Variational Inference (BBVI) in posterior approximation quality, particularly for multi-modal targets.
As shown in the figure above, individual VBMC runs (left) may only capture portions of the posterior landscape due to conservative exploration. S-VBMC (right) successfully merges these into a comprehensive global map. Key findings include:
- Efficiency: The stacking step adds negligible overhead (5–15% total compute time) while significantly improving fit quality.
- Optimal Parallelism: Empirical results suggest that stacking approximately 10 independent runs provides the best balance between computational cost and posterior accuracy.
- Noise Robustness: The capping heuristic ensures stability even when likelihood evaluations are corrupted by noise.
Discussion and Conclusion
S-VBMC provides a robust, parallelizable framework for improving Bayesian inference in expensive black-box models. By leveraging existing VBMC outputs, it offers a performance boost without increasing the simulation budget. While currently optimized for low-to-moderate dimensional problems ($D \le 15$), future work may explore "active" stacking, where parallel runs communicate to ensure more efficient global exploration.
The implementation is available as a Python package at https://github.com/acerbilab/svbmc.
Summary updated