Compositional Distributional Semantics with Long Short Term Memory

Phong Le, Willem H. Zuidema · DOI

TL;DR

This paper introduces an extension of Recursive Neural Networks (RNNs) called LSTM-RNN, which leverages the Long Short-Term Memory (LSTM) architecture to better capture long-range dependencies in compositional semantics. By incorporating an LSTM's memory cell into the RNN's hierarchical structure, LSTM-RNN significantly improves performance on sentiment analysis tasks compared to traditional RNNs.

What Problem Does This Paper Address?

Traditional approaches to compositional semantics, which aim to derive the meaning of phrases and sentences from the meanings of their constituent words, face two main challenges: defining appropriate composition functions and learning their parameters from data. While neural networks, particularly Recursive Neural Networks (RNNs), have shown promise, they struggle with the "vanishing gradient problem." This issue causes errors to shrink exponentially during backpropagation in deep trees, making it difficult to learn long-range dependencies where information from lower parts of a sentence needs to influence higher-level interpretations. This paper addresses this by proposing a novel RNN architecture that can retain information over longer distances.

Methods

The core innovation is the LSTM-RNN model. This model integrates the Long Short-Term Memory (LSTM) architecture into the existing Recursive Neural Network (RNN) framework.

  • Recursive Neural Network (RNN): The paper first explains the standard RNN, which recursively applies the same weight matrices at each inner node of a parse tree to compute representations of phrases and sentences. This is done in a bottom-up manner.
  • Long Short-Term Memory (LSTM): The paper then introduces the LSTM, a type of recurrent neural network designed to overcome the vanishing gradient problem. LSTMs use a "memory cell" and "gates" (input, forget, and output) to control the flow of information, allowing them to store and retrieve information over extended periods.
  • LSTM-RNN: The proposed LSTM-RNN extends the RNN by incorporating an LSTM cell at each internal node of the parse tree. Crucially, this LSTM cell not only uses the outputs of its children but also their memory cell states. This allows information to be stored and passed up the tree more effectively, addressing the vanishing gradient problem and enabling the capture of long-range dependencies. The paper details the specific equations for how the gates and memory cells interact within the hierarchical structure.

Datasets

The primary dataset used is the Stanford Sentiment Treebank.

  • This dataset contains 215,154 phrases from 11,855 sentences, annotated with 5-way fine-grained sentiment labels (very negative, negative, neutral, positive, very positive).
  • A standard split is provided: 8544 sentences for training, 1101 for development, and 2210 for testing.
  • The treebank also supports binary sentiment classification (positive, negative) by removing neutral labels.

Key Insights and Ideas

  • LSTM as a Memory for Composition: The key insight is that the LSTM's memory cell can act as a persistent store of information within the hierarchical structure of an RNN. This allows the network to "remember" information from lower levels of the parse tree and utilize it much later at higher levels, directly tackling the vanishing gradient problem.
  • Improved Long-Range Dependency Capture: By retaining information in the memory cell, the LSTM-RNN can better capture dependencies between words or phrases that are far apart in a sentence, which is crucial for understanding complex linguistic structures and nuances.
  • Flexibility in Information Flow: The gating mechanisms of the LSTM (input and forget gates) provide fine-grained control over how information from child nodes is incorporated into the parent node's representation and how the parent's memory is updated. This allows the model to dynamically decide what information is important to retain or discard.
  • Word Embeddings Matter: The experiments highlight the significant impact of word embeddings. Using better pre-trained embeddings (300-D GloVe) substantially improved the LSTM-RNN's performance, suggesting that the quality of the initial word representations is critical for downstream compositional tasks.

Key Results

  • Superior Performance: The LSTM-RNN model consistently outperformed the traditional RNN model on both fine-grained and binary sentiment classification tasks across various activation functions (tanh, softsign, sigmoid).
  • Tanh Activation: The tanh activation function generally yielded the best results for the LSTM-RNN, aligning with common practices in LSTM research.
  • Comparison with Other Models: When compared against other state-of-the-art models (CNN, DCNN, PV, DRNN), the LSTM-RNN with 300-D GloVe embeddings achieved competitive results, performing on par with DRNN in fine-grained tasks and CNN in binary tasks.
  • Efficiency: Despite its increased complexity, the LSTM-RNN model was found to be fast to train and evaluate, taking about 10 minutes to train on a modern computer for the given dataset size.

Limitations and Future Work

  • Dropout and Memory Corruption: The paper notes that applying dropout directly to the LSTM-RNN architecture did not work well, potentially corrupting the memory cell and hindering training. This suggests that standard dropout might not be directly compatible with memory-based architectures.
  • Comparison with DRNN and Dropout: The authors acknowledge that their LSTM-RNN (without 300-D GloVe embeddings) performed worse than DRNN, which benefited significantly from dropout. Future work could explore methods to integrate dropout-like regularization techniques that do not corrupt the LSTM memory, potentially boosting performance further.
  • Further Improvements: The paper suggests that finding a method similar to dropout that doesn't corrupt the LSTM memory could lead to significant performance gains and is a promising direction for future research.

Summary updated

BibTeX
@inproceedings{le2015compositional,
  author = {Phong Le and Willem H. Zuidema},
  title = {{Compositional Distributional Semantics with Long Short Term Memory}},
  booktitle = {SEM @ NAACL},
  year = {2015},
  doi = {10.18653/v1/s15-1002},
}
Figure