Abstract
SentenceMIM is a probabilistic auto-encoder for language data, trained with Mutual Information Machine (MIM) learning to provide a fixed-length representation of variable-length language observations. Previous attempts to learn Variational Auto-encoders (VAEs) for language data faced challenges due to posterior collapse. MIM learning encourages high mutual information between observations and latent variables and is robust against posterior collapse. As such, it learns informative representations whose dimension can be an order of magnitude higher than existing language VAEs. Importantly, the SentenceMIM loss has no hyper-parameters, simplifying optimization. SentenceMIM yields excellent reconstruction, comparable to Auto-encoders (AEs), with a rich structured latent space comparable to VAEs. The structured latent representation is demonstrated with interpolation between sentences of different lengths and through zero-shot performance on question-answering tasks.
Introduction: The Challenge of Posterior Collapse
In computer vision, Latent Variable Models (LVMs) like VAEs are staples for learning compressed representations that facilitate image interpolation and generation. However, achieving similar success in Natural Language Processing (NLP) has been historically difficult due to a phenomenon called posterior collapse.
In text models, the decoder is typically auto-regressive (predicting the next word based on previous ones). If the decoder becomes sufficiently powerful, it can learn to model the data distribution while ignoring the latent code provided by the encoder. Consequently, the encoder "gives up," and the latent space becomes useless noise. Traditional solutions involve complex heuristics like "KL-annealing" or "warm-up" periods. SentenceMIM addresses this fundamentally through a different learning objective.
Methodology
SentenceMIM replaces the standard VAE Evidence Lower Bound (ELBO) with the Mutual Information Machine (MIM) objective.
The MIM Objective
While VAEs minimize the marginal cross-entropy of observations, MIM minimizes the cross-entropy between the sample distribution and the model's encoding/decoding distributions. This formulation naturally maximizes the mutual information between the observation $x$ and its latent representation $z$. To ensure computational efficiency, the authors utilize A-MIM, a variant that uses an encoding sample distribution to make training tractable and efficient for sequential data.
Architecture and Optimization
The model employs a standard GRU-based encoder-decoder architecture. A significant advantage of the SentenceMIM loss is that it contains no hyper-parameters (unlike the $\beta$ parameter in VAEs), which removes the need for delicate balancing between reconstruction and regularization during optimization.
Key Insights: A Structured and Informative Latent Space
SentenceMIM bridges the gap between the high reconstruction accuracy of standard Auto-encoders (AEs) and the structured latent manifolds of VAEs.
As illustrated above, VAEs often suffer from overlapping latent distributions that lead to "blurry" or collapsed representations where different inputs map to the same latent region. Standard AEs provide precise point estimates but lack a coherent global structure. SentenceMIM (MIM) produces tight, non-overlapping clusters, preserving both the identity of individual samples and the semantic relationships between them. This allows the model to scale to 512 or 1024 latent dimensions, whereas traditional text VAEs often collapse beyond 32 dimensions.
Experimental Results
The model was evaluated on several standard benchmarks, including Penn Tree Bank (PTB), Yahoo Answers, Yelp15, and WikiText-103.
Reconstruction and Information Density
SentenceMIM demonstrates significantly higher information density than VAEs. On the PTB dataset, SentenceMIM (512D) achieved a BLEU score of 0.679, compared to just 0.116 for a standard VAE. This indicates the decoder is actively utilizing the latent code for reconstruction rather than relying solely on its auto-regressive properties.
The histograms show that SentenceMIM maintains a much clearer separation in likelihood between matching and non-matching latent-observation pairs. In the VAE, the distributions overlap significantly, indicating that the latent code is less distinctive for specific inputs.
Zero-Shot Question Answering
The versatility of the learned representations was tested on a zero-shot Question Answering task (YahooCQA). Without any fine-tuning, a pre-trained 1024D SentenceMIM model achieved a P@1 of 0.757 and an MRR of 0.863, outperforming specialized single-task models. This suggests that the latent space captures deep semantic features suitable for transfer learning without the need for task-specific training.
Conclusion
SentenceMIM successfully rescues latent variable models for text by leveraging the MIM objective to prevent posterior collapse. It provides a robust, hyper-parameter-free framework for learning high-dimensional, semantically rich sentence embeddings that excel in both reconstruction and downstream transfer tasks.
Summary updated