Sequence-to-Action: Grammatical Error Correction with Action Guided Sequence Generation

Jiquan Li, Junliang Guo, Yongxin Zhu, Xin Sheng, Deqiang Jiang, Bo Ren, Linli Xu

TL;DR

The Sequence-to-Action (S2A) framework bridges the gap between sequence-to-sequence generation and sequence tagging for Grammatical Error Correction (GEC). By introducing three simple, language-agnostic atomic actions—SKIP, COPY, and GENerate—the model effectively mitigates the over-correction issues plaguing traditional generation models while retaining the flexibility to handle complex edits and long insertions across multiple languages.

What Problem Does This Paper Address?

Grammatical Error Correction (GEC) has two primary goals: fixing mistakes and leaving correct text untouched.

Currently, two main paradigms dominate the field, but both have distinct flaws:

  1. Sequence-to-Sequence (seq2seq) Models: These models generate the corrected sentence from scratch. Because they lack a direct mechanism to anchor themselves to the source text, they often suffer from "over-correction," word omissions, or repetitive loops, especially on long sentences or out-of-vocabulary words.
  2. Sequence Tagging Models: These treat GEC as a text-editing task, predicting specific edit operations for each token. While this prevents over-correction, these models rely heavily on human-designed, language-specific rules and predefined vocabularies. This makes them rigid, poor at handling long insertions or reorderings, and difficult to adapt to new languages.

The authors propose Sequence-to-Action (S2A) to combine the best of both worlds: the safety against over-correction found in tagging models, and the fluid flexibility of generative seq2seq models.

Methods

The S2A framework augments a standard seq2seq architecture with a novel Sequence-to-Action module built on top of the decoder.

Figure 1: An illustration of the proposed framework.

Instead of predicting tokens directly from scratch, the model learns to output a token-level action sequence before generating each word. The action space is stripped down to just three atomic choices:

  • COPY: Keep the current source token (biasing the model to preserve correct text).
  • SKIP: Ignore the current source token (used for deletions or replacements).
  • GENerate (GEN): Produce a completely new token from the entire vocabulary (allowing for flexible insertions).

Input Construction & Probability Fusion

During training, the source and target sentences are aligned using dynamic programming to create an integrated sequence $z$ and an action sequence $a$.

An illustration for the decoder input construction.

A special blank token [BLK] acts as a placeholder when a word is skipped. At inference time, the model computes two distributions at each step: the standard token distribution from the decoder and the action distribution from the S2A module. These distributions are fused together, allowing the predicted action to guide and constrain the final token choice.

Datasets

The authors evaluated their model on both English and Chinese benchmarks:

  • English GEC: Trained on the restricted track of the BEA-2019 shared task (Lang-8, NUCLE, FCE, and W&I+LOCNESS). Validated on CoNLL-2013 and tested on CoNLL-2014. They also utilized a 100M synthetic pseudo-data corpus for pre-training.
  • Chinese GEC: Evaluated on the NLPCC-2018 Task 2 benchmark, utilizing a 1.2M sentence pair corpus derived from Lang-8 for training and the PKU Chinese Learner Corpus for testing.

Key Insights and Ideas

  • Language Independence: Unlike state-of-the-art tagging models like GECToR, which rely on complex, language-specific morphological transformations (e.g., English verb conjugations), S2A uses only three basic actions. This makes it inherently language-agnostic.
  • Naturally Alleviating Over-Correction: Because the vast majority of tokens in a GEC dataset are already correct, the COPY action dominates the training data. This naturally biases the model toward keeping the source text intact unless it is highly confident an error exists.
  • Autoregressive Flexibility: When the model chooses the GEN action, it generates text autoregressively from the entire vocabulary, bypassing the rigid phrase-length limits that cripple standard sequence tagging models during long insertions or sentence reorderings.

Key Results

English GEC (CoNLL-2014)

When trained purely on the BEA-2019 training set (without pre-training), the single S2A model achieved an $F_{0.5}$ score of 52.5, outperforming the Transformer Big baseline (50.4). When pre-trained on synthetic data, the S2A ensemble achieved a competitive $F_{0.5}$ score of 62.9.

The results on the CoNLL-2014 English GEC task.

Chinese GEC (NLPCC-2018)

S2A achieved a new state-of-the-art on the Chinese benchmark. Without data augmentation, it scored 30.46 $F_{0.5}$ (outperforming the standard Transformer's 27.86). When combined with MaskGEC data augmentation, it reached 38.06, outperforming all baselines.

The results on the NLPCC-2018 Chinese GEC task.

Crucially, the experiments highlighted the weakness of sequence tagging models across languages: GECToR (which excels in English) degenerated significantly on Chinese due to the lack of a well-designed Chinese edit vocabulary, whereas S2A adapted seamlessly.

Limitations and Future Work

While the paper demonstrates strong performance and excellent cross-lingual generalization, it inherits the standard computational overhead of autoregressive seq2seq models during inference. This makes it slower than non-autoregressive sequence tagging models that can edit sentences in parallel.

For future work, the authors plan to extend the Sequence-to-Action philosophy to other text-editing domains, such as text infilling, text style transfer, and abstractive rewriting.

Summary updated

BibTeX
@inproceedings{li2022sequence,
  author = {Jiquan Li and Junliang Guo and Yongxin Zhu and Xin Sheng and Deqiang Jiang and Bo Ren and Linli Xu},
  title = {{Sequence-to-Action: Grammatical Error Correction with Action Guided Sequence Generation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i10.21345},
}
Figure