Mutual Information Constraints for Monte-Carlo Objectives

Gábor Melis, András György, Phil Blunsom

Abstract: A common failure mode of density models trained as variational autoencoders is to model the data without relying on their latent variables, rendering these variables useless. Two contributing factors, the underspecification of the model and the looseness of the variational lower bound, have been studied separately in the literature. We weave these two strands of research together, specifically the tighter bounds of Monte-Carlo objectives and constraints on the mutual information between the observable and the latent variables. Estimating the mutual information as the average Kullback-Leibler divergence between the easily available variational posterior $q(z|x)$ and the prior does not work with Monte-Carlo objectives because $q(z|x)$ is no longer a direct approximation to the model's true posterior $p(z|x)$. Hence, we construct estimators of the Kullback-Leibler divergence of the true posterior from the prior by recycling samples used in the objective, with which we train models of continuous and discrete latents at much improved rate-distortion and no posterior collapse. While alleviated, the tradeoff between modelling the data and using the latents still remains, and we urge for evaluating inference methods across a range of mutual information values.

Introduction

Variational Autoencoders (VAEs) are a cornerstone of modern generative modeling, designed to learn compressed latent representations ($z$) of complex data ($x$). However, a persistent failure mode known as "posterior collapse" often undermines their utility. In this state, the model learns to ignore the latent variables entirely, relying solely on the decoder's power to reconstruct the data. This renders the "autoencoder" aspect of the architecture moot, as the latents become uninformative noise.

The Mechanics of Posterior Collapse

Understanding posterior collapse requires looking at the complex interplay between the generative model $p$ and the inference process $q$. As illustrated in Figure 1, the path to collapse is paved by several distinct but related issues that span both the model specification and the optimization process.

A conceptual map of the factors contributing to posterior collapse, categorized by model (p) and inference (q) components.

The authors categorize these into two primary strands:

  1. Underspecification: The standard Evidence Lower Bound (ELBO) objective does not explicitly penalize the model for ignoring latents. If the decoder is sufficiently powerful (e.g., an LSTM), the model may find a local optimum where the latents are ignored because they are not strictly necessary for reconstruction.
  2. Loose Bounds: The mathematical approximations used in training are often "loose," meaning they provide a poor estimate of the true log-likelihood. This gap—comprising approximation, amortization, and optimization errors—can lead the model to underestimate the potential benefit of using latent variables.

While previous research has addressed these issues in isolation—either by using tighter Monte-Carlo bounds or by adding mutual information constraints—combining these approaches has proven difficult. In multi-sample settings like the Importance Weighted Autoencoder (IWAE), the variational distribution $q(z|x)$ acts as a proposal rather than a direct approximation of the true posterior, making standard mutual information estimates biased and unreliable.

Methodology: Mutual Information Augmented Objectives

The core contribution of this work is a framework for Mutual Information Augmented Objectives designed specifically for multi-sample Monte-Carlo settings.

Sample Recycling and Efficient Estimation

A major hurdle in multi-sample objectives is the computational cost. The authors overcome this by deriving estimators that "recycle" the samples already used for the main objective. This allows for the addition of mutual information constraints with virtually no extra computational overhead, making the method highly practical.

KL and Rényi Objectives

The researchers propose two primary types of constraints:

  • The KL Objective: Using self-normalized importance sampling, they estimate the true Kullback-Leibler divergence between the model's actual posterior and the prior. This is a more accurate measure of information content than the standard "representational" KL used in basic VAEs.
  • The Rényi Objective: They introduce an alternative based on Rényi divergence, which acts as a smoother proxy for mutual information, enhancing training stability.

These objectives are integrated with state-of-the-art gradient estimators: DReG for continuous latents and VIMCO for discrete (categorical) latents.

Experimental Evaluation

The methods were tested on two distinct benchmarks:

  1. Synthetic Discrete Data: A "trap" task involving 10,000 discrete symbols designed to induce posterior collapse. This allowed the authors to verify if their constraints could force the model to utilize latents even when ignoring them was the "easier" path.
  2. Language Modeling (Penn Treebank): A real-world NLP benchmark. The authors used a version of the PTB corpus to evaluate the tradeoff between data modeling accuracy (perplexity) and latent usage.

Key Insights and Results

The study yielded several critical insights:

  • The Proposal vs. Posterior Distinction: Recognizing that $q(z|x)$ is merely a proposal in multi-sample objectives is vital. Treating it as the actual posterior leads to significant errors in estimating information flow.
  • Pushing the Pareto Frontier: Rather than focusing on a single metric, the authors analyzed the Rate-Distortion tradeoff. Their methods consistently pushed the entire frontier toward the theoretical optimum, achieving better data fit for a given amount of latent information.
  • The Success of Discrete Latents: Discrete latent variables showed remarkable performance when paired with these new objectives, nearly solving the synthetic task where continuous latents struggled.
  • Efficiency: The Rényi objective with 16 samples proved more efficient than single-sample baselines, even when those baselines were given significantly more training time or larger batch sizes.

Conclusion and Future Directions

By weaving together tighter Monte-Carlo bounds and mutual information constraints, this research provides a robust toolkit for preventing posterior collapse. While the fundamental tradeoff between modeling data and using latents remains, these new estimators allow for much finer control over this balance. Future work may explore the utility of these "un-collapsed" latents in downstream tasks like semi-supervised learning or text summarization, where meaningful representations are paramount.

Summary updated

Abstract

A common failure mode of density models trained as variational autoencoders is to model the data without relying on their latent variables, rendering these variables useless. Two contributing factors, the underspecification of the model and the looseness of the variational lower bound, have been studied separately in the literature. We weave these two strands of research together, specifically the tighter bounds of Monte-Carlo objectives and constraints on the mutual information between the observable and the latent variables. Estimating the mutual information as the average Kullback-Leibler divergence between the easily available variational posterior $q(z|x)$ and the prior does not work with Monte-Carlo objectives because $q(z|x)$ is no longer a direct approximation to the model's true posterior $p(z|x)$. Hence, we construct estimators of the Kullback-Leibler divergence of the true posterior from the prior by recycling samples used in the objective, with which we train models of continuous and discrete latents at much improved rate-distortion and no posterior collapse. While alleviated, the tradeoff between modelling the data and using the latents still remains, and we urge for evaluating inference methods across a range of mutual information values.
BibTeX
@article{melis2022mutual,
  author = {Gábor Melis and András György and Phil Blunsom},
  title = {{Mutual Information Constraints for Monte-Carlo Objectives}},
  journal = {J. Mach. Learn. Res.},
  year = {2022},
}
Figure