NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks

Kai Sheng Tai, Richard Socher, Christopher D. Manning

Abstract

Standard Long Short-Term Memory (LSTM) networks are limited by their linear processing of sequential data, which often fails to capture the inherent hierarchical structure of natural language. This paper introduces the Tree-LSTM, a generalization of the LSTM architecture that allows for information flow across arbitrary tree structures. By incorporating multiple forget gates—one for each child node—the Tree-LSTM can selectively aggregate information from syntactic subtrees. Our experiments on sentiment classification and semantic relatedness tasks show that Tree-LSTMs achieve state-of-the-art performance, demonstrating that structural topology is a critical component for deep learning in natural language processing.

Introduction

While sequential LSTMs have proven effective for many NLP tasks, they treat language as a flat chain of tokens. However, natural language is inherently hierarchical: words combine into phrases, which in turn form clauses. In a linear model, the distance between related words (e.g., a negation and its target) can be large, leading to potential information loss over long sequences. The Tree-LSTM addresses this by aligning the network's computational graph with the sentence's syntactic structure, reducing the maximum path between nodes and facilitating better long-range dependency modeling.

Methodology

The authors propose two primary architectures: the Child-Sum Tree-LSTM, suitable for unordered trees like dependency parses, and the N-ary Tree-LSTM, designed for trees with a fixed branching factor like constituency parses.

The Gating Mechanism

The core innovation of the Tree-LSTM is the modification of the standard LSTM gating mechanism. Unlike the sequential LSTM which has a single forget gate, the Tree-LSTM unit features a separate forget gate for each child.

Detailed diagram of a Tree-LSTM unit showing multiple forget gates ($f_2, f_3$) for child nodes.

This allows the model to selectively incorporate or ignore information from specific subtrees. For instance, the model can learn to prioritize the "head" of a phrase while down-weighting auxiliary modifiers, effectively acting as a soft-attention mechanism over the tree structure.

Experimental Evaluation

The models were evaluated on two major benchmarks: the Stanford Sentiment Treebank (SST) for fine-grained sentiment classification and the Sentences Involving Compositional Knowledge (SICK) dataset for semantic relatedness and entailment.

Key Results

The Tree-LSTM variants consistently outperformed standard sequential LSTMs and previous recursive neural network models. On the SST fine-grained task, the Constituency Tree-LSTM achieved 51.0% accuracy, significantly beating the standard LSTM (46.4%). On the SICK dataset, the Dependency Tree-LSTM reached a Pearson’s $r$ of 0.8676.

Accuracy vs. sentence length on the Stanford Sentiment Treebank, showing Tree-LSTM's robustness to longer sequences compared to standard LSTMs.

A critical finding is the model's efficiency on length. As shown in the performance metrics, while standard LSTMs degrade as sentences get longer, Tree-LSTMs maintain high performance because their "memory path" remains short (logarithmic relative to sentence length).

Conclusion

The Tree-LSTM demonstrates that incorporating linguistic structure into neural architectures leads to superior semantic representations. While the model currently relies on external parsers and presents challenges for parallelization, it sets a new standard for capturing the compositional nature of language. Future work may explore models that learn optimal tree structures dynamically during training.

Summary updated

BibTeX
@inproceedings{tai2015improved,
  author = {Kai Sheng Tai and Richard Socher and Christopher D. Manning},
  title = {{Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-1150},
}
Figure