VISA: Variational Inference with Sequential Sample-Average Approximations

Heiko Zimmermann, Christian A. Naesseth, Jan-Willem van de Meent

Abstract

We present variational inference with sequential sample-average approximation (VISA), a method for approximate inference in computationally intensive models, such as those based on numerical simulations. VISA extends importance-weighted forward-KL variational inference by employing a sequence of sample-average approximations, which are considered valid inside a trust region. This makes it possible to reuse model evaluations across multiple gradient steps, thereby reducing computational cost. We perform experiments on high-dimensional Gaussians, Lotka-Volterra dynamics, and a Pickover attractor, which demonstrate that VISA can achieve comparable approximation accuracy to standard importance-weighted forward-KL variational inference with computational savings of a factor two or more for conservatively chosen learning rates.

Introduction

In scientific domains such as ecology and physics, researchers frequently rely on complex simulators to model phenomena. Performing Bayesian inference—estimating model parameters from observed data—often requires thousands of evaluations of these simulators. While gradient-based methods like Hamiltonian Monte Carlo are powerful, they require differentiable models. Many simulators are "black boxes" or non-differentiable, necessitating methods like Importance-Weighted Forward-KL Variational Inference (IWFVI). However, IWFVI is computationally expensive because it requires fresh simulator samples at every optimization step. VISA addresses this inefficiency by recognizing that while evaluating the variational approximation is cheap, simulator evaluations are the primary bottleneck.

Methods: Sequential Sample-Average Approximations

VISA introduces a Sequential Sample-Average Approximation (SAA) approach to forward-KL variational inference. The core idea is to reuse expensive simulator evaluations across multiple gradient steps.

Conceptual diagram of VISA showing the optimization path moving through sequential trust regions.

The method operates on three key principles:

  1. Sample Reuse: Instead of drawing new samples at every step, VISA fixes a set of samples $\mathcal{Z}$ to create a deterministic surrogate objective.
  2. Trust Regions: To maintain accuracy, VISA defines a trust region $S_{\mathcal{Z}, \alpha}(\phi)$ based on the Effective Sample Size (ESS). As the variational parameters $\phi$ evolve, the ESS is monitored to ensure the current samples remain representative of the updated distribution.
  3. Refreshing the SAA: When the ESS drops below a threshold $\alpha$ (e.g., 0.95), the trust region is exited. VISA then "refreshes" the SAA by drawing a new batch of samples from the simulator at the current parameter values.

This approach allows the optimizer to take many "cheap" steps on cached data before incurring the cost of new simulator runs.

Experiments and Results

The authors evaluated VISA against standard IWFVI and Black-Box Variational Inference (BBVI) baselines across three benchmarks: high-dimensional Gaussians, Lotka-Volterra predator-prey dynamics, and the chaotic Pickover attractor.

Performance comparison on the Lotka-Volterra model across different learning rates. VISA achieves faster convergence in terms of model evaluations and takes more gradient steps per evaluation.

Key findings include:

  • Computational Efficiency: In the Lotka-Volterra and Gaussian experiments, VISA achieved comparable accuracy to IWFVI while requiring 50% fewer model evaluations. As shown in the "Grad. steps" plots, VISA performs significantly more optimization steps per simulator evaluation than the baseline.
  • Robustness: VISA is particularly effective with conservative learning rates. Because it reuses samples, it can afford many small steps without increasing the total number of expensive evaluations.
  • Stability: In the non-differentiable Pickover attractor case, VISA demonstrated more stable convergence than standard methods, effectively capturing high-density posterior regions.

Discussion and Limitations

While VISA offers significant speedups, it introduces a bias-variance tradeoff. Setting the ESS threshold too low can lead to "overfitting" the surrogate objective, potentially underestimating posterior variance. Additionally, like many SAA methods, VISA may face challenges in extremely high-dimensional spaces where maintaining a valid trust region requires a prohibitive number of samples. Future work may explore adaptive thresholds or integration with second-order optimization methods to further enhance efficiency.

Conclusion

VISA provides a robust, drop-in replacement for standard forward-KL variational inference in simulator-based models. By intelligently caching and reusing model evaluations within a trust region, it significantly reduces the computational burden of Bayesian inference for non-differentiable, expensive models.

Summary updated

Abstract

We present variational inference with sequential sample-average approximation (VISA), a method for approximate inference in computationally intensive models, such as those based on numerical simulations. VISA extends importance-weighted forward-KL variational inference by employing a sequence of sample-average approximations, which are considered valid inside a trust region. This makes it possible to reuse model evaluations across multiple gradient steps, thereby reducing computational cost. We perform experiments on high-dimensional Gaussians, Lotka-Volterra dynamics, and a Pickover attractor, which demonstrate that VISA can achieve comparable approximation accuracy to standard importance-weighted forward-KL variational inference with computational savings of a factor two or more for conservatively chosen learning rates.
BibTeX
@inproceedings{zimmermann2024visa,
  author = {Heiko Zimmermann and Christian A. Naesseth and Jan-Willem van de Meent},
  title = {{VISA: Variational Inference with Sequential Sample-Average Approximations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=lbLC5OV9GY},
}
Figure