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

BERT-ATTACK: Adversarial Attack Against BERT Using BERT

About

Adversarial attacks for discrete data (such as texts) have been proved significantly more challenging than continuous data (such as images) since it is difficult to generate adversarial samples with gradient-based methods. Current successful attack methods for texts usually adopt heuristic replacement strategies on the character or word level, which remains challenging to find the optimal solution in the massive space of possible combinations of replacements while preserving semantic consistency and language fluency. In this paper, we propose \textbf{BERT-Attack}, a high-quality and effective method to generate adversarial samples using pre-trained masked language models exemplified by BERT. We turn BERT against its fine-tuned models and other deep neural models in downstream tasks so that we can successfully mislead the target models to predict incorrectly. Our method outperforms state-of-the-art attack strategies in both success rate and perturb percentage, while the generated adversarial samples are fluent and semantically preserved. Also, the cost of calculation is low, thus possible for large-scale generations. The code is available at https://github.com/LinyangLee/BERT-Attack.

Linyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue, Xipeng Qiu• 2020

Related benchmarks

TaskDatasetResultRank
Text-to-SQLSpider (dev)--
100
Visual ReasoningNLVR2--
49
Text ClassificationIMDB (test)
Attack Success Rate88.2
27
Visual EntailmentSNLI-VE
Accuracy0.1051
24
RECRefCOCOg
ASR22.03
16
RECRefCOCO+
ASR6.4
16
Adversarial AttackMGT Detector Evaluation Set XLM-RoBERTa-Base (test)
ASR (%)71.49
15
Text ClassificationAG's News (test)
A-rate74.6
13
Multimodal RecommendationAmazon Toys Zero-Shot (test)
HR@514.66
12
Multimodal RecommendationAmazon Toys Few-Shot (test)
HR (Top-5)0.1461
12
Showing 10 of 25 rows

Other info

Follow for update