REGMAPR - Text Matching Made Easy

Siddhartha BrahmaarXiv 2018

Abstract

REGMAPR demonstrates that complex inter-sentence attention mechanisms are not strictly necessary for achieving state-of-the-art results in text matching tasks. By augmenting word embeddings with simple binary features for exact and paraphrase matches and applying heavy regularization, this Siamese architecture rivals much more complex models across six major NLP benchmarks.

Introduction

Text matching—determining the relationship between two sentences (e.g., paraphrase detection or textual entailment)—is a cornerstone of natural language processing. Currently, the highest-performing models rely on inter-sentence attention mechanisms to find dependencies between sentence pairs. However, these mechanisms come at a cost: high parameter counts, increased computational complexity, and difficult training.

This paper explores whether a simpler "Siamese" architecture, where each sentence is encoded independently, can reach the same performance levels if it is properly regularized and given basic "hints" about how the two sentences overlap.

Methodology

The proposed model, REGMAPR, is built on a standard Siamese foundation but introduces two key strategies to bypass the need for complex attention:

Feature Augmentation

Instead of relying on the model to discover word overlaps through deep layers, REGMAPR adds two binary features directly to the word embeddings:

  • Matching Feature (MA): A binary indicator of whether the exact word appears in the other sentence.
  • Paraphrase Feature (PR): A binary indicator of whether a paraphrase of the word (sourced from the external Paraphrase Database, PPDB) appears in the other sentence.

Robust Regularization

To prevent overfitting, especially on smaller datasets, the model employs three distinct types of dropout:

  • Locked Dropout: Applying the same dropout mask across all words in a sentence.
  • Recurrent Dropout: Dropping connections within the hidden-to-hidden weights of the BiLSTM.
  • Standard Dropout: Applied after the final ReLU activation layer.
The REGMAPR Siamese architecture with feature augmentation and multiple dropout layers.

The encoder consists of a bidirectional LSTM (BiLSTM) with max-pooling that converts the augmented embeddings into a fixed-length vector. These vectors are then compared using element-wise absolute difference and product before being fed into a final classification layer.

Experimental Results

The model was evaluated on six diverse datasets covering three distinct tasks: Textual Entailment (SNLI, SICK-E), Paraphrase Detection (MSRP, QUORA), and Semantic Relatedness (SICK, STSB).

REGMAPR achieved impressive results, proving that simplicity does not equate to weakness:

  • SNLI: Achieved 86.8% accuracy, setting a new state-of-the-art for models that do not use inter-sentence attention.
  • SICK (Semantic Relatedness): Achieved a Pearson correlation of 0.8864, a new state-of-the-art overall, outperforming even complex tree-based and attention-heavy models.
  • QUORA: Reached 88.64% accuracy, outperforming several models that use sophisticated attention mechanisms.
Percentage improvement across datasets when adding regularization and features (MA, PR).

Discussion

The success of REGMAPR highlights several key insights:

  1. Simplicity is Underestimated: The "base" model already performs surprisingly well, suggesting that researchers often jump to complex attention mechanisms prematurely.
  2. Binary Features as "Cheap" Attention: The MA and PR features provide the model with the "what matches where" information that attention usually provides, but with significantly lower computational overhead ($O(N)$ vs $O(N^2)$).
  3. Regularization is the Great Equalizer: Proper regularization allows a vanilla BiLSTM to match the performance of specialized architectures. The gains from regularization were particularly pronounced when combined with the PR feature.

Conclusion

While REGMAPR is highly efficient and effective, it remains dependent on the quality of external paraphrase databases like PPDB. Furthermore, the Siamese "bottleneck" (encoding sentences into fixed-length vectors) may eventually limit performance on extremely long or complex sentences compared to full cross-attention models. Future work will explore more sophisticated matching heuristics and ways to infuse deeper semantic information directly into word embeddings.

Summary updated

BibTeX
@misc{brahma2018regmapr,
  author = {Siddhartha Brahma},
  title = {{REGMAPR - Text Matching Made Easy}},
  year = {2018},
  eprint = {1808.04343},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.04343},
}
Figure