Dependency Parsing as MRC-based Span-Span Prediction

Leilei Gan, Yuxian Meng, Kun Kuang, Xiaofei Sun, Chun Fan, Fei Wu, Jiwei Li

Abstract

Traditional dependency parsing models typically focus on word-to-word relationships, which can oversimplify the structural dependencies between subtrees. This paper introduces a novel paradigm that frames dependency parsing as a Machine Reading Comprehension (MRC) task centered on span-to-span prediction. By treating a child subtree as a query to identify its parent span, the proposed framework achieves state-of-the-art results on several major benchmarks, including the Penn Treebank (PTB), Chinese Treebank (CTB), and Universal Dependencies (UD).

Introduction: From Tokens to Spans

In dependency parsing, an edge represents a relationship between a head and a dependent. While standard parsers model these as links between individual tokens, a dependency edge actually signifies a relationship between two entire subtrees.

Consider the sentence: "I love Tim’s cat." A conventional parser might link the verb "love" directly to the noun "cat." However, "love" is semantically and structurally related to the entire noun phrase "Tim’s cat." Word-pair models often fail to capture these underlying structural boundaries, even when using higher-order methods that consider groups of edges.

Comparison between word-to-word (left) and span-to-span (right) dependency modeling.

This research bridges the gap by treating dependency parsing as a direct span-to-span matching problem, allowing the model to explicitly represent the boundaries of the subtrees involved.

Methodology

The authors propose a two-stage framework designed to identify and link subtrees:

  1. Text Span Proposal Module: For every word in a sentence, the model predicts the start and end boundaries of the subtree rooted at that word. This prediction is facilitated by a biaffine scorer built upon a transformer backbone like BERT or RoBERTa.
  2. Span Linking Module (MRC Core): This module determines if Span A is a child of Span B. Span A is treated as a "query" with its boundaries and root marked by special tokens (e.g., <sos>, <sor>). The model then performs an MRC-style search to find the "answer"—the parent span and its corresponding root—within the sentence. To ensure robustness, the model calculates scores for both child-to-parent and parent-to-child directions.
  3. Inference: For projective trees, a CKY-style bottom-up dynamic programming algorithm is employed. For non-projective trees, the scores are adapted for use with a Maximum Spanning Tree (MST) algorithm.

Key Insights

The shift to span-level modeling provides several advantages:

  • Structural Accuracy: By modeling exact subtrees rather than proxy tokens, the model gains a more global and accurate view of sentence structure.
  • Enhanced Retrieval: Framing linking as MRC allows the model to recover spans that might have been missed by the initial proposal module, increasing the overall recall of eligible subtrees.
  • Robustness to Length: Span-level strategies are particularly effective for long-range dependencies. Unlike word-to-word models where noise increases exponentially with distance, focusing on coherent subtrees maintains high accuracy in long sentences.

Results and Evaluation

The model was evaluated on the English Penn Treebank (PTB) v3.0, Chinese Treebank (CTB) v5.1, and 12 languages from Universal Dependencies (UD) v2.2.

The proposed method set new benchmarks across the board:

  • PTB: Achieved 97.24% UAS and 95.49% LAS using RoBERTa.
  • CTB: Reached a new SOTA of 93.14% UAS.
  • UD: Outperformed existing SOTA methods on 11 out of 12 languages.
Performance comparison (UAS) between the proposed span-span model and a standard biaffine parser across sentence, dependency, and subtree span lengths.

Ablation studies confirmed that the span-span approach was the primary driver of success; reverting to token-to-token linking resulted in a significant performance drop of 0.57 UAS.

Limitations and Future Work

While highly effective, the model's $O(n^3)$ complexity makes it computationally heavier than simpler biaffine parsers. The authors currently use a "top-k" heuristic to manage this complexity. Additionally, while the model handles non-projective trees via MST, its recursive span definition is naturally optimized for projective structures. Future research will focus on more efficient span proposal methods and end-to-end training techniques to bypass the current search bottlenecks.

Summary updated

BibTeX
@inproceedings{gan2022dependency,
  author = {Leilei Gan and Yuxian Meng and Kun Kuang and Xiaofei Sun and Chun Fan and Fei Wu and Jiwei Li},
  title = {{Dependency Parsing as MRC-based Span-Span Prediction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.173},
}
Figure