Lune

EMNLP2020Top-tier venue

BERT-ATTACK: Adversarial Attack Against BERT Using BERT

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

Abstract

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 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-theart 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 .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

150 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Tree of Attacks: Jailbreaking Black-Box LLMs Automatically cites TextBugger: Generating Adversarial Text Against Real-world Applications
  • Tree of Attacks: Jailbreaking Black-Box LLMs Automatically cites Word-level Textual Adversarial Attacking as Combinatorial Optimization
  • Tree of Attacks: Jailbreaking Black-Box LLMs Automatically cites Automatically Auditing Large Language Models via Discrete Optimization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers150

  1. Tree of Attacks: Jailbreaking Black-Box LLMs AutomaticallyAnay Mehrotra, Manolis Zampetakis, Paul Kassianik, Blaine Nelson et al.NeurIPS 2024 · 835 citations
  2. Automatically Auditing Large Language Models via Discrete OptimizationErik Jones, Anca D. Dragan, Aditi Raghunathan, Jacob SteinhardtICML 2023 · 232 citations
  3. Natural Attack for Pre-trained Models of CodeZhou Yang, Jieke Shi, Junda He, David LoICSE 2022 · 150 citations
  4. An extensive study on pre-trained models for program understanding and generationZhengran Zeng, Hanzhuo Tan, Haotian Zhang, Jing Li et al.ISSTA 2022 · 142 citations
  5. Set-level Guidance Attack: Boosting Adversarial Transferability of Vision-Language Pre-training ModelsDong Lu, Zhiqiang Wang, Teng Wang, Weili Guan et al.ICCV 2023 · 141 citations

Builds on2

  1. TextBugger: Generating Adversarial Text Against Real-world ApplicationsJinfeng Li, Shouling Ji, Tianyu Du, Bo Li et al.NDSS 2019 · 876 citations
  2. Word-level Textual Adversarial Attacking as Combinatorial OptimizationYuan Zang, Fanchao Qi, Chenghao Yang, Zhiyuan Liu et al.ACL 2020 · 188 citations

Related papers

  1. Modeling Adversarial Attack on Pre-trained Language Models as Sequential Decision MakingXuanjie Fang, Sijie Cheng, Yang Liu, Wei WangACL Findings 2023 · 9 citations
  2. Evaluating the Validity of Word-level Adversarial Attacks with Large Language ModelsHuichi Zhou, Zhaoyang Wang, Hongtao Wang, Dongping Chen et al.ACL Findings 2024 · 6 citations
  3. Perturbations in the Wild: Leveraging Human-Written Text Perturbations for Realistic Adversarial Attack and DefenseThai Le, Jooyoung Lee, Kevin Yen, Yifan Hu et al.ACL Findings 2022 · 22 citations
  4. Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and EntailmentDi Jin, Zhijing Jin, Joey Tianyi Zhou, Peter SzolovitsAAAI 2020 · 1,333 citations
  5. Text Adversarial Purification as Defense against Adversarial AttacksLinyang Li, Demin Song, Xipeng QiuACL 2023 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines