Long Short-Term Memory Over Tree Structures

Xiaodan Zhu, Parinaz Sobhani, Hongyu GuoarXiv 2015

Abstract: The chain-structured long short-term memory (LSTM) has showed to be effective in a wide range of problems such as speech recognition and machine translation. In this paper, we propose to extend it to tree structures, in which a memory cell can reflect the history memories of multiple child cells or multiple descendant cells in a recursive process. We call the model S-LSTM, which provides a principled way of considering long-distance interaction over hierarchies, e.g., language or image parse structures. We leverage the models for semantic composition to understand the meaning of text, a fundamental problem in natural language understanding, and show that it outperforms a state-of-the-art recursive model by replacing its composition layers with the S-LSTM memory blocks. We also show that utilizing the given structures is helpful in achieving a performance better than that without considering the structures.

Introduction

Standard Long Short-Term Memory (LSTM) networks have achieved remarkable success in sequence modeling tasks like speech recognition and machine translation. Their gating mechanisms effectively manage long-range dependencies by preventing gradient vanishing. However, many data types, particularly natural language, possess an inherent hierarchical structure. A sentence is better represented as a nested tree of phrases rather than a simple linear sequence.

While Recursive Neural Networks (RvNNs) were developed to process such structures, they often struggle with depth, failing to propagate information effectively from leaf nodes to the root. This paper introduces the S-LSTM, an extension of the LSTM architecture designed to operate over tree structures, providing a principled approach to capturing long-distance interactions within hierarchies.

The S-LSTM Architecture

The fundamental innovation is the S-LSTM memory block. Unlike a standard LSTM cell that receives input from a single previous time step, an S-LSTM node integrates information from multiple child nodes. In the case of binary parse trees, a node receives hidden and cell states from its left and right children.

Key components of the S-LSTM include:

  • Multiple Forget Gates: The model employs separate forget gates ($f_t^L$ and $f_t^R$) for each child. This allows the network to independently regulate the flow of information from different branches of the tree.
  • Cell State Integration: The current cell state ($c_t$) is computed as a weighted sum of the children's cell states, modulated by their respective forget gates, combined with the new input.
  • Gated Copying: This mechanism enables the network to "copy" semantically significant information from distant leaf nodes directly to the root, effectively bypassing noise in intermediate nodes.
The S-LSTM memory block architecture, illustrating the integration of hidden and cell states from left and right children.

The model is trained using Backpropagation Over Structures (BPS), ensuring accurate error attribution through the specific topology of the input tree.

Experimental Setup

The S-LSTM was evaluated on the Stanford Sentiment Treebank (SST), which contains approximately 11,800 movie review sentences parsed into trees. Every node in these trees is manually annotated with a sentiment score ranging from very negative to very positive. The task requires predicting sentiment at both the phrase level and the root (sentence) level.

Key Insights and Results

The experiments yielded several critical insights into the performance and robustness of the S-LSTM:

Superiority of Tree Structures

Comparing S-LSTM against versions that ignore tree structure (e.g., left-to-right processing) demonstrated that explicit hierarchical priors significantly enhance the model's ability to understand complex semantics.

Robustness to Depth

A significant advantage of the S-LSTM is its resilience to increasing tree depth. While traditional recursive models often degrade as structures become deeper, the S-LSTM's gating mechanism successfully mitigates the vanishing gradient problem.

Accuracy vs. tree depth, showing S-LSTM's superior performance on deep structures compared to the RNTN baseline.

Performance and Efficiency

S-LSTM achieved state-of-the-art results on the SST at the time of publication, with a root accuracy of 48.0% (outperforming RNTN's 45.7%) and a phrase accuracy of 81.9%. Notably, S-LSTM has fewer parameters than the Recursive Neural Tensor Network (RNTN) and converges much faster. For phrase-level tasks, S-LSTM began to converge in roughly 20 minutes, compared to over 180 minutes for RNTN.

In scenarios with low supervision—where only root labels were provided for training—S-LSTM significantly outperformed competitors, reaching 43.5% accuracy versus RNTN's 29.1%.

Conclusion

The S-LSTM successfully brings the robust memory management of LSTMs to hierarchical data. By effectively handling long-distance interactions and maintaining performance across deep structures, it represents a significant advancement in recursive modeling for natural language understanding.

Summary updated

BibTeX
@misc{zhu2015long,
  author = {Xiaodan Zhu and Parinaz Sobhani and Hongyu Guo},
  title = {{Long Short-Term Memory Over Tree Structures}},
  year = {2015},
  eprint = {1503.04881},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1503.04881},
}
Figure