Weakly Supervised Grammatical Error Correction using Iterative Decoding

Jared Lichtarge, Christopher Alberti, Shankar Kumar, Noam Shazeer, Niki ParmararXiv 2018

TL;DR

This paper introduces a novel approach to Grammatical Error Correction (GEC) by treating it as an incremental, multi-pass process rather than a single-shot translation task. By pretraining a standard Transformer model on a massive, noisy dataset of 4 billion tokens from Wikipedia revision histories and employing an iterative decoding strategy, the authors achieve state-of-the-art results on standard GEC benchmarks after fine-tuning on clean data.

What Problem Does This Paper Address?

Traditional Grammatical Error Correction (GEC) systems often treat the task as a standard Machine Translation (MT) problem—translating an "ungrammatical language" into a "grammatical language." However, this analogy imposes an unnatural "all-at-once" constraint, forcing a model to fix every error in a single pass.

Furthermore, high-quality, human-curated GEC training data is notoriously scarce. While massive datasets like Wikipedia revision histories exist, they are "weakly supervised" and highly noisy: most edits are stylistic or editorial rather than strictly grammatical, and single revisions usually fix only one minor error at a time. A standard sequence-to-sequence model trained on this data learns to be overly conservative, making very few corrections per pass and rendering it ineffective for heavily flawed sentences.

Methods

The authors address these challenges using a two-pronged approach:

  1. The Architecture: They use a standard Transformer sequence-to-sequence model (6 layers for both encoder and decoder) trained on a massive scale.
  2. Iterative Decoding Algorithm: Instead of decoding the final output in a single shot, the model processes the sentence in multiple passes. In each iteration, the model performs a conventional beam search but is only allowed to output a rewrite if it has high confidence. Specifically, a rewrite is accepted only if its generation cost is lower than the cost of keeping the sentence identical, multiplied by a strict threshold. The output of one iteration becomes the input for the next, continuing until the model decides no more edits are required or hits a maximum iteration limit (MAXITER).

This multi-pass approach aligns perfectly with how Wikipedia data is structured, allowing the model to accumulate minor, incremental corrections over several steps.

Figure 1: F0.5 with iterative decoding on the CoNLL dev set. Triangles indicate performance with single-shot decod- ing. Each point for the pre-trained/fine-tuned settings is an average performance across 4 models.

Datasets

The model relies on a mix of massive, weakly supervised data and smaller, clean datasets:

  • Wikipedia Revisions (Pretraining): A massive dataset extracted from English Wikipedia page histories containing 170 million sentences (4.1 billion words). It is unfiltered by grammar heuristics, meaning it contains a vast majority of non-grammatical editorial changes. Synthetic spelling errors were artificially introduced to the source text to train a single model capable of both spelling and grammar fixes.
  • Lang-8 (Fine-tuning): A human-curated GEC corpus consisting of 1.9 million sentences (25 million words), used to adapt the model from the Wikipedia domain to the GEC domain.
  • Evaluation Benchmarks: The models were evaluated on the CoNLL’14 dev/test sets (using the $F_{0.5}$ metric) and the JFLEG dev/test sets (using the GLEU+ metric).

Key Insights and Ideas

  • GEC is Incremental: Human correction is often iterative. Breaking down the problem into a multi-pass sequence allows the model to tackle complex sentences step-by-step (e.g., fixing spelling first, then capitalization, then verb tense).
  • Unlocking Noisy Data via Decoding: Models trained on sparse, noisy data like Wikipedia learn to make minimal changes. Single-shot decoding makes these models appear useless for GEC. However, iterative decoding acts as a mechanism for domain transfer, allowing these small changes to compound into substantial corrections.
  • Fine-Tuning as Domain Adaptation: Pretraining on Wikipedia teaches the model how to edit text, but it tends to make stylistic changes. Fine-tuning on a small, clean dataset like Lang-8 acts as a regularizer, teaching the model to be more conservative and focus strictly on grammatical errors rather than editorial rewrites.

Key Results

The combination of massive pretraining and iterative decoding yielded impressive quantitative gains:

  • Purely Weakly Supervised: Without using any labeled GEC data (pretraining on Wikipedia only), the iterative decoding strategy achieved an $F_{0.5}$ score of 48.2 on CoNLL’14. For context, single-shot decoding on the same pretrained model yielded a meager score of 5.7.
  • State-of-the-Art Performance: After fine-tuning on Lang-8 and ensembling four models, the system achieved a state-of-the-art $F_{0.5}$ score of 58.3 on the CoNLL’14 benchmark and a GLEU score of 62.4 on JFLEG.
Comparison of single-shot vs iterative decoding performance

Limitations and Future Work

While highly effective, the authors note that the Wikipedia-pretrained model frequently proposes changes that improve a sentence's style or conciseness but fall outside the strict scope of grammatical correction. This necessitates the fine-tuning step to "reign in" the model's edits.

Additionally, the authors suggest that this iterative decoding framework could be generalized beyond GEC to other natural language processing tasks that suffer from a scarcity of clean parallel data but have an abundance of noisy, weakly supervised datasets.

Summary updated

BibTeX
@misc{lichtarge2018weakly,
  author = {Jared Lichtarge and Christopher Alberti and Shankar Kumar and Noam Shazeer and Niki Parmar},
  title = {{Weakly Supervised Grammatical Error Correction using Iterative Decoding}},
  year = {2018},
  eprint = {1811.01710},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.01710},
}
Figure