Variational Autoencoder
An autoencoder whose latent space you can actually sample from — the principled generative model that lost to GANs on looks and won by being useful.
When not to use it
- When sharpness is the product. Blurriness is structural under MSE. Diffusion is the answer now.
- When you only need compression. A plain autoencoder is simpler and reconstructs better; the KL term costs you fidelity you didn't need.
- With a very powerful decoder, carelessly. Posterior collapse means the latent gets ignored and you won't get an error.
- When a pretrained embedding exists. Usually better than a latent space you trained yourself.
Reach for something else instead
- Diffusion models — better generation, and they use a VAE internally anyway.
- Plain autoencoder — for pure compression, sharper and simpler.
- GAN — sharper, unstable, largely superseded.
- VQ-VAE — discrete latents, so a transformer can model them. The bridge to token-based generation.
Sources & further reading
- Kingma & Welling (2013), Auto-Encoding Variational Bayes — the paper; the ELBO and the reparameterisation trick.
- Higgins et al. (2017), β-VAE: Learning Basic Visual Concepts with a Constrained Variational Framework — the disentanglement dial, and its cost.
- van den Oord, Vinyals & Kavukcuoglu (2017), Neural Discrete Representation Learning — VQ-VAE; discrete latents, and the bridge to token-based generation.
Primary sources, listed so you can check the claims on this page rather than take them on trust.
Where people go wrong
- Trying to tune away the blurriness. It's the MSE objective averaging plausible outputs. Change the loss, not the learning rate.
- Not watching for posterior collapse. KL going to zero looks like convergence and means the latent was abandoned.
- Treating β as free. It trades latent structure against reconstruction, directly.
- Using a VAE for compression when an autoencoder would reconstruct better.