BadPrompt: Backdoor Attacks on Continuous Prompts
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
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.
Key facts. Cited by 59 papers in the map (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 42 of its 50 references that are in the map. First posted on arXiv 27 Nov 2022.
Builds on
42 of 50 references.
Closest ancestors · 7
Same direction, newest first
- 2021Triggerless Backdoor Attack for NLP Tasks with Clean Labels15 Nov
- 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
- 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
- 2021Turn the Combination Lock: Learnable Textual Backdoor Attacks via Word Substitution11 Jun
- 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
- 2021Hidden Backdoors in Human-Centric Language Models1 May
- 2021Be Careful about Poisoned Word Embeddings: Exploring the Vulnerability of the Embedding Layers in NLP Models29 Mar
Other references · 35
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2016Categorical Reparameterization with Gumbel-Softmaxcited by 2,708
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2019Language Models as Knowledge Bases?cited by 1,922
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
23 more
- 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,122
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,052
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 668
- 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 550
- 2019Hidden Trigger Backdoor Attackscited by 359
- 2021True Few-Shot Learning with Language Modelscited by 343
- 2020Reflection Backdoor: A Natural Backdoor Attack on Deep Neural Networkscited by 341
- 2020Invisible Backdoor Attack with Sample-Specific Triggerscited by 338
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
- 2021Neural Attention Distillation: Erasing Backdoor Triggers from Deep Neural Networkscited by 313
- 2020Input-Aware Dynamic Backdoor Attackcited by 304
- 2021Factual Probing Is [MASK]: Learning vs. Learning to Recallcited by 291
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 231
- 2020BadNL: Backdoor Attacks against NLP Models with Semantic-preserving Improvementscited by 191
- 2021OpenPrompt: An Open-source Framework for Prompt-learningcited by 148
- 2021Differentiable Prompt Makes Pre-trained Language Models Better Few-shot Learnerscited by 115
- 2021Backdoor Attacks on Pre-trained Models by Layerwise Weight Poisoningcited by 103
- 2021Backdoor Pre-trained Models Can Transfer to Allcited by 79
- 2018Unsupervised Text Style Transfer using Language Models as Discriminatorscited by 70
- 2022Exploring the Universal Vulnerability of Prompt-based Learning Paradigmcited by 56
- 2021Red Alarm for Pre-trained Models: Universal Vulnerability to Neuron-Level Backdoor Attackscited by 44
- 2021Revisiting Self-Training for Few-Shot Learning of Language Modelcited by 22
Built on by
Citing papers per year: 2023: 14; 2024: 25; 2025: 14; 2026: 6.
59 papers.
Sort:
By area:
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 341
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2023Prompt as Triggers for Backdoor Attack: Examining the Vulnerability in Language Modelscited by 87
- 2024BadEdit: Backdooring large language models by model editingcited by 84
- 2024BadChain: Backdoor Chain-of-Thought Prompting for Large Language Modelscited by 74
- 2024Safeguarding Large Language Models: A Surveycited by 73
- 2023BadGPT: Exploring Security Vulnerabilities of ChatGPT via Backdoor Attacks to InstructGPTcited by 70
- 2023Composite Backdoor Attacks Against Large Language Modelscited by 63
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflowscited by 57
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2024Universal Vulnerabilities in Large Language Models: Backdoor Attacks for In-context Learningcited by 47
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Modelscited by 44
38 more
- 2023PoisonPrompt: Backdoor Attack on Prompt-based Large Language Modelscited by 40
- 2024Distilling an End-to-End Voice Assistant Without Instruction Training Datacited by 35
- 2023NOTABLE: Transferable Backdoor Attacks Against Prompt-based NLP Modelscited by 33
- 2023Defending Pre-trained Language Models as Few-shot Learners against Backdoor Attackscited by 32
- 2023TrojLLM: A Black-box Trojan Prompt Attack on Large Language Modelscited by 29
- 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimizationcited by 29
- 2023Grounding Foundation Models through Federated Transfer Learning: A General Frameworkcited by 24
- 2025FlippedRAG: Black-Box Opinion Manipulation Adversarial Attacks to Retrieval-Augmented Generation Modelscited by 24
- 2023Attacks in Adversarial Machine Learning: A Systematic Survey from the Life-cycle Perspectivecited by 19
- 2024BadActs: A Universal Backdoor Defense in the Activation Spacecited by 19
- 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environmentscited by 17
- 2024Defending Against Weight-Poisoning Backdoor Attacks for Parameter-Efficient Fine-Tuningcited by 16
- 2025DarkMind: Latent Chain-of-Thought Backdoor in Customized LLMscited by 15
- 2023TextGuard: Provable Defense against Backdoor Attacks on Text Classificationcited by 14
- 2024Exploring Backdoor Vulnerabilities of Chat Modelscited by 11
- 2024Black-Box Opinion Manipulation Attacks to Retrieval-Augmented Generation of Large Language Modelscited by 11
- 2023TrojFSP: Trojan Insertion in Few-shot Prompt Tuningcited by 9
- 2024NewsBench: A Systematic Evaluation Framework for Assessing Editorial Capabilities of Large Language Models in Chinese Journalismcited by 8
- 2025LLM Security: Vulnerabilities, Attacks, Defenses, and Countermeasurescited by 8
- 2023LMSanitator: Defending Prompt-Tuning Against Task-Agnostic Backdoorscited by 7
- 2025Persistent Backdoor Attacks under Continual Fine-Tuning of LLMscited by 7
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMscited by 5
- 2024MEGen: Generative Backdoor into Large Language Models via Model Editingcited by 5
- 2025Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!cited by 5
- 2023Prompt Backdoors in Visual Prompt Learningcited by 4
- 2024TrojFM: Resource-efficient Backdoor Attacks against Very Large Foundation Modelscited by 4
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Modelscited by 4
- 2025Exploring Backdoor Attack and Defense for LLM-empowered Recommendationscited by 4
- 2024Injecting Undetectable Backdoors in Obfuscated Neural Networks and Language Modelscited by 2
- 2024Breaking PEFT Limitations: Leveraging Weak-to-Strong Knowledge Transfer for Backdoor Attacks in LLMscited by 2
- 2024New Emerged Security and Privacy of Pre-trained Model: a Survey and Outlookcited by 2
- 2025A Linear Approach to Data Poisoningcited by 2
- 2026Reverse-Engineering Model Editing on Language Modelscited by 2
- 2024Attack On Prompt: Backdoor Attack in Prompt-Based Continual Learningcited by 1
- 2024Defense Against Syntactic Textual Backdoor Attacks with Token Substitutioncited by 1
- 2024ICLGuard: Controlling In-Context Learning Behavior for Applicability Authorizationcited by 1
- 2025Stealthy Dual-Trigger Backdoors: Attacking Prompt Tuning in LM-Empowered Graph Foundation Modelscited by 1
- 2026SecureCAI: Injection-Resilient LLM Assistants for Cybersecurity Operationscited by 1
50 most cited of 59 All 59 (JSON)
- 2026Token by Token, Compromised: Backdoor Vulnerabilities in Unified Autoregressive Models19 May 2026
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts12 May 2026
- 2026Secret Stealing Attacks on Local LLM Fine-Tuning through Supply-Chain Model Code Backdoors30 Apr 2026
- 2026Reverse-Engineering Model Editing on Language Models7 Feb 2026
- 2026Safety-Efficacy Trade Off: Robustness against Data-Poisoning31 Jan 2026
- 2026SecureCAI: Injection-Resilient LLM Assistants for Cybersecurity Operations12 Jan 2026
- 2025Persistent Backdoor Attacks under Continual Fine-Tuning of LLMs12 Dec 2025
- 2025Backdoor Attacks on Open Vocabulary Object Detectors via Multi-Modal Prompt Tuning16 Nov 2025
- 2025Stealthy Dual-Trigger Backdoors: Attacking Prompt Tuning in LM-Empowered Graph Foundation Models16 Oct 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows29 Jun 2025
- 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environments18 Jun 2025
38 more
- 2025Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!21 May 2025
- 2025A Linear Approach to Data Poisoning21 May 2025
- 2025LLM Security: Vulnerabilities, Attacks, Defenses, and Countermeasures2 May 2025
- 2025MuTRAP: Multi-trigger Trojans Attacking Robot Task Planning Systems23 Apr 2025
- 2025Exploring Backdoor Attack and Defense for LLM-empowered Recommendations15 Apr 2025
- 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimization10 Apr 2025
- 2025DarkMind: Latent Chain-of-Thought Backdoor in Customized LLMs24 Jan 2025
- 2025FlippedRAG: Black-Box Opinion Manipulation Adversarial Attacks to Retrieval-Augmented Generation Models6 Jan 2025
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Models27 Nov 2024
- 2024New Emerged Security and Privacy of Pre-trained Model: a Survey and Outlook12 Nov 2024
- 2024Distilling an End-to-End Voice Assistant Without Instruction Training Data3 Oct 2024
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct 2024
- 2024Breaking PEFT Limitations: Leveraging Weak-to-Strong Knowledge Transfer for Backdoor Attacks in LLMs26 Sep 2024
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models23 Aug 2024
- 2024MEGen: Generative Backdoor into Large Language Models via Model Editing20 Aug 2024
- 2024A Survey of Trojan Attacks and Defenses to Deep Neural Networks15 Aug 2024
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMs30 Jul 2024
- 2024Black-Box Opinion Manipulation Attacks to Retrieval-Augmented Generation of Large Language Models18 Jul 2024
- 2024ICLGuard: Controlling In-Context Learning Behavior for Applicability Authorization9 Jul 2024
- 2024Defense Against Syntactic Textual Backdoor Attacks with Token Substitution4 Jul 2024
- 2024Attack On Prompt: Backdoor Attack in Prompt-Based Continual Learning28 Jun 2024
- 2024Injecting Undetectable Backdoors in Obfuscated Neural Networks and Language Models9 Jun 2024
- 2024Safeguarding Large Language Models: A Survey3 Jun 2024
- 2024TrojFM: Resource-efficient Backdoor Attacks against Very Large Foundation Models27 May 2024
- 2024BadActs: A Universal Backdoor Defense in the Activation Space18 May 2024
- 2024Exploring Backdoor Vulnerabilities of Chat Models3 Apr 2024
- 2024Shortcuts Arising from Contrast: Effective and Covert Clean-Label Attacks in Prompt-Based Learning30 Mar 2024
- 2024BadEdit: Backdooring large language models by model editing20 Mar 2024
- 2024NewsBench: A Systematic Evaluation Framework for Assessing Editorial Capabilities of Large Language Models in Chinese Journalism29 Feb 2024
- 2024Defending Against Weight-Poisoning Backdoor Attacks for Parameter-Efficient Fine-Tuning19 Feb 2024
- 2024Security and Privacy Challenges of Large Language Models: A Survey30 Jan 2024
- 2024BadChain: Backdoor Chain-of-Thought Prompting for Large Language Models20 Jan 2024
- 2024Universal Vulnerabilities in Large Language Models: Backdoor Attacks for In-context Learning11 Jan 2024
- 2023TrojFSP: Trojan Insertion in Few-shot Prompt Tuning16 Dec 2023
- 2023Grounding Foundation Models through Federated Transfer Learning: A General Framework29 Nov 2023
- 2023TextGuard: Provable Defense against Backdoor Attacks on Text Classification19 Nov 2023
- 2023PoisonPrompt: Backdoor Attack on Prompt-based Large Language Models19 Oct 2023
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directions16 Oct 2023
50 newest of 59 All 59 (JSON)
- 2024Security and Privacy Challenges of Large Language Models: A Surveycited by 179
- 2023Prompt as Triggers for Backdoor Attack: Examining the Vulnerability in Language Modelscited by 87
- 2024BadEdit: Backdooring large language models by model editingcited by 84
- 2024Safeguarding Large Language Models: A Surveycited by 73
- 2023BadGPT: Exploring Security Vulnerabilities of ChatGPT via Backdoor Attacks to InstructGPTcited by 70
- 2023Composite Backdoor Attacks Against Large Language Modelscited by 63
- 2024Universal Vulnerabilities in Large Language Models: Backdoor Attacks for In-context Learningcited by 47
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Modelscited by 44
- 2023PoisonPrompt: Backdoor Attack on Prompt-based Large Language Modelscited by 40
- 2023NOTABLE: Transferable Backdoor Attacks Against Prompt-based NLP Modelscited by 33
- 2023Defending Pre-trained Language Models as Few-shot Learners against Backdoor Attackscited by 32
- 2023TextGuard: Provable Defense against Backdoor Attacks on Text Classificationcited by 14
12 most cited of 34 All 34 (JSON)
- 2026Token by Token, Compromised: Backdoor Vulnerabilities in Unified Autoregressive Models19 May 2026
- 2026BadSKP: Backdoor Attacks on Knowledge Graph-Enhanced LLMs with Soft Prompts12 May 2026
- 2026Secret Stealing Attacks on Local LLM Fine-Tuning through Supply-Chain Model Code Backdoors30 Apr 2026
- 2026Safety-Efficacy Trade Off: Robustness against Data-Poisoning31 Jan 2026
- 2026SecureCAI: Injection-Resilient LLM Assistants for Cybersecurity Operations12 Jan 2026
- 2025Persistent Backdoor Attacks under Continual Fine-Tuning of LLMs12 Dec 2025
- 2025Backdoor Attacks on Open Vocabulary Object Detectors via Multi-Modal Prompt Tuning16 Nov 2025
- 2025Stealthy Dual-Trigger Backdoors: Attacking Prompt Tuning in LM-Empowered Graph Foundation Models16 Oct 2025
- 2025Be Careful When Fine-tuning On Open-Source LLMs: Your Fine-tuning Data Could Be Secretly Stolen!21 May 2025
- 2025A Linear Approach to Data Poisoning21 May 2025
- 2025Exploring Backdoor Attack and Defense for LLM-empowered Recommendations15 Apr 2025
- 2024Neutralizing Backdoors through Information Conflicts for Large Language Models27 Nov 2024
12 newest of 34 All 34 (JSON)
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agentscited by 341
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflowscited by 57
- 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environmentscited by 17
- 2025From Prompt Injections to Protocol Exploits: Threats in LLM-Powered AI Agents Workflows29 Jun 2025
- 2025RAS-Eval: A Comprehensive Benchmark for Security Evaluation of LLM Agents in Real-World Environments18 Jun 2025
- 2024Agent Security Bench (ASB): Formalizing and Benchmarking Attacks and Defenses in LLM-based Agents3 Oct 2024
- 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimizationcited by 29
- 2025FlippedRAG: Black-Box Opinion Manipulation Adversarial Attacks to Retrieval-Augmented Generation Modelscited by 24
- 2024Black-Box Opinion Manipulation Attacks to Retrieval-Augmented Generation of Large Language Modelscited by 11
- 2025PR-Attack: Coordinated Prompt-RAG Attacks on Retrieval-Augmented Generation in Large Language Models via Bilevel Optimization10 Apr 2025
- 2025FlippedRAG: Black-Box Opinion Manipulation Adversarial Attacks to Retrieval-Augmented Generation Models6 Jan 2025
- 2024Black-Box Opinion Manipulation Attacks to Retrieval-Augmented Generation of Large Language Models18 Jul 2024
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2024Distilling an End-to-End Voice Assistant Without Instruction Training Datacited by 35
- 2023TrojLLM: A Black-box Trojan Prompt Attack on Large Language Modelscited by 29
- 2023Grounding Foundation Models through Federated Transfer Learning: A General Frameworkcited by 24
- 2023Attacks in Adversarial Machine Learning: A Systematic Survey from the Life-cycle Perspectivecited by 19
- 2024BadActs: A Universal Backdoor Defense in the Activation Spacecited by 19
- 2024Defending Against Weight-Poisoning Backdoor Attacks for Parameter-Efficient Fine-Tuningcited by 16
- 2023TrojFSP: Trojan Insertion in Few-shot Prompt Tuningcited by 9
- 2024NewsBench: A Systematic Evaluation Framework for Assessing Editorial Capabilities of Large Language Models in Chinese Journalismcited by 8
- 2025LLM Security: Vulnerabilities, Attacks, Defenses, and Countermeasurescited by 8
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMscited by 5
- 2024New Emerged Security and Privacy of Pre-trained Model: a Survey and Outlookcited by 2
12 most cited of 17 All 17 (JSON)
- 2026Reverse-Engineering Model Editing on Language Models7 Feb 2026
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025LLM Security: Vulnerabilities, Attacks, Defenses, and Countermeasures2 May 2025
- 2025MuTRAP: Multi-trigger Trojans Attacking Robot Task Planning Systems23 Apr 2025
- 2024New Emerged Security and Privacy of Pre-trained Model: a Survey and Outlook12 Nov 2024
- 2024Distilling an End-to-End Voice Assistant Without Instruction Training Data3 Oct 2024
- 2024A Survey of Trojan Attacks and Defenses to Deep Neural Networks15 Aug 2024
- 2024Can LLMs be Fooled? Investigating Vulnerabilities in LLMs30 Jul 2024
- 2024ICLGuard: Controlling In-Context Learning Behavior for Applicability Authorization9 Jul 2024
- 2024BadActs: A Universal Backdoor Defense in the Activation Space18 May 2024
- 2024NewsBench: A Systematic Evaluation Framework for Assessing Editorial Capabilities of Large Language Models in Chinese Journalism29 Feb 2024
- 2024Defending Against Weight-Poisoning Backdoor Attacks for Parameter-Efficient Fine-Tuning19 Feb 2024
12 newest of 17 All 17 (JSON)