A Fast and Accurate Dependency Parser using Neural Networks

Danqi Chen, Christopher D. Manning

Abstract

This paper introduces a groundbreaking neural network-based approach to dependency parsing that replaces millions of manually crafted, sparse features with a small set of dense, learned embeddings. By using a novel "cube" activation function to capture complex feature interactions, the parser achieves a ~2% accuracy boost over traditional methods while processing over 1,000 sentences per second—making it up to 20 times faster than its contemporaries.

Introduction

Dependency parsing—the process of determining the grammatical structure of a sentence by identifying "head" words and their dependents—is a core task in Natural Language Processing (NLP). In 2014, the state-of-the-art relied on transition-based parsers that used millions of sparse "indicator features" (e.g., "Is the current word a verb AND is the next word a noun?").

These traditional parsers faced three major hurdles:

  1. Sparsity: Because features were so specific, many were rarely seen during training, leading to poor generalization.
  2. Manual Engineering: Experts had to spend weeks hand-designing "feature templates" to capture linguistic nuances.
  3. Computational Bottleneck: Feature extraction was incredibly slow. In some systems, 99% of the runtime was spent just looking up and concatenating these millions of features rather than actually parsing.

Neural Transition-Based Parsing

The authors propose a greedy, transition-based parser powered by a neural network. The key technical innovations include:

  • Dense Embeddings for Everything: Unlike previous work that only used embeddings for words, this model learns d-dimensional dense vectors for words, Part-of-Speech (POS) tags, and dependency labels. This allows the model to "see" that a "singular noun" is semantically similar to a "plural noun."
Neural network architecture for transition-based dependency parsing.
  • The Cube Activation Function: Standard neural networks use functions like tanh or sigmoid. The authors argue these don't capture the interactions between features (like the relationship between a head, a dependent, and their tags) well enough. They introduce the cube activation function ($g(x) = x^3$), which mathematically mimics the product of three different elements, effectively automating the "feature conjunctions" that humans used to hand-code.
Comparison of the cube activation function with standard non-linearities.
  • Pre-computation Trick: To achieve extreme speed, the model pre-computes the hidden layer contributions for the top 10,000 most frequent words. During parsing, the system simply performs a table lookup for these words, reducing the math to simple additions.

Experimental Evaluation

The model was evaluated on two major benchmarks:

  • English Penn Treebank (PTB): Specifically the CoNLL and Stanford dependency representations.
  • Chinese Penn Treebank (CTB): To demonstrate the model's cross-linguistic effectiveness.

The authors used standard splits for training, development, and testing, and utilized pre-trained word embeddings (word2vec and Collobert & Weston) for initialization.

Key Results and Insights

  • Accuracy: On the English Penn Treebank, the parser achieved a 92.2% Unlabeled Attachment Score (UAS), a significant improvement over the 89.9% - 90.2% range of traditional greedy parsers.
  • Speed: The parser reached a throughput of 1,013 sentences per second. For comparison, the popular MaltParser (greedy) ran at ~500 sents/sec, and the high-accuracy MSTParser (graph-based) ran at a sluggish 12 sents/sec.
  • Learning the "Why": By visualizing the learned embeddings using t-SNE, the authors found that the model automatically grouped similar POS tags (like all adjectives) and similar dependency labels (like clausal complements) together without being explicitly told to do so.
  • Automation over Intuition: The cube activation function essentially "discovers" which combinations of words and tags are important. This removes the need for the incomplete and biased feature templates designed by humans.

Conclusion and Future Work

While the model is fast and accurate, it currently makes local, "greedy" decisions at each step. This means if it makes one mistake early on, that error propagates through the rest of the sentence. The authors suggest that incorporating beam search (keeping track of multiple likely paths) could further improve accuracy. Additionally, while the cube activation function works well empirically, its full expressive power compared to other non-linearities remains an open question for theoretical investigation.

Summary updated

BibTeX
@inproceedings{chen2014fast,
  author = {Danqi Chen and Christopher D. Manning},
  title = {{A Fast and Accurate Dependency Parser using Neural Networks}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2014},
  doi = {10.3115/v1/d14-1082},
}
Figure