Abstract
Variational Autoencoders (VAEs) are a cornerstone of generative modeling, yet they face a significant challenge in Natural Language Processing: posterior collapse. This phenomenon occurs when the decoder ignores the latent code, rendering the variational component ineffective. This paper investigates the mathematical role of the Kullback-Leibler (KL) divergence term and proposes a method to explicitly control the information capacity ($C$) of the latent space. Our findings reveal a fundamental trade-off: while higher KL values improve text reconstruction, they can compromise the coherence of generated samples by increasing decoder sensitivity.
Introduction: The Challenge of Posterior Collapse
In a standard VAE, an encoder maps an input sentence to a latent vector ($z$), while a decoder attempts to reconstruct the input from $z$. A KL divergence term is typically used to regularize the latent space against a simple prior. However, powerful text decoders (such as LSTMs) often learn to model the language independently of $z$, leading to posterior collapse where the KL term vanishes. Previous solutions often involved weakening the decoder; this research instead asks if forcing the KL term to a specific target value can resolve the issue without sacrificing decoder power.
Methodology: Controlling Channel Capacity
The researchers employ an extension of the $\beta$-VAE framework, introducing a constraint to the objective function:
$$\mathcal{L} = \text{Reconstruction Loss} - \beta |D_{KL}(q(z|x)||p(z)) - C|$$
Here, $C$ represents the channel capacity, allowing explicit control over the information bottleneck. This approach was tested across three architectures: $\beta_C$-VAE${LSTM}$, $\beta_C$-VAE${GRU}$, and $\beta_C$-VAE$_{CNN}$.
As shown in Figure 1, the training objective effectively manages the trade-off between the information rate (KL) and distortion (reconstruction error) across various encoder-decoder configurations.
Experimental Results
The study evaluated performance across five diverse corpora, including Yelp, Yahoo, and the Children’s Book Test (CBT). A key finding is the linear-like relationship between capacity and reconstruction quality.
As detailed in Table 1, increasing $C$ from 3 to 100 on the CBT dataset resulted in a dramatic improvement in the BLEU-4 reconstruction score, rising from 1.57 to 16.09. The models consistently satisfied the KL constraint, with actual values staying within $\pm 1$ of the target $C$.
Discussion: The Sharpness Trade-off
While increasing $C$ bypasses posterior collapse, it introduces a "sharpness" trade-off. Higher capacity leads to posterior distributions that diverge significantly from the prior. Consequently, the decoder becomes highly sensitive to the latent code. While this allows for more diverse generation, it increases the risk of incoherence when sampling from the prior, as the decoder may not be equipped to handle latent vectors that differ from those seen during training.
Furthermore, while the latent space captures syntactic signals (e.g., subject-verb agreement), these signals are often weak. The ability of a model to distinguish grammatical structures does not always translate to improved generation quality, suggesting that the type of information encoded is as important as the amount.
Conclusion
Explicitly controlling the KL divergence term provides a robust mechanism for training text VAEs without resorting to decoder-weakening heuristics. By dialing the channel capacity $C$, researchers can optimize for either high-fidelity reconstruction or creative, coherent sampling. Future work will explore automated methods for selecting optimal $C$ values and the use of more complex latent priors to better capture the nuances of natural language.
Summary updated