Linear VAE and Posterior Collapse, Interactively
← text notes · Lucas, Tucker, Grosse and Norouzi (NeurIPS 2019). Three widgets: why a fixed noise level can trap a latent unit at zero, how many units that traps, and why a diagonal posterior forces the decoder's columns to be perpendicular.
1. One column: a valley or a hill at zero
Take a single latent unit whose decoder column points along one principal direction of the data, and ask how much the log-likelihood improves as the column's length s grows from zero. Here λ is the data's variance along that direction and σ² is the observation noise, held fixed. The curve is the gain per data point, measured against the collapsed column (s = 0).
Because the model's variance along the direction is σ² + s², the unit can only describe variance above the noise floor.
2. Fixed noise against learned noise
Now several directions at once. Each bar is a principal-component variance λi of the data. The model has q latent columns to spend on the top q directions. The horizontal line is σ². A column whose bar lies above the line can be used (filled, blue). One whose bar lies below it is stuck at zero (hollow): it is collapsed. The lower panel shows how much information each live unit carries, ½ ln(λi/σ²), which is the KL cost the unit pays.
3. Rotating the decoder: same likelihood, different ELBO
With two latent units, the decoder is W = L Rᵀ: lengths L = diag(l1, l2) and a rotation R of the latent coordinates. The data distribution (left panel, its ellipse) does not depend on the rotation, so the likelihood is the same for every angle θ. The arrows are the two columns of W.
The middle panel is the latent space: the dark ellipse is the true posterior, and the coloured ellipse is what a variational posterior with diagonal covariance can offer. The right panel plots the gap KL(q ‖ posterior) against θ. The ELBO is the likelihood minus this gap.
Everything here is computed in the browser from the formulas in the notes; none of it is data from the paper.