Improving Autoregressive Grammatical Error Correction with Non-autoregressive Models

Hang Cao, Zhiquan Cao, Chi Hu, Baoyu Hou, Tong Xiao, Jingbo ZhuACL 2023

Introduction: The Challenge of Over-Copying in GEC

Grammatical Error Correction (GEC) is a unique sequence-to-sequence task where input and output sentences typically overlap by approximately 90%. This high degree of similarity creates a "class imbalance" problem: standard autoregressive (AR) models, such as the Transformer, often become overconfident in copying the source text and underconfident in performing necessary corrections.

When an AR model encounters a position requiring an insertion, deletion, or substitution, its probability distribution frequently becomes "flat" or low-confidence. Because AR models generate text token-by-token based on local, preceding context, they lack a global view of the target sentence. This limitation makes it difficult to resolve ambiguities that require looking ahead at the "future" context of the sentence.

Methodology: Joint AR-NAR Training Framework

To address these limitations, this research introduces a joint training framework that leverages a non-autoregressive (NAR) model as a global auxiliary. The architecture utilizes a shared Transformer encoder paired with two distinct decoders: a standard AR decoder and a Conditional Masked Language Model (CMLM) based NAR decoder.

The joint training framework featuring a shared encoder and dual decoders (AR and NAR) with consistency regularization via KL loss.

The training process follows a "Mask Low Confidence" strategy:

  1. Identification: The AR decoder generates a sequence, and the system identifies positions with the lowest confidence (lowest max-logit).
  2. Masking: These low-confidence positions are masked in the "golden" target sentence.
  3. Global Teaching: The masked sentence is fed into the NAR decoder. Since the NAR decoder is bidirectional, it utilizes the entire surrounding context to predict the masked tokens.
  4. Consistency Regularization: A bidirectional Kullback-Leibler (KL) divergence loss is applied to ensure the AR model's output distributions are consistent with the NAR model's global predictions at these critical positions.

Additionally, the training employs a curriculum learning strategy, gradually increasing the weight of the NAR auxiliary task to prevent the model from being overwhelmed early on. Crucially, the NAR decoder is discarded after training. During inference, only the AR decoder is used, ensuring that the model maintains the same generation speed as a standard Transformer with zero additional computational overhead.

Experimental Results

The proposed method was evaluated on major English and Chinese GEC benchmarks, demonstrating significant improvements over baseline models.

English Benchmark (CoNLL-2014)

On the CoNLL-2014 test set, the model achieved an $F_{0.5}$ score of 54.11, significantly outperforming the "Transformer Big" baseline (50.98) and other competitive systems like JANUS and S2A.

Comparison of the proposed model against state-of-the-art GEC systems on the BEA-2019/CoNLL-2014 benchmark.

Chinese Benchmark (NLPCC-2018)

In the Chinese GEC task, the model reached an $F_{0.5}$ of 31.04. This result is particularly noteworthy as the single-model system outperformed several established ensemble models. Further error analysis revealed that the joint training framework specifically improves the model's ability to handle deletions and substitutions—areas where standard AR models typically struggle to agree with ground-truth corrections.

Conclusion and Future Work

By incorporating an NAR model as a training-time teacher, this framework effectively injects global context into the AR model's learning signal. This targeted intervention helps the model overcome its inherent bias toward copying the source text. While the sequential nature of the dual-decoder training increases training time, the lack of inference-time overhead makes it a highly practical solution for real-world GEC applications. Future research will explore the integration of explicit linguistic signals, such as syntax trees, to further enhance error detection and correction.

Summary updated

BibTeX
@inproceedings{cao2023improving,
  author = {Hang Cao and Zhiquan Cao and Chi Hu and Baoyu Hou and Tong Xiao and Jingbo Zhu},
  title = {{Improving Autoregressive Grammatical Error Correction with Non-autoregressive Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.760},
}
Figure