Abstract
TCAB is a massive new benchmark featuring 1.5 million adversarial text examples designed to shift the focus from merely defending models to attack identification. By providing a dataset orders of magnitude larger than previous efforts, it enables researchers to train models that can detect, label, and localize the specific adversarial strategies used to trick text classifiers.
Introduction
Text classifiers—used for everything from spam filtering to toxic comment detection—are increasingly under fire from adversarial attacks. These attacks involve making minor, semantics-preserving perturbations to text, such as swapping a word for a synonym or introducing a misspelling, to flip a model's prediction.
While much research focuses on robustness (making models harder to fool), there is a significant gap in attack identification. If a system is attacked, defenders need to know if the text was manipulated, which specific attack algorithm was used, and which part of the text was changed. Existing benchmarks were previously too small to train the complex models needed for these forensic tasks. TCAB addresses this by providing the scale necessary for deep learning-based attack analysis.
Methodology
The researchers built TCAB using a fully automated pipeline consisting of target model selection, attack generation, and the development of identification baselines.
- Target Models: Three state-of-the-art transformer models (BERT, RoBERTa, and XLNet) were fine-tuned on six different datasets.
- Attack Generation: 12 diverse adversarial attack methods (such as BAE, DeepWordBug, and TextFooler) were employed using the
TextAttackandOpenAttackframeworks. These range from character-level typos to word-level synonym swaps. - Baseline Identification Model: To prove the dataset's utility, a baseline classifier was developed combining fine-tuned BERT embeddings with hand-crafted features, including text properties (length, punctuation), language model properties (perplexity via GPT-2), and target model internal states (gradients, activations, and saliency).
Dataset Composition
TCAB is built upon six source datasets across two primary domains:
- Sentiment Analysis: SST-2, IMDB, and a Climate Change tweet dataset.
- Abuse Detection: Wikipedia (Talk Pages), Hatebase, and Civil Comments.
The resulting benchmark contains over 1.5 million successful attack instances and roughly 900,000 "clean" examples. This represents a massive leap over previous benchmarks like Adversarial GLUE, which contains only 5,000 human-verified attacks.
Analysis and Key Insights
Analysis of the benchmark reveals that a text attack cannot be understood in isolation; it must be viewed through the lens of the specific classifier it targeted. This justifies the use of "Target Model Properties" as powerful features for identification.
Interestingly, the amount of text changed does not always correlate with success. For example, the DeepWordBug attack only perturbs about 20% of words on average but remains one of the most successful methods. Furthermore, human evaluation showed domain sensitivity: attacks on abuse detection datasets were much better at preserving original meaning (81% label preservation) compared to sentiment analysis (51%), where word swaps often fundamentally changed the human-perceived sentiment.
Key Results
The baseline approach, using Gradient Boosted Trees on top of BERT and hand-crafted features, performed impressively:
- Attack Detection: Achieved an average of 91.7% accuracy in determining if text was an attack or "clean."
- Attack Labeling: Achieved 66.7% accuracy in identifying which of the 11 specific attack algorithms was used.
- Model Robustness: Among the target models, XLNet proved to be the most robust, though it was still successfully fooled 61% of the time across all attempts.
Limitations and Future Work
The primary limitation is label preservation. Because the generation process is automated, some "successful" attacks change the underlying meaning enough that a human would also change the label. Future work includes expanding TCAB to more languages, incorporating newer attacks, and developing a "filtered" version of the dataset containing only human-verified, semantics-preserving attacks for more nuanced studies.
Summary updated