Variational Autoencoder (VAE)

Select an input to encode...

1. Input (x)

Original high-dim data

2. Latent Space (z)

Compressed representation (Mean μ + Variance σ)

3. Output (x')

Reconstructed from z

How It Works

This demo visualizes how a VAE compresses an image into a "Latent Space" and reconstructs it.

  • Encoder: Takes the input face and maps it to a distribution (a region) in the 2D Latent Space. The center is the Mean (μ) and the size is the Variance (σ).
  • Sampling (The "Variational" part): The model picks a random point (z) from this region. This adds randomness and creativity!
  • Decoder: Takes the point (z) and reconstructs the face.
  • Latent Space Exploration: Try clicking and dragging on the middle graph! You can manually control the "genes" of the face (e.g., Smile vs. Frown, Eye Size).