Improved Variational Inference with Inverse Autoregressive Flow

Durk Kingma, Tim Salimans, Rafał Józefowicz, Xi Chen, Ilya Sutskever, Max Welling

TL;DR

This paper introduces Inverse Autoregressive Flows (IAF), a new type of normalizing flow that efficiently scales to high-dimensional latent spaces. IAF significantly improves variational inference by allowing more flexible posterior approximations compared to standard diagonal Gaussians, leading to better generative model performance and faster synthesis.

What Problem Does This Paper Address?

Variational inference is a powerful technique for approximating complex probability distributions, particularly in deep generative models like Variational Autoencoders (VAEs). A key challenge is designing flexible "inference networks" (also known as approximate posteriors) that can accurately capture the true posterior distribution of latent variables. Traditional methods often rely on simple, factorized Gaussian posteriors, which can be too restrictive for complex data. While normalizing flows offer a way to build more flexible posteriors, existing methods struggle to scale to the high-dimensional latent spaces common in modern deep learning applications (e.g., image generation). This paper aims to bridge this gap by proposing a normalizing flow that is both flexible and computationally efficient for high-dimensional data.

Methods

The core contribution is the Inverse Autoregressive Flow (IAF). Normalizing flows work by transforming a simple base distribution (like a Gaussian) through a series of invertible functions, each with a known Jacobian determinant, to create a more complex target distribution.

IAF's novelty lies in its use of autoregressive neural networks for these transformations. Specifically, each transformation in the IAF chain is based on an autoregressive model. These models generate each element of the output variable conditioned on the previous elements. The key insight is that the inverse of such an autoregressive transformation is computationally efficient and has a simple, analytically computable Jacobian determinant. This makes it suitable for building a normalizing flow.

The authors also introduce a novel variational autoencoder architecture that leverages IAF for its inference network. This VAE is designed to handle multi-level latent variables, where each stochastic variable can be a high-dimensional tensor (like feature maps in an image).

Datasets

The paper evaluates their proposed methods on the following datasets:

  • MNIST: A standard dataset of handwritten digits.
  • CIFAR-10: A dataset of natural images.

Key Insights and Ideas

  • Autoregressive models are key to scalable flows: By leveraging the structure of autoregressive models, the authors found a way to create invertible transformations with tractable Jacobians that scale to high-dimensional latent spaces, overcoming a major limitation of previous normalizing flows.
  • Inverse is the magic: While autoregressive models are typically used for generation (sampling), the paper cleverly uses their inverse for inference (approximating posteriors). This inverse transformation is parallelizable across dimensions, making it efficient.
  • Flexibility matters for inference: More expressive approximate posteriors (achieved with deeper IAFs) lead to better generative model performance, as evidenced by tighter variational lower bounds and improved log-likelihoods.
  • IAF enables faster synthesis: VAEs equipped with IAF can achieve competitive log-likelihoods on natural images while allowing significantly faster sampling (synthesis) compared to other autoregressive models.

Key Results

  • Improved Log-Likelihoods: IAF significantly improves upon diagonal Gaussian approximate posteriors, leading to better generative modeling performance on both MNIST and CIFAR-10.
  • State-of-the-Art Performance: On binarized MNIST, their VAE with deep IAF achieved a log-likelihood of -79.10, competitive with previous best results.
  • Competitive on CIFAR-10: Their ResNet VAE with IAF achieved 3.11 bits per dimension on CIFAR-10, outperforming other published latent-variable models and being close to the performance of PixelCNN.
  • Faster Synthesis: The proposed VAE with IAF achieved synthesis speeds of about 0.05 seconds per image on CIFAR-10, a dramatic improvement over models like PixelCNN which took over 50 seconds per image.

Limitations and Future Work

  • Depth vs. Width: While deeper IAFs improve performance, the paper notes that the trade-off between depth and width of the autoregressive networks is an area for further exploration.
  • Further Improvements: The authors suggest that results could be further improved with more steps (depth) in the IAF chain, which they leave for future work.
  • Computational Cost: While IAF scales better than previous flows, training deep IAFs can still be computationally intensive.
  • Comparison to Real NVP: The paper mentions that NICE (a related flow) was extended to high-dimensional spaces in Real NVP, and an empirical comparison between IAF and Real NVP would be interesting.

Summary updated

BibTeX
@inproceedings{kingma2016improved,
  author = {Durk Kingma and Tim Salimans and Rafał Józefowicz and Xi Chen and Ilya Sutskever and Max Welling},
  title = {{Improved Variational Inference with Inverse Autoregressive Flow}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
}
Figure