Recursive Non-Autoregressive Graph-to-Graph Transformer for Dependency Parsing with Iterative Refinement

James Henderson, Alireza Mohammadshahi, James Henderson 0001

TL;DR

The Recursive Non-Autoregressive Graph-to-Graph Transformer (RNGTr) introduces a way to perform dependency parsing by iteratively "polishing" a sentence's structure. By combining the speed of parallel edge prediction with the global context of iterative refinement, it achieves new state-of-the-art results across 13 languages and multiple major benchmarks.

What Problem Does This Paper Address?

In natural language processing, dependency parsing is the task of identifying the grammatical relationships between words (e.g., which word is the subject of which verb). Historically, researchers have faced a trade-off between two approaches:

  1. Autoregressive models: These predict edges one by one. They are highly accurate because they "see" what they’ve already built, but they are slow because they can't be parallelized.
  2. Non-autoregressive models: These predict all edges simultaneously. They are fast but often struggle to capture complex correlations between edges (like ensuring the final result is a valid tree), leading to lower accuracy.

The authors address this "speed vs. accuracy" gap by proposing a model that predicts everything in parallel but does so multiple times, using each pass to refine the errors of the previous one.

Methods

The core of the paper is the RNGTr architecture, which consists of three main stages:

  • Initialization: The process starts with an initial guess of the dependency graph. This can come from a simple baseline parser (like the authors' own SynTr), a third-party model (like UDify), or even a completely empty graph.
  • The Graph-to-Graph (G2G) Transformer: This is the "brain" of the refinement. Unlike standard Transformers that only look at sequences of words, this encoder takes the previous graph as an input. It uses a specialized self-attention mechanism where the relationships (edges) from the previous step are embedded directly into the attention weights.
  • Recursive Refinement: The model doesn't just run once. It applies the G2G Transformer recursively. In each iteration, the model looks at the current graph, finds inconsistencies or errors, and outputs a "better" version.
  • Decoding: For intermediate steps, the model uses a fast argmax approach. For the final output, it employs the Chu-Liu/Edmonds algorithm to ensure the resulting graph is a mathematically valid tree (a Maximum Spanning Tree).

Datasets

The authors evaluated RNGTr on a wide variety of benchmarks to prove its versatility:

  • Universal Dependencies (UD) v2.3: 13 languages selected for their diversity in scripts, family, and complexity (including Arabic, Chinese, English, Finnish, Turkish, and more).
  • Penn Treebanks: The standard English (PTB) and Chinese (CTB5.1) datasets.
  • CoNLL 2009: The German treebank.
  • Pre-training: The model leverages BERT embeddings to provide a rich initial understanding of word meanings.

Key Insights and Ideas

  • Self-Correction is Powerful: The most striking insight is that the model can "fix" itself. Even when starting with a "trivial" empty graph, four iterations of refinement produced results nearly as good as starting with a state-of-the-art initial parser.
  • Global Context via Iteration: By conditioning on the full graph from the previous step, the model gains a "global view" that single-pass non-autoregressive models lack. This allows it to resolve "idiosyncratic" dependencies that require looking at the whole sentence structure at once.
  • Handling Complexity: The refinement process is particularly effective for non-projective trees (where dependency lines cross). These are notoriously difficult for standard parsers, but RNGTr's iterative nature allows it to untangle these complex structures pass-by-pass.

Key Results

The RNGTr model set new State-of-the-Art (SOTA) benchmarks across the board:

  • English PTB: Achieved a Labelled Attachment Score (LAS) of 95.01, surpassing previous top-tier models.
  • Universal Dependencies: The model significantly improved results for all 13 languages. For example, when refining the UDify baseline, it saw a relative error reduction in LAS of up to 57% for some languages.
  • Efficiency: While iterative, the model is still more efficient than traditional edge-by-edge autoregressive models because it only requires a few passes (typically 3) to converge, rather than $N$ passes for a sentence of $N$ words.

Limitations and Future Work

  • Computational Overhead: Although faster than sequential models, running a heavy Transformer three or four times is still more computationally expensive than a single-pass parser. The authors suggest that future work could focus on "dynamic stopping"—knowing exactly when a graph is "good enough" to stop refining.
  • Intermediate Decoding: Currently, the model uses a simple "greedy" approach for intermediate steps which can produce loops. While the final MST algorithm fixes this, exploring better intermediate decoding strategies might lead to even faster convergence.
  • Beyond Parsing: The authors note that this "Graph-to-Graph" approach is general-purpose. It could potentially be applied to other structured prediction tasks like semantic role labeling or even molecule generation.

Summary updated

BibTeX
@article{henderson2021recursive,
  author = {James Henderson and Alireza Mohammadshahi and James Henderson},
  title = {{Recursive Non-Autoregressive Graph-to-Graph Transformer for Dependency Parsing with Iterative Refinement}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2021},
  doi = {10.1162/tacl\_a\_00358},
}
Figure