Dependency Sensitive Convolutional Neural Networks for Modeling Sentences and Documents

Rui Zhang, Honglak Lee, Dragomir R. Radev · DOI

TL;DR

This paper introduces Dependency Sensitive Convolutional Neural Networks (DSCNN), a novel architecture that effectively models both sentence and document meaning by capturing long-range dependencies without relying on external parsers. DSCNN achieves state-of-the-art results on several NLP tasks, demonstrating its ability to outperform traditional CNNs and other models by better understanding the relationships between words and sentences.

What Problem Does This Paper Address?

Accurately representing the meaning of text, from individual sentences to entire documents, is a fundamental challenge in Natural Language Processing (NLP). Traditional "bag-of-words" models, which treat text as unordered collections of words, fail to capture crucial information like word order and syntactic structure. While more advanced neural network models like Recursive Neural Networks (RNNs) and Convolutional Neural Networks (CNNs) have emerged to address this, they have their own limitations. RNNs often require complex parsing and can struggle with long-term dependencies due to vanishing gradients. Standard CNNs, on the other hand, process text using fixed-size sliding windows, effectively treating sentences as bags of n-grams and potentially losing long-range contextual information. This paper aims to bridge this gap by proposing a model that can capture both intra-sentence and inter-sentence dependencies without the need for external parsers.

Methods

The core innovation of DSCNN lies in its hierarchical architecture that combines Long Short-Term Memory (LSTM) networks with Convolutional Neural Networks (CNNs).

  • LSTM Layer: The first layer utilizes LSTMs to process word embeddings. LSTMs are well-suited for capturing long-distance dependencies within a sequence. For sentence modeling, a single LSTM processes the entire sentence. For document modeling, independent LSTMs process each subsentence.
  • Convolutional Layer: Following the LSTM(s), a convolutional layer with variable-size filters is applied. This layer extracts local features from the representations generated by the LSTMs. The filters can capture patterns across different window sizes, allowing for more robust feature extraction.
  • Max-Over-Time Pooling: A max-over-time pooling layer is used to select the most important features extracted by the convolutional filters. This helps in creating a fixed-size representation regardless of the input length.
  • Hierarchical Structure for Documents: For document modeling, the architecture is extended. After processing individual subsentences with LSTMs and pooling, a higher-level LSTM is used to capture the joint meaning across these subsentence representations. This is then followed by another convolutional layer, pooling, and a softmax classifier.

A key advantage highlighted is that DSCNN does not require explicit phrase labeling or external parsers, making it more flexible and robust.

Datasets

The paper evaluates DSCNN on several standard NLP datasets:

  • Movie Review Data (MR): A dataset for sentiment analysis, consisting of single-sentence movie reviews.
  • Stanford Sentiment Treebank (SST): Used for sentiment analysis, available in binary (SST-2) and fine-grained (SST-5) versions.
  • TREC: A dataset for question type classification, with six classes (abbreviation, entity, description, location, numeric).
  • Subjectivity Classification Dataset (SUBJ): A dataset for classifying sentences as subjective or objective.
  • Large Movie Review (IMDB): A dataset for document-level sentiment analysis, consisting of multi-sentence reviews.

Key Insights and Ideas

  • Parser-Free Dependency Modeling: The most significant insight is the ability to capture dependency information without relying on external parsers. This bypasses the limitations and potential errors associated with parsing, making the model more broadly applicable.
  • LSTM-CNN Synergy: The combination of LSTMs for capturing sequential dependencies and CNNs for feature extraction proves highly effective. LSTMs provide rich contextual representations, which are then efficiently processed by CNNs.
  • Hierarchical Document Modeling: Extending the sentence-level architecture to a hierarchical document model by first processing subsentences and then modeling their interrelationships is a crucial step for handling longer texts.
  • Robustness to Dependency Length: The paper demonstrates that DSCNN's performance scales better with increasing dependency lengths in sentences compared to traditional CNN models, indicating its superior ability to capture long-range context.

Key Results

DSCNN achieves state-of-the-art or competitive results across various tasks:

  • Sentence Modeling: DSCNN outperforms baselines on MR and TREC datasets. It achieves the same best result as MVCNN on SUBJ and is only slightly lower on SST-2.
  • Document Modeling: On the IMDB dataset, DSCNN outperforms traditional bag-of-words models and other related methods.
  • Qualitative Analysis: Figures 4 and 5 provide examples where DSCNN correctly classifies sentences that CNN-MC misclassifies, highlighting its ability to capture longer dependencies. Conversely, it also shows examples where DSCNN makes errors, often due to issues with word embeddings or out-of-vocabulary words.

Limitations and Future Work

  • Word Embeddings: The performance of DSCNN, like many deep learning models, is influenced by the quality of pre-trained word embeddings. Errors in word embeddings can lead to misclassifications, as seen in Figure 5 (example a).
  • Out-of-Vocabulary Words: The model can struggle with out-of-vocabulary words, as demonstrated in Figure 5 (example b), where the word "TMJ" leads to misclassification.
  • Ambiguous Annotations: In some cases, misclassifications might stem from ambiguous or mistaken annotations in the datasets themselves, as suggested in Figure 5 (example c).
  • Future Work: The paper implicitly suggests that further improvements could come from better pre-training strategies for LSTMs (as explored with DSCNN-Pretrain) and potentially incorporating more sophisticated ways to handle word embeddings or unknown words. The success on document modeling also opens avenues for more complex document understanding tasks.

Summary updated

BibTeX
@inproceedings{zhang2016dependency,
  author = {Rui Zhang and Honglak Lee and Dragomir R. Radev},
  title = {{Dependency Sensitive Convolutional Neural Networks for Modeling Sentences and Documents}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2016},
  doi = {10.18653/v1/n16-1177},
}
Figure