Skip to main content
QUICK REVIEW

[Paper Review] Modelling Sentence Pairs with Tree-structured Attentive Encoder

Yao Zhou, Cong Liu|arXiv (Cornell University)|Oct 10, 2016
Topic ModelingComputer Science22 references16 citations
TL;DR

This paper proposes a tree-structured attentive encoder that enhances sentence pair modeling by using one sentence's RNN-encoded representation to guide attention during tree-structured encoding of the other sentence. By integrating attention into dependency parse trees via Child-Sum Tree-LSTM and Tree-GRU, the model achieves state-of-the-art performance on semantic similarity (SICK) and true-false question selection (AI2-8grade), outperforming non-attentive baselines on two tasks with improved generalization on low-ngram-overlap cases.

ABSTRACT

We describe an attentive encoder that combines tree-structured recursive neural networks and sequential recurrent neural networks for modelling sentence pairs. Since existing attentive models exert attention on the sequential structure, we propose a way to incorporate attention into the tree topology. Specially, given a pair of sentences, our attentive encoder uses the representation of one sentence, which generated via an RNN, to guide the structural encoding of the other sentence on the dependency parse tree. We evaluate the proposed attentive encoder on three tasks: semantic similarity, paraphrase identification and true-false question selection. Experimental results show that our encoder outperforms all baselines and achieves state-of-the-art results on two tasks.

Motivation & Objective

  • To improve sentence pair modeling by integrating attention into tree-structured neural networks, moving beyond sequential attention mechanisms.
  • To address the limitation of existing models that treat sentence pairs independently during encoding, by enabling cross-sentence attention during structural encoding.
  • To enhance semantic composition in recursive neural networks by dynamically attending to more relevant subtrees based on the other sentence's representation.
  • To evaluate the model on diverse sentence pair tasks—semantic similarity, paraphrase identification, and question selection—across multiple benchmark datasets.
  • To demonstrate that attention in tree-structured models improves performance and generalization, especially on low-overlap or complex sentence pairs.

Proposed method

  • The model uses a two-stage architecture: first, a sequential RNN (LSTM or GRU) encodes each sentence into a contextual representation.
  • Second, an attentive tree-RNN (Tree-LSTM or Tree-GRU) recursively builds sentence representations from dependency parse trees, using the other sentence’s RNN output as a query for attention.
  • Attention weights are computed over child nodes at each internal node, allowing the model to emphasize semantically relevant subtrees during composition.
  • The attention mechanism is implemented via a compatibility function between the query (other sentence’s representation) and each child’s hidden state.
  • The final sentence representations from both trees are fed into a multilayer perceptron for classification or regression on the sentence pair task.
  • The model is trained end-to-end using cross-entropy or mean squared error loss depending on the task.

Experimental results

Research questions

  • RQ1Can attention be effectively integrated into tree-structured recursive neural networks to improve sentence pair modeling?
  • RQ2Does using one sentence’s representation to guide the structural encoding of the other improve performance on semantic similarity and paraphrase tasks?
  • RQ3How does the attentive tree-encoder generalize compared to non-attentive tree-RNNs, especially on sentence pairs with low n-gram overlap?
  • RQ4Can the model capture subtle semantic relationships in complex or low-overlap sentence pairs better than sequential RNNs or standard tree-RNNs?
  • RQ5What insights can attention weights provide about which syntactic subtrees contribute most to the final representation?

Key findings

  • The proposed attentive tree-encoder achieves state-of-the-art performance on the SICK dataset for semantic similarity, outperforming all non-attentional baselines.
  • On the AI2-8grade dataset for true-false question selection, the model achieves SOTA results, demonstrating strong performance in identifying false questions.
  • The model shows improved generalization on low-ngram-overlap sentence pairs, with Attentive Tree-GRUs outperforming standard Tree-GRUs when n-gram overlap is below 40.
  • Attention visualization reveals that the model focuses on semantically relevant subtrees—e.g., attending more to 'boy' than 'outdoors' when constructing the representation of 'playing'—indicating meaningful attention behavior.
  • The Pearson correlation score on SICK decreases with longer sentences, but the attentive tree-encoder maintains better performance than standard Seq-RNNs and Tree-RNNs, especially when sentence length exceeds 20 tokens.
  • The model fails to correctly identify numerical paraphrases in the MSRP dataset, suggesting limitations in capturing numerical equivalence despite strong performance on semantic similarity.

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.