An Introduction to Variational Autoencoders

Diederik P. Kingma, Max WellingOpenalex Unknown 2019 · DOI · OpenAlex

Abstract

In this monograph, the authors present an introduction to the framework of variational autoencoders (VAEs) that provides a principled method for jointly learning deep latent-variable models and corresponding inference models using stochastic gradient descent. The framework has a wide array of applications from generative modeling, semi-supervised learning to representation learning. The authors expand earlier work and provide the reader with the fine detail on the important topics giving deep insight into the subject for the expert and student alike. Written in a survey-like nature the text serves as a review for those wishing to quickly deepen their knowledge of the topic. An Introduction to Variational Autoencoders provides a quick summary for the reader of a topic that has become an important tool in modern-day deep learning techniques.

Introduction

The Variational Autoencoder (VAE) stands as one of the most influential frameworks in modern machine learning. Authored by the original creators of the architecture, this work serves as a definitive manual, bridging the gap between classical probabilistic graphical models and deep learning. It provides a principled methodology for teaching machines to not only recognize data but to understand the underlying factors that generate it.

The Problem of Intractable Latents

In generative modeling, the objective is to build systems capable of creating new data—such as images or text—that mirror real-world distributions. To achieve this, a model must capture "latent variables": hidden factors such as the pose of a face or the specific digit in a handwritten note.

The primary challenge in deep learning is that these latent factors are often "intractable." Calculating the probability of a single observation theoretically requires integrating over every possible combination of hidden factors. For complex neural networks, this is computationally impossible. Traditional approaches like Markov Chain Monte Carlo (MCMC) are often too slow for massive datasets, leaving a gap between probabilistic theory and practical deep learning applications.

Methodology: The VAE Framework

The VAE addresses this by formalizing a pair of coupled models:

  1. The Encoder (Inference Model): A neural network that maps an input $x$ to a distribution over latent variables $z$. VAEs utilize Amortized Inference, where a single network learns to perform inference across the entire dataset, rather than optimizing a unique distribution for every data point.
  2. The Decoder (Generative Model): A neural network that receives a latent sample $z$ and attempts to reconstruct the original data $x$.

The Evidence Lower Bound (ELBO)

To train these models jointly, the framework employs the ELBO as an objective function. The ELBO acts as a proxy for the actual likelihood of the data. Maximizing the ELBO simultaneously improves reconstruction quality and regularizes the latent space to follow a simple, organized distribution (typically a Gaussian).

The Reparameterization Trick

The "secret sauce" of the VAE is the reparameterization trick. Standard backpropagation cannot pass through a random sampling step. The authors solve this by "externalizing" the randomness: sampling noise from a standard distribution and then shifting and scaling it. This makes the entire pipeline differentiable, enabling the model to learn via standard Stochastic Gradient Descent (SGD).

Applications and Datasets

The VAE framework has been validated across diverse domains rather than a single benchmark:

  • MNIST: Demonstrating state-of-the-art semi-supervised learning.
  • CIFAR-10: Evaluating advanced inference techniques like Inverse Autoregressive Flow (IAF).
  • Scientific Domains: Applications in chemical design (using molecular datasets) and astronomy (simulating galaxy observations).

Key Insights

  • Inference as Optimization: VAEs transform the task of "guessing" hidden factors into a standard supervised-like learning task. The encoder essentially learns the mathematics of Bayesian inference.
  • The Marriage of Two Worlds: VAEs represent a formal bridge between the interpretability of Probabilistic Graphical Models and the representational power of Deep Learning.
  • Regularization via the Bottleneck: The KL-divergence term in the ELBO prevents data memorization, forcing the model to discover efficient, independent factors of variation.

Results and Limitations

VAEs have shown remarkable data efficiency, achieving less than 1% error on MNIST with only 10 labeled examples per class—a massive improvement over purely supervised models of the same era. Furthermore, the introduction of Inverse Autoregressive Flow (IAF) demonstrated that VAEs can handle highly complex latent distributions without losing computational efficiency.

However, limitations remain. VAEs are known for producing "blurry" images compared to Generative Adversarial Networks (GANs), a result of the KL divergence's tendency to over-smooth distributions. Additionally, "posterior collapse" can occur if the decoder becomes too powerful, causing it to ignore latent variables. While the reparameterization trick works for continuous variables, handling discrete factors remains a subject of ongoing research.

Summary updated

BibTeX
@inproceedings{kingma2019introduction,
  author = {Diederik P. Kingma and Max Welling},
  title = {{An Introduction to Variational Autoencoders}},
  booktitle = {Openalex Unknown},
  year = {2019},
  doi = {10.1561/9781680836233},
}

Loading related content...

Figure