Learning with Importance Weighted Variational Inference: Asymptotics for Gradient Estimators of the VR-IWAE Bound

Kamelia Daudel, François Roueff

TL;DR

This paper analyzes the asymptotic behavior of gradient estimators for the VR-IWAE bound, a unified framework for variational inference that encompasses the popular ELBO, IWAE, and VR bounds. By studying the Signal-to-Noise Ratio (SNR) of reparameterized (REP) and doubly-reparameterized (DREP) gradient estimators, the authors reveal a bias-variance tradeoff controlled by the divergence parameter $\alpha$ and expose a severe "weight collapse" issue that plagues these estimators in high-dimensional latent spaces.

What Problem Does This Paper Address?

In Variational Inference (VI), the goal is to approximate complex, intractable posterior distributions. While the Evidence Lower BOund (ELBO) is the standard optimization objective, alternatives like the Importance Weighted Auto-Encoder (IWAE) and Variational Rényi (VR) bounds use importance weighting to yield tighter approximations. Recently, the VR-IWAE bound was introduced to unify these approaches using two hyperparameters: $N$ (number of Monte Carlo samples) and $\alpha$ (a divergence parameter).

However, having a tight theoretical bound doesn't guarantee a good learning algorithm. Optimization relies on stochastic gradient ascent, and if the gradient estimators have a poor Signal-to-Noise Ratio (SNR), the algorithm will struggle to learn the model parameters. While prior work analyzed how the VR-IWAE bound behaves, this paper tackles the crucial missing piece: how do the hyperparameters ($N, \alpha$) and the dimensionality of the latent space ($d$) affect the SNR of the gradient estimators used in practice?

Methods

The authors perform a rigorous mathematical asymptotic analysis of the SNR for two specific gradient estimators of the VR-IWAE bound:

  1. Reparameterized (REP) estimator: The standard approach using the reparameterization trick.
  2. Doubly-Reparameterized (DREP) estimator: An advanced estimator designed to reduce variance by differentiating the score function.

The analysis is split into two asymptotic regimes:

  • Infinite Samples ($N \to \infty$): Analyzing the estimators as the number of Monte Carlo samples grows, keeping the latent dimension $d$ fixed.
  • High Dimensions ($N, d \to \infty$): Analyzing the estimators as both the number of samples and the latent dimension grow. To make this tractable, the authors model the log-weights as a Gaussian random field.

This is the first rigorous SNR analysis of the DREP estimator for the VR-IWAE bound, and the first to explicitly analyze high-dimensional weight collapse at the gradient level.

Datasets

The authors validate their theoretical findings using synthetic benchmarks rather than real-world datasets, which allows for exact calculation of the true gradients and SNRs:

  • Gaussian Example: A simple setup learning the mean of a Gaussian distribution.
  • Linear Gaussian Example: A standard benchmark from prior literature (Rainforth et al., 2018) using 1024 synthetic datapoints sampled from $\mathcal{N}(0, 2\boldsymbol{I}_d)$.

Key Insights and Ideas

  • The $\alpha$ Bias-Variance Tradeoff: The parameter $\alpha \in [0, 1)$ explicitly controls a bias-variance tradeoff in the gradient estimators. Increasing $\alpha$ reduces the variance of the gradient estimator but increases its bias.
  • DREP is Superior to REP: The theoretical analysis proves why the Doubly-Reparameterized (DREP) estimator is preferred. For $\alpha \in (0, 1)$, DREP significantly outperforms the standard REP estimator. In the linear Gaussian example, DREP improves the SNR by a massive multiplicative factor of $4\alpha^{-1}$.
  • The Curse of Dimensionality (Weight Collapse): The most critical finding is that as the latent dimension $d$ grows, both REP and DREP estimators suffer from "weight collapse." Essentially, one importance weight dominates all others.
  • Exponential Sample Requirements: To prevent this weight collapse and actually benefit from using $N > 1$ importance samples in high dimensions, $N$ must grow exponentially with $d$. If $N$ grows any slower, the SNR of the VR-IWAE gradient estimators collapses back to the SNR of the basic ELBO ($N=1$), rendering the extra computation useless.

Key Results

  • Asymptotic Formulas: The authors derived explicit, closed-form asymptotic formulas for the SNR of both REP and DREP estimators as $N \to \infty$.
  • Collapse Conditions: They mathematically proved that for high dimensions ($N, d \to \infty$), if $\log N = o(d)$, the SNR of the VR-IWAE gradient estimators collapses.
  • Empirical Validation: In simulations with a low dimension ($d=10$), the empirical SNR perfectly matches the authors' $N \to \infty$ theoretical curves. However, at $d=100$ and $d=500$, the empirical SNR flatlines exactly as predicted by their high-dimensional weight collapse theorems.

Limitations and Future Work

  • Limitations: The high-dimensional analysis ($N, d \to \infty$) relies on the assumption that the log-weights behave exactly as a Gaussian random field. While a reasonable proxy for high dimensions due to the Central Limit Theorem, it is a strict mathematical assumption.
  • Future Work: The authors suggest extending the high-dimensional results to approximate Gaussian random fields to cover a broader class of real-world models. Additionally, they propose investigating whether the catastrophic weight collapse can be mitigated, perhaps by dynamically tuning the $\alpha$ parameter during training.

Summary updated

BibTeX
@misc{daudel2024learning,
  author = {Kamelia Daudel and François Roueff},
  title = {{Learning with Importance Weighted Variational Inference: Asymptotics for Gradient Estimators of the VR-IWAE Bound}},
  year = {2024},
  eprint = {2410.12035},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.12035},
}
Figure