A Syntax-Guided Grammatical Error Correction Model with Dependency Tree Correction

Zhaohong Wan, Xiaojun WanarXiv 2021

Abstract

Syntactic information is a powerful signal for Grammatical Error Correction (GEC), yet erroneous input often leads to unreliable dependency parses. This paper introduces SG-GEC, a model that explicitly incorporates syntactic structures through a Syntax-Guided Encoder and a novel Dependency Tree Correction auxiliary task. By learning to reconstruct correct syntactic "blueprints" while fixing text, SG-GEC achieves superior performance on standard benchmarks, outperforming other models that do not rely on massive, computationally expensive pre-trained transformers.

The Challenge of Syntactic GEC

Most modern GEC systems treat sentences as simple sequences of words. While effective, this approach ignores the underlying structural rules—syntax—that dictate how words relate to one another. Incorporating syntax into GEC faces a "chicken and egg" problem: to fix a sentence's grammar, it helps to know its syntactic structure; however, because the input sentence is grammatically incorrect, standard parsers often produce "broken" trees. If a model blindly follows an incorrect tree, it may introduce further errors. SG-GEC bridges this gap by teaching the model to not only fix the words but also "fix" the underlying syntactic tree.

Methodology: The SG-GEC Architecture

The SG-GEC model builds upon the standard Transformer architecture with two major innovations designed to handle syntactic signals robustly:

  1. Syntax-Guided Encoder: This component utilizes a Graph Attention Mechanism. Instead of processing words linearly, it treats the sentence as a graph based on a dependency tree. It separately processes "incoming" and "outgoing" relationships between words to capture how syntactic influence flows through the sentence structure.
  2. Dependency Tree Correction Task: To address the "broken tree" problem, the model is assigned an auxiliary goal during training. The decoder predicts three types of relationships for the corrected version of the sentence: specific dependency labels, the distance (hops) between words in the tree, and ancestor-descendant relationships.
The SG-GEC architecture featuring the Syntax-guided Encoder and the Dependency Tree Correction module.

By multitasking—correcting text while simultaneously predicting the correct tree—the model develops a deeper understanding of grammatically healthy sentence structures.

Experimental Results

The model was evaluated on three gold-standard GEC benchmarks: CoNLL-2014, FCE, and BEA-2019. Training utilized a combination of NUCLE, Lang-8, FCE, and W&I+LOCNESS corpora, supplemented by 10 million synthetic parallel sentences.

Performance comparison of SG-GEC against other single and ensemble models on CoNLL-2014, BEA-2019, and FCE-test benchmarks.

As shown in the results, SG-GEC achieved the best $F_{0.5}$-score among models that do not use large-scale pre-trained weights (like BERT or RoBERTa). Even when compared to these "giants," the SG-GEC ensemble remained highly competitive, particularly on the CoNLL-2014 and FCE benchmarks. Ablation studies confirmed that the Dependency Tree Correction task is vital; removing the dependency relation prediction sub-task caused a significant drop in performance.

Key Insights and Limitations

  • Precision through Syntax: Syntactic knowledge significantly boosts precision, helping the model avoid "hallucinated" changes common in sequence-only models.
  • Efficiency over Scale: SG-GEC proves that structural inductive biases can substitute for raw data scale, achieving competitive results without massive pre-training.
  • Limitations: The model remains dependent on the quality of the initial external parser. Furthermore, the current handling of sub-word tokenization (BPE) vs. whole-word dependency trees could be further integrated in future work to improve performance on morphologically rich languages.

Summary updated

BibTeX
@misc{wan2021syntax,
  author = {Zhaohong Wan and Xiaojun Wan},
  title = {{A Syntax-Guided Grammatical Error Correction Model with Dependency Tree Correction}},
  year = {2021},
  eprint = {2111.03294},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.03294},
}
Figure