Source-linked AI summary

Evaluating the Robustness of Discrete Prompts

Yoichi Ishibashi, Danushka Bollegala, Katsuhito Sudoh, Satoshi Nakamura

arXiv:2302.05619v1cs.CLcs.AI

TL;DR

Automatically learned discrete prompts can contain counter-intuitive lexical constructs, raising an understudied question about their robustness in downstream tasks. The paper evaluates carefully designed perturbations to AutoPrompt on two NLI datasets, finding prompt-token sensitivity and weak cross-dataset generalization despite relative robustness to some input changes.

  • Problem

    Automatically learned discrete prompts can contain counter-intuitive lexical constructs, but their robustness to perturbations and generalization beyond training data had not been systematically studied.

    Source: §1 · pp. 1–2
  • Method

    The study applies carefully designed perturbations to AutoPrompt and compares its prompts with manually written prompts and head-based fine-tuning on CB and MNLI.

    Source: §1 · p. 2, §3 · pp. 3–4
  • Results

    Discrete prompts were relatively robust to input perturbations without label changes, but sensitive to prompt-token shuffling and generalized poorly across NLI datasets.

    Source: §4 · pp. 8–9
  • Takeaways & Limitations

    The findings motivate future work on methods that learn accurate as well as robust discrete prompts.

    Source: §4 · p. 9

    The evaluation focuses on NLI and uses RoBERTa-large; other complex tasks and PLMs remain to be investigated.

    Source: §5 · p. 9

Abstract

from arXiv · show

Discrete prompts have been used for fine-tuning Pre-trained Language Models for diverse NLP tasks. In particular, automatic methods that generate discrete prompts from a small set of training instances have reported superior performance. However, a closer look at the learnt prompts reveals that they contain noisy and counter-intuitive lexical constructs that would not be encountered in manually-written prompts. This raises an important yet understudied question regarding the robustness of automatically learnt discrete prompts when used in downstream tasks. To address this question, we conduct a systematic study of the robustness of discrete prompts by applying carefully designed perturbations into an application using AutoPrompt and then measure their performance in two Natural Language Inference (NLI) datasets. Our experimental results show that although the discrete prompt-based method remains relatively robust against perturbations to NLI inputs, they are highly sensitive to other types of perturbations such as shuffling and deletion of prompt tokens. Moreover, they generalize poorly across different NLI datasets. We hope our findings will inspire future work on robust discrete prompt learning.

1 Introduction

Automatically learned discrete prompts can contain counter-intuitive lexical constructs, raising questions about their robustness and cross-dataset generalization. The study evaluates perturbations to AutoPrompt and reports sensitivity to prompt-token changes alongside differences across NLI datasets and input perturbations.

1 Introduction

  • Discrete-prompt robustness matters because few-shot prompts should capture task patterns rather than random training artifacts, and small edits can alter downstream performance.Discrete prompts are represented in natural language and are supposed to be interpretable.Source: §1 · p. 2
  • The study uses AutoPrompt as a concrete case to evaluate carefully designed perturbations, comparing it with manually written prompts and head-based fine-tuning.The paper notes that its perturbation techniques can also be used with other discrete prompt-learning methods.Source: §1 · p. 2
  • As training instances increase, MP outperforms AP and HFT on CB and MNLI, while AP performs much worse on MNLI than CB.The introduction contrasts this with AP’s superior performance on SICK-E reported by Shin et al. (2020).Source: §1 · p. 2
  • Prompts learned on CB and MNLI show a performance drop when transferred between the datasets, indicating poor cross-dataset generalization.Source: §1 · p. 2
  • AP-learned prompts are highly sensitive to token ordering, and random prompt-token deletion decreases performance for both AP and MP.Source: §1 · p. 2
  • AP is relatively more robust than MP to adversarial input perturbations, although MP drops significantly when the perturbation changes the target label.Both methods remain relatively robust when the input perturbation leaves the target label unchanged.Source: §1 · pp. 2–3

2 Related Work

Prior work has examined prompt behavior from several perspectives, but the robustness of discrete prompts under different perturbations had not been systematically studied. This paper focuses on that gap.

2 Related Work

  • Discrete prompts learn lexical sequences, whereas continuous prompts learn embeddings; continuous prompts are difficult to interpret and unavailable when PLMs can only be accessed through an API.The passage also notes continuous prompts’ parameter efficiency and performance comparable to PLM fine-tuning.Source: §2 · p. 3
  • Prior analyses examined dataset size, sentence surface cues, task-input ordering, and lexical-overlap reliance in prompt-based models.Source: §2 · p. 3
  • The paper identifies systematic robustness testing of discrete prompts under different perturbations as an unaddressed focus in prior work.Source: §2 · p. 3

3 Experiments

Experiments compare AutoPrompt (AP), manually written prompts (MP), and head-based fine-tuning (HFT) on NLI datasets, then probe prompt perturbations and cross-dataset transfer. AP prompts are sensitive to token ordering and transfer poorly across datasets, while AP and MP are relatively robust to label-preserving input edits.

3 Experiments

  • Experiments compare AP-learned prompts, manually written prompts, and classifier-head fine-tuning with RoBERTa-large on NLI.AP learns trigger tokens by replacing template placeholders through gradient-guided search; MP uses one template for a fair comparison with AP.Source: §3 · pp. 3–4

3.1 Effect of the Training Dataset Size

  • On CB with 200 training instances, MP achieved 92.7% accuracy versus AP’s 54.2%; across CB and MNLI, MP always outperformed AP, and AP’s MNLI accuracy was quite low relative to CB.Source: §3.1 · pp. 4–5

3.2 Token Reordering

  • Randomly reordering prompt tokens reduced accuracy for both AP and MP, but AP’s CB accuracy fell about 14% versus about 2% for MP.Across all four AP prompts, accuracy decreased as token-shuffling edit distance increased.Source: Table 3 · p. 6, §3.2 · p. 6

3.3 Token Deletion

  • Both AP and MP lose accuracy under token deletion; more deletions degrade performance, but MP’s CB accuracy drops very little even when all prompt tokens are removed.AP’s robustness to single-token deletion varies by dataset, with higher RoD on CB than MNLI.Source: §3.3 · pp. 6–7

3.4 Cross-Dataset Evaluation

  • AP-based prompts generalize poorly across datasets, and RoD is larger for transfers from CB to MNLI than in the reverse direction for both AP and MP.The authors infer that MNLI is a better dataset for fine-tuning a PLM for NLI using discrete prompts.Source: §3.4 · p. 7

3.5 Adversarial Perturbations

  • Label-preserving hypothesis edits yield small RoD for AP and MP, but label-changing edits significantly lower both accuracies; AP RoD is smaller than MP’s despite AP’s lower accuracy.Neither method is sufficiently robust to correctly predict target labels when test hypotheses are adversarially modified.Source: §3.5 · p. 8

4 Conclusion

The study finds discrete prompts robust to some NLI input perturbations but sensitive to prompt perturbations, and poorly generalizing across NLI datasets.

4 Conclusion

  • Discrete prompts remain relatively robust to token deletion but are highly sensitive to other prompt perturbations, including token shuffling.The conclusion also notes that manually written prompts are less robust than AutoPrompt prompts in some perturbation settings.Source: §4 · p. 8
  • For input adversarial perturbations, discrete prompts tolerate weak changes without label changes, while AP is more robust than MP when perturbations change labels.Source: §4 · p. 9
  • AP prompts generalize poorly across NLI datasets, and a method's superiority on one dataset does not guarantee superiority on another.Source: §4 · p. 9

5 Limitations

The study's conclusions are bounded by its selected prompt methods, model, task, language, and performance differences between comparison methods.

5 Limitations

  • The study evaluates AP and MP, not other discrete prompt methods, although its analysis procedure could be applied to methods such as AvgTrigger.Source: §5 · p. 9
  • Experiments use RoBERTa-large; other pretrained language models could yield different results.Source: §5 · p. 9
  • The analysis focuses on NLI, leaving other complex downstream tasks for future investigation.Source: §5 · p. 9
  • Results and conclusions come from English datasets and would differ in other languages, though the methodology is not English-dependent.Source: §5 · p. 9
  • The performance gap between MP/HFT and AP could affect perturbation accuracies; the study examines robustness rather than identifying the best prompt-learning method.Source: §5 · p. 9

6 Ethical Considerations

The authors describe ethical checks on their adversarial data and note potential influence from biases in the pretrained model.

6 Ethical Considerations

  • The adversarial dataset uses existing CB and MNLI data, and visual checks of development instances found no ethical concerns.Source: §6 · p. 9
  • RoBERTa is known to have gender biases, which may influence the results because it was used as-is.Source: §6 · p. 9
  • The authors state that their prompt-robustness analysis would not pose or magnify the noted ethical concerns.Source: §6 · p. 9

A Supplementary Materials/Appendix

The appendix identifies the AutoPrompt prompts used in robustness evaluations and describes the information encoded in Table 9.

A Supplementary Materials/Appendix

Loading 2302.05619v1…