Gender Bias and Universal Substitution Adversarial Attacks on Grammatical Error Correction Systems for Automated Assessment

Vyas Raina, Mark GalesarXiv 2022

TL;DR

This paper reveals that Grammatical Error Correction (GEC) systems, commonly used for automated language assessment, are highly vulnerable to simple "universal substitution" attacks. By exploiting inherent gender biases and using a small, pre-learned dictionary of word swaps, an adversary can trick these systems into making fewer corrections, thereby artificially inflating a candidate's fluency score without actually improving their writing.

What Problem Does This Paper Address?

Automated assessment of English language learners often relies on GEC systems. These systems take an input sentence, identify errors, and produce a corrected version. A common metric for fluency is the edit count: the fewer changes the system makes, the more "fluent" the candidate is perceived to be.

The problem is that deep learning-based GEC models are susceptible to adversarial attacks. While most attacks require multiple queries to the target system—a luxury a student taking an exam doesn't have—this paper explores universal adversarial attacks. These are simple, input-agnostic rules (like "always replace word X with word Y") that a candidate could easily apply to their writing to "cheat" the system. The goal is to find substitutions that conceal genuine grammatical errors from the model, leading to an unjustly high score.

Methods

The authors investigate two main types of universal substitution attacks:

  1. Gender Pronoun Substitution: Exploiting potential gender bias by swapping all male pronouns (e.g., "he") with female pronouns ("she"), or vice-versa.
  2. Generalized Universal Substitution: Learning a fixed dictionary mapping for common words.
  3. Target Selection: They identify the most frequent nouns, adjectives, and adverbs in a training set.
  4. Greedy Search: For each target word, they search the English vocabulary for a substitute (of the same Part-of-Speech) that minimizes the number of edits the GEC system makes across the training data.
  5. Transferability: The dictionary is learned on one dataset (FCE) and then tested on unseen datasets (BEA and CoNLL) to see if the "cheat sheet" generalizes.

The target system for these experiments is Gramformer, a popular Transformer-based GEC model.

Datasets

The study utilizes three benchmark GEC datasets:

  • FCE (First Certificate in English): Used for training the attack dictionary and initial evaluation.
  • BEA (BEA-2019 shared task): Used as an unseen test set for transferability.
  • CoNLL (CoNLL-2014 shared task): Used as an unseen test set for transferability.

The baseline performance of the GEC system on these datasets is summarized below:

GEC system performance across datasets

Key Insights and Ideas

  • Worrying Gender Bias: The GEC system is significantly more "lenient" toward female pronouns. Simply swapping male pronouns for female ones (m2f) consistently reduces the number of edits the system suggests, effectively "hiding" errors.
  • The "Metamorphosis" Effect: The search for optimal substitutions yielded some surprising results. For instance, the authors found that replacing the common noun "life" with the more complex "metamorphosis" was highly effective at reducing edit counts.
  • Minimal Effort, High Impact: An adversary doesn't need a massive dictionary to be effective. A dictionary of just 14 words (6 nouns, 4 adjectives, 2 adverbs, and 3 gender pronouns) was sufficient to reduce the average number of edits on completely unseen test sets.
  • Agnostic Malpractice: Because these attacks are universal, an adversary could theoretically "sell" these dictionaries to candidates as a way to game the assessment system regardless of the specific essay topic.

Key Results

The gender bias results were particularly stark. As shown in the table below, swapping male to female pronouns (m2f) reduced edits by up to 7.2%, whereas the reverse (f2m) caused a massive 64.3% increase in edits on the FCE dataset.

Impact of gender pronoun substitution on average edits

When applying the generalized 14-word substitution dictionary to unseen test sets, the authors observed a clear reduction in the average number of GEC edits for the affected samples:

Average number of GEC edits with and without the universal attack

Limitations and Future Work

The authors acknowledge several limitations:

  • Computational Feasibility: Due to the massive size of the English vocabulary, the search for optimal substitutes was restricted to a small number of hand-crafted target words.
  • Semantic Preservation: While the attacks maintain Part-of-Speech, they do not explicitly ensure that the sentence still makes sense (e.g., substituting "life" with "metamorphosis" might result in a bizarre sentence). Future work could incorporate semantic constraints to make the attacks more subtle.
  • Defense Mechanisms: This paper focuses on the threat. The logical next step is developing robust detection methods or training GEC systems to be more resilient against these specific types of adversarial manipulations.

Summary updated

Abstract

Grammatical Error Correction (GEC) systems perform a sequence-to-sequence task, where an input word sequence containing grammatical errors, is corrected for these errors by the GEC system to output a grammatically correct word sequence. With the advent of deep learning methods, automated GEC systems have become increasingly popular. For example, GEC systems are often used on speech transcriptions of English learners as a form of assessment and feedback - these powerful GEC systems can be used to automatically measure an aspect of a candidate's fluency. The count of \textit{edits} from a candidate's input sentence (or essay) to a GEC system's grammatically corrected output sentence is indicative of a candidate's language ability, where fewer edits suggest better fluency. The count of edits can thus be viewed as a \textit{fluency score} with zero implying perfect fluency. However, although deep learning based GEC systems are extremely powerful and accurate, they are susceptible to adversarial attacks: an adversary can introduce a small, specific change at the input of a system that causes a large, undesired change at the output. When considering the application of GEC systems to automated language assessment, the aim of an adversary could be to cheat by making a small change to a grammatically incorrect input sentence that conceals the errors from a GEC system, such that no edits are found and the candidate is unjustly awarded a perfect fluency score. This work examines a simple universal substitution adversarial attack that non-native speakers of English could realistically employ to deceive GEC systems used for assessment.
BibTeX
@misc{raina2022gender,
  author = {Vyas Raina and Mark Gales},
  title = {{Gender Bias and Universal Substitution Adversarial Attacks on Grammatical Error Correction Systems for Automated Assessment}},
  year = {2022},
  eprint = {2208.09466},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.09466},
}
Figure