Skip to main content
QUICK REVIEW

[Paper Review] Combating Adversarial Misspellings with Robust Word Recognition

Danish Pruthi, Bhuwan Dhingra|arXiv (Cornell University)|May 27, 2019
Topic ModelingComputer Science29 references26 citations
TL;DR

This paper proposes a task-agnostic defense using an RNN-based semi-character word recognition model to mitigate adversarial misspellings in text classification. By recognizing corrupted words before classification, the method reduces error rates by 32% relative (3.3% absolute) over vanilla models and restores BERT accuracy from 45.8% to 75% under 1-character attacks, with robustness strongly tied to model sensitivity and backoff strategy.

ABSTRACT

To combat adversarial spelling mistakes, we propose placing a word recognition model in front of the downstream classifier. Our word recognition models build upon the RNN semi-character architecture, introducing several new backoff strategies for handling rare and unseen words. Trained to recognize words corrupted by random adds, drops, swaps, and keyboard mistakes, our method achieves 32% relative (and 3.3% absolute) error reduction over the vanilla semi-character model. Notably, our pipeline confers robustness on the downstream classifier, outperforming both adversarial training and off-the-shelf spell checkers. Against a BERT model fine-tuned for sentiment analysis, a single adversarially-chosen character attack lowers accuracy from 90.3% to 45.8%. Our defense restores accuracy to 75%. Surprisingly, better word recognition does not always entail greater robustness. Our analysis reveals that robustness also depends upon a quantity that we denote the sensitivity.

Motivation & Objective

  • To address the vulnerability of modern NLP models to minimal, adversarial spelling perturbations such as character swaps, drops, and additions.
  • To demonstrate that character-level and word-piece models are more vulnerable than word-level models due to finer-grained adversarial control.
  • To propose a defense mechanism using a word recognition model that restores semantic integrity before downstream classification.
  • To investigate the trade-off between word error rate and model sensitivity in determining robustness against adversarial attacks.
  • To quantify and control model sensitivity as a key factor in designing robust word recognition defenses.

Proposed method

  • Introduce a word recognition model based on RNN semi-character architecture, trained on domain-specific text to recognize misspelled words.
  • Implement multiple backoff strategies—pass-through, background, and neutral—to handle out-of-vocabulary (UNK) predictions.
  • Use the word recognizer as a preprocessor, replacing corrupted input words with likely correct forms before feeding to the downstream classifier.
  • Train the word recognizer on synthetic adversarial perturbations (add, drop, swap) to improve robustness to real-world attacks.
  • Define and compute a sensitivity metric measuring the number of unique predictions a model makes under perturbations, with lower values indicating higher robustness.
  • Evaluate defenses across multiple model types (BiLSTM, BERT) and attack types (1- and 2-character edits), comparing to adversarial training and spell checkers.

Experimental results

Research questions

  • RQ1How does adversarial character-level perturbation affect the performance of modern NLP models, particularly those using character or word-piece inputs?
  • RQ2Why are character-level and word-piece models more vulnerable to adversarial attacks than word-level models despite their finer-grained representation?
  • RQ3Can a word recognition model serve as an effective, task-agnostic defense against adversarial misspellings in text classification?
  • RQ4What is the relationship between word error rate and model sensitivity in determining the robustness of a word recognition defense?
  • RQ5How do different backoff strategies (pass-through, background, neutral) impact both recognition accuracy and robustness under adversarial attacks?

Key findings

  • A single adversarially chosen 1-character swap reduced BERT sentiment classifier accuracy from 90.3% to 45.8%, demonstrating high vulnerability to minimal perturbations.
  • The proposed word recognition defense restored BERT accuracy to 75.0% under 1-character swap attacks, significantly outperforming adversarial training (69.2% accuracy).
  • The neutral backoff strategy achieved the lowest sensitivity (11.3) and highest robustness, outperforming pass-through and background variants in adversarial settings.
  • Robustness is not solely determined by word error rate; models with low sensitivity and moderate error rates confer the greatest defense performance.
  • The sensitivity metric effectively quantifies the number of unique predictions a model makes under perturbations, with lower values indicating reduced attack surface.
  • Human evaluation confirmed that 48 out of 50 adversarially modified reviews preserved sentiment, indicating that the defense maintains semantic integrity.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.