Skip to main content
QUICK REVIEW

[Paper Review] Learning Natural Language Inference with LSTM

Shuohang Wang, Jing Jiang|arXiv (Cornell University)|Dec 30, 2015
Topic ModelingComputer Science19 references62 citations
TL;DR

This paper proposes a match-LSTM (mLSTM) architecture for natural language inference that performs word-by-word matching between hypothesis and premise using attention-weighted representations, enabling the model to selectively remember critical mismatches. The approach achieves 86.1% accuracy on the SNLI dataset, outperforming prior state-of-the-art methods by explicitly capturing word-level mismatches that signal contradiction or neutral relationships.

ABSTRACT

Natural language inference (NLI) is a fundamentally important task in natural language processing that has many applications. The recently released Stanford Natural Language Inference (SNLI) corpus has made it possible to develop and evaluate learning-centered methods such as deep neural networks for natural language inference (NLI). In this paper, we propose a special long short-term memory (LSTM) architecture for NLI. Our model builds on top of a recently proposed neural attention model for NLI but is based on a significantly different idea. Instead of deriving sentence embeddings for the premise and the hypothesis to be used for classification, our solution uses a match-LSTM to perform word-by-word matching of the hypothesis with the premise. This LSTM is able to place more emphasis on important word-level matching results. In particular, we observe that this LSTM remembers important mismatches that are critical for predicting the contradiction or the neutral relationship label. On the SNLI corpus, our model achieves an accuracy of 86.1%, outperforming the state of the art.

Motivation & Objective

  • To address the limitation of sentence embedding-based models in NLI, which treat all word-level matches uniformly and fail to emphasize critical mismatches.
  • To design a neural architecture that performs sequential, word-by-word matching between hypothesis and premise to better capture salient matching patterns.
  • To improve inference accuracy on the SNLI benchmark by leveraging long short-term memory networks to retain important mismatches while forgetting less relevant matches.
  • To analyze the internal behavior of the model, particularly the role of LSTM gates, to validate that it learns to remember key mismatches for contradiction and neutral predictions.

Proposed method

  • The model uses a neural attention mechanism to generate an attention-weighted representation of the premise for each word in the hypothesis.
  • A match-LSTM processes the hypothesis word-by-word, using the attention-weighted premise representation as context at each step.
  • At each time step, the mLSTM computes a hidden state that integrates the current word embedding and the context from the premise, with gates controlling information flow.
  • The final hidden state of the mLSTM is used as a context-aware representation for classifying the relationship as entailment, contradiction, or neutral.
  • The model is trained end-to-end using cross-entropy loss with stochastic gradient descent, using pre-trained word embeddings as input.
  • The architecture is evaluated on the SNLI dataset, with performance measured by overall accuracy on the test set.

Experimental results

Research questions

  • RQ1Can a sequential, word-by-word matching mechanism with an LSTM outperform sentence-level embedding models in natural language inference?
  • RQ2Does the mLSTM architecture effectively learn to remember critical mismatches between premise and hypothesis that signal contradiction or neutral relationships?
  • RQ3How do the internal LSTM gates (forget, input, output) reflect the model’s decision-making process during inference?
  • RQ4To what extent does the model’s performance depend on capturing word-level mismatches rather than overall sentence similarity?

Key findings

  • The mLSTM model achieves 86.1% accuracy on the SNLI test set, surpassing the previous state of the art of 83.5%.
  • The model learns to forget good word-level matches, such as between 'cat' and 'dog', while retaining critical mismatches that signal contradiction or neutral relationships.
  • Analysis of forget gate values shows higher average values (0.536 ± 0.170) for contradiction and (0.507 ± 0.148) for neutral, indicating that mismatches are preserved longer in the sequence.
  • The input and output gates show a positive correlation, suggesting dynamic control of information flow, though no strong pattern was observed in output gates.
  • The model’s behavior confirms that it prioritizes remembering mismatches—especially those involving subject or verb disagreements—over matching content.
  • Preliminary experiments on the smaller SICK dataset showed poor performance, suggesting the model requires large-scale training data to generalize effectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.