Grammatical Error Detection Using Error- and Grammaticality-Specific Word Embeddings

Masahiro Kaneko, Yuya Sakaizawa, Mamoru Komachi

Abstract

This paper introduces a novel approach to training word embeddings specifically for Grammatical Error Detection (GED) by incorporating learner-specific error patterns and grammaticality labels. While standard word embeddings are trained on clean, native-speaker text, they lack the necessary context to identify common learner mistakes. We propose three specialized models: Error-specific Word Embeddings (EWE), Grammaticality-specific Word Embeddings (GWE), and a hybrid E&GWE. By pre-training these embeddings to distinguish between correct usage and common learner errors, and subsequently using them to initialize a Bidirectional LSTM (Bi-LSTM) classifier, we achieved state-of-the-art performance on the First Certificate in English (FCE) dataset.

Introduction

Grammatical Error Detection (GED) is a critical task in natural language processing, aimed at identifying incorrect word usage in text written by non-native speakers. The standard architecture for GED involves a Bidirectional LSTM (Bi-LSTM) initialized with pre-trained word embeddings like word2vec or GloVe.

However, a fundamental mismatch exists: these standard embeddings are trained on massive volumes of "clean" text (e.g., Wikipedia or news articles). While effective at capturing syntax and semantics, they do not encode the "error-proneness" of words. For instance, a learner might confuse "price" with "prize" or "advice" with "advise." Standard models may see both as valid nouns in similar contexts. We argue that for effective GED, word representations must explicitly encode grammaticality and common error patterns found in learner corpora.

Methods

We propose three specialized embedding models based on the Collobert & Weston (C&W) architecture. The core innovation lies in how the model handles negative sampling and secondary objectives.

  1. Error-specific Word Embedding (EWE): Standard C&W training uses random negative sampling. EWE replaces this with "smart" negative sampling. Using a probability distribution derived from learner corpora, the model replaces a target word with one that learners actually confuse it with (e.g., swapping "prize" for "price").
  2. Grammaticality-specific Word Embedding (GWE): This model adds a secondary objective. In addition to the standard ranking loss, the model must predict a binary label indicating whether the center word of an n-gram is correct or incorrect.
  3. Error & Grammaticality-specific Word Embedding (E&GWE): This hybrid approach combines the "smart" negative sampling of EWE with the binary classification objective of GWE.
Architectural comparison between standard (a) and grammaticality-specific (b) embedding models.

These specialized embeddings are then used to initialize a Bi-LSTM classifier, which is fine-tuned on labeled GED datasets.

Datasets and Experimental Setup

The models were evaluated using several key corpora:

  • FCE-public: The primary benchmark consisting of learner essays from the Cambridge English: First exam.
  • NUCLE & CoNLL-14: Used for cross-population robustness testing.
  • Lang-8: A massive "social" learner corpus used to extract over 270,000 error patterns for the EWE and E&GWE models.
Corpus statistics including the number of error patterns (substitution candidates) extracted.

While Lang-8 is too noisy for direct classifier training, it serves as an excellent source for extracting the sheer volume of error patterns required to train robust embeddings.

Results

The proposed methods consistently outperformed baselines across all datasets. The Bi-LSTM initialized with E&GWE achieved an $F_{0.5}$ score of 41.4 on the FCE-public dataset, surpassing the previous state-of-the-art of 41.1.

The most significant gains were observed when scaling the error patterns. By utilizing the massive Lang-8 corpus (E&GWE-L8), the $F_{0.5}$ score reached 44.6, a substantial improvement over existing methods. Visualization of the resulting embeddings using t-SNE revealed that words frequently misused by learners moved in a specific direction in the vector space, suggesting the model successfully learned a "dimension of error-proneness."

Discussion and Conclusion

This research demonstrates that "error-aware" word representations are significantly more effective for GED than general-purpose embeddings. By explicitly modeling how learners make mistakes, the system can better distinguish between valid contextual variations and actual grammatical errors.

One limitation of the current approach is its focus on "substitution" errors. Because the model relies on swapping existing words, it is less effective at detecting "deletion" errors (missing words). Future work could address this by incorporating omission patterns or leveraging learner native language (L1) data to predict specific types of interference errors.

Summary updated

BibTeX
@article{kaneko2018grammatical,
  author = {Masahiro Kaneko and Yuya Sakaizawa and Mamoru Komachi},
  title = {{Grammatical Error Detection Using Error- and Grammaticality-Specific Word Embeddings}},
  journal = {Journal of Natural Language Processing},
  year = {2018},
  doi = {10.5715/jnlp.25.421},
}
Figure