Reproduce “Adversarial Robustness of Prompt-based Few-Shot Learning for Natural Language Understanding” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Venkata Prabhakara Sarath Nookala, Gaurav Verma, Subhabrata Mukherjee, Srijan Kumar

A systematic empirical study reveals that vanilla prompt-based few-shot learning methods are generally less robust to adversarial attacks than fully fine-tuned models, contrasting with prior findings on out-of-distribution robustness. However, leveraging unlabeled data (iPET) or ensembling multiple prompts (PET) significantly improves adversarial resilience, achieving a lower relative performance drop compared to full fine-tuning. Robustness further increases with more few-shot examples and larger pre-trained language model encoders, with RoBERTa-large showing superior adversarial robustness among tested encoders.

Key insights

  • Adversarial robustness in prompt-based FSL behaves differently from OOD robustness; vanilla prompting can be more vulnerable to targeted attacks than fully fine-tuned models.
  • Integrating unlabeled data through self-training (iPET) or ensembling predictions from multiple prompts (PET) are effective strategies for enhancing the adversarial robustness of few-shot learners.
  • Both increasing the number of few-shot examples and utilizing larger pre-trained language model encoders consistently improve adversarial robustness, suggesting that scale contributes to resilience.
  • The pre-training approach of the language model encoder significantly impacts adversarial robustness, with whole-word masking (e.g., RoBERTa) yielding more reliable textual representations against adversarial perturbations.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.