A Prompting-based Approach for Adversarial Example Generation and Robustness Enhancement
Not on the map. Why?
Abstract (arXiv)
Recent years have seen the wide application of NLP models in crucial areas such as finance, medical treatment, and news media, raising concerns of the model robustness and vulnerabilities. In this paper, we propose a novel prompt-based adversarial attack to compromise NLP models and robustness enhancement technique. We first construct malicious prompts for each instance and generate adversarial examples via mask-and-filling under the effect of a malicious purpose. Our attack technique targets the inherent vulnerabilities of NLP models, allowing us to generate samples even without interacting with the victim NLP model, as long as it is based on pre-trained language models (PLMs). Furthermore, we design a prompt-based adversarial training method to improve the robustness of PLMs. As our training method does not actually generate adversarial samples, it can be applied to large-scale training sets efficiently. The experimental results show that our attack method can achieve a high attack success rate with more diverse, fluent and natural adversarial examples. In addition, our robustness enhancement method can significantly improve the robustness of models to resist adversarial attacks. Our work indicates that prompting paradigm has great potential in probing some fundamental flaws of PLMs and fine-tuning them for downstream tasks.
Key facts. Cited by 12 papers in the map (data through 14 Oct 2026). Builds on 17 of its 30 references that are in the map. First posted on arXiv 21 Mar 2022.
Builds on
17 of 30 references.
References · 17
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
- 2015A large annotated corpus for learning natural language inferencecited by 1,847
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 938
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 671
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
- 2017Supervised Learning of Universal Sentence Representations from Natural Language Inference Datacited by 432
- 2018Generating Natural Language Adversarial Examplescited by 424
- 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 163
- 2020GSum: A General Framework for Guided Neural Abstractive Summarizationcited by 129
5 more
- 2021Dialogue State Tracking with a Language Model using Schema-Driven Promptingcited by 94
- 2018On Adversarial Examples for Character-Level Neural Machine Translationcited by 85
- 2019Learning to Discriminate Perturbations for Blocking Adversarial Attacks in Text Classificationcited by 57
- 2020Frequency-Guided Word Substitutions for Detecting Textual Adversarial Examplescited by 54
- 2021Using Adversarial Attacks to Reveal the Statistical Bias in Machine Reading Comprehension Modelscited by 29
Built on by
Citing papers per year: 2022: 2; 2023: 4; 2024: 3; 2025: 2; 2026: 1.
12 papers.
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learningcited by 896
- 2023Prompt Engineering for Healthcare: Methodologies and Applicationscited by 52
- 2023A Systematic Survey of Prompt Engineering on Vision-Language Foundation Modelscited by 12
- 2022PSSAT: A Perturbed Semantic Structure Awareness Transferring Method for Perturbation-Robust Slot Fillingcited by 9
- 2023Model-tuning Via Prompts Makes NLP Models Adversarially Robustcited by 9
- 2024Recent advancements in LLM Red-Teaming: Techniques, Defenses, and Ethical Considerationscited by 8
- 2023PromptAttack: Probing Dialogue State Trackers with Adversarial Promptscited by 6
- 2024textitLinkPrompt: Natural and Universal Adversarial Attacks on Prompt-based Language Modelscited by 3
- 2025Red Teaming Multimodal Language Models: Evaluating Harm Across Prompt Modalities and Modelscited by 1
- 2024ADAPT to Robustify Prompt Tuning Vision Transformerscited by 0
- 2025Breaking to Build: A Threat Model of Prompt-Based Attacks for Securing LLMscited by 0
- 2026Alignment Drift in Multimodal LLMs: A Two-Phase, Longitudinal Evaluation of Harm Across Eight Model Releasescited by 0
- 2026Alignment Drift in Multimodal LLMs: A Two-Phase, Longitudinal Evaluation of Harm Across Eight Model Releases4 Feb 2026
- 2025Red Teaming Multimodal Language Models: Evaluating Harm Across Prompt Modalities and Models18 Sep 2025
- 2025Breaking to Build: A Threat Model of Prompt-Based Attacks for Securing LLMs4 Sep 2025
- 2024Recent advancements in LLM Red-Teaming: Techniques, Defenses, and Ethical Considerations9 Oct 2024
- 2024textitLinkPrompt: Natural and Universal Adversarial Attacks on Prompt-based Language Models25 Mar 2024
- 2024ADAPT to Robustify Prompt Tuning Vision Transformers19 Mar 2024
- 2023A Systematic Survey of Prompt Engineering on Vision-Language Foundation Models24 Jul 2023
- 2023PromptAttack: Probing Dialogue State Trackers with Adversarial Prompts7 Jun 2023
- 2023Prompt Engineering for Healthcare: Methodologies and Applications28 Apr 2023
- 2023Model-tuning Via Prompts Makes NLP Models Adversarially Robust13 Mar 2023
- 2022PSSAT: A Perturbed Semantic Structure Awareness Transferring Method for Perturbation-Robust Slot Filling24 Aug 2022
- 2022Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning11 May 2022