Skip to main content
QUICK REVIEW

[Paper Review] Learning Natural Language Inference using Bidirectional LSTM model and Inner-Attention

Yang Liu, Chengjie Sun|arXiv (Cornell University)|May 30, 2016
Topic ModelingComputer Science9 references234 citations
TL;DR

A sentence-encoding based NLI model using a bidirectional LSTM with an inner-attention mechanism to produce refined sentence representations, achieving state-of-the-art SNLI performance among sentence-encoding approaches with a lightweight model.

ABSTRACT

In this paper, we proposed a sentence encoding-based model for recognizing text entailment. In our approach, the encoding of sentence is a two-stage process. Firstly, average pooling was used over word-level bidirectional LSTM (biLSTM) to generate a first-stage sentence representation. Secondly, attention mechanism was employed to replace average pooling on the same sentence for better representations. Instead of using target sentence to attend words in source sentence, we utilized the sentence's first-stage representation to attend words appeared in itself, which is called "Inner-Attention" in our paper . Experiments conducted on Stanford Natural Language Inference (SNLI) Corpus has proved the effectiveness of "Inner-Attention" mechanism. With less number of parameters, our model outperformed the existing best sentence encoding-based approach by a large margin.

Motivation & Objective

  • Motivate and solve recognizing textual entailment (RTE) using a sentence-encoding approach without heavy feature engineering.
  • Propose a two-stage sentence encoding: first a mean-pooled biLSTM representation, then an inner-attention refinement of the same sentence.
  • Employ a Siamese sentence encoder with shared weights and a matching module to classify entailment, contradiction, or neutral.
  • Introduce input modification strategies to further improve performance while keeping a lightweight model.

Proposed method

  • Encode each sentence with a two-stage process: (i) average pooling over word-level biLSTM outputs to get a first-stage sentence vector, (ii) apply an inner-attention mechanism using the first-stage vector to attend to words within the same sentence and obtain a refined representation.
  • Use a Siamese architecture with shared weights for premise and hypothesis encoders; combine the two sentence representations into a relation vector.
  • Apply three matching operations on the sentence representations: concatenation, element-wise product, and element-wise difference, followed by a softmax over a nonlinear projection for classification.
  • Conduct inner-attention with Y being biLSTM outputs, R_ave from mean pooling, and compute attention as M = tanh(W^y Y + W^h (R_ave ⊗ e_L)); α = softmax(w^T M); R_att = Y α^T.
  • Explore four input strategies (Original, Inverting Premises, Doubling Premises, Doubling Hypothesis, Differentiating Inputs) and report their impact on accuracy.
  • Train on SNLI with cross-entropy loss, mini-batch SGD (RMSProp), dropout (0.25), and GloVe 300D embeddings fixed during training; implement in Keras.

Experimental results

Research questions

  • RQ1Can inner-attention on the sentence itself improve sentence-encoding based NLI models without cross-sentence attention?
  • RQ2How does the proposed inner-attention compare to standard mean-pooling encoders and to other baselines on SNLI?
  • RQ3Do input modification strategies further boost performance with a lightweight sentence-encoding model?
  • RQ4What is the impact of model size (parameters) on accuracy for this approach?

Key findings

  • The inner-attention mechanism improves SNLI test accuracy from 83.3% (basic model) to 84.2% (with inner-attention).
  • Differentiating inputs yields further gains to 83.72% (and, in combination with inner-attention, up to 85.0% as reported).
  • The proposed model with inner-attention and input strategies outperforms several state-of-the-art sentence-encoding baselines (e.g., LSTM/GRU encoders, TBCNN, SPINN) while using fewer parameters.
  • Overall, the best single configuration (Diversing Input) reaches 85.0% test accuracy on SNLI, surpassing comparable sentence-encoding models.
  • Inner-attention tends to assign higher weights to content words (nouns, verbs, adjectives), producing more focused sentence representations.

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.