Quality assurance · Production

GECToR: Grammarly's sequence-tagging 'tag, not rewrite' approach achieves state-of-the-art grammatical error correction with up to 10x faster inference

The problem

NMT-based GEC systems required large amounts of training data, generated inferences slowly, and could not explain what types of mistakes were made—making them better suited to academic research than real-world product deployment.

First attempt

The dominant NMT/seq2seq translation approach used encoder-decoder architecture where language generation was more complex than language understanding, resulting in slower inference and a black-box system with no explainability.

Workflow diagram · grounded in source
1
Token alignment preprocessing
trigger
“we roughly align each token in the source sequence with one or more tokens from the target sequence”
2
Transformation tag assignment
ai_action
“we convert each mapping into the tag that represents the transformation”
3
GECToR model prediction
ai_action
“Our GEC sequence-tagging model, called GECToR, is an encoder made up of a pre-trained BERT-like transformer, stacked with two linear layers, with softmax layers on the top. The two linear layers are responsible for mistake detection and …”
4
Iterative correction loop
feedback_loop
“We modify the sentence, run our tagger on it again, and repeat”
5
Corrected sequence output
output
“we can then apply these transformations to get the modified output sequence”
Reported outcome

GECToR achieved state-of-the-art F0.5 scores on standard GEC benchmarks and ran up to 10 times faster than NMT-based systems, with error coverage reaching 80% when g-transformations were included.

Reported metrics
inference speed vs NMT-based systemsup to 10 times as fast
F0.5 score on CoNLL-2014 (single model)65.3
F0.5 score on BEA-2019 (single model)72.4
F0.5 score on CoNLL-2014 (ensemble)66.5
Show all 10 reported metrics
inference speed vs NMT-based systemsup to 10 times as fast
F0.5 score on CoNLL-2014 (single model)65.3
F0.5 score on BEA-2019 (single model)72.4
F0.5 score on CoNLL-2014 (ensemble)66.5
F0.5 score on BEA-2019 (ensemble)73.6
error coverage with g-transformations80%
error coverage with top 100 basic tags only60%
errors in CoNLL-2014 covered by tag vocabulary98%
GECToR average inference time (5 iterations)0.40 sec
GECToR average inference time (1 iteration)0.20 sec
Reported stack
GECToRBERT-like transformer
Source
https://www.grammarly.com/blog/engineering/gec-tag-not-rewrite/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

GECToR achieved state-of-the-art F0.5 scores on standard GEC benchmarks and ran up to 10 times faster than NMT-based systems, with error coverage reaching 80% when g-transformations were included.

What tools did this team use?

GECToR, BERT-like transformer.

What results were reported?

inference speed vs NMT-based systems: up to 10 times as fast; F0.5 score on CoNLL-2014 (single model): 65.3; F0.5 score on BEA-2019 (single model): 72.4; F0.5 score on CoNLL-2014 (ensemble): 66.5 (source-reported, not independently verified).

What failed first in this deployment?

The dominant NMT/seq2seq translation approach used encoder-decoder architecture where language generation was more complex than language understanding, resulting in slower inference and a black-box system with no expl…

How is this quality assurance AI workflow structured?

Token alignment preprocessing → Transformation tag assignment → GECToR model prediction → Iterative correction loop → Corrected sequence output.