Abstract
We introduce a novel architecture for dependency parsing: stack-pointer networks (STACKPTR). Combining pointer networks with an internal stack, the proposed model first reads and encodes the whole sentence, then builds the dependency tree top-down (from root-to-leaf) in a depth-first fashion. The stack tracks the status of the depth-first search and the pointer networks select one child for the word at the top of the stack at each step. The STACKPTR parser benefits from the information of the whole sentence and all previously derived subtree structures, and removes the left-to-right restriction in classical transition-based parsers. Yet, the number of steps for building any (including non-projective) parse tree is linear in the length of the sentence just as other transition-based parsers, yielding an efficient decoding algorithm with $O(n^2)$ time complexity. We evaluate our model on 29 treebanks spanning 20 languages and different dependency annotation schemas, and achieve state-of-the-art performance on 21 of them.
Introduction
Dependency parsing is a fundamental task in Natural Language Processing, identifying structural relationships between words in a sentence. Historically, the field has been divided between transition-based parsers and graph-based parsers. Transition-based models are computationally efficient ($O(n)$) but often suffer from error propagation due to local, greedy decision-making. Graph-based models offer global awareness and higher accuracy but at a significant computational cost ($O(n^3)$ or higher).
The STACKPTR network aims to bridge this gap by combining the structural efficiency of transition-based systems with the global context typical of graph-based models.
Architecture and Methodology
The STACKPTR architecture is composed of three primary elements: a multi-layer BiLSTM-CNN encoder, a pointer network decoder, and an internal stack.
- Encoder: The model uses a BiLSTM-CNN to generate context-aware representations for each word, integrating character-level, word-level, and Part-of-Speech (POS) information.
- Decoder (Pointer Network): Unlike standard decoders that select from a fixed vocabulary, the pointer network selects words directly from the input sentence to serve as dependents.
- The Stack: The stack facilitates a top-down, depth-first search (DFS) for tree construction. Starting from a virtual "Root," the model identifies a child, pushes it onto the stack, and recursively searches for that child's dependents.
A key innovation is the inclusion of higher-order structural information. During decoding, the model considers the current head, its grandparent, and its previous sibling by summing their hidden states. This provides the decoder with a rich structural context that traditional transition-based models lack.
Experimental Results
The model was rigorously tested on 29 treebanks across 20 languages, including the Penn Treebank (PTB) for English, the Penn Chinese Treebank (CTB), and various Universal Dependencies (UD) datasets.
STACKPTR achieved state-of-the-art (SOTA) results on 21 of the 29 treebanks. Notably, it reached a Unlabeled Attachment Score (UAS) of 95.87% on the English PTB and 90.59% on the Chinese CTB.
As shown in the results, the model excels in "Complete Match" metrics (UCM and LCM), indicating a superior ability to capture the entire sentence structure accurately compared to baseline models like the Biaffine (BiAf) parser.
Discussion and Conclusion
By breaking the traditional left-to-right processing constraint, STACKPTR captures the top-down intuition of linguistic structure. It operates at an $O(n^2)$ complexity—a "sweet spot" that is faster than graph-based models while being more accurate than greedy transition-based parsers.
Future work may involve using Reinforcement Learning to optimize the order in which children are traversed, as the current model relies on a fixed "inside-out" order. Additionally, reducing the reliance on external POS tags could lead to a more robust, end-to-end parsing system.
Summary updated