Dependency-based Convolutional Neural Networks for Sentence Embedding

Mingbo Ma, Liang Huang, Bing Xiang, Bowen Zhou · DOI

TL;DR

This paper introduces Dependency-based Convolutional Neural Networks (DCNNs) that leverage linguistic dependency trees to capture long-range word relationships, overcoming a key limitation of traditional sequential CNNs in NLP. By incorporating ancestor and sibling information from parse trees, DCNNs achieve state-of-the-art results on sentiment and question classification tasks, notably outperforming previous benchmarks on the TREC dataset.

What Problem Does This Paper Address?

Convolutional Neural Networks (CNNs) have become a powerful tool for Natural Language Processing (NLP), achieving impressive results in tasks like sentiment analysis and question classification. However, standard CNNs process text sequentially, treating sentences as linear sequences of words. This approach inherently struggles to capture long-distance dependencies between words, which are crucial for understanding nuances like negation, subordination, and complex sentence structures. While some prior work has attempted to incorporate syntactic information, it has often yielded inconsistent improvements and hasn't become mainstream. This paper aims to bridge this gap by proposing a CNN architecture that explicitly leverages the structural information from dependency parse trees to better model sentence meaning.

Methods

The core innovation is the Dependency-based Convolutional Neural Network (DCNN). Unlike standard CNNs that use sequential n-grams, DCNNs operate on "tree-based n-grams" derived from dependency parse trees.

  • Ancestor Paths: For each word, the model concatenates its vector with those of its ancestors up to a certain depth in the dependency tree. This allows the model to directly consider relationships between a word and its parent, grandparent, etc.
  • Sibling Information: To further enrich the structural representation, the model also incorporates information from a word's siblings in the dependency tree.
  • Combined Model: The authors propose combining representations from ancestor paths, sibling information, and traditional sequential n-grams. This is achieved by concatenating the feature vectors generated by each component before feeding them into a final fully connected layer.
  • Max-Over-Tree Pooling: Similar to max-over-time pooling in sequential CNNs, this technique selects the maximum activation across the entire feature map generated by a filter, effectively capturing the most salient structural pattern detected by that filter.
  • Dropout: Standard dropout is applied to the penultimate layer to prevent overfitting.

Datasets

The proposed DCNN model was evaluated on three benchmark datasets:

  • Movie Review (MR): A binary sentiment analysis dataset.
  • Stanford Sentiment Treebank (SST-1): A sentiment analysis dataset with fine-grained labels (very positive, positive, neutral, negative, very negative).
  • TREC: A question classification dataset.

The authors mention using the Stanford parser to obtain dependency parse trees for all datasets. They also note that for MR, they used 10% of the training data for early stopping due to the absence of a development set.

Key Insights and Ideas

  • Linguistic Structure Matters: The paper strongly advocates for the importance of linguistic structure (dependency trees) in NLP tasks, demonstrating that it can significantly enhance the performance of neural models.
  • Beyond Surface-Level: By moving beyond surface-level sequential n-grams, DCNNs can capture crucial long-distance relationships that are often missed by traditional CNNs, leading to better understanding of sentence semantics.
  • Simplicity and Effectiveness: The proposed dependency-based convolution is presented as a "very simple" yet effective extension to existing CNN architectures, making it relatively easy to implement and integrate.
  • Complementary Information: Combining structural information (ancestors, siblings) with sequential information proves to be more powerful than using either alone, suggesting that different types of features capture complementary aspects of sentence meaning.

Key Results

  • Superior Performance: DCNNs consistently outperformed baseline sequential CNNs across all three tested datasets.
  • State-of-the-Art on TREC: The DCNN model achieved the highest published accuracy on the TREC dataset, surpassing even models that used extensive hand-engineered features.
  • Sentiment Analysis: On the SST-1 dataset, the DCNN achieved an accuracy of 49.5%, ranking second only to Irsoy and Cardie (2014).
  • Question Classification: The DCNNs showed significant improvements on the TREC dataset, with the combined model achieving the best performance among published results.

Limitations and Future Work

  • Dependency Parse Quality: The authors acknowledge that the performance of DCNNs can be affected by the quality of the dependency parse trees. Parsing errors, especially in noisy or informal text (like some online reviews), can negatively impact classification accuracy.
  • Data Sparsity: While word embeddings help alleviate data sparsity issues with tree n-grams, they still remain sparser than surface n-grams.
  • Overfitting with Combined Model: The paper notes that the combined model (ancestor+sibling+sequential) might suffer from overfitting on the training data in some cases.
  • Future Work: The paper implicitly suggests that further exploration of different tree-based convolution patterns and combinations could yield even better results. The authors also mention that their implementation is available, encouraging further research in this direction.

Summary updated

BibTeX
@inproceedings{ma2015dependency,
  author = {Mingbo Ma and Liang Huang and Bing Xiang and Bowen Zhou},
  title = {{Dependency-based Convolutional Neural Networks for Sentence Embedding}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-2029},
}
Figure