Tree-based Convolution: A New Neural Architecture for Sentence Modeling

Lili Mou, Hao Peng, Ge Li, Yan Xu, Lu Zhang, Zhi JinarXiv 2015

Introduction

Sentence modeling is a fundamental task in natural language processing (NLP), requiring models to capture both local semantic features and global structural relationships. Traditional approaches typically fall into two categories: Convolutional Neural Networks (CNNs) and Recursive Neural Networks (RNNs). While CNNs excel at extracting local n-gram features through sliding windows, they often fail to account for long-distance dependencies in a sentence's grammatical structure. Conversely, RNNs process sentences according to their parsing trees, capturing structural nuances but suffering from vanishing gradients due to long propagation paths from leaf nodes to the root.

This paper introduces the Tree-Based Convolutional Neural Network (TBCNN), an architecture designed to bridge this gap. By applying convolutional filters over sentence parsing trees, TBCNN combines the structural awareness of recursive models with the efficient, short-path learning characteristic of convolutional networks.

The TBCNN Architecture

The core innovation of TBCNN is the "tree-based convolution" operation. Unlike standard CNNs that slide a window over a linear sequence of word embeddings, TBCNN slides a fixed-depth subtree window over the entire parsing tree of a sentence. This allows the model to capture features based on grammatical relationships rather than just linear proximity.

Comparison of CNN, RNN, and TBCNN architectures.

The authors propose two primary variants:

  • Constituency-based TBCNN (c-TBCNN): This model operates on constituency trees, which group words into hierarchical phrases. Since internal nodes in these trees do not have inherent embeddings, they are initialized using a pre-trained recursive RNN.
  • Dependency-based TBCNN (d-TBCNN): This model utilizes dependency trees, which map direct grammatical links between words. To manage nodes with a variable number of children, d-TBCNN uses dependency types (e.g., nominal subject, direct object) as weights for the convolution, ensuring consistent processing of grammatical roles.

Pooling and Structural Heuristics

Following the convolutional layer, a pooling operation is required to aggregate features into a fixed-length vector for classification. While standard max-pooling is effective, the authors also explore heuristics to preserve structural information.

The 3-slot pooling mechanism for c-TBCNN.

One such method is 3-slot pooling, which divides the parsing tree into top, lower-left, and lower-right regions. By performing max-pooling within these specific slots, the model can distinguish between features originating from different parts of the sentence structure, such as the main verb versus its modifiers.

Experimental Evaluation

The TBCNN was evaluated on two benchmark datasets: the Stanford Sentiment Treebank (SST) and the TREC Question Classification dataset.

In the SST task, d-TBCNN achieved a state-of-the-art accuracy of 51.4% for fine-grained sentiment analysis, outperforming both standard CNNs and recursive RNNs. On the TREC dataset, the model reached 96.0% accuracy, marking the first time a neural network has surpassed specialized human-engineered systems that rely on thousands of hand-coded rules.

Conclusion

TBCNN represents a significant advancement in sentence modeling by effectively integrating linguistic structure into a convolutional framework. By reducing the depth of information propagation paths, TBCNN demonstrates superior performance on long and complex sentences compared to traditional recursive models. Future work may involve refining pooling heuristics and exploring more dynamic ways to handle diverse dependency structures.

Summary updated

BibTeX
@misc{mou2015tree,
  author = {Lili Mou and Hao Peng and Ge Li and Yan Xu and Lu Zhang and Zhi Jin},
  title = {{Tree-based Convolution: A New Neural Architecture for Sentence Modeling}},
  year = {2015},
  eprint = {1504.01106},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1504.01106},
}
Figure