Abstract
Variational Autoencoders (VAEs) are known to suffer from learning uninformative latent representation of the input due to issues such as approximated posterior collapse, or entanglement of the latent space. We impose an explicit constraint on the Kullback-Leibler (KL) divergence term inside the VAE objective function. While the explicit constraint naturally avoids posterior collapse, we use it to further understand the significance of the KL term in controlling the information transmitted through the VAE channel. Within this framework, we explore different properties of the estimated posterior distribution, and highlight the trade-off between the amount of information encoded in a latent code during training, and the generative capacity of the model.
Introduction
Variational Autoencoders (VAEs) are powerful generative models, yet they face significant challenges when applied to text. A primary obstacle is posterior collapse, where the model's decoder—often a powerful autoregressive component like an LSTM—learns to reconstruct text using only local context, effectively ignoring the latent representation ($z$). Mathematically, this results in the Kullback-Leibler (KL) divergence term dropping to zero, rendering the latent space uninformative noise. This paper investigates the dynamics of VAEs by explicitly controlling the KL term, treating it as a "volume knob" for information flow to better understand its impact on text generation.
Methodology: Controlling Channel Capacity
To analyze the role of the KL term, the authors employ a modified $\beta$-VAE objective that imposes a constraint forcing the KL divergence to remain near a target value, $C$:
$$\mathcal{L} = \text{Reconstruction} - \beta |D_{KL}(q_\phi(z|x) || p(z)) - C|$$
In this framework, $C$ represents the "channel capacity"—the maximum information (in nats) the encoder transmits to the decoder. By varying $C$ from 10 to 100, the study precisely observes how the model evolves as the latent representation becomes increasingly dense with input information. This approach successfully prevents posterior collapse by maintaining the KL term within a tight range of the target capacity.
The Reconstruction-Generation Trade-off
A fundamental insight from this study is the trade-off between reconstruction fidelity and generative quality. As channel capacity $C$ increases, the model's ability to reconstruct input text improves significantly, evidenced by lower distortion scores. However, this improvement creates a "reconstruction-generation gap."
As shown in Figure 1, increasing $C$ leads to a more concentrated aggregated posterior that deviates further from the Gaussian prior used during generation. Consequently, at high $C$ values, the decoder becomes hyper-sensitive to specific training codes and struggles to produce coherent text when sampled from random noise. At low $C$, the decoder is "lazy" and insensitive; at high $C$, it becomes fragile, where minor "jitter" in the latent space drastically alters the output.
Qualitative and Quantitative Analysis
The quantitative results across datasets like WebText confirm these findings. Increasing $C$ from 3 to 100 improved BLEU-4 reconstruction scores from approximately 3.35 to 38.71. However, the Forward Cross Entropy (FCE)—a metric for how "human-like" the generated text is—worsened as $C$ increased. This confirms that higher information capacity does not equate to better generative performance.
Qualitative samples (Figure 2) illustrate that while high-capacity models generate diverse text, they often lose the structural coherence found in lower-capacity models. Furthermore, syntactic evaluations on the Wikipedia (WIKI) dataset suggest that while latent codes capture syntactic information (e.g., subject-verb agreement), these signals are often entangled with specific sentence details rather than being represented as clean, global vectors.
Conclusion
This research demonstrates that the KL divergence term is a critical lever in balancing the trade-off between a VAE's ability to memorize and its ability to generalize. While increasing channel capacity improves reconstruction, it simultaneously degrades the model's generative stability. Future work should focus on developing more complex, multi-modal priors to bridge the gap between training and generation distributions, potentially allowing for high-capacity models that remain coherent during synthesis.
Summary updated