Tighter Variational Bounds are Not Necessarily Better

Tom Rainforth, Adam R. Kosiorek, Tuan Anh Le, Chris J. Maddison, Maximilian Igl, Frank Wood, Yee Whye Teh

TL;DR

Conventional wisdom in deep generative modeling suggests that tighter variational bounds lead to better models. This paper flips that assumption on its head, proving that tighter bounds can actually sabotage the training of the inference network by drastically reducing the signal-to-noise ratio (SNR) of its gradients. The authors introduce three new algorithms—PIWAE, MIWAE, and CIWAE—that decouple the training objectives to achieve high-fidelity generative models without sacrificing inference quality.

What Problem Does This Paper Address?

In the world of Variational Auto-Encoders (VAEs), we often use the Evidence Lower Bound (ELBO) as a surrogate objective because the true marginal likelihood is intractable. The Importance Weighted Auto-Encoder (IWAE) improved upon the standard VAE by using $K$ importance samples to create a tighter lower bound.

The implicit assumption has always been: tighter is better. If a bound is closer to the true likelihood, the resulting model should be superior. However, researchers noticed that while IWAE produces better generative models, its inference network (the encoder) often performs worse than a standard VAE's.

This paper identifies the culprit: as you increase $K$ to tighten the bound, the gradient signal for the inference network vanishes faster than the noise. Essentially, the encoder stops "learning" because it can't distinguish the correct direction to move from the random fluctuations of the Monte Carlo estimates.

Methods

The authors perform a rigorous Signal-to-Noise Ratio (SNR) analysis of the gradient estimators. They define SNR as the absolute value of the expected gradient divided by its standard deviation.

Their main theoretical contribution (Theorem 1) shows a stark divergence:

  • For the generative network ($\theta$), the SNR grows at a rate of $O(\sqrt{K})$. Tighter is indeed better here.
  • For the inference network ($\phi$), the SNR decreases at a rate of $O(1/\sqrt{K})$. Tighter is worse.

To fix this, they propose three new estimators:

  1. MIWAE (Multiply IWAE): Instead of one tight bound with $K$ particles, it averages $M$ independent IWAE estimates. This increases SNR for both networks by leveraging the $O(\sqrt{M})$ benefit of simple averaging.
  2. CIWAE (Combination IWAE): A convex combination of the VAE and IWAE bounds. The VAE component provides a stable "anchor" gradient signal that prevents the SNR from collapsing even when $K$ is large.
  3. PIWAE (Partially IWAE): The most sophisticated approach. it uses the tight IWAE bound to update the generative network but a looser, higher-SNR MIWAE-style bound to update the inference network.

Datasets

  • Toy Gaussian Model: A simple latent variable model where the ground truth is analytically calculable, used to confirm theoretical SNR rates.
  • MNIST: The classic handwritten digit dataset, used to evaluate the algorithms on deep neural architectures.

Key Insights and Ideas

  • The SNR Trap: Increasing $K$ in IWAE reduces the variance of the gradient, but it reduces the magnitude of the true gradient even faster. This leads to the "vanishing SNR" problem.
  • Decoupling is Key: The generative and inference networks have different needs. The generative network thrives on a tight, low-bias bound. The inference network needs a high-SNR signal to learn how to map data to latent space effectively.
  • Directional Accuracy: Even if the direction of the gradient improves with larger $K$ (targeting a better objective), the noise becomes so dominant that the optimizer ends up taking random steps. This is clearly visible in the gradient histograms.
Figure 1: Histograms of gradient estimates ∆M,K for the generative network and the inference network using the IWAE (M = 1) objective with different values of K.

Key Results

  • Theoretical Confirmation: Empirical tests on the Gaussian model perfectly matched the predicted $O(1/\sqrt{K})$ decay for inference SNR.
  • MNIST Performance: PIWAE and MIWAE consistently outperformed standard IWAE. Remarkably, they even achieved better values on the IWAE objective itself than IWAE did, because a better-trained inference network helps the overall optimization.
  • Inference Quality: The new methods produced encoders with significantly higher Effective Sample Size (ESS), indicating that the learned approximate posteriors were much closer to the true posteriors.
Figure 2: Convergence of signal-to-noise ratios of gradient estimates with increasing M and K. Different lines correspond to different dimensions of the parameter vectors. Shown in blue is the IWAE where we keep M = 1 fixed and increase K. Shown in red is the VAE where K = 1 is fixed and we increase M. The black and green dashed lines show the expected convergence rates from our theoretical results, representing gradients of 1/2 and −1/2 respectively.

Limitations and Future Work

  • Asymptotic Regime: The theoretical results are asymptotic in $K$. In the "small $K$" regime (e.g., $K < 5$), the behavior can be more erratic, and the SNR might not strictly follow the $1/\sqrt{K}$ rule yet.
  • Reparameterization Only: The analysis focuses on reparameterization gradients (the "reparameterization trick"). It's unclear if these findings translate directly to other gradient estimators like REINFORCE.
  • Future Directions: The authors suggest that using entirely separate targets for the two networks is a promising path forward, potentially moving away from the single-ELBO paradigm entirely.

Summary updated

BibTeX
@inproceedings{rainforth2018tighter,
  author = {Tom Rainforth and Adam R. Kosiorek and Tuan Anh Le and Chris J. Maddison and Maximilian Igl and Frank Wood and Yee Whye Teh},
  title = {{Tighter Variational Bounds are Not Necessarily Better}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=ryEIhsWu-B},
}

Loading related content...

Figure