SHIELD: Defending Textual Neural Networks against Multiple Black-Box Adversarial Attacks with Stochastic Multi-Expert Patcher
Thai Le, Noseong Park, Dongwon Lee
Abstract
Even though several methods have proposed to defend textual neural network (NN) models against black-box adversarial attacks, they often defend against a specific text perturbation strategy and/or require re-training the models from scratch. This leads to a lack of generalization in practice and redundant computation. In particular, the state-of-the-art transformer models (e.g., BERT, RoBERTa) require great time and computation resources. By borrowing an idea from software engineering, in order to address these limitations, we propose a novel algorithm, SHIELD, which modifies and re-trains only the last layer of a textual NN, and thus it “patches” and “transforms” the NN into a stochastic weighted ensemble of multi-expert prediction heads. Considering that most of current black-box attacks rely on iterative search mechanisms to optimize their adversarial perturbations, SHIELD confuses the attackers by automatically utilizing different weighted ensembles of predictors depending on the input. In other words, SHIELD breaks a fundamental assumption of the attack, which is a victim NN model remains constant during an attack. By conducting comprehensive experiments, we demonstrate that all of CNN, RNN, BERT, and RoBERTa-based textual NNs, once patched by SHIELD, exhibit a relative enhancement of 15%–70% in accuracy on average against 14 different black-box attacks, outperforming 6 defensive baselines across 3 public datasets. All codes are to be released.
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.
6 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Towards Robustness Against Natural Language Word Substitutions cites Word-level Textual Adversarial Attacking as Combinatorial Optimization
- TextShield: Beyond Successfully Detecting Adversarial Sentences in text classification cites Towards Robustness Against Natural Language Word Substitutions
- TextShield: Beyond Successfully Detecting Adversarial Sentences in text classification cites Word-level Textual Adversarial Attacking as Combinatorial Optimization
- TextShield: Beyond Successfully Detecting Adversarial Sentences in text classification cites Adversarial Training with Fast Gradient Projection Method against Synonym Substitution Based Text Attacks
- Don't Retrain, Just Rewrite: Countering Adversarial Perturbations by Rewriting Text cites ROSE: Robust Selective Fine-tuning for Pre-trained Language Models
- RMLM: A Flexible Defense Framework for Proactively Mitigating Word-level Adversarial Attacks cites Towards Robustness Against Natural Language Word Substitutions
- HQA-Attack: Toward High Quality Black-Box Hard-Label Adversarial Attack on Text cites Word-level Textual Adversarial Attacking as Combinatorial Optimization
Cited by top-tier papers6
- HQA-Attack: Toward High Quality Black-Box Hard-Label Adversarial Attack on TextHan Liu, Zhi Xu, Xiaotong Zhang, Feng Zhang et al.NeurIPS 2023 · 32 citations
- RMLM: A Flexible Defense Framework for Proactively Mitigating Word-level Adversarial AttacksZhaoyang Wang, Zhiyue Liu, Xiaopeng Zheng, Qinliang Su et al.ACL 2023 · 16 citations
- Don't Retrain, Just Rewrite: Countering Adversarial Perturbations by Rewriting TextAshim Gupta, Carter Wood Blum, Temma Choji, Yingjie Fei et al.ACL 2023 · 7 citations
- ROSE: Robust Selective Fine-tuning for Pre-trained Language ModelsLan Jiang, Hao Zhou, Yankai Lin, Peng Li et al.EMNLP 2022 · 5 citations
- TextShield: Beyond Successfully Detecting Adversarial Sentences in text classificationLingfeng Shen, Ze Zhang, Haiyun Jiang, Ying ChenICLR 2023
Builds on11
- Generative Pretraining From PixelsMark Chen, Alec Radford, Rewon Child, Jeffrey Wu et al.ICML 2020 · 1,773 citations
- Word-level Textual Adversarial Attacking as Combinatorial OptimizationYuan Zang, Fanchao Qi, Chenghao Yang, Zhiyuan Liu et al.ACL 2020 · 188 citations
- Mixup Inference: Better Exploiting Mixup to Defend Adversarial AttacksTianyu Pang, Kun Xu, Jun ZhuICLR 2020 · 114 citations
- Adversarial Training with Fast Gradient Projection Method against Synonym Substitution Based Text AttacksXiaosen Wang, Yichen Yang, Yihe Deng, Kun HeAAAI 2021 · 98 citations
- Towards Robustness Against Natural Language Word SubstitutionsXinshuai Dong, Anh Tuan Luu, Rongrong Ji, Hong LiuICLR 2021 · 63 citations
Related papers
- Improving the Robustness of Transformer-based Large Language Models with Dynamic AttentionLujia Shen, Yuwen Pu, Shouling Ji, Changjiang Li et al.NDSS 2024
- Fooling the Textual Fooler via Randomizing Latent RepresentationsDuy C. Hoang, Nguyen Hung-Quang, Saurav Manchanda, Minlong Peng et al.ACL Findings 2024 · 1 citation
- Searching for an Effective Defender: Benchmarking Defense against Adversarial Word SubstitutionZongyi Li, Jianhan Xu, Jiehang Zeng, Linyang Li et al.EMNLP 2021 · 46 citations
- Fooling Explanations in Text ClassifiersAdam Ivankay, Ivan Girardi, Chiara Marchiori, Pascal FrossardICLR 2022 · 23 citations
- ProTransformer: Robustify Transformers via Plug-and-Play ParadigmZhichao Hou, Weizhi Gao, Yuchen Shen, Feiyi Wang et al.NeurIPS 2024 · 9 citations
