Variational refinement for importance sampling using the forward Kullback-Leibler divergence

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

TL;DR

This paper introduces a novel approach to approximate Bayesian inference by minimizing the forward KL divergence (FKL) instead of the standard reverse KL divergence (RKL) for variational inference. This FKL-based method, termed "FKL boosting," constructs better importance sampling (IS) proposal distributions, leading to more consistent and efficient posterior estimates, especially for multimodal and heavy-tailed distributions.

What Problem Does This Paper Address?

Bayesian inference aims to quantify uncertainty about model parameters given data. This often involves computing expectations over complex posterior distributions, which are typically intractable. Existing approximate inference methods like Variational Inference (VI) and Importance Sampling (IS) have complementary strengths and weaknesses. VI is computationally efficient but often produces biased estimates with under-estimated posterior variances (due to minimizing the reverse KL divergence, RKL). IS can provide unbiased estimates but requires a good proposal distribution, which is hard to find, and can suffer from high variance if the proposal is poor. The RKL objective in VI tends to favor "mode-seeking" behavior, leading to light-tailed approximations that are inadequate for IS, especially for multimodal or heavy-tailed posteriors. This paper addresses the challenge of creating a robust and efficient approximate inference method that combines the computational advantages of VI with the consistency of IS, particularly for challenging posterior shapes.

Methods

The core contribution is the use of the forward KL divergence (FKL), $KL(p||q)$, as the variational objective, where $p$ is the true posterior and $q$ is the approximating distribution. Unlike RKL ($KL(q||p)$), minimizing FKL is known to control the estimation error of importance sampling. However, FKL is intractable for unnormalized posteriors. The authors propose a method called FKL boosting to construct an IS proposal distribution. This method iteratively refines a mixture distribution $q_K$ by adding new components to minimize the FKL between the target posterior $p$ and the current approximation $q_K$.

Key aspects of the method include:

  • Self-Normalized Importance Sampling (SNIS) for FKL: They derive a way to estimate the FKL divergence using samples from the approximating distribution, enabling optimization.
  • Iterative Boosting: The approximation $q$ is built incrementally, starting with an initial approximation (potentially from RKL-based VI) and adding new mixture components. Each new component is fitted to improve the FKL objective, while previously learned components are held fixed.
  • Variance Reduction: They propose a sequential estimation of FKL that reduces the variance of the SNIS estimator, making the boosting process more stable.
  • Initialization: For the first iteration, they suggest using RKL-based VI to find an initial mode, which is then refined by FKL boosting.

Datasets

The paper evaluates their method on real-world datasets for:

  • Bayesian Linear Regression (BLR): Using Gaussian and heavy-tailed priors.
  • Bayesian Neural Networks (BNNs): Using Gaussian priors.

The datasets used are from the UCI Machine Learning Repository, specifically for tasks involving: Wine, Boston, Concrete, and Power. These are standard benchmarks for evaluating regression models.

Key Insights and Ideas

  • FKL is the "right" divergence for IS proposals: While RKL is standard for VI, FKL directly relates to the quality of IS estimates. Minimizing FKL leads to proposals that are better suited for importance sampling, offering improved consistency and reduced variance.
  • Boosting with FKL handles multimodality and heavy tails: The iterative nature of FKL boosting allows it to construct approximations that can capture multiple modes and heavier tails, which are problematic for RKL-based VI.
  • A principled trade-off between computation and quality: FKL boosting offers a clear way to balance the computational cost (number of boosting iterations, IS samples) against the quality of the approximation and the resulting IS estimates.
  • RKL-VI as a good starting point: Using RKL-based VI for initial mode-finding before FKL boosting provides a computationally efficient way to initialize the process and leverage the strengths of both approaches.

Key Results

  • Improved Predictive Performance: FKL boosting consistently outperformed RKL-based VI and RKL-based variational boosting across all tested datasets and model types (BLR, BNNs) in terms of predictive log probabilities on held-out test data.
  • Competitive with HMC: In several experimental settings, FKL boosting achieved performance comparable to or better than Hamiltonian Monte Carlo (HMC), a gold-standard sampling method.
  • Guaranteed Convergence: Theoretical analysis suggests that FKL boosting converges asymptotically to the optimal IS proposal distribution.
  • Efficiency Gains: While not explicitly quantified in terms of speedup, the method's ability to provide better IS proposals means that fewer IS samples might be needed for a given level of accuracy compared to using RKL-based approximations.

Limitations and Future Work

  • SNIS Variance: The authors acknowledge that the self-normalized importance sampling (SNIS) estimation of FKL can still have high variance, although their sequential approach helps mitigate this.
  • Overfitting in Boosting: For some datasets, adding more mixture components in boosting led to a decay in held-out log-likelihood, suggesting potential overfitting. The theoretical convergence guarantees do not extend to learning or generalization guarantees.
  • Future Work: The authors suggest exploring variance-reduction schemes for FKL estimation and applying their method to more complex models and higher-dimensional problems. They also note that existing techniques for resampling or smoothing importance weights can be directly applied to their framework.

Summary updated

BibTeX
@inproceedings{jerfel2021variational,
  author = {Ghassen Jerfel and Serena Wang and Clara Wong-Fannjiang and Katherine A. Heller and Yian 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