A Dynamic Oracle for Linear-Time 2-Planar Dependency Parsing

Daniel Fernández-González, Carlos Gómez-RodríguezNAACL 2018

Introduction

In natural language processing, dependency parsing is a critical task for identifying grammatical relationships between words. While transition-based parsers offer high efficiency, they often struggle with non-projective sentences—structures where dependency arcs cross, common in languages with flexible word order like Czech, German, or Turkish.

The 2-Planar parser provides a compelling solution by distributing dependency arcs across two planes, allowing it to handle over 99% of non-projective cases while maintaining linear time complexity. Historically, however, these parsers relied on static oracles for training. Static oracles only teach the parser a single "gold" path; if the model makes a minor error during inference, it lacks the training to recover, often leading to a total breakdown in accuracy. This paper introduces the first dynamic oracle for the 2-Planar parser, enabling it to learn from suboptimal states and significantly improving its robustness.

Methodology: Learning from Failure

The core challenge in developing a dynamic oracle for the 2-Planar system is that it is non-arc-decomposable. Decisions made on one plane can inadvertently make future arcs on the other plane impossible to construct. To address this, the authors developed a dynamic oracle that calculates the minimum possible loss—the number of gold arcs that become unreachable—from any given parser state.

Key technical innovations include:

  • Efficient Loss Calculation: The system utilizes Tarjan’s algorithm to detect cycles in linear time, ensuring that the loss function $\ell(c)$ accurately reflects unreachable arcs.
  • Canonical Plane Assignment: To manage the complexity of two planes, the oracle assumes a fixed assignment of arcs based on logic that minimizes plane switches.
  • Refined Transition Logic: The authors modified the parser's Switch command logic to prevent infinite loops and added a regularization term to penalize unnecessary plane switching, ensuring the model learns stable, generalizable sequences.

Experimental Results

The researchers evaluated the dynamic oracle across 20 different language datasets, including CoNLL-X, CoNLL-XI, and the Penn Treebank (PTB-SD). The results demonstrate a clear advantage for the dynamic training approach.

Performance Against Static Oracles

The dynamic oracle outperformed the traditional static training strategy in 15 out of 20 languages in terms of Unlabeled Attachment Score (UAS). On average, the dynamic oracle raised the UAS from 86.51% to 86.90% and the Labeled Attachment Score (LAS) from 81.65% to 82.01%.

Table 1: Comparison of 2-Planar parser performance using static vs. dynamic oracles across 20 languages.

Comparison with Swap-Based Models

When compared to the popular "arc-hybrid + Swap" parser—which can handle any non-projectivity but is theoretically slower ($O(n^2)$ vs. $O(n)$)—the 2-Planar dynamic oracle remained highly competitive. It achieved a higher UAS in 12 out of 20 datasets, proving that linear-time efficiency does not require a significant sacrifice in accuracy.

Table 2: Performance comparison between the 2-Planar dynamic oracle and the AHybrid_Swap model.

Conclusion and Future Work

By allowing the 2-Planar parser to explore and recover from mistakes during training, the dynamic oracle provides a substantial boost to parsing accuracy across a diverse set of languages. While the current implementation relies on a fixed "canonical" plane assignment, future work may explore more flexible assignments to further optimize performance. This research confirms that robust, high-accuracy dependency parsing is achievable within linear time, making it a viable tool for large-scale linguistic processing.

Summary updated

BibTeX
@inproceedings{fernandezgonzalez2018dynamic,
  author = {Daniel Fernández-González and Carlos Gómez-Rodríguez},
  title = {{A Dynamic Oracle for Linear-Time 2-Planar Dependency Parsing}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/n18-2062},
}
Figure