[Paper Review] Encoder-Decoder Models Can Benefit from Pre-trained Masked Language Models in Grammatical Error Correction
This paper proposes a novel method to enhance encoder-decoder models for grammatical error correction (GEC) by fine-tuning a pre-trained masked language model (MLM), such as BERT, on GEC-specific data before using its contextual representations as additional features in the GEC model. The approach, particularly BERT-fuse GED (fine-tuned on grammatical error detection), achieves state-of-the-art performance on BEA-2019 and CoNLL-2014 benchmarks, outperforming standard initialization and fusion methods.
This paper investigates how to effectively incorporate a pre-trained masked language model (MLM), such as BERT, into an encoder-decoder (EncDec) model for grammatical error correction (GEC). The answer to this question is not as straightforward as one might expect because the previous common methods for incorporating a MLM into an EncDec model have potential drawbacks when applied to GEC. For example, the distribution of the inputs to a GEC model can be considerably different (erroneous, clumsy, etc.) from that of the corpora used for pre-training MLMs; however, this issue is not addressed in the previous methods. Our experiments show that our proposed method, where we first fine-tune a MLM with a given GEC corpus and then use the output of the fine-tuned MLM as additional features in the GEC model, maximizes the benefit of the MLM. The best-performing model achieves state-of-the-art performances on the BEA-2019 and CoNLL-2014 benchmarks. Our code is publicly available at: https://github.com/kanekomasahiro/bert-gec.
Motivation & Objective
- To address the gap between pre-trained MLMs (e.g., BERT) trained on grammatically correct text and the erroneous input distributions typical in GEC corpora.
- To investigate whether standard methods of incorporating MLMs—such as initialization or feature fusion—effectively improve GEC performance.
- To propose and evaluate a new method that fine-tunes the MLM on GEC data before using its representations as features in the GEC model.
- To determine whether task-specific fine-tuning of the MLM enhances its utility in sequence-to-sequence GEC models.
Proposed method
- Fine-tune a pre-trained BERT model on a GEC corpus using the grammatical error detection (GED) task to adapt its representations to error-prone input distributions.
- Use the contextual representations from the final layer of the fine-tuned BERT as additional input features to the encoder-decoder GEC model.
- Compare this approach (BERT-fuse GED) with standard methods: BERT initialization (BERT-init) and feature fusion with a pre-trained BERT (BERT-fuse).
- Additionally evaluate a variant where BERT is fine-tuned directly on the GEC correction task (BERT-fuse mask) for comparison.
- Combine the best-performing models using an R2L re-ranking technique to further improve results.
- Use the ERRANT toolkit to evaluate performance across different error types, including tense, article, preposition, and punctuation errors.
Experimental results
Research questions
- RQ1Can pre-trained masked language models like BERT improve the performance of encoder-decoder models in grammatical error correction?
- RQ2Does fine-tuning a pre-trained MLM on GEC-specific data lead to better performance than using the model in its pre-trained state?
- RQ3How does the performance of BERT-fuse GED compare to BERT-init and BERT-fuse in terms of F0.5 scores across different error types?
- RQ4Does the use of fine-tuned BERT representations as additional features yield better results than direct model initialization with BERT parameters?
- RQ5Can combining the BERT-fuse GED method with ensemble and re-ranking techniques achieve state-of-the-art performance on standard GEC benchmarks?
Key findings
- The BERT-fuse GED method, which fine-tunes BERT on the grammatical error detection task before using its representations as features, outperformed both BERT-init and BERT-fuse across all evaluated datasets.
- The BERT-fuse GED model achieved state-of-the-art performance on the BEA-2019 and CoNLL-2014 benchmarks, with a 0.2-point improvement in F0.5 score when using an ensemble of models.
- Fine-tuned BERT representations clearly distinguish between correct and incorrect word usage in hidden space, unlike vanilla BERT, which fails to separate correct and erroneous forms.
- The method improved performance across all major error types, including VERB:TENSE, DET, PREP, and PUNCT, with gains ranging from 1.3 to 4.4 F0.5 points.
- Hidden representation visualization confirmed that fine-tuned BERT learns to encode grammatical error information, creating distinct clusters for correct and incorrect word usage.
- The BERT-fuse GED model consistently outperformed BERT-fuse mask, indicating that GED-specific fine-tuning better aligns the MLM's representations with the GEC task.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.