Learning to combine Grammatical Error Corrections

Yoav Kantor, Yoav Katz, Leshem Choshen, Edo Cohen-Karlik, Naftali Liberman, Assaf Toledo, Amir Menczel, Noam Slonim

Abstract

This paper introduces a novel, automated method for combining multiple "black-box" Grammatical Error Correction (GEC) systems by directly optimizing the $F_{0.5}$ score based on specific error types. By strategically merging the outputs of different models—including a custom spellchecker and a BERT-based system—the authors achieved state-of-the-art results in the BEA 2019 Shared Task, proving that smart output combination significantly outperforms standard model ensembling.

Introduction

Grammatical Error Correction (GEC) systems are designed to fix spelling, grammar, and word-choice errors in text. However, different systems have different strengths. Rule-based systems might have high precision (they are rarely wrong) but low recall (they miss a lot of errors). Neural models might have high recall but make hallucinated corrections.

Historically, researchers combined systems by pipelining them or by ensembling the internal weights of neural networks. Pipelining often propagates errors, while ensembling requires access to the models' internals—meaning you cannot use commercial APIs like Grammarly—and often hurts recall. The authors tackle the challenge of creating a universal, automatic way to combine any set of black-box GEC systems to maximize overall performance.

Methodology

The core contribution is a convex optimization-based combiner. The system operates on the outputs of GEC models through a multi-step process:

  1. Categorize Edits: The system takes the output of two GEC models and splits the suggested edits into three buckets: edits only System 1 made ($S_{1\setminus 2}$), edits only System 2 made ($S_{2\setminus 1}$), and edits both agreed on ($S_{1\cap 2}$).
  2. Evaluate by Error Type: Using a development dataset, it calculates the precision and recall for each bucket, separated by specific error types such as punctuation, verb tense, and spelling.
  3. Optimize: It uses a mathematical solver to decide which buckets and error types to "trust" in order to maximize the $F_{0.5}$ score (a metric that weights precision twice as much as recall).
  4. Iterative Merging: For more than two systems, the method combines two systems, takes the result, and iteratively combines it with the next system.
Table 2: Performance metrics for various error types across different system overlap buckets, illustrating the data used for optimization.

To support this framework, the authors also developed several base components:

  • A Custom Spellchecker: Uses a 6-million sentence corpus and Levenshtein distance heuristics to correct spelling, outperforming standard open-source spellcheckers.
  • A BERT-based Corrector: Uses BERT as a masked language model to iteratively suggest replacements within a predefined set of syntactically interchangeable words.
  • Nematus NMT Models: Four Transformer-based neural machine translation models trained to "translate" erroneous English into corrected text.

Datasets and Training

The models were trained on standard datasets including FCE, LANG8, NUCLE, and W&I+LOCNESS (upsampled 10x). Additionally, the authors generated synthetic data by applying known corrections backwards on correct text from Project Gutenberg and the W&I training set. A key insight was that domain matters: using text from the target domain (W&I) yielded vastly better results than using larger out-of-domain datasets like Gutenberg books.

Key Results

State-of-the-Art Performance

By applying their combination method to the top four competing systems in the BEA 2019 shared task (UEDIN-MS, Kakao&Brain, Shuyao, CAMB-CUED), the authors achieved an $F_{0.5}$ score of 72.84. This was a significant 3.7 point improvement over the best standalone system, setting a new state-of-the-art for the open phase of the task.

Spellchecker Dominance

Their custom spellchecker achieved an $F_{0.5}$ of 0.6378 on spelling errors, easily beating standard tools like Norvig and Jamspell. This specialized performance highlights the value of domain-specific tools within a combined framework.

Table 6: Comparison of spellchecking performance (P, R, $F_{0.5}$) between the proposed system and existing tools.

System Self-Improvement

The combination method can even improve a single system. By running the optimizer on one system's output, it learns to drop predictions for error types where the system historically performs poorly, effectively boosting overall precision.

Conclusion

This research demonstrates that black-box combination is a highly effective strategy for GEC. You do not need access to a model's architecture to improve it; simply knowing where systems agree or disagree on specific error types allows for mathematical optimization of the final output. Future work will address the risks of overfitting during iterative merging and refine the handling of overlapping, conflicting annotations.

Summary updated

BibTeX
@inproceedings{kantor2019learning,
  author = {Yoav Kantor and Yoav Katz and Leshem Choshen and Edo Cohen-Karlik and Naftali Liberman and Assaf Toledo and Amir Menczel and Noam Slonim},
  title = {{Learning to combine Grammatical Error Corrections}},
  booktitle = {BEA @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-4414},
}
Figure