Why can a deterministic autoencoder not generate realistic new images by sampling from its latent space, and how does the VAE’s KL term fix this? What is posterior collapse in VAEs, when does it happen, and how do -VAE and KL annealing address it?
Deep learning, Variational autoencoders
Level L4 Advanced. Length Medium. Nature Th Theoretical.
What's being asked
Whether you understand both why VAEs enable generative sampling and the classic optimisation failure mode where the latent code is ignored.
Key idea
A deterministic autoencoder maps training points to isolated islands in latent space, so random samples land in dead zones. A VAE forces posteriors to overlap smoothly inside via ; conversely, posterior collapse occurs when the optimiser drives so and the decoder ignores .
Steps
- Explain why deterministic autoencoders fail at sampling: reconstruction loss alone puts no constraint on where codes lie or whether nearby latent points decode meaningfully, leaving large gaps between encoded training points.
- Explain the VAE fix: the ELBO forces each encoded distribution to have non-zero spread and stay close to the prior , filling latent space continuously so sampling decodes plausibly.
- Define posterior collapse: for every , making independent of (). This often happens when the decoder is a powerful autoregressive model (such as PixelCNN or an LSTM) that can model well on its own, so early in training—when is noisy—the easiest way to cut the ELBO penalty is to turn off completely.
- Explain mitigations: KL annealing (gradually raising the KL weight from to during training so the encoder–decoder first learns useful codes before the prior pulls them in), -VAE (weighting the KL term by : preserves reconstruction and mutual information against collapse, whereas trades reconstruction for more factorised, disentangled axes) or "free bits" (clamping per-dimension KL below a floor).
Common mistakes
- Claiming posterior collapse means the decoder outputs garbage; the decoder can still generate sharp samples from alone, it simply ignores the latent variable and stops learning a useful representation.
- Confusing (stronger regularisation, used for disentangling and actually increasing the risk of collapse) with or warm-up annealing (used to prevent collapse).
How long your answer should be
Half a page; 3–4 minutes.
Last checked on 4 December 2026.
Read this
Previous in Deep learning: What does the universal approximation theorem say for networks with one hidden layer, what does it not guarantee, and why are deep networks used anyway?
Next in Deep learning: Why do gradients of the original minimax GAN objective vanish when and have disjoint supports, what is mode collapse, and how does the Wasserstein-1 distance in WGAN fix both?