The Usual Suspects? Reassessing Blame for VAE Posterior Collapse

Bin Dai, Ziyu Wang, David P. Wipf

TL;DR

This paper argues that posterior collapse in Variational Autoencoders (VAEs), a common failure mode where latent variables become uninformative, is often caused by "bad" local minima in the VAE's loss landscape, particularly in deeper networks. This challenges the conventional wisdom that solely blames the KL-divergence term, suggesting that the architecture of the autoencoder itself plays a crucial role.

What Problem Does This Paper Address?

Variational Autoencoders (VAEs) are powerful generative models that learn a compressed, latent representation of data. A key assumption is that this latent space captures meaningful variations in the data. However, a frequent problem encountered in practice is "posterior collapse," where the VAE's learned latent posterior distribution for a given data point collapses to the prior distribution (e.g., a standard Gaussian). This means the latent variables become uninformative, and the VAE can no longer generate diverse or meaningful samples. The prevailing explanation for this phenomenon has been the influence of the KL-divergence term in the VAE's objective function, which encourages the learned posterior to match the prior. This paper aims to re-examine this blame, proposing that the underlying architecture of the autoencoder, specifically the presence of "bad" local minima, is a significant, and perhaps underappreciated, contributor to posterior collapse.

Methods

The authors investigate posterior collapse by first analyzing simplified VAE models. They prove that even small nonlinear perturbations to affine VAE decoder models can introduce local minima that exhibit posterior collapse. For deeper networks, they demonstrate that these local minima can force the VAE to act like a truncation operator, discarding information across latent dimensions. A key theoretical contribution is Proposition 1, which shows that for a specific non-affine decoder, a bad local minimum exhibiting posterior collapse can exist alongside a global minimum that perfectly reconstructs the data. They also introduce Proposition 2, which suggests that VAEs can behave like thresholding operators, effectively shutting off latent dimensions for finite values of the variance parameter $\gamma$. Empirically, they train VAEs with varying depths and complexities to observe the relationship between reconstruction error, network depth, and posterior collapse.

Datasets

  • Fashion-MNIST: Used for experiments with fully connected networks.
  • Cifar10, Cifar100, SVHN, CelebA, ImageNet: Used for experiments with convolutional and residual networks.

Key Insights and Ideas

  • Bad Local Minima as the Culprit: The paper strongly suggests that the presence of "bad" local minima in the VAE's loss landscape, especially in deeper architectures, is a primary driver of posterior collapse, rather than solely the KL-divergence term.
  • Architecture Matters: The inherent properties of the autoencoder's architecture, particularly its depth and capacity, can lead to these problematic local minima, even without explicit regularization.
  • VAE as a Thresholding Operator: For certain VAE configurations, the paper shows that the model can behave like a thresholding operator, effectively discarding information from latent dimensions for finite values of the variance parameter $\gamma$. This is analogous to L1 regularization in linear models.
  • Deep Networks Exacerbate the Problem: As network depth increases, the likelihood of encountering these bad local minima with high reconstruction errors also increases, making posterior collapse more probable.
  • KL Warm-start Limitations: The paper implies that common techniques like KL warm-start might be less effective than assumed because they don't fundamentally address the underlying architectural issues causing bad local minima.

Key Results

  • Theoretical Proof of Bad Local Minima: Proposition 1 proves that even small nonlinearities in VAE decoders can create local minima exhibiting posterior collapse.
  • Empirical Evidence of Increasing Reconstruction Error with Depth: Experiments show that as AE/VAE network depth increases, reconstruction errors tend to rise after an initial decrease, indicating convergence to suboptimal solutions.
  • Posterior Collapse Correlates with High $\sigma_z$: Histograms of $\sigma_z$ values (variance of the latent posterior) show that as network depth increases and reconstruction error grows, more $\sigma_z$ values approach 1, a hallmark of impending posterior collapse.
  • VAE Reconstruction Error is Always Worse than AE: Empirically, VAEs consistently exhibit higher reconstruction errors than their deterministic AE counterparts, and this gap can widen with depth.

Limitations and Future Work

  • Focus on Gaussian VAEs: The primary analysis is on Gaussian VAE models. While the authors suggest insights might translate to non-Gaussian regimes, this is not explicitly demonstrated.
  • Practical Implications for Architecture Design: The paper highlights the need for better AE architectures and training regimes to mitigate posterior collapse, suggesting that advances in deeper unregularized AEs could be adapted for VAEs.
  • KL Warm-start Effectiveness: The paper questions the universal effectiveness of KL warm-start, implying that it might not overcome the fundamental issues arising from bad local minima in deep networks.
  • Future Work: The authors suggest that further research into improving AE architectures, training procedures, and initializations could help reduce the risk of posterior collapse in VAEs. They also note that while this work focuses on category (v) posterior collapse (due to local minima), other categories exist and are briefly discussed.

Summary updated

Abstract

In narrow asymptotic settings Gaussian VAE models of continuous data have been shown to possess global optima aligned with ground-truth distributions. Even so, it is well known that poor solutions whereby the latent posterior collapses to an uninformative prior are sometimes obtained in practice. However, contrary to conventional wisdom that largely assigns blame for this phenomena on the undue influence of KL-divergence regularization, we will argue that posterior collapse is, at least in part, a direct consequence of bad local minima inherent to the loss surface of deep autoencoder networks. In particular, we prove that even small nonlinear perturbations of affine VAE decoder models can produce such minima, and in deeper models, analogous minima can force the VAE to behave like an aggressive truncation operator, provably discarding information along all latent dimensions in certain circumstances. Regardless, the underlying message here is not meant to undercut valuable existing explanations of posterior collapse, but rather, to refine the discussion and elucidate alternative risk factors that may have been previously underappreciated.
BibTeX
@inproceedings{dai2020usual,
  author = {Bin Dai and Ziyu Wang and David P. Wipf},
  title = {{The Usual Suspects? Reassessing Blame for VAE Posterior Collapse}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=AD444QbTJ0},
}
Figure