Model-tuning Via Prompts Makes NLP Models Adversarially Robust
Not on the map. Why?
Abstract (arXiv)
In recent years, NLP practitioners have converged on the following practice: (i) import an off-the-shelf pretrained (masked) language model; (ii) append a multilayer perceptron atop the CLS token's hidden representation (with randomly initialized weights); and (iii) fine-tune the entire model on a downstream task (MLP-FT). This procedure has produced massive gains on standard NLP benchmarks, but these models remain brittle, even to mild adversarial perturbations. In this work, we demonstrate surprising gains in adversarial robustness enjoyed by Model-tuning Via Prompts (MVP), an alternative method of adapting to downstream tasks. Rather than appending an MLP head to make output prediction, MVP appends a prompt template to the input, and makes prediction via text infilling/completion. Across 5 NLP datasets, 4 adversarial attacks, and 3 different models, MVP improves performance against adversarial substitutions by an average of 8% over standard methods and even outperforms adversarial training-based state-of-art defenses by 3.5%. By combining MVP with adversarial training, we achieve further improvements in adversarial robustness while maintaining performance on unperturbed examples. Finally, we conduct ablations to investigate the mechanism underlying these gains. Notably, we find that the main causes of vulnerability of MLP-FT can be attributed to the misalignment between pre-training and fine-tuning tasks, and the randomly initialized MLP parameters.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 45 of its 62 references that are in the map. First posted on arXiv 13 Mar 2023.
Builds on
45 of 62 references.
References · 45
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2013Intriguing properties of neural networkscited by 5,114
- 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
- 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
- 2022Training Compute-Optimal Large Language Modelscited by 2,927
- 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,857
- 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
- 2021Learning to Prompt for Vision-Language Modelscited by 2,269
33 more
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2022Conditional Prompt Learning for Vision-Language Modelscited by 1,427
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2019How Can We Know What Language Models Know?cited by 953
- 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
- 2021Robust fine-tuning of zero-shot modelscited by 785
- 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 722
- 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 668
- 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 568
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
- 2020Measuring Robustness to Natural Distribution Shifts in Image Classificationcited by 452
- 2018Generating Natural Language Adversarial Examplescited by 422
- 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
- 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
- 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
- 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 261
- 2021Knowledgeable Prompt-tuning: Incorporating Knowledge into Prompt Verbalizer for Text Classificationcited by 183
- 2019Certified Robustness to Adversarial Word Substitutionscited by 164
- 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 162
- 2022Finetune like you pretrain: Improved finetuning of zero-shot vision modelscited by 149
- 2020InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspectivecited by 92
- 2018On Adversarial Examples for Character-Level Neural Machine Translationcited by 85
- 2021Bad Characters: Imperceptible NLP Attackscited by 69
- 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 55
- 2018Robust Machine Comprehension Models via Adversarial Trainingcited by 44
- 2019Natural Language Adversarial Defense through Synonym Encodingcited by 39
- 2020Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuningcited by 39
- 2021The Inductive Bias of In-Context Learning: Rethinking Pretraining Example Designcited by 33
- 2020Benchmarking Robustness of Machine Reading Comprehension Modelscited by 18
- 2022A Prompting-based Approach for Adversarial Example Generation and Robustness Enhancementcited by 12
Built on by
Citing papers per year: 2023: 3; 2024: 4; 2025: 1; 2026: 1.
9 papers.
- 2023Large Language Models Are Better Adversaries: Exploring Generative Clean-Label Backdoor Attacks Against Text Classifierscited by 14
- 2024Defending Large Language Models Against Attacks With Residual Stream Activation Analysiscited by 5
- 2023How to Handle Different Types of Out-of-Distribution Scenarios in Computational Argumentation? A Comprehensive and Fine-Grained Field Studycited by 4
- 2023Improving Few-shot Generalization of Safety Classifiers via Data Augmented Parameter-Efficient Fine-Tuningcited by 4
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learningcited by 4
- 2025PAFT: Prompt-Agnostic Fine-Tuningcited by 2
- 2024ADAPT to Robustify Prompt Tuning Vision Transformerscited by 0
- 2024Fully-fused Multi-Layer Perceptrons on Intel Data Center GPUscited by 0
- 2026Asynchronous Heavy-Tailed Optimizationcited by 0
- 2026Asynchronous Heavy-Tailed Optimization20 Feb 2026
- 2025PAFT: Prompt-Agnostic Fine-Tuning18 Feb 2025
- 2024Defending Large Language Models Against Attacks With Residual Stream Activation Analysis5 Jun 2024
- 2024Evaluating and Safeguarding the Adversarial Robustness of Retrieval-Based In-Context Learning24 May 2024
- 2024Fully-fused Multi-Layer Perceptrons on Intel Data Center GPUs26 Mar 2024
- 2024ADAPT to Robustify Prompt Tuning Vision Transformers19 Mar 2024
- 2023Large Language Models Are Better Adversaries: Exploring Generative Clean-Label Backdoor Attacks Against Text Classifiers28 Oct 2023
- 2023Improving Few-shot Generalization of Safety Classifiers via Data Augmented Parameter-Efficient Fine-Tuning25 Oct 2023
- 2023How to Handle Different Types of Out-of-Distribution Scenarios in Computational Argumentation? A Comprehensive and Fine-Grained Field Study15 Sep 2023