Variational autoencoders
A variational autoencoder pairs a deep latent-variable model with a corresponding approximate inference model.
A variational autoencoder pairs a deep latent-variable model with a corresponding approximate inference model. An approximate inference model is also called a recognition model. The posterior is approximate.
The approximate posterior has a mean and standard deviation. Compute z as mu plus sigma times epsilon. Reparameterization of the variational lower bound yields a lower-bound estimator.
Evaluate the decoding term. Combine reconstruction loss with KL loss. The standard example assumes Gaussian prior and approximate-posterior distributions.
VAE training combines reconstruction loss with KL loss.
Follow one input through the VAE training path.
- 1 · encodeProduce the mean and standard deviation of the approximate posterior.
- 2 · sampleCompute z as mu plus sigma times epsilon.
- 3 · decodeEvaluate the decoding term.
- 4 · scoreCombine reconstruction loss with KL loss.
- 5 · updateUse the resulting gradients with stochastic optimization methods.
The reparameterized sample computes z as mu plus sigma times epsilon.
| Who | What they ask | What it works with |
|---|---|---|
| Generative-modelling team | “Can we sample new examples from a learned latent model?” | Samples from a chosen latent prior |
| Imaging researcher | “How does the decoded output change across a two-dimensional latent space?” | A grid of latent coordinates |
| Missing-data team | “Can a latent-variable model impute unobserved values?” | Partially observed records |
- A VAE trains an approximate inference model together with a generative model.
- Reparameterization of the variational lower bound yields a lower-bound estimator.
- A low-dimensional latent space can project high-dimensional data for visualization.
- The true posterior can remain intractable.
- The posterior is approximate.
- The standard example assumes Gaussian prior and approximate-posterior distributions.
Sources used
This explainer is written in original language. The links below support its factual claims.
- paperAuto-Encoding Variational Bayes, Kingma and Welling · read 28 Sept 2026
- paperStochastic Backpropagation and Approximate Inference in Deep Generative Models, Rezende, Mohamed and Wierstra · read 28 Sept 2026
- docsVariational AutoEncoder, Keras · read 28 Sept 2026
- docsPyTorch Examples, PyTorch · read 28 Sept 2026
- paperAn Introduction to Variational Autoencoders, Kingma and Welling · read 28 Sept 2026