ACL Findings2021
Defending Pre-trained Language Models from Adversarial Word Substitution Without Performance Sacrifice
Rongzhou Bao, Jiayi Wang, Hai Zhao
Abstract
Pre-trained contextualized language models (PrLMs) have led to strong performance gains in downstream natural language understanding tasks. However, PrLMs can still be easily fooled by adversarial word substitution, which is one of the most challenging textual adversarial attack methods. Existing defence approaches suffer from notable performance loss and complexities. Thus, this paper presents a compact and performance-preserved framework, Anomaly Detection with Frequency-Aware Randomization (ADFAR). In detail, we design an auxiliary anomaly detection classifier and adopt a multi-task learning procedure, by which PrLMs are able to distinguish adversarial input samples. Then, in order to defend adversarial word substitution, a frequency-aware randomization process is applied to those recognized adversarial input samples. Empirical results show that AD-FAR significantly outperforms those newly proposed defense methods over various tasks with much higher inference speed. Remarkably, ADFAR does not impair the overall performance of PrLMs. The code is available at https://github.com/LilyNLP/ADFAR.
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 7 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers7
- Why Should Adversarial Perturbations be Imperceptible? Rethink the Research Paradigm in Adversarial NLPYangyi Chen, Hongcheng Gao, Ganqu Cui, Fanchao Qi et al.EMNLP 2022 · 28 citations
- Perturbation-Invariant Adversarial Training for Neural Ranking Models: Improving the Effectiveness-Robustness Trade-OffYu-An Liu, Ruqing Zhang, Mingkun Zhang, Wei Chen et al.AAAI 2024 · 17 citations
- ATTention Please! An Investigation of the App Tracking Transparency PermissionReham Mohamed, Arjun Arunasalam, Habiba Farrukh, Jason Tong et al.USENIX Security 2024 · 9 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
- The Best Defense is Attack: Repairing Semantics in Textual Adversarial ExamplesHeng Yang, Ke LiEMNLP 2024 · 3 citations
Builds on8
- 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
- Adversarial NLI: A New Benchmark for Natural Language UnderstandingYixin Nie, Adina Williams, Emily Dinan, Mohit Bansal et al.ACL 2020 · 602 citations
- ELECTRA: Pre-training Text Encoders as Discriminators Rather Than GeneratorsKevin Clark, Minh-Thang Luong, Quoc V. Le, Christopher D. ManningICLR 2020 · 541 citations
- BERT-ATTACK: Adversarial Attack Against BERT Using BERTLinyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue et al.EMNLP 2020 · 529 citations
- Semantics-Aware BERT for Language UnderstandingZhuosheng Zhang, Yuwei Wu, Hai Zhao, Zuchao Li et al.AAAI 2020 · 396 citations
Related papers
- Distinguishing Non-natural from Natural Adversarial Samples for More Robust Pre-trained Language ModelJiayi Wang, Rongzhou Bao, Zhuosheng Zhang, Hai ZhaoACL Findings 2022 · 8 citations
- Text-CRS: A Generalized Certified Robustness Framework against Textual Adversarial AttacksXinyu Zhang, Hanbin Hong, Yuan Hong, Peng Huang et al.S&P 2024 · 41 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
- Textual Manifold-based Defense Against Natural Language Adversarial ExamplesDang Minh Nguyen, Anh Tuan LuuEMNLP 2022 · 13 citations
- Toward Adversarial Training on Contextualized Language RepresentationHongqiu Wu, Yongxiang Liu, Hanwen Shi, Hai Zhao et al.ICLR 2023 · 4 citations
