TMU Transformer System Using BERT for Re-ranking at BEA 2019 Grammatical Error Correction on Restricted Track

Masahiro Kaneko, Kengo Hotate, Satoru Katsumata, Mamoru Komachi

Introduction

Grammatical Error Correction (GEC) is a critical task in Natural Language Processing (NLP) aimed at automatically correcting errors in text written by language learners. Modern GEC systems typically adopt a two-stage pipeline: a generation stage where a model produces multiple candidate corrections (hypotheses), and a re-ranking stage where these candidates are scored to select the most accurate output.

Traditional re-ranking methods often rely on Language Models (LMs) trained on large-scale native corpora, such as Wikipedia. While effective at identifying fluent text, these LMs lack exposure to the specific error patterns common among language learners. Consequently, they may struggle to distinguish between a grammatically correct sentence and one that is subtly incorrect but fluent-sounding. This paper introduces the TMU Transformer system, which incorporates a BERT-based re-ranker fine-tuned as a "grammaticality judge" to bridge this gap.

Methodology

The TMU system comprises a Transformer-based generator and a BERT-based re-ranker.

GEC Generator

The generator uses a standard Transformer architecture, implemented via the Fairseq library. It is trained to map erroneous learner sentences to their corrected counterparts, producing a set of N-best hypotheses for each input. This component serves as the primary engine for generating potential corrections.

BERT Re-ranker

The core innovation lies in the re-ranking stage. Instead of using BERT as a standard language model, the authors fine-tuned it on learner corpora as a binary classifier. The model is trained to predict whether a given sentence is "correct" (1) or "incorrect" (0). By training on actual learner errors, the BERT re-ranker acquires "negative knowledge"—an understanding of what constitutes a mistake that general-purpose LMs often lack.

Feature Integration

The final selection of the best hypothesis is performed using Minimum Error Rate Training (MERT) to optimize the weights of five distinct features:

  1. GEC Model Score: The log-probability from the Transformer generator.
  2. 5-gram LM Score: A traditional measure capturing local fluency.
  3. BERT Score: The grammaticality probability from the fine-tuned classifier.
  4. Edit Operations: Penalties for excessive substitutions, deletions, or insertions to prevent over-editing.
  5. Sentence Length: A feature to prevent bias toward overly short, "safe" sentences.

Experimental Setup

The system was evaluated on the BEA 2019 Shared Task Restricted Track. Training data included the First Certificate in English (FCE) corpus, Lang-8, and the NUS Corpus of Learner English (NUCLE). The W&I+LOCNESS dataset served as the primary development and test set.

Results

The performance was measured using the $F_{0.5}$ metric, which prioritizes precision over recall, reflecting user preference for accurate corrections over a high volume of potentially incorrect suggestions. The full TMU system achieved an $F_{0.5}$ of 35.35 on the test set.

Ablation study showing the impact of BERT and re-ranking on precision, recall, and F0.5.

As shown in the ablation study (Figure 3), the inclusion of BERT specifically improved the system's recall, increasing it from 23.76 to 28.08. This suggests that while the generator often produces the correct correction within its N-best list, the BERT re-ranker is essential for identifying and promoting these correct candidates. Removing the re-ranking stage entirely led to a significant drop in $F_{0.5}$ to 32.60.

Discussion and Qualitative Analysis

The BERT re-ranker's self-attention mechanism allows it to capture long-distance dependencies, such as subject-verb agreement across several words. However, qualitative analysis reveals ongoing challenges, particularly regarding context.

Qualitative comparison of corrections with and without the BERT re-ranker.

In Figure 5, example (a) demonstrates the system's ability to correctly insert conjunctions and adjust verb tense to match the gold standard. However, example (b) highlights a limitation regarding coreference resolution. The system corrected "look after" to "look after it," whereas the gold standard required "look after her" to match the antecedent "her sister." Because the BERT re-ranker currently only evaluates the candidate sentence in isolation, it lacks the context of the original source sentence to ensure semantic faithfulness.

Conclusion

The TMU Transformer system demonstrates that fine-tuning BERT as a grammaticality judge provides valuable "negative knowledge" that enhances GEC performance, particularly in terms of recall. Future work will focus on integrating the source sentence into the re-ranking process to improve coreference resolution and ensure that corrections remain faithful to the original intent of the writer.

Summary updated

BibTeX
@inproceedings{kaneko2019tmu,
  author = {Masahiro Kaneko and Kengo Hotate and Satoru Katsumata and Mamoru Komachi},
  title = {{TMU Transformer System Using BERT for Re-ranking at BEA 2019 Grammatical Error Correction on Restricted Track}},
  booktitle = {BEA @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-4422},
}
Figure