When Are Tree Structures Necessary for Deep Learning of Representations?

Jiwei Li, Thang Luong, Dan Jurafsky, Eduard H. Hovy

Introduction

In the evolution of Natural Language Processing (NLP), a central debate has centered on the optimal way to represent linguistic structure. While language is often processed as a linear sequence of tokens, its underlying nature is inherently hierarchical. This paper provides a rigorous "apples-to-apples" comparison between recursive (tree-structured) and recurrent (sequential) neural networks across several diverse NLP tasks. The goal is to determine if the added complexity and computational cost of explicit tree structures are necessary for high-quality representation learning.

Problem Statement

By the mid-2010s, two paradigms dominated: Recurrent Neural Networks (RNNs), which process text linearly, and Recursive Neural Networks, which operate over hierarchical syntactic parse trees. Proponents of recursive models argue that trees are essential for capturing complex semantics, such as negation and long-distance dependencies. However, recursive models are computationally expensive and depend on the accuracy of external parsers. This study investigates whether sequential models can match the performance of tree-based architectures when controlled for hyperparameters and training conditions.

Methodology

The researchers benchmarked several architectures, including standard RNNs, LSTMs, and Bi-directional LSTMs against Tree-RNNs and Tree-LSTMs. To ensure a fair comparison, all models utilized identical vector dimensions, optimization algorithms (AdaGrad), and initialization strategies.

A key challenge in this comparison is the difference in data labeling. Recursive models often utilize phrase-level labels from datasets like the Stanford Sentiment Treebank (SST). To maintain parity, the authors transformed these tree-structured labels into token sequences suitable for recurrent models.

Mapping phrase-level sentiment labels from a parse tree to a sequential format for recurrent models.

Additionally, the authors introduced a Hierarchical Sequence Model. This hybrid approach segments sentences into "clause-like" units based on punctuation, processes them with a sequential LSTM, and aggregates the results. This tests whether the benefit of trees stems from syntactic branching or simply from breaking long sequences into manageable chunks.

Datasets and Tasks

The models were evaluated on four distinct tasks:

  1. Sentiment Classification: Using the Stanford Sentiment Treebank (SST) and the Pang movie review dataset.
  2. Question-Answer Matching: Factoid questions from the UMD-QA dataset.
  3. Semantic Relation Classification: Identifying relationships between entities (SemEval-2010 Task 8).
  4. Discourse Parsing: Identifying rhetorical relations between clauses in the RST-DT corpus.

Analysis of Structural Advantages

The study revealed that the necessity of tree structures is highly task-dependent. The most significant advantage for recursive models appeared in Semantic Relation Extraction. In a tree structure, a verb and its distant object may be separated by only a few "hops," whereas a sequential model must bridge dozens of intervening tokens.

Structural representation of a semantic relation task in recursive vs. recurrent models.

Conversely, for tasks with short sequences, such as Discourse Parsing (where units average ~7 words), sequential models performed adequately. Furthermore, on datasets with sparse supervision (sentence-level labels only), tree models showed no significant advantage, suggesting they rely on fine-grained, phrase-level labels to learn effective compositionality.

Key Results

  • Relation Classification: Recursive models achieved a clear victory, with the Tree-LSTM reaching 0.767 accuracy, outperforming the Bi-LSTM (0.752) and standard LSTM (0.740).
  • Sentiment Analysis (SST): The performance gap was much narrower. The Tree-LSTM (50.4%) was only marginally better than the Bi-LSTM (49.8%). Notably, the authors' Hierarchical Sequence model slightly outperformed the Tree-LSTM at 50.7%, suggesting that simple clausal segmentation can mimic the benefits of full syntactic parsing.
  • QA Matching: Tree models held a negligible edge (0.558 vs 0.546), indicating that pooling information from all hidden states in a sequence is a robust alternative to tree-based aggregation.

Conclusion and Future Work

The findings suggest that while tree structures are superior for modeling specific long-distance dependencies, their advantages in many general NLP tasks can be matched by simpler sequential models that incorporate basic segmentation. The primary limitations of recursive models remain their dependence on parser accuracy and computational overhead. Future research may focus on whether deep, multi-layer sequential models can implicitly discover these recursive structures without the need for explicit syntactic supervision.

Summary updated

BibTeX
@inproceedings{li2015when,
  author = {Jiwei Li and Thang Luong and Dan Jurafsky and Eduard H. Hovy},
  title = {{When Are Tree Structures Necessary for Deep Learning of Representations?}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2015},
  doi = {10.18653/v1/d15-1278},
}
Figure