Skip to main content
QUICK REVIEW

[Paper Review] Elephant in the Room: An Evaluation Framework for Assessing Adversarial Examples in NLP

Ying Xu, Xu Zhong|arXiv (Cornell University)|Jan 22, 2020
Adversarial Robustness in Machine LearningComputer Science25 references9 citations
TL;DR

This paper proposes a comprehensive evaluation framework for adversarial examples in NLP, combining automatic metrics and human evaluation to assess four key criteria: attack success, textual similarity, fluency, and label preservation. The study reveals that most existing attack methods generate adversarial examples that sacrifice fluency and semantic content, with many 'cheating' by flipping sentiment labels, undermining their utility for adversarial training.

ABSTRACT

An adversarial example is an input transformed by small perturbations that machine learning models consistently misclassify. While there are a number of methods proposed to generate adversarial examples for text data, it is not trivial to assess the quality of these adversarial examples, as minor perturbations (such as changing a word in a sentence) can lead to a significant shift in their meaning, readability and classification label. In this paper, we propose an evaluation framework consisting of a set of automatic evaluation metrics and human evaluation guidelines, to rigorously assess the quality of adversarial examples based on the aforementioned properties. We experiment with six benchmark attacking methods and found that some methods generate adversarial examples with poor readability and content preservation. We also learned that multiple factors could influence the attacking performance, such as the length of the text inputs and architecture of the classifiers.

Motivation & Objective

  • To address the lack of systematic evaluation for adversarial examples in NLP, especially beyond attack success rate.
  • To identify critical quality dimensions—textual similarity, fluency, and label preservation—that are often overlooked in existing evaluation protocols.
  • To develop a dual evaluation framework combining automatic metrics and human annotation to rigorously assess adversarial example quality.
  • To investigate how model architecture, input length, and attack type influence the quality and transferability of adversarial examples.
  • To demonstrate that many current methods generate low-quality adversarial examples that 'cheat' by flipping sentiment, limiting their value for robustness improvement.

Proposed method

  • Propose a four-criteria evaluation framework: (a) attack success, (b) textual similarity (measured via BLEU and SEM), (c) fluency (measured via ACPT), and (d) sentiment label preservation.
  • Conduct human evaluation via crowdsourcing to assess content preservation, fluency, and sentiment consistency using three distinct questions per example.
  • Use automatic metrics—BLEU, SEM (semantic embedding similarity), and ACPT (a fluency score derived from n-gram language models)—to quantify linguistic quality.
  • Test six benchmark attack methods (including TextFooler, HotFlip, FGSM, FGVM, DeepFool, and TYC) across white-box and black-box settings on sentiment classification tasks.
  • Compare automatic metric scores against human annotations to validate the reliability of each metric in capturing human judgment.
  • Analyze transferability and computational efficiency across methods to assess practical trade-offs in adversarial example generation.

Experimental results

Research questions

  • RQ1To what extent do existing adversarial attack methods in NLP preserve the original sentence’s meaning and fluency, beyond simply fooling the classifier?
  • RQ2How well do automatic metrics (e.g., BLEU, SEM, ACPT) align with human judgments of textual similarity, fluency, and sentiment preservation?
  • RQ3Why do some attack methods, especially on short, sentiment-laden texts like those in Yelp50, fail to preserve semantic content and fluency despite high attack success?
  • RQ4How do model architecture (e.g., CNN vs. LSTM) and input length influence the quality and transferability of adversarial examples?
  • RQ5To what extent do current methods 'cheat' by flipping sentiment labels rather than generating semantically coherent adversarial examples?

Key findings

  • TextFooler produces the highest-quality adversarial examples across all criteria, achieving strong performance in content preservation and fluency, though with the poorest transferability.
  • HotFlip performs comparably to TextFooler in fluency and content preservation, and maintains relatively high attack success, but also suffers from poor transferability.
  • TYC generates adversarial examples with better transferability but significantly worse fluency and content preservation, indicating a trade-off between transferability and quality.
  • FGSM, FGVM, and DeepFool perform poorly on all quality metrics, largely due to direct perturbation of word embeddings without word-level substitution, leading to incoherent or unnatural outputs.
  • A strong correlation exists between attack success and sentiment flipping: many methods achieve high success by replacing positive words with negative ones, undermining their value for adversarial training.
  • Automatic metrics like ACPT show strong alignment with human judgments on fluency, while BLEU is less reliable—evidenced by high BLEU scores for HotFlip on Yelp50 despite poor human-rated paraphrasing quality.

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.