Detection-Correction Structure via General Language Model for Grammatical Error Correction

Wei Li, Houfeng Wang

Introduction

Grammatical Error Correction (GEC) systems are traditionally categorized into two paradigms: Sequence-to-Sequence (Seq2Seq) and Sequence-to-Edit (Seq2Edit). Seq2Seq models, while flexible, are computationally intensive as they regenerate entire sentences, often leading to "over-correction." Seq2Edit models are faster but rely on complex, language-specific edit grammars. This paper introduces DeCoGLM, a framework that unifies detection and correction within a single General Language Model (GLM), focusing on localized edits to improve efficiency and precision.

Methodology: The DeCoGLM Framework

DeCoGLM leverages the GLM architecture to perform multi-task learning. The core innovation lies in its "Detection-Correction" structure, which operates in a pipeline that identifies errors and then performs targeted infilling.

The DeCoGLM pipeline: from source text to localized error correction via masking and piece generation.

Unified Architecture

Unlike hybrid systems that use separate models for detection and correction, DeCoGLM uses a single backbone. It predicts token-level labels—KEEP, ERROR, or INSERT—and then utilizes the GLM’s blank-infilling capability to generate text only for the spans identified as errors. This approach avoids the overhead of copying correct tokens, which is a major bottleneck in standard Seq2Seq models.

Training and Robustness

The model undergoes a two-stage Supervised Fine-Tuning (SFT) process. In the first stage (SFT1), it learns from gold-standard detection labels. In the second stage (SFT2), it is trained on its own detection outputs, which teaches the correction head to be fault-tolerant. If the detector produces a false positive, the corrector is trained to either restore the original token or generate an empty string, ensuring the final output remains accurate even with imperfect detection.

Experimental Results

The model was evaluated on major English (CoNLL-14, BEA-19) and Chinese (MuCGEC, FCGEC) benchmarks.

Performance comparison of DeCoGLM against state-of-the-art GEC systems and LLMs across English and Chinese benchmarks.

Performance and Efficiency

As shown in the results table, DeCoGLM (335M parameters) achieves competitive or superior $F_{0.5}$ scores compared to larger models like BART (400M) and T5 (770M). Notably, it operates approximately 3x faster than standard Seq2Seq models because it only generates the necessary "pieces" of text rather than the full sentence.

Enhancing Large Language Models

The DeCoGLM structure also proves beneficial for massive LLMs. By applying a detection-based prompt to GPT-4, researchers observed a significant jump in precision on the CoNLL-14 test set from 59.64 to 66.40, effectively mitigating the common issue of stylistic over-correction in zero-shot LLM outputs. This suggests that the localized correction template is a robust way to constrain LLMs to only necessary edits.

Discussion and Limitations

The synergy between detection and correction tasks within a single model improves performance for both. The detection task provides a structural hint that guides the generation process. However, scaling this approach to multi-billion parameter models remains challenging due to the difficulty of integrating sequence labeling tasks via Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA. Future work will explore more aggressive detection strategies and the integration of external syntactic features to further refine correction accuracy.

Summary updated

BibTeX
@inproceedings{li2024detection,
  author = {Wei Li and Houfeng Wang},
  title = {{Detection-Correction Structure via General Language Model for Grammatical Error Correction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.96},
}
Figure