Grammatical Error Correction with Neural Reinforcement Learning

Keisuke Sakaguchi, Matt Post, Benjamin Van Durme

Abstract: Keisuke Sakaguchi, Matt Post, Benjamin Van Durme. Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 2: Short Papers).

2017.

Introduction

This paper introduces a Neural Reinforcement Learning (NRL) approach to Grammatical Error Correction (GEC), moving beyond standard word-by-word training. Most neural GEC models are trained using Maximum Likelihood Estimation (MLE), which suffers from two major flaws: exposure bias and objective mismatch. Exposure bias occurs because models are trained on ground-truth tokens but must rely on their own potentially erroneous predictions at test time. Objective mismatch arises because MLE optimizes for word-level accuracy, while GEC is evaluated using sentence-level metrics like GLEU or BLEU. By directly optimizing for sentence-level fluency metrics, the proposed NRL model avoids these pitfalls and achieves state-of-the-art results.

Methods

The researchers utilized an attentional neural encoder-decoder (Bi-GRU architecture) as their base. The training pipeline consists of two distinct stages:

  1. Pre-training (MLE): The model is first trained for 600k updates using standard cross-entropy loss to provide a "warm start" in understanding language structure.
  2. Refinement (NRL): The model then undergoes 600k updates of Reinforcement Learning. Using the REINFORCE algorithm, the model (the agent) predicts words (actions) and receives a reward based on the GLEU score of the completed sentence. GLEU is a variant of BLEU designed for GEC that rewards edits matching the reference while penalizing unnecessary changes to the source.
Comparison of GEC models, training methods, and corpora.

To reduce the high variance typical of RL, the authors subtracted a "baseline reward" (the average reward of sampled sentences). Additionally, the authors provide a mathematical proof showing that Minimum Risk Training (MRT) is a special case of their NRL framework.

Datasets and Evaluation

The models were trained on a combination of three major learner corpora: NUCLE (NUS Corpus of Learner English), FCE (Cambridge Learner Corpus First Certificate English), and Lang-8. After filtering for length and quality, the total training data comprised approximately 720,000 sentence pairs. For evaluation, the authors used the JFLEG corpus, which is specifically designed to evaluate "fluency-oriented" GEC rather than just simple error detection.

Key Results

The NRL model outperformed the MLE baseline and several other state-of-the-art systems (such as CAMB16 and NUS) across both automated and human metrics.

Performance comparison using Human evaluation and GLEU scores on dev and test sets.
  • Automated Metrics: On the JFLEG test set, NRL achieved a GLEU of 53.98, compared to 52.75 for the MLE baseline.
  • Human Evaluation: Using the TrueSkill algorithm to aggregate human rankings, NRL was significantly preferred over the MLE model. In pairwise comparisons, humans preferred NRL corrections over MLE corrections 30% of the time, while they were tied 57% of the time.
  • M2 Score: NRL also showed gains in the M2 score (focused on phrase-level edits), reaching 58.68 on the test set.

Discussion and Insights

By using GLEU as a reward, the model learns to prioritize the overall flow and naturalness of the sentence. Sampling from the model's own predictions during the RL phase makes it more robust to its own mistakes during real-world inference, effectively mitigating exposure bias.

However, the authors observed a "meaning trap": while NRL produces more fluent sentences, it can occasionally be too creative, changing the original meaning (e.g., changing "their idea" to "it") to satisfy the metric. Future work should focus on making models more context-aware to prevent such semantic drift. Additionally, while effective, RL training is computationally expensive and highly dependent on the quality of the reward function; any biases in the GLEU metric could lead to "reward hacking."

Summary updated

BibTeX
@inproceedings{sakaguchi2017grammatical,
  author = {Keisuke Sakaguchi and Matt Post and Benjamin Van Durme},
  title = {{Grammatical Error Correction with Neural Reinforcement Learning}},
  booktitle = {IJCNLP},
  year = {2017},
  url = {https://openreview.net/forum?id=KGj4cQrdU4m},
}
Figure