Dependency-based Convolutional Neural Networks for Sentence Embedding

Mingbo Ma, Liang Huang, Bowen Zhou, Bing Xiang

Introduction

Traditional Convolutional Neural Networks (CNNs) have become a staple in Natural Language Processing (NLP) due to their ability to extract local features through sliding windows (n-grams). However, these models inherently possess a "surface-level" bias, treating sentences as linear sequences of words. This approach often fails to capture the hierarchical, nested structure of human language. Long-distance dependencies—such as a negation modifying a verb several words away—are frequently lost in standard CNN architectures unless prohibitively large window sizes are used, which in turn leads to data sparsity and overfitting.

To address this, the research introduces Dependency-based Convolutional Neural Networks (DCNNs). By performing convolutions over paths within a dependency parse tree rather than linear sequences, DCNNs can directly model syntactic relationships, effectively bridging the gap between deep learning and formal linguistics.

The Challenge of Linear Sequences

In a standard CNN, the relationship between words is determined by their proximity in the surface string. Consider the sentence: "Despite the film's shortcomings, the stories are quietly moving."

Example of a dependency parse tree showing syntactic relationships.

As illustrated in the dependency tree above, the word "moving" is syntactically related to "stories" and "Despite," even though they are separated by several words in the linear sequence. A standard CNN might struggle to link these concepts without a very wide filter. DCNNs, by contrast, operate on the tree structure where these related terms are often just one or two "hops" away, regardless of the surface distance.

Methodology: Convolving Over Trees

The core innovation of the DCNN is the transition from surface n-grams to tree-based n-grams. The model employs two primary types of tree-based convolutions:

  1. Ancestor Paths: For any given word $m$, the filter considers the word itself and its ancestors in the dependency tree (parent $h$, grandparent $g$, etc.). This allows the model to capture the "structural backbone" of a sentence, ignoring intervening modifiers like adjectives or parenthetical clauses.
  2. Sibling Groups: To capture horizontal relationships, such as those found in conjunctions or lists, the model convolves over a word's siblings within the tree.
Patterns for ancestor paths and sibling convolutions with varying window sizes (n).

As shown in the patterns above, these operations allow the network to learn features based on syntactic roles. After these convolutions, the model applies Max-Over-Tree Pooling, identifying the most salient features across the entire hierarchical structure. The final architecture typically combines these tree-based features with standard sequential n-gram features to ensure that local word-order context is preserved alongside global syntactic context.

Experimental Evaluation

The DCNN was benchmarked against several standard datasets, including sentiment analysis (MR and SST-1) and question classification (TREC and TREC-2).

Key Results

The model demonstrated significant improvements over sequential baselines, particularly in tasks where syntax is paramount. On the TREC dataset, the DCNN achieved a state-of-the-art accuracy of 95.6%.

The "backbone advantage" is most evident in question classification. For a query like "What is Hawaii's state flower?", a linear CNN might focus on "Hawaii" and "state," potentially misclassifying the target as a "Location." A DCNN follows the dependency path from the interrogative "What" directly to the head noun "flower," correctly identifying the category as an "Entity."

Discussion and Limitations

While DCNNs offer a powerful way to incorporate syntax, they are not without drawbacks. The model's performance is heavily dependent on the quality of the underlying dependency parser. In informal contexts—such as social media or movie reviews where grammar is often irregular—parser errors can introduce "noise," leading to diminished gains compared to formal text. Furthermore, the computational overhead of processing tree structures is higher than that of simple linear convolutions.

Conclusion

Dependency-based CNNs represent a significant step toward more linguistically-informed deep learning models. By leveraging the inherent structure of language through tree-based convolutions and dense word embeddings, DCNNs overcome the limitations of surface-level models, particularly in capturing long-distance dependencies and nuanced categorical distinctions.

Summary updated

BibTeX
@inproceedings{ma2015dependency,
  author = {Mingbo Ma and Liang Huang and Bowen Zhou and Bing Xiang},
  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