AI, But Simple

A Visual Guide To Variational Autoencoders (VAEs)

Free editionPRO edition

Variational autoencoders (VAEs) are autoencoder-based neural networks used for generative tasks such as image generation or reconstructing missing data.

They are comparable to traditional autoencoders but use probabilistic techniques to not only reconstruct input data but also generate new, similar data to what they were trained on.

The most popular use cases for VAEs are:

  • Generating new images, such as faces or digits.

  • Anomaly detection by identifying data with high reconstruction error.

  • Dimensionality reduction, reducing data dimensions for visualization.

VAE-generated handwritten digits

Additional Applications of VAEs

VAEs have a very wide range of applications that leverage their generative capabilities.

VAEs generate new images, such as faces, digits, or artwork, by sampling from their latent spaces. For instance, VAEs can create realistic faces by training on datasets such as CelebA.

They can perform anomaly detection by measuring reconstruction error to identify outliers. Data points with high error are potential anomalies, useful in applications such as network security or fraud detection.

VAEs are also useful in dimensionality reduction. They compress high-dimensional data into a lower-dimensional latent space for visualization—similar to principal component analysis (PCA) but with generative potential.

An interesting application of VAEs is their use in semi-supervised learning. With limited labels on data (scarce labels), VAEs use their learned representations as features, improving performance and removing the need for highly organized and labeled data.

VAEs also work well in data imputation and denoising by reconstructing missing or noisy data. This is useful in medical imaging or audio/video restoration.

VAEs can manipulate the latent space, where adjusting latent variables can control features like lighting or facial expressions in generated images, practical in creative industries.

Being a generative model, its performance is compared to other similar generative models, such as GANs or diffusion models. Want to learn more about GANs? We did a deep dive in one of our previous issues:

At its heart, a VAE still has the same structure and components as a standard autoencoder: it has both an encoder and a decoder.

Like standard autoencoders, VAEs map inputs into a latent space (a smaller, lower-dimensional representation), then reconstruct latent space vectors back to the input space.

The key feature of VAEs is that, unlike regular autoencoders (which map inputs to fixed points in the latent space), VAEs learn a probability distribution over the data.

This edition is for PRO members.

More in Architecture

Architecture 30
  1. #120 Architecture

    Recursive Self-Improvement, Ternary 27B Model for Laptops, Jev Architecture

  2. #117 Architecture PRO edition

    How DeepSeek’s Architecture Actually Works

  3. #115 Architecture PRO edition

    BDH-CQ: A 150M model just broke the ARC-AGI cost curve