HeadlinesBriefing favicon HeadlinesBriefing.com

VAEs Explained: ELBO and Reparameterization Trick

Towards Data Science •
×

Variational Autoencoders (VAEs) address key limitations of vanilla autoencoders by improving latent space structure for better similarity preservation and image generation. Vanilla autoencoders focus on reconstruction rather than latent representations, causing poor similarity preservation and failed interpolation—like generating a neutral face midway between a smiling and disappointed person.

VAEs solve this by assuming latent distributions are normal N(0,1) and approximating the posterior p(z|x) with q(z|x)=N(μ,σ) using an encoder. The training objective maximizes log-likelihood of real data, using Evidence Lower Bound (ELBO) estimation: log p(x) ≥ ELBO = E[log p(x|z)] - KL[q(z|x)||p(z)].

This requires maximizing reconstruction quality E[log p(x|z)] while minimizing KL divergence between approximate and prior distributions. The reparameterization trick enables gradient flow through stochastic nodes, allowing end-to-end training. The decoder p(x|z) is typically Gaussian centered at output x̆, optimizing reconstruction fidelity.