Learning to combine Grammatical Error Corrections

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

Abstract

The field of Grammatical Error Correction (GEC) has produced various systems to deal with focused phenomena or general text editing. We propose an automatic way to combine black-box systems. Our method automatically detects the strength of a system or the combination of several systems per error type, improving precision and recall while optimizing $F$ score directly. We show consistent improvement over the best standalone system in all the configurations tested. This approach also outperforms average ensembling of different RNN models with random initializations. In addition, we analyze the use of BERT for GEC - reporting promising results on this end. We also present a spellchecker created for this task which outperforms standard spellcheckers tested on the task of spellchecking. This paper describes a system submission to Building Educational Applications 2019 Shared Task: Grammatical Error Correction. Combining the output of top BEA 2019 shared task systems using our approach, currently holds the highest reported score in the open phase of the BEA 2019 shared task, improving $F_{0.5}$ by 3.7 points over the best result reported.

Introduction

Grammatical Error Correction (GEC) is a complex sequence-to-sequence task. Unlike machine translation, where entire sentences are often rewritten, GEC focuses on specific, separable edits such as fixing punctuation or verb tense. Existing systems typically fall into two categories: high-precision/low-recall or high-recall/low-precision. Simply pipelining these systems often leads to error propagation. This research addresses the challenge of combining diverse "black-box" systems to leverage their individual strengths while minimizing noise.

Methodology

The core of our approach is a black-box combination framework that treats individual GEC models as independent experts.

Black-Box Combination

The framework operates through several key steps:

  1. Annotation Splitting: Suggested edits from two systems are partitioned into three subsets: edits unique to System A, edits unique to System B, and edits suggested by both.
  2. Per-Error Optimization: Every edit is categorized by type (e.g., R:SPELL, M:PUNCT).
  3. Convex Optimization: On a development set, we solve an optimization problem to determine "selection variables." This calculates the probability of a fix being correct based on whether it was suggested by one or both systems for a specific error type.
  4. Iterative Merging: For multiple systems, this process is repeated, merging systems sequentially.
Precision and recall metrics across various error types, highlighting the increased precision when systems agree ($P_{1\cap2}$).

Specialized Components

We also developed a custom spellchecker using a 6-million sentence corpus from Project Gutenberg and LibreOffice dictionaries, specifically tuned for GEC. Additionally, we explored using BERT as a masked language model for iterative correction, focusing on specific word sets (e.g., {a, an}) to maintain semantic integrity.

Experimental Setup

We utilized standard GEC benchmarks, primarily the W&I+LOCNESS dataset for the BEA 2019 Shared Task. Additional training data included FCE, LANG8, and NUCLE for our base Nematus models. Project Gutenberg provided word-frequency counts for the spellchecker. To augment the training set, we generated synthetic data by reversing corrections from existing training sets.

Results and Discussion

Our findings demonstrate that agreement between systems is a powerful signal for correctness. As shown in the error-type analysis, the precision of corrections where systems agree is significantly higher than for unique suggestions. For instance, in the "Other" category, combined precision reached 0.67, compared to 0.17 and 0.28 for individual systems.

Spellchecking Performance

Our custom spellchecker significantly outperformed standard tools like JamSpell and Enchant on the GEC spelling correction task, achieving an $F_{0.5}$ of 0.6378.

Performance comparison of the proposed spellchecker against standard tools on the R:SPELL error category.

BEA 2019 Shared Task

By combining the outputs of the top four systems in the competition, we improved the $F_{0.5}$ score by 3.7 points over the best standalone result, achieving a state-of-the-art score of 73.18. Furthermore, even applying our method to a single system (filtering low-confidence error types) yielded performance gains.

Conclusion

This research demonstrates that optimizing system combinations at the error-type level is more effective than traditional ensembling. While the iterative approach risks overfitting on small development sets, it provides a robust framework for integrating diverse GEC models. Future work will explore multiple-sequence-to-single-sequence models to further refine the integration of multiple system outputs.

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