Variational Refinement for Importance Sampling Using the Forward Kullback-Leibler Divergence

Ghassen Jerfel, Serena Wang, Clara Fannjiang, Katherine A. Heller, Yi-An Ma, Michael I. Jordan

Abstract

Variational Inference (VI) is a popular alternative to asymptotically exact sampling in Bayesian inference. Its main workhorse is optimization over a reverse Kullback-Leibler divergence (RKL), which typically underestimates the tail of the posterior leading to miscalibration and potential degeneracy. Importance sampling (IS), on the other hand, is often used to fine-tune and de-bias the estimates of approximate Bayesian inference procedures. The quality of IS crucially depends on the choice of the proposal distribution. Ideally, the proposal distribution has heavier tails than the target, which is rarely achievable by minimizing the RKL. We thus propose a novel combination of optimization and sampling techniques for approximate Bayesian inference by constructing an IS proposal distribution through the minimization of a forward KL (FKL) divergence. This approach guarantees asymptotic consistency and a fast convergence towards both the optimal IS estimator and the optimal variational approximation. We empirically demonstrate on real data that our method is competitive with variational boosting and MCMC.

Introduction

In Bayesian inference, computing expectations over an intractable posterior distribution $p(\theta|x)$ is a fundamental challenge. Standard Variational Inference (VI) typically minimizes the Reverse KL (RKL) divergence, which is known to be "mode-seeking." This behavior often leads to distributions that collapse around a single peak and underestimate the "tails" of the target distribution.

Importance Sampling (IS) offers a way to de-bias these approximations, but its efficacy is highly dependent on the "proposal" distribution. If a proposal distribution lacks mass where the target distribution is significant—a common issue with light-tailed RKL approximations—the resulting IS estimates can suffer from extreme or even infinite variance. This paper addresses this gap by proposing a practical method to optimize the Forward KL (FKL) divergence, which is inherently "mass-covering" and thus better suited for generating IS proposals.

Methodology

The primary obstacle to using FKL is its intractability, as it requires taking an expectation over the unknown target distribution. The authors overcome this through several key innovations:

  • SNIS for FKL Optimization: They derive a self-normalized importance sampling (SNIS) estimator to approximate the FKL objective. This allows the current approximation to estimate the gradient of the FKL by "peeking" at the target distribution.
  • Forward KL Boosting: To maintain stability and tractability, the authors employ a boosting approach. Instead of joint optimization of a complex mixture, they sequentially add simple components (e.g., Gaussians) to a mixture model. Each new component is optimized to minimize the FKL between the updated mixture and the target.
  • Hybrid Initialization Strategy: To leverage the strengths of both divergences, the authors suggest a two-stage workflow: first, use standard RKL-based VI to locate the primary modes, then apply FKL boosting to refine the approximation and ensure adequate tail coverage.

Key Insights: Mass-Covering vs. Mode-Seeking

The fundamental advantage of the proposed approach lies in the qualitative difference between RKL and FKL optimization. As illustrated below, RKL tends to "zero-force," avoiding regions where the target density is low, even if it means missing significant mass. In contrast, FKL is "mean-seeking" or "mass-covering," ensuring the approximation spans the entire support of the target.

Comparison of Reverse KL (mode-seeking) and Forward KL (mass-covering) behaviors.

This mass-covering property is critical for Importance Sampling, as it ensures the proposal distribution has heavier tails than the target, a prerequisite for stable and low-variance estimation.

Empirical Evaluation and Results

The method was evaluated on synthetic benchmarks, including a 1D Cauchy distribution and a multimodal 2D Gaussian Mixture Model (GMM), as well as real-world datasets from the UCI repository (Wine, Boston Housing, Concrete, and Power Plant) using Bayesian Linear Regression and Bayesian Neural Networks.

Convergence and Accuracy

The authors proved a theoretical convergence rate of $O(1/K)$ for FKL boosting, where $K$ is the number of components. Empirically, FKL boosting demonstrated superior reduction in divergence compared to RKL-based boosting methods.

Convergence of Forward KL divergence over boosting iterations, comparing Forward KL boosting and Reverse KL boosting.

Performance Benchmarks

  • Tail Coverage: On heavy-tailed distributions like the Cauchy, FKL boosting significantly outperformed RKL methods in moment estimation.
  • Comparison to MCMC: In several Bayesian regression tasks, the FKL-refined approach achieved higher predictive log-probabilities than Hamiltonian Monte Carlo (HMC), highlighting its effectiveness as a high-precision inference tool.
  • Consistency: The refinement consistently improved standard VI results across various priors, demonstrating robustness to model specification.

Conclusion and Future Work

While FKL boosting provides a principled framework for variational refinement, challenges remain. The SNIS estimator can exhibit high variance if the initial approximation is poor, and there is a risk of overfitting the training posterior if too many components are added. Furthermore, scaling mixture-based methods to extremely high-dimensional parameter spaces in large-scale neural networks is an ongoing area of research. Nonetheless, this work establishes FKL optimization as a powerful tool for creating robust importance sampling proposals in Bayesian inference.

Summary updated

BibTeX
@inproceedings{jerfel2021variational,
  author = {Ghassen Jerfel and Serena Wang and Clara Fannjiang and Katherine A. Heller and Yi-An Ma and Michael I. Jordan},
  title = {{Variational Refinement for Importance Sampling Using the Forward Kullback-Leibler Divergence}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
  url = {https://openreview.net/forum?id=-XRVENKYp9K},
}
Figure