Fast post-process Bayesian inference with Variational Sparse Bayesian Quadrature

Chengkun Li, Grégoire Clarté, Martin Jørgensen, Luigi Acerbi

In many scientific and engineering domains, researchers rely on complex "black-box" models where likelihoods are expensive to compute and gradients are unavailable. Due to the high computational cost of traditional Markov Chain Monte Carlo (MCMC) methods, practitioners often settle for Maximum A Posteriori (MAP) estimation. However, this approach discards the thousands of likelihood evaluations generated during the optimization process.

Published in Statistics and Computing (2025), this paper introduces Variational Sparse Bayesian Quadrature (VSBQ), a framework designed to recycle these discarded "optimization traces" to reconstruct full posterior distributions and estimate model evidence with virtually no additional model calls.

The VSBQ Framework

VSBQ operates as a post-processing pipeline that transforms an optimization trace into a structured Bayesian posterior. The process consists of three primary stages:

  1. Trimming: The algorithm first filters the trace to remove evaluations with extremely low log-density, which can destabilize surrogate modeling.
  2. Sparse GP Surrogate with Noise Shaping: A Sparse Gaussian Process (GP) is built to model the log-posterior landscape. To handle the large number of points in a typical trace, the authors utilize a sparse approach. A key innovation here is Noise Shaping: the model artificially increases noise in low-density regions, forcing the GP to prioritize accuracy in the high-density "peaks" where the posterior mass is concentrated.
  3. Variational Inference via Bayesian Quadrature: Finally, a mixture of Gaussians is fitted to the surrogate. By employing Sparse Bayesian Quadrature, the framework can analytically integrate over the GP surrogate to rapidly calculate the Variational Lower Bound (ELBO) and marginal likelihood.
Figure 1: Illustration of the sparse GP surrogate (orange) fitting the points of an optimization trace (blue crosses). The surrogate accurately captures the landscape where data is dense.

Experimental Validation

The authors evaluated VSBQ across a variety of challenging scenarios, including synthetic problems like the bimodal "Two Moons" task and high-dimensional real-world models from computational neuroscience, such as multisensory causal inference and human time perception models. VSBQ was benchmarked against standard methods including the Laplace approximation, Neural Network Regression (NNR), and Black-Box Variational Inference (BBVI).

Key Insights and Results

  • Superior Accuracy: VSBQ demonstrated a remarkable ability to recover complex, non-Gaussian posterior shapes. While the Laplace approximation failed on bimodal tasks by assuming a single Gaussian peak, VSBQ accurately captured the true distribution.
  • Efficiency: VSBQ often outperformed BBVI even when the latter was provided with ten times more model evaluations. This suggests that the information contained within an optimization path is highly informative for global posterior estimation.
  • Robustness: The method proved more stable than neural network-based surrogates when dealing with the noisy likelihood evaluations typical of simulation-based models.
  • Marginal Likelihood Estimation: VSBQ provided precise estimates of the log marginal likelihood (LML), a critical metric for model selection that is usually computationally prohibitive to obtain.
Figure 2: Comparison between the true density function and the VSBQ posterior approximation, demonstrating the framework's ability to capture bimodal distributions accurately.

Conclusion and Future Directions

VSBQ offers a "near-instant" upgrade for researchers already performing optimization, turning discarded data into a rich Bayesian analysis. While currently optimized for low-to-moderate dimensions (up to $D \approx 10$), future work aims to integrate VSBQ with active learning to strategically fill gaps in the optimization trace. By treating optimization traces as valuable data rather than temporary artifacts, VSBQ sets a new standard for efficient post-process inference.

Summary updated

BibTeX
@article{li2025fast,
  author = {Chengkun Li and Grégoire Clarté and Martin Jørgensen and Luigi Acerbi},
  title = {{Fast post-process Bayesian inference with Variational Sparse Bayesian Quadrature}},
  journal = {Stat. Comput.},
  year = {2025},
  doi = {10.1007/s11222-025-10695-7},
}
Figure