Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examples

About

Recent efforts have shown that neural text processing models are vulnerable to adversarial examples, but the nature of these examples is poorly understood. In this work, we show that adversarial attacks against CNN, LSTM and Transformer-based classification models perform word substitutions that are identifiable through frequency differences between replaced words and their corresponding substitutions. Based on these findings, we propose frequency-guided word substitutions (FGWS), a simple algorithm exploiting the frequency properties of adversarial word substitutions for the detection of adversarial examples. FGWS achieves strong performance by accurately detecting adversarial examples on the SST-2 and IMDb sentiment datasets, with F1 detection scores of up to 91.4% against RoBERTa-based classification models. We compare our approach against a recently proposed perturbation discrimination framework and show that we outperform it by up to 13.0% F1.

Maximilian Mozes, Pontus Stenetorp, Bennett Kleinberg, Lewis D. Griffin• 2020

Related benchmarks

TaskDatasetResultRank
Adversarial Text DetectionIMDB
F1 Score89.8
25
Adversarial Text DetectionIMDB (test)
F1 Score89.8
24
Adversarial Text DetectionAG-News
F1 Score90.6
24
Adversarial DetectionAG-News
F1 Score90.6
18
Adversarial Text DetectionYelp
F1 Score91.2
15
Adversarial DetectionRTMR
F1 Score78.9
12
Adversarial Text DetectionRTMR
F1 Score78.9
11
Adversarial Text DetectionYelp (test)
F10.912
7
Adversarial Text DetectionAG News (test)
F1 Score89.5
6
Adversarial Text DetectionRTMR (test)
F1 Score78.9
3
Showing 10 of 10 rows

Other info

Follow for update