NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Seq2Seq Grammatical Error Correction via Decoding Interventions

Houquan Zhou, Yumeng Liu, Zhenghua Li, Min Zhang, Bo Zhang, Chen Li, Ji Zhang, Fei Huang

Abstract

Sequence-to-Sequence (Seq2Seq) models are the current standard for Grammatical Error Correction (GEC), yet they are often limited by the scarcity of high-quality parallel training data and a lack of real-time awareness during the decoding process. This paper introduces a unified decoding intervention framework that utilizes external "critics" to evaluate and refine model outputs word-by-word. By integrating a pre-trained language model and a novel incremental grammatical error detector, the framework achieves state-of-the-art performance across English and Chinese benchmarks. Notably, this method improves correction accuracy without requiring the base GEC model to be retrained.

Introduction

Grammatical Error Correction (GEC) is a critical task in natural language processing, traditionally framed as a translation problem where incorrect sentences are "translated" into correct ones. While Seq2Seq architectures have proven effective, they face two primary challenges:

  1. Data Scarcity and Noise: Training these models requires pairs of erroneous and corrected sentences. Such datasets are often limited in scale and contain noise from inconsistent human annotations or learner-specific patterns.
  2. Lack of Real-time Awareness: During inference, standard Seq2Seq models generate tokens based on learned probabilities without an explicit mechanism to verify if the generated token introduces a new error or fails to correct an existing one. This often leads to "hallucinated" errors or missed corrections.

To address these issues, we propose a framework that intervenes during the decoding phase, using external knowledge to guide the model toward more natural and grammatically accurate outputs.

The Decoding Intervention Framework

The core of our approach is a unified scoring mechanism that adjusts the base model's predictions in real-time. Instead of relying solely on the GEC model's output, the system calculates a final score for each candidate token using the following equation:

$$\text{Final Score} = \text{GEC Log-Probability} - (\lambda \times \text{Critic Penalty})$$

External Critics

We investigated two distinct types of critics to provide the penalty score:

  • Left-to-Right Language Model (LM) Critic: Utilizing off-the-shelf models like GPT-2, this critic leverages vast amounts of general text to assess the "naturalness" of a sequence. If the LM finds a proposed word highly improbable in context, the system applies a penalty, pushing the model toward more idiomatic phrasing.
  • Incremental Target-side GED Critic: We developed a novel Grammatical Error Detector (GED) that labels tokens as Correct (COR), Redundant (RED), Substitution (SUB), or Missing (MISS). This critic monitors the relationship between the original input and the generated sequence to ensure the intended meaning is preserved while errors are eliminated.

Dynamic Coefficient (\lambda)

To prevent the critics from over-correcting, we implemented a Dynamic Coefficient. Rather than a fixed weight, the system calculates $\lambda$ at every step by comparing the "confidence" (entropy) of the GEC model against the critic. This allows the system to trust the critic more when the base model is uncertain, and vice versa.

Experimental Setup

The framework was evaluated on several major benchmarks to test its robustness across different languages and error types:

  • English Benchmarks: The model was trained on standard datasets (CLang8, FCE, NUCLE, W&I+LOCNESS) and evaluated on CoNLL-14, BEA-19, and GMEG-wiki. The latter is specifically designed to test corrections of native-speaker errors.
  • Chinese Benchmarks: Training was conducted on Lang8 and HSK datasets, with evaluation performed on the MuCGEC benchmark.

Results and Discussion

The intervention framework consistently outperformed vanilla decoding across all tested datasets.

Performance Gains

On the CoNLL-2014 English test set, the combined configuration (LM + GED) improved the $F_{0.5}$ score—a metric prioritizing precision—by 1.4 points. Similarly, on the Chinese MuCGEC benchmark, the framework achieved a 1.2 point improvement in $F_{0.5}$.

Complementary Strengths

Our analysis reveals that the two critics serve different purposes. The LM critic is highly effective at improving recall (identifying more errors) because of its broad understanding of natural language. Conversely, the GED critic excels at improving precision (ensuring corrections are accurate) by explicitly identifying specific grammatical error types.

Zero-Retraining Advantage

A significant benefit of this framework is that it occurs entirely during the inference (decoding) stage. Researchers can enhance the performance of existing, high-performing GEC models without the prohibitive computational cost of retraining them on new or larger datasets.

Conclusion

Decoding interventions provide a powerful, flexible way to improve GEC performance by incorporating external linguistic knowledge. While the current implementation introduces some computational overhead due to the additional models running during inference, the gains in precision and the ability to catch subtle errors—such as correcting "ward of" to "ward off" where standard models fail—demonstrate the framework's potential. Future work will focus on optimizing these critics through model distillation to reduce latency and memory usage.

Summary updated

BibTeX
@inproceedings{zhou2023improving,
  author = {Houquan Zhou and Yumeng Liu and Zhenghua Li and Min Zhang and Bo Zhang and Chen Li and Ji Zhang and Fei Huang},
  title = {{Improving Seq2Seq Grammatical Error Correction via Decoding Interventions}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.495},
}
Figure