Autoencoders Needs review

β-VAE

Year of appearance
2017
Researchers
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, Alexander Lerchner
Organisation
DeepMind
Architecture type
Variational autoencoder with weighted KL
Learning mechanism
unsupervised
Tasks
Disentangled representation learning, Image generation

A simple modification of VAE that multiplies the KL term by β > 1, pushing the model towards disentangled latent representations in which each dimension represents an independent factor of variation.

Architecture diagram

Displayed configuration: β-VAE (β = 4) with the same VAE architecture (illustrative) — The architecture is identical to VAE; the difference is only in the KL weight.

Layer table (11 nodes)
LayerTypeInputOutputRepetitionParametersFormulaMACs
Flattened MNIST imageinput78410—
Encoder: FC 500 + tanhfc7845001392,500784·500 + 500392,000
μ: FC 20fc50020110,020500·20 + 2010,000
log σ²: FC 20fc50020110,020500·20 + 2010,000
ε ∼ N(0, I)noise2010—
z = μ + σ ⊙ εsampling20, 202010—
Decoder: FC 500 + tanhfc20500110,50020·500 + 50010,000
FC 784 + sigmoid (Bernoulli)fc5007841392,784500·784 + 784392,000
Reconstruction x̂output78478410—
Reconstruction term −log p(x|z)lossx, x̂L_rec10—
β × KL termlossμ, log σ²L_KL10—

Configuration figures: β-VAE (β = 4) with the same VAE architecture (illustrative)

Parameters (computed from the layers)815,824 (≈815.82K)
Parameters (published in the source)Unspecified
MACs814,000 (≈814K)
FLOPs ≈ 2 × MACs1,628,000 (≈1.63M)
Input shape
784
Output shape
784
Depth
One hidden layer per network
Complexity
Identical to VAE.
MACs note
Identical to VAE.
Calculation assumptions: Illustrative configuration: the paper used convolutional networks and datasets such as dSprites and CelebA; the same VAE architecture was chosen here to isolate the effect of β.

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

Published at ICLR 2017 with a metric for evaluating disentanglement, and launched extensive research on disentangled representations.

The problem it addresses

The latent representations in VAE are entangled: a single dimension mixes several factors (shape, position and colour).

Core idea

Increasing the weight of KL imposes a stronger information bottleneck on z, so the model learns the most economical and independent encodings.

Architecture description

The same VAE architecture (convolutional in the paper); only the loss function changes.

Data flow

As in VAE.

Inputs

Images (in the original paper: dSprites, CelebA, 3D Chairs and 3D Faces).

Outputs

A reconstruction and a disentangled latent representation.

Training procedure

Like VAE, with β chosen by search (for example β = 4 for dSprites).

Loss functions

−E[log p(x|z)] + β·KL(q(z|x) ‖ p(z)).

Computational complexity

Like VAE.

Computational requirements

Low to medium.

Advantages

  • More interpretable representations
  • A very simple modification
  • Control over the trade-off between compression and reconstruction

Limitations

  • Lower reconstruction quality with large β
  • β is a sensitive hyperparameter
  • Disentanglement is not guaranteed without inductive biases

Equations

β-VAE objective β-VAE objective

\mathcal{L} = \mathbb{E}_{q_\phi(\mathbf{z}\mid\mathbf{x})}\left[\log p_\theta(\mathbf{x}\mid\mathbf{z})\right] - \beta\, D_{KL}\big(q_\phi(\mathbf{z}\mid\mathbf{x}) \,\Vert\, p(\mathbf{z})\big)

β = 1 recovers the ordinary VAE.

Symbols: β: KL weight

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

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

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

Applications

Related models

References

  1. Original paper Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, Alexander Lerchner. (2017). β-VAE: Learning basic visual concepts with a constrained variational framework. ICLR 2017. Link Needs review
  2. Related reference Diederik P. Kingma, Max Welling. (2014). Auto-encoding variational Bayes. ICLR 2014. arXiv:1312.6114 Verified
Scientific review note: A first scientific draft based on the original paper and reference implementations; it needs review by a specialist before final approval.

Version 1 — last updated 2026-11-15.