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

Improving Grammatical Error Correction via Contextual Data Augmentation

Yixuan Wang, Baoxin Wang, Yijun Liu, Qingfu Zhu, Dayong Wu, Wanxiang Che

Introduction

Grammatical Error Correction (GEC) is a critical task in natural language processing, yet it remains significantly "data-starved." While massive corpora of clean text are readily available, high-quality parallel datasets—consisting of error-prone sentences paired with their human-corrected versions—are rare and expensive to produce. To mitigate this, researchers traditionally rely on synthetic data generation, such as random word deletion or swapping.

However, while these methods are effective for large-scale pre-training, they often fail during the crucial fine-tuning stage. Standard synthetic data typically suffers from two main issues: an inconsistent error distribution that does not reflect real-world human mistakes, and noisy labels where automated rules create ungrammatical corrections. This paper introduces Contextual Data Augmentation (CDA), a pipeline designed to generate high-quality synthetic data that mimics human error patterns and provides clean, contextually relevant training signals.

The Contextual Data Augmentation (CDA) Framework

The authors propose a three-step pipeline to bridge the gap between synthetic and human-annotated data:

  1. Error Pattern Extraction: Using the ERRANT tool, the researchers extract specific error patterns (e.g., changing "move one" to "move from one") from small, high-quality human datasets. This ensures the synthetic data targets the same types of errors humans actually make.
  2. Contextual Generation: Rather than inserting these patterns into random sentences, the framework uses Large Language Models (LLMs) like GPT-2 or LLaMA2 to generate natural-sounding sentences around the correct version of the pattern. By using a "hard constraint" approach with placeholders, the LLM ensures the surrounding context is linguistically appropriate for the specific grammatical structure being targeted.
  3. Pattern Substitution and Relabeling: After generating the sentence, the "error" version of the pattern is substituted back in. To address the problem of noisy labels, these synthetic pairs are passed through a baseline GEC model for relabeling. This "denoising" step ensures that the final training pairs are accurate and that the corrections are truly grammatical.

Training and Experimental Setup

The researchers employed a robust three-stage training process:

  • Stage I: Large-scale pre-training on the $C4_{200M}$ synthetic dataset.
  • Stage II: Fine-tuning on a mixture of real human-annotated data and CDA-augmented data.
  • Stage III: Final polishing on high-quality real and augmented datasets.

Performance was evaluated on the industry-standard benchmarks CoNLL14 and BEA19-Test, using models trained on standard GEC datasets including Lang-8, NUCLE, FCE, and W&I+L.

Key Insights

Data Distribution and Quality

A primary finding of the study is that the distribution of error types is more important than the sheer volume of data. CDA succeeds because it samples error patterns based on real-world frequencies found in human data. Furthermore, the use of LLMs to generate context ensures that the synthetic sentences reflect natural language usage, which is more effective for fine-tuning than rule-based substitutions.

Efficiency vs. Scale

One of the most significant results is the efficiency of the CDA approach. A well-tuned BART-large model (400M parameters), when trained with CDA-augmented data, achieved results comparable to or better than a T5-XXL model (11B parameters). This suggests that for specialized tasks like GEC, high-quality data and distribution alignment can compensate for a 25-fold difference in model size.

The Role of Denoising

The relabeling (denoising) step proved critical for maintaining precision. Without this step, the model's performance dropped, confirming that even LLM-generated context requires a secondary validation to ensure it serves as a reliable training signal for the final stages of fine-tuning.

Results and Performance

On the BEA19-Test benchmark, the CDA-enhanced BART-large model achieved an $F_{0.5}$ score of 75.4, setting a new state-of-the-art for models in its class and outperforming previous strong baselines such as SynGEC and MixEdit. The results demonstrate that CDA effectively addresses the data scarcity problem by providing high-fidelity synthetic examples that are indistinguishable from human-annotated data in terms of utility.

Limitations and Future Directions

While CDA is highly effective, it is more computationally expensive than simple rule-based augmentation due to the LLM inference required for sentence generation. Additionally, the method is currently limited to the error patterns present in the initial seed datasets; it cannot yet "invent" entirely new categories of grammatical errors. Future work may explore using LLMs to synthesize a broader variety of complex, sentence-level errors beyond simple n-gram substitutions.

Summary updated

BibTeX
@inproceedings{wang2024improving,
  author = {Yixuan Wang and Baoxin Wang and Yijun Liu and Qingfu Zhu and Dayong Wu and Wanxiang Che},
  title = {{Improving Grammatical Error Correction via Contextual Data Augmentation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.647},
}
Figure