Abstract
Traditional text matching models often struggle with information loss during encoding, especially when dealing with long sequences or mismatched lengths. This paper introduces TIM (Text matching with Deep InfoMax), a framework that maximizes the Mutual Information (MI) between raw text inputs and their learned representations. By incorporating a discriminator to ensure encoders retain comprehensive local and global information, TIM achieves state-of-the-art results across various benchmarks without the need for massive external pretraining.
Introduction
Text matching is a fundamental task for search engines, chatbots, and question-answering systems, where the goal is to determine the relationship between two sequences. However, deep learning encoders frequently "forget" or compress away crucial details in long sequences. Furthermore, bridging the "information gap" when matching short queries against long documents remains a significant challenge. While large-scale pretrained models like BERT mitigate some of these issues, they are computationally expensive. TIM offers a more efficient, self-contained alternative by focusing on the statistical dependence between input and output.
Methodology: Text Matching with Deep InfoMax (TIM)
The core of the TIM framework is the integration of Deep InfoMax (DIM) into a base text-matching architecture (specifically RE2). The system treats the matching network as an encoder and adds a discriminator to distinguish between "real" pairs (an input and its actual representation) and "fake" pairs (an input and a representation from a different text).
To accommodate varying text lengths and structures, the authors proposed two distinct feature extraction modes:
- TIM-W (Word Mode): Optimized for short texts, this mode extracts feature maps based on individual word embeddings to preserve fine-grained semantic details.
- TIM-S (Segment Mode): Designed for long-form documents, this mode divides text into fixed-size segments (word index blocks). This approach reduces computational complexity while maintaining the structural "flow" of lengthy articles.
By maximizing Local Mutual Information, the model ensures that the final "global" representation remains highly correlated with every small patch or segment of the input, preventing the encoder from ignoring critical parts of the text.
Evaluation and Benchmarks
The model was rigorously evaluated on five diverse benchmarks:
- SNLI & SciTail: Natural Language Inference and science question entailment.
- Quora: Paraphrase identification.
- WikiQA: Retrieval-based question answering.
- Harvard News: A challenging dataset requiring the matching of short titles to long-form news articles (often exceeding 1000 words).
Key Insights
- MI as a Quality Metric: Mutual Information serves as a powerful regularizer, quantifying how much source content is preserved in the final vector and preventing over-simplification.
- Local-Global Synergy: Maximizing MI between the whole text and the final vector is insufficient. Forcing the final vector to also match "local" patches leads to more robust and comprehensive representations.
- Efficiency: TIM improves performance by maximizing the utility of the current training data, offering a high-performance alternative to "heavy" pretrained models.
Results and Discussion
TIM-W demonstrated state-of-the-art or competitive performance on short-text tasks like SNLI (88.9% accuracy) and Quora (89.6%). However, the most significant gains were observed in long-form matching.
On the Harvard News dataset, TIM-S achieved a remarkable 96.59% accuracy, a substantial improvement over the baseline RE2 model's 93.18%. Beyond accuracy, TIM-S proved to be significantly faster for long documents by processing indices in segments rather than high-dimensional embeddings for every word.
Limitations and Future Directions
The performance of TIM is sensitive to hyperparameters such as the number of feature maps ($M$) and segment size ($D$). Excessive values can lead to sparse feature maps, hindering pattern recognition. Future research will explore advanced feature extraction methods and the application of MI neural estimation to other NLP tasks like text generation and summarization.
Summary updated