Abstract
Traditional Grammatical Error Correction (GEC) models treat all training samples as equally authoritative "gold standards." However, human-annotated datasets often contain inaccuracies and fail to account for the inherent diversity of valid linguistic corrections. This paper introduces MainGEC, a mixed-grained weighted training strategy that utilizes a teacher model to assign weights at both the token and sentence levels. By prioritizing high-accuracy tokens and low-entropy (less ambiguous) sentences, MainGEC achieves state-of-the-art performance on standard benchmarks, demonstrating that strategic data weighting is more effective than standard knowledge distillation for GEC tasks.
1. Introduction
Grammatical Error Correction (GEC) is a critical task in natural language processing, aimed at automatically correcting errors in text. While the field has advanced significantly with the advent of large-scale pre-trained models, the standard training paradigm remains limited: it assumes that every sentence pair in a training corpus is a perfect representation of the truth.
In reality, human-annotated data is subject to two primary discrepancies. First, human annotators are fallible, occasionally introducing new errors or failing to correct existing ones. Second, language is inherently flexible; a single erroneous sentence can often be corrected in multiple valid ways. When a model is trained on a single "gold" correction while ignoring other valid alternatives, it may be unfairly penalized, leading to sub-optimal generalization.
2. The MainGEC Framework
To address these issues, we propose MainGEC (Mixed-grained weighted training for GEC). Instead of treating all samples equally, MainGEC employs a pre-trained "teacher" model to evaluate the quality and ambiguity of the training data, assigning weights that guide the "student" model's learning process.
2.1 Token-Level Weighting: Addressing Accuracy
Annotation errors often occur at the token level. A sentence might be mostly correct but contain a single misguided edit. MainGEC calculates token-level weights based on the teacher model's output probability. If the teacher model—which represents a high baseline of grammatical competence—assigns a low probability to a specific token in the target sentence, that token's weight is reduced. This prevents the student model from over-fitting to human mistakes or idiosyncratic annotations.
2.2 Sentence-Level Weighting: Addressing Diversity
The "one-to-many" nature of GEC means that some sentences have high correction diversity. To quantify this, MainGEC uses information entropy. High entropy indicates that the teacher model is uncertain because there are many plausible ways to correct the sentence. Conversely, low entropy suggests a clear-cut grammatical fix. MainGEC assigns higher weights to low-entropy samples, focusing the model on definitive grammatical rules rather than ambiguous stylistic choices.
2.3 Architecture Agnosticism
A key strength of the MainGEC approach is its versatility. It can be integrated into the two dominant GEC architectures:
- Seq2Seq: Models like BART that treat GEC as a sequence-to-sequence translation task.
- Seq2Edit: Models like GECToR that treat GEC as a sequence tagging and editing task.
3. Experimental Results
The effectiveness of MainGEC was evaluated using a robust training set including Troy-1BW, CLang-8, NUCLE, FCE, and W&I+LOCNESS, with testing performed on the CoNLL-14 and BEA-19 benchmarks.
3.1 Performance Benchmarks
MainGEC consistently outperformed vanilla training methods and existing state-of-the-art baselines. On the BEA-19 benchmark, the Seq2Seq implementation (BART) reached an $F_{0.5}$ score of 74.1 (up from 73.3). Similarly, the Seq2Edit version (GECToR-L) reached 74.5 (up from 73.3).
3.2 Weighting vs. Knowledge Distillation
A common alternative to weighting is Knowledge Distillation (KD), where a student model learns to mimic the teacher's full probability distribution. However, experiments showed that MainGEC's weighting strategy is superior for GEC. By using the teacher as a "quality controller" rather than a target to be mimicked exactly, the student model retains the ability to learn from the ground truth while being shielded from its noise.
3.3 Ablation Studies
Ablation experiments confirmed that both token-level and sentence-level weights are essential. Removing either grain of information resulted in a measurable performance decline, validating the hypothesis that both annotation accuracy and correction diversity must be addressed simultaneously.
4. Conclusion and Future Work
MainGEC demonstrates that not all training data is created equal in the context of GEC. By introducing mixed-grained weighting, the model effectively navigates the noise and ambiguity inherent in human-annotated datasets. While the current method relies on a high-quality teacher model and incurs some pre-processing overhead, it sets a new standard for training efficiency in GEC. Future research may explore self-paced learning, where a model iteratively generates its own weights, potentially removing the dependency on an external teacher.
Summary updated