EMNLP Findings2023
Demystifying Prompts in Language Models via Perplexity Estimation
Hila Gonen, Srini Iyer, Terra Blevins, Noah A. Smith, Luke Zettlemoyer
Abstract
Language models can be prompted to perform a wide variety of tasks with zero-and few-shot incontext learning. However, performance varies significantly with the choice of prompt, and we do not yet understand why this happens. In this paper, we analyze the factors that contribute to this variance and establish a new empirical hypothesis: the performance of a prompt is predicted by the extent to which the model is familiar with the language it contains. Over a wide range of tasks, we show that the lower the perplexity of the prompt, the better it is able to perform the task, when considering reasonable prompts that are related to it. As part of our analysis, we also devise a method to automatically extend a small seed set of manually written prompts by paraphrasing with GPT3 and backtranslation. This larger set allows us to verify that perplexity is a strong predictor of the success of a prompt and we show that the lowest perplexity prompts are consistently effective.
Task Perplexity-score corr. Perplexity-acc corr. Avg Acc Acc 50% Pearson Spearman Pearson Spearman OPT 175B Antonyms **-0.41 **-0.53 ----GLUE Cola -0.15 -0.14 -0.04 -0.02 47.7 57.1 Newspop *-0.24 **-0.26 *-0.20 -0.18 66.4 72.9 AG News **-0.63 **-0.68 **-0.77 **-0.81 57.5 68.7 IMDB **0.35 **0.40 0.14 *0.20 86.2 91.0 DBpedia **-0.50 **-0.44 **-0.51 **-0.42 46.7 55.2 Emotion -0.14 -0.19 **-0.30 **-0.32 16.4 23.0 Tweet Offensive *-0.19 0.07 0.18 *0.23 51.3 55.8 Bloom 176B Antonyms **-0.37 **-0.23 ----GLUE Cola 0.07 0.11 **-0.25 **-0.26 55.5 65.6 Newspop **-0.50 **-0.42 **-0.59 **-0.51 78.9 87.8 AG News **-0.62 **-0.54 **-0.44 **-0.44 50.3 59.4 IMDB 0.04 0.09 -0.08 -0.14 89.3 92.2 DBpedia **-0.47 *-0.27 **-0.35 *-0.21 27.2 33.4 Emotion **-0.33 **-0.42 **-0.48 **-0.55 29.3 31.7 Tweet Offensive 0.14 *0.24 *-0.20 -0.03 41.6 46.2
Ask Lune
Ask anything. The answer quotes the paper.
Lune reads all of it and the papers around it, then shows you the passages behind every answer.
Lune answers from
the full paper · 74 top-tier papers that cite it · related work
Free to start. No credit card required.
Cited by top-tier papers74
- Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingMelanie Sclar, Yejin Choi, Yulia Tsvetkov, Alane SuhrICLR 2024 · 682 citations
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
- Cost-Efficient Large Language Model Serving for Multi-turn Conversations with CachedAttentionBin Gao, Zhuomin He, Puru Sharma, Qingxuan Kang et al.USENIX ATC 2024 · 273 citations
- SatLM: Satisfiability-Aided Language Models Using Declarative PromptingXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettNeurIPS 2023 · 126 citations
- Speak, Memory: An Archaeology of Books Known to ChatGPT/GPT-4Kent K. Chang, Mackenzie Cramer, Sandeep Soni, David BammanEMNLP 2023 · 70 citations
Builds on12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- AutoPrompt: Eliciting Knowledge from Language Models with Automatically Generated PromptsTaylor Shin, Yasaman Razeghi, Robert L. Logan IV, Eric Wallace et al.EMNLP 2020 · 1,162 citations
- TweetEval: Unified Benchmark and Comparative Evaluation for Tweet ClassificationFrancesco Barbieri, José Camacho-Collados, Luis Espinosa Anke, Leonardo NevesEMNLP Findings 2020 · 720 citations
- Large Language Models Struggle to Learn Long-Tail KnowledgeNikhil Kandpal, Haikang Deng, Adam Roberts, Eric Wallace et al.ICML 2023 · 623 citations
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement LearningMingkai Deng, Jianyu Wang, Cheng-Ping Hsieh, Yihan Wang et al.EMNLP 2022 · 141 citations
Related papers
- The language of prompting: What linguistic properties make a prompt successful?Alina Leidinger, Robert van Rooij, Ekaterina ShutovaEMNLP Findings 2023 · 29 citations
- Reframing Instructional Prompts to GPTk's LanguageDaniel Khashabi, Chitta Baral, Yejin Choi, Hannaneh HajishirziACL Findings 2022 · 126 citations
- What Makes Pre-trained Language Models Better Zero-shot Learners?Jinghui Lu, Dongsheng Zhu, Weidong Han, Rui Zhao et al.ACL 2023 · 5 citations
- Pre-trained Language Models Can be Fully Zero-Shot LearnersXuandong Zhao, Siqi Ouyang, Zhiguo Yu, Ming Wu et al.ACL 2023 · 22 citations
- Monotonic Paraphrasing Improves Generalization of Language Model PromptingQin Liu, Fei Wang, Nan Xu, Tianyi Yan et al.EMNLP Findings 2024 · 4 citations
