mlsanityData to 7 Oct 2026

Model-tuning Via Prompts Makes NLP Models Adversarially Robust

arXiv 2303.07320 ↗First posted 13 Mar 2023cs.CL cs.LGcited by 9

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

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  5. 2014Explaining and Harnessing Adversarial Examplescited by 7,287
  6. 2013Intriguing properties of neural networkscited by 5,114
  7. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  8. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  9. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  10. 2019Benchmarking Neural Network Robustness to Common Corruptions and Perturbationscited by 2,857
  11. 2015Character-level Convolutional Networks for Text Classificationcited by 2,293
  12. 2021Learning to Prompt for Vision-Language Modelscited by 2,269
33 more
  1. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  2. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
  3. 2022Conditional Prompt Learning for Vision-Language Modelscited by 1,427
  4. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
  5. 2019How Can We Know What Language Models Know?cited by 953
  6. 2020Exploiting Cloze Questions for Few Shot Text Classification and Natural Language Inferencecited by 934
  7. 2021Robust fine-tuning of zero-shot modelscited by 785
  8. 2022Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distributioncited by 722
  9. 2020It's Not Just Size That Matters: Small Language Models Are Also Few-Shot Learnerscited by 668
  10. 2019Is BERT Really Robust? A Strong Baseline for Natural Language Attack on Text Classification and Entailmentcited by 663
  11. 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
  12. 2017Adversarial Examples for Evaluating Reading Comprehension Systemscited by 568
  13. 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 488
  14. 2020Measuring Robustness to Natural Distribution Shifts in Image Classificationcited by 452
  15. 2018Generating Natural Language Adversarial Examplescited by 422
  16. 2018TextBugger: Generating Adversarial Text Against Real-world Applicationscited by 376
  17. 2021Learning How to Ask: Querying LMs with Mixtures of Soft Promptscited by 376
  18. 2017Synthetic and Natural Noise Both Break Neural Machine Translationcited by 304
  19. 2019FreeLB: Enhanced Adversarial Training for Natural Language Understandingcited by 261
  20. 2021Knowledgeable Prompt-tuning: Incorporating Knowledge into Prompt Verbalizer for Text Classificationcited by 183
  21. 2019Certified Robustness to Adversarial Word Substitutionscited by 164
  22. 2019Combating Adversarial Misspellings with Robust Word Recognitioncited by 162
  23. 2022Finetune like you pretrain: Improved finetuning of zero-shot vision modelscited by 149
  24. 2020InfoBERT: Improving Robustness of Language Models from An Information Theoretic Perspectivecited by 92
  25. 2018On Adversarial Examples for Character-Level Neural Machine Translationcited by 85
  26. 2021Bad Characters: Imperceptible NLP Attackscited by 69
  27. 2021Searching for an Effective Defender: Benchmarking Defense against Adversarial Word Substitutioncited by 55
  28. 2018Robust Machine Comprehension Models via Adversarial Trainingcited by 44
  29. 2019Natural Language Adversarial Defense through Synonym Encodingcited by 39
  30. 2020Better Robustness by More Coverage: Adversarial Training with Mixup Augmentation for Robust Fine-tuningcited by 39
  31. 2021The Inductive Bias of In-Context Learning: Rethinking Pretraining Example Designcited by 33
  32. 2020Benchmarking Robustness of Machine Reading Comprehension Modelscited by 18
  33. 2022A Prompting-based Approach for Adversarial Example Generation and Robustness Enhancementcited by 12

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 3; 2024: 4; 2025: 1; 2026: 1.

9 papers.