Course contentsShow
← Machine Learning and Deep Learning
Lesson 1441 of 3,53832. Generative Models: Autoencoders and VAEsFree lesson

From Autoencoders to Variational Autoencoders

Understand the fundamental difference: VAEs learn distributions in latent space instead of deterministic encodings.

From Autoencoders to Variational Autoencoders

What you'll learn: You'll understand the fundamental leap from deterministic autoencoders to VAEs, which model probability distributions instead of fixed points in latent space.

The Core Limitation of Traditional Autoencoders

In the autoencoders you've learned so far, the encoder maps each input to a single, fixed point in the latent space. If you feed in the same image twice, you get the exact same latent vector. This is deterministic and precise, but it has a problem: the latent space can be irregular and discontinuous.

Think of it like a map where cities (your data points) are scattered randomly with huge gaps between them. If you try to sample a random point from this map, you'll likely land in empty space that doesn't decode into anything meaningful.

The VAE Innovation: Learning Distributions

Variational Autoencoders (VAEs) solve this by making the encoder output a probability distribution instead of a single point. Specifically, the encoder produces two vectors: a mean (μ) and a standard deviation (σ) that define a Gaussian distribution in latent space.

Instead of saying "this image is point [0.5, -1.2, 0.8]," a VAE says "this image is somewhere around [0.5, -1.2, 0.8] with this much uncertainty."

During training, you sample from this distribution to get your actual latent vector. This forces the model to create a smooth, continuous latent space where nearby points decode to similar outputs—because the model must handle the noise from sampling.

Key Takeaway: VAEs transform autoencoders from deterministic point mappings into probabilistic models that learn continuous distributions in latent space, enabling smooth interpolation and meaningful random sampling for generation.