BadPrompt: Backdoor Attacks on Continuous Prompts
Xiangrui Cai, Haidong Xu, Sihan Xu, Ying Zhang, Xiaojie Yuan
摘要
The prompt-based learning paradigm has gained much research attention recently. It has achieved state-of-the-art performance on several NLP tasks, especially in the few-shot scenarios. While steering the downstream tasks, few works have been reported to investigate the security problems of the prompt-based models. In this paper, we conduct the first study on the vulnerability of the continuous prompt learning algorithm to backdoor attacks. We observe that the few-shot scenarios have posed a great challenge to backdoor attacks on the prompt-based models, limiting the usability of existing NLP backdoor methods. To address this challenge, we propose BadPrompt, a lightweight and task-adaptive algorithm, to backdoor attack continuous prompts. Specially, BadPrompt first generates candidate triggers which are indicative for predicting the targeted label and dissimilar to the samples of the non-targeted labels. Then, it automatically selects the most effective and invisible trigger for each sample with an adaptive trigger optimization algorithm. We evaluate the performance of BadPrompt on five datasets and two continuous prompt models. The results exhibit the abilities of BadPrompt to effectively attack continuous prompts while maintaining high performance on the clean test sets, outperforming the baseline models by a large margin. The source code of BadPrompt is publicly available at https://github.com/papersPapers/BadPrompt.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 27 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- BadChain: Backdoor Chain-of-Thought Prompting for Large Language Models 引用了 AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts
- BadChain: Backdoor Chain-of-Thought Prompting for Large Language Models 引用了 Prompt as Triggers for Backdoor Attack: Examining the Vulnerability in Language Models
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Language Models are Few-Shot Learners
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated Prompts 引用了 Language Models are Few-Shot Learners
- Prompt as Triggers for Backdoor Attack: Examining the Vulnerability in Language Models 引用了 Language Models are Few-Shot Learners
- Defending Pre-trained Language Models as Few-shot Learners against Backdoor Attacks 引用了 Language Models are Few-Shot Learners
- TrojLLM: A Black-box Trojan Prompt Attack on Large Language Models 引用了 Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- TrojLLM: A Black-box Trojan Prompt Attack on Large Language Models 引用了 Language Models are Few-Shot Learners
- TrojLLM: A Black-box Trojan Prompt Attack on Large Language Models 引用了 Calibrate Before Use: Improving Few-shot Performance of Language Models
- BadEdit: Backdooring Large Language Models by Model Editing 引用了 Language Models are Few-Shot Learners
- Calibrate Before Use: Improving Few-shot Performance of Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper27
- BadEdit: Backdooring Large Language Models by Model EditingYanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang 等ICLR 2024 · 116 次引用
- BadChain: Backdoor Chain-of-Thought Prompting for Large Language ModelsZhen Xiang, Fengqing Jiang, Zidi Xiong, Bhaskar Ramasubramanian 等ICLR 2024 · 98 次引用
- TrojLLM: A Black-box Trojan Prompt Attack on Large Language ModelsJiaqi Xue, Mengxin Zheng, Ting Hua, Yilin Shen 等NeurIPS 2023 · 63 次引用
- Defending Pre-trained Language Models as Few-shot Learners against Backdoor AttacksZhaohan Xi, Tianyu Du, Changjiang Li, Ren Pang 等NeurIPS 2023 · 61 次引用
- Prompt as Triggers for Backdoor Attack: Examining the Vulnerability in Language ModelsShuai Zhao, Jinming Wen, Anh Tuan Luu, Junbo Zhao 等EMNLP 2023 · 39 次引用
它引用的 Paper24
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray 等ICML 2021 · 6,356 次引用
- Calibrate Before Use: Improving Few-shot Performance of Language ModelsZihao Zhao, Eric Wallace, Shi Feng, Dan Klein 等ICML 2021 · 1,843 次引用
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order SensitivityYao Lu, Max Bartolo, Alastair Moore, Sebastian Riedel 等ACL 2022 · 1,494 次引用
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace 等EMNLP 2020 · 1,162 次引用
相关 Paper
- NOTABLE: Transferable Backdoor Attacks Against Prompt-based NLP ModelsKai Mei, Zheng Li, Zhenting Wang, Yang Zhang 等ACL 2023 · 17 次引用
- BadCLIP: Trigger-Aware Prompt Learning for Backdoor Attacks on CLIPJiawang Bai, Kuofeng Gao, Shaobo Min, Shu-Tao Xia 等CVPR 2024
- Shortcuts Arising from Contrast: Towards Effective and Lightweight Clean-Label Attacks in Prompt-Based LearningXiaopeng Xie, Ming Yan, Xiwen Zhou, Chenlong Zhao 等EMNLP 2024
- Are You Using Reliable Graph Prompts? Trojan Prompt Attacks on Graph Neural NetworksMinhua Lin, Zhiwei Zhang, Enyan Dai, Zongyu Wu 等KDD 2025
- TrojanWave: Exploiting Prompt Learning for Stealthy Backdoor Attacks on Large Audio-Language ModelsAsif Hanif, Maha Tufail Agro, Fahad Shamshad, Karthik NandakumarEMNLP 2025
