HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

LM-Critic: Language Models for Unsupervised Grammatical Error Correction

Michihiro Yasunaga Jure Leskovec Percy Liang

LM-Critic: Language Models for Unsupervised Grammatical Error Correction

Abstract

Training a model for grammatical error correction (GEC) requires a set of labeled ungrammatical / grammatical sentence pairs, but manually annotating such pairs can be expensive. Recently, the Break-It-Fix-It (BIFI) framework has demonstrated strong results on learning to repair a broken program without any labeled examples, but this relies on a perfect critic (e.g., a compiler) that returns whether an example is valid or not, which does not exist for the GEC task. In this work, we show how to leverage a pretrained language model (LM) in defining an LM-Critic, which judges a sentence to be grammatical if the LM assigns it a higher probability than its local perturbations. We apply this LM-Critic and BIFI along with a large set of unlabeled sentences to bootstrap realistic ungrammatical / grammatical pairs for training a corrector. We evaluate our approach on GEC datasets across multiple domains (CoNLL-2014, BEA-2019, GMEG-wiki and GMEG-yahoo) and show that it outperforms existing methods in both the unsupervised setting (+7.7 F0.5) and the supervised setting (+0.5 F0.5).

Code Repositories

michiyasunaga/LM-Critic
Official
pytorch
Mentioned in GitHub
elaynelemos/gector-api
pytorch
Mentioned in GitHub
grammarly/gector
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
grammatical-error-correction-on-bea-2019-testLM-Critic
F0.5: 72.9
grammatical-error-correction-on-conll-2014LM-Critic
F0.5: 65.8
grammatical-error-correction-on-restricted+ BIFI with no critic
F0.5: 18.7
grammatical-error-correction-on-unrestricted+ BIFI (ours)
F0.5: 42.4

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp