- Year of appearance
- 2013
- Researchers
- Diederik P. Kingma, Max Welling
- Organisation
- Universiteit van Amsterdam
- Architecture type
- Probabilistic encoder–decoder (latent variable model)
- Learning mechanism
- unsupervised
- Tasks
- Image generation, Representation learning, Dimensionality reduction
A probabilistic generative model that learns an encoder approximating the posterior q(z|x) and a decoder p(x|z), trained by maximising an evidence lower bound (ELBO) with the reparameterisation trick.
Architecture diagram
Displayed configuration: VAE on MNIST: hidden layer 500 and latent space J = 20 — An MLP encoder and decoder with one hidden layer each, as in the paper’s experiments.
Layer table (11 nodes)
| Layer | Type | Input | Output | Repetition | Parameters | Formula | MACs |
|---|---|---|---|---|---|---|---|
| Flattened MNIST image | input | 784 | 1 | 0 | — | ||
| Encoder: FC 500 + tanh | fc | 784 | 500 | 1 | 392,500 | 784·500 + 500 | 392,000 |
| μ: FC 20 | fc | 500 | 20 | 1 | 10,020 | 500·20 + 20 | 10,000 |
| log σ²: FC 20 | fc | 500 | 20 | 1 | 10,020 | 500·20 + 20 | 10,000 |
| ε ∼ N(0, I) | noise | 20 | 1 | 0 | — | ||
| z = μ + σ ⊙ ε | sampling | 20, 20 | 20 | 1 | 0 | — | |
| Decoder: FC 500 + tanh | fc | 20 | 500 | 1 | 10,500 | 20·500 + 500 | 10,000 |
| FC 784 + sigmoid (Bernoulli) | fc | 500 | 784 | 1 | 392,784 | 500·784 + 784 | 392,000 |
| Reconstruction x̂ | output | 784 | 784 | 1 | 0 | — | |
| Reconstruction term −log p(x|z) | loss | x, x̂ | L_rec | 1 | 0 | — | |
| KL term | loss | μ, log σ² | L_KL | 1 | 0 | — |
Configuration figures: VAE on MNIST: hidden layer 500 and latent space J = 20
- Input shape
- 784
- Output shape
- 784 (+ z ∈ ℝ²⁰)
- Depth
- One hidden layer per network
- Complexity
- O(D·H + H·J).
- MACs note
- Per image and for a single sample L = 1 of z.
MAC = a multiplication followed by an addition. The figures are for one forward pass of one sample with the stated dimensions; they are an analytical calculation, not a measurement of run time.
Scientific explanation
Historical background
Appeared on arXiv in December 2013 and was published at ICLR 2014 under the title “Auto-Encoding Variational Bayes”; the work of Rezende and colleagues appeared at the same time.
The problem it addresses
Variational inference in continuous latent-variable models with intractable posteriors, on large data.
Core idea
A network encoder that predicts μ and σ of a normal distribution, and sampling z = μ + σ⊙ε allows backpropagation through the sample.
Architecture description
An MLP encoder that outputs (μ, log σ²), a sampling layer, and an MLP decoder that outputs the parameters of p(x|z) (Bernoulli or Gaussian).
Data flow
x → encoder → (μ, log σ²) → z = μ + σε → decoder → x̂. For generation: z ∼ N(0, I) → decoder.
Inputs
Continuous or binary data (an image).
Outputs
A reconstruction, a latent distribution, and new samples.
Training procedure
SGVB/AEVB with batches of 100 and Adagrad, with a single sample L = 1 per data point.
Loss functions
Negative ELBO: reconstruction error + KL(q(z|x) ‖ N(0, I)).
Computational complexity
O(D·H + H·J) per sample.
Computational requirements
Low.
Advantages
- A regular latent space that supports interpolation and generation
- Stable training
- A clear probabilistic framework
Limitations
- Blurry samples compared with GAN and diffusion
- Posterior collapse with powerful decoders
- A lower bound, not the actual likelihood
Equations
Evidence lower bound Evidence lower bound (ELBO)
\mathcal{L}(\theta, \phi; \mathbf{x}) = \mathbb{E}_{q_\phi(\mathbf{z}\mid\mathbf{x})}\left[\log p_\theta(\mathbf{x} \mid \mathbf{z})\right] - D_{KL}\big(q_\phi(\mathbf{z}\mid\mathbf{x}) \,\Vert\, p(\mathbf{z})\big)The reconstruction term minus the regularisation term; it is maximised during training.
Symbols: q_φ: encoder, p_θ: decoder
Reparameterisation trick Reparameterization trick
\mathbf{z} = \boldsymbol\mu + \boldsymbol\sigma \odot \boldsymbol\epsilon,\quad \boldsymbol\epsilon \sim \mathcal{N}(0, I)Makes sampling differentiable with respect to μ and σ.
Symbols: ε: standard noise
KL divergence of two normal distributions KL divergence (Gaussian)
D_{KL}\big(\mathcal{N}(\boldsymbol\mu, \boldsymbol\sigma^2) \,\Vert\, \mathcal{N}(0, I)\big) = -\frac{1}{2} \sum_{j=1}^{J} \left(1 + \log \sigma_j^2 - \mu_j^2 - \sigma_j^2\right)A closed form computed without sampling (Appendix B of the VAE paper).
Symbols: J: latent-space dimension
Applications
Related models
- Predecessor of Deep Autoencoder — Makes the autoencoder probabilistic. Compare
- Variant of β-VAE — β-VAE increases the weight of KL for disentanglement. Compare
- Alternative Generative Adversarial Network — An alternative implicit generative model. Compare
- Uses a component of Latent Diffusion Model — The latent diffusion model uses a KL-regularised autoencoder. Compare
- Denoising Diffusion Probabilistic Models — DDPM is also trained with a variational bound. Compare
- Latent Diffusion Model — A KL-regularised autoencoder. Compare
References
- Original paper Diederik P. Kingma, Max Welling. (2014). Auto-encoding variational Bayes. ICLR 2014. arXiv:1312.6114 Verified
Version 1 — last updated 2026-11-15.
