Abstract
Variational Autoencoders (VAEs) are powerful generative models, but they frequently suffer from "posterior collapse" when paired with expressive autoregressive decoders. In such cases, the model ignores the latent variables, and the Kullback–Leibler (KL) divergence term vanishes to zero. This paper introduces BN-VAE, a simple yet effective modification that applies Batch Normalization to the inference network's output. By fixing the scale parameter, BN-VAE provides a theoretical lower bound for the expected KL divergence, ensuring the latent space remains informative without the computational overhead of existing methods.
The Problem: Posterior Collapse
In generative modeling, VAEs learn latent representations of data. However, when paired with powerful decoders like LSTMs, the decoder often learns to reconstruct data perfectly by relying solely on its autoregressive properties, completely ignoring the latent variable $z$. Mathematically, the KL divergence—which penalizes deviations from the prior—vanishes to zero, rendering the latent space useless. Previous solutions like KL annealing or "free-bits" often require complex hyperparameter tuning or significantly slow down training.
Methodology: BN-VAE
The authors propose a shift in perspective: instead of forcing the KL divergence to be positive for every data point, they aim to keep the expectation of the KL distribution across the entire dataset positive.
The core of the approach is BN-VAE:
- Batch Normalization (BN): A standard Batch Normalization layer is applied to the mean ($\mu$) produced by the inference network.
- Fixed Scale: Unlike standard BN, which learns a scale parameter ($\gamma$), BN-VAE uses a fixed $\gamma$.
- Theoretical Guarantee: By fixing the variance of the distribution of $\mu$ to $\gamma^2$, the authors prove that the expected KL divergence has a lower bound of $\frac{n(\gamma^2 + \beta^2)}{2}$ (where $n$ is the latent dimension). This prevents the average KL from ever reaching zero.
Experimental Results
The researchers evaluated BN-VAE across three distinct NLP tasks: language modeling (Yelp/Yahoo), text classification (downsampled Yelp), and dialogue generation (Switchboard).
Language Modeling
On the Yahoo and Yelp corpora, BN-VAE achieved Negative Log-Likelihood (NLL) scores that surpassed strong baselines and rivaled much more complex models. Crucially, it maintained a healthy KL divergence, indicating that the latent space remained informative.
Representation Quality
To test the quality of learned representations, the model was evaluated on text classification in low-data regimes. With only 100 labeled examples, BN-VAE achieved 88.8% accuracy, significantly outperforming standard VAEs (66.1%) and even models using pretrained encoders.
Efficiency and Dialogue
BN-VAE is remarkably efficient, maintaining the same training speed as a basic VAE. It is roughly 12x faster than Semi-Amortized VAE (SA-VAE) and 2-4x faster than Aggressive VAE (Agg-VAE). In dialogue generation tasks, human evaluations rated BN-VAE responses as more relevant and informative than standard CVAE baselines.
Conclusion
BN-VAE offers a simple, "one-line" fix to the persistent problem of posterior collapse. By regularizing the parameters of the approximate posterior rather than the objective function, it achieves state-of-the-art performance with minimal computational cost. Future work may explore automatically learning dimension-specific scale parameters or extending the method to non-Gaussian priors.
Summary updated