Abstract
Grammatical Error Correction (GEC) has traditionally been divided into detection-based classification and generative sequence-to-sequence modeling. While generative models offer flexibility, they often lack explicit diagnostic guidance. We introduce LET (Leveraging Error Type), an end-to-end framework that integrates "soft" error-type information directly into the generative process. By employing Guided Input of the Decoder (GID) and Guided Cross-Attention (GCA), LET aligns the semantic space of error detection with the correction decoder. This approach mitigates the risk of error propagation and achieves state-of-the-art results on the BEA-test and CoNLL-2014 benchmarks, demonstrating the value of explicit error-level alignment in neural correction systems.
Introduction
Grammatical Error Correction (GEC) is a critical task in natural language processing, typically addressed through two paradigms: detection-based models that classify and transform tokens, and generative models that treat correction as a translation task. Generative models, such as those based on the Transformer architecture, have become the standard due to their ability to handle complex corrections without manual error-category design. However, these models often operate as "black boxes," lacking explicit reasoning for their corrections.
Previous attempts to integrate Grammatical Error Detection (GED) into generative frameworks have faced two primary challenges. First, error propagation occurs when a hard-coded detection error (e.g., a false positive) is passed to the generator, leading to incorrect output. Second, there is often a mismatch in cross-attention where the model struggles to reconcile token-level semantics with abstract error categories.
Methods
The LET framework addresses these issues by building on a BART backbone and introducing two novel guidance mechanisms.
Guided Input of the Decoder (GID)
Instead of relying solely on previously generated tokens, LET incorporates a "long" error-type representation of the next token from the source sentence. This provides the decoder with a look-ahead "hint" about upcoming grammatical requirements, such as a necessary deletion or a specific part-of-speech correction.
Guided Cross-Attention (GCA)
GCA is the core innovation of the LET framework. In standard Transformers, cross-attention aligns the decoder's state with the encoder's hidden states. GCA introduces a parallel attention path that projects these states into an "error-type semantic space" before comparison. This ensures that the query and key are aligned based on grammatical error context, facilitating more precise corrections.
Soft Representations
To solve the problem of error propagation, LET avoids "hard" one-hot labels. Instead, it utilizes intermediate hidden vectors from the classification head. These "soft" vectors preserve the probability distribution across all possible error types, allowing the generator to remain flexible even if the top-1 detection prediction is incorrect.
Key Results
LET was evaluated against standard GEC benchmarks, including the BEA-test and CoNLL-2014. The researchers utilized the ERRANT toolkit to categorize errors, finding that higher granularity in error types (up to 55 classes) consistently improved performance.
As shown in the performance table, LET achieved significant gains:
- BEA-test: In constrained settings, LET reached an $F_{0.5}$ score of 59.5, outperforming the previous best generative model by 1.0 point.
- CoNLL-2014: The model achieved an $F_{0.5}$ of 55.6, a 1.2-point improvement over the previous state-of-the-art.
- Scalability: In unconstrained settings with additional training data, LET reached an $F_{0.5}$ of 71.9 on the BEA-test.
Ablation studies confirmed that both GID and GCA are essential, as removing either module resulted in a measurable performance decline.
Conclusion
The LET framework demonstrates that providing explicit, soft-coded error guidance to a generative model significantly enhances its correction capabilities. By aligning the semantic spaces of detection and generation, LET overcomes the traditional pitfalls of hybrid GEC systems. While the model currently faces challenges with long-distance word disorder, it represents a major step toward more transparent and accurate grammatical error correction. Future research will focus on incorporating global structural information to further improve sentence-level coherence.
Summary updated