Skip to main content
QUICK REVIEW

[论文解读] Demystifying Prompts in Language Models via Perplexity Estimation

Hila Gonen, Srini Iyer|arXiv (Cornell University)|Dec 8, 2022
Topic Modeling被引用 10
一句话总结

本文提出了SPELL(通过估计语言模型似然性来选择提示),一种通过将最低困惑度的提示作为模型熟悉度的代理来提升少样本提示性能的方法。通过自动改写和困惑度估计,SPELL在无需标签的情况下,使平均准确率相较于人工提示提升了1.8–3.6个百分点,表明低困惑度提示在多种任务和模型上与更高性能强烈相关。

ABSTRACT

Language models can be prompted to perform a wide variety of zero- and few-shot learning problems. However, performance varies significantly with the choice of prompt, and we do not yet understand why this happens or how to pick the best prompts. In this work, we analyze the factors that contribute to this variance and establish a new empirical hypothesis: the performance of a prompt is coupled with 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 is, the better the prompt is able to perform the task. As a result, we devise a method for creating prompts: (1) automatically extend a small seed set of manually written prompts by paraphrasing using GPT3 and backtranslation and (2) choose the lowest perplexity prompts to get significant gains in performance.

研究动机与目标

  • 理解为何在零样本和少样本提示中,尽管表面形式相似,某些提示仍表现更优。
  • 探究模型对提示的熟悉度(通过困惑度衡量)是否与下游任务性能相关。
  • 开发一种无需标签、与模型无关的高绩效提示生成方法,适用于新任务。
  • 验证低困惑度提示是否在多种任务和模型架构上均能带来更稳定且更高的准确率结果。

提出的方法

  • 使用GPT-3对少量人工编写的种子提示进行自动扩展,通过改写和反向翻译生成多样化的大型候选提示池。
  • 使用目标语言模型估计每个候选提示的困惑度,以衡量模型对提示的熟悉程度。
  • 选择困惑度最低的k个提示作为推理的最终提示集。
  • 使用选定的低困惑度提示在下游任务中执行少样本提示,且无需任务特定标签。
  • 在多个任务和模型(如OPT-175B、Bloom)上评估性能,以验证该方法的泛化性和鲁棒性。
  • 将最低困惑度提示的性能与人工精心设计的提示进行对比,量化性能提升和稳定性。
Figure 1: Accuracy vs. perplexity for the AG News dataset with OPT 175b. The $x$ axis is in log scale. Each point stands for a different prompt.
Figure 1: Accuracy vs. perplexity for the AG News dataset with OPT 175b. The $x$ axis is in log scale. Each point stands for a different prompt.

实验结果

研究问题

  • RQ1提示的困惑度是否与它在下游任务上的表现相关?
  • RQ2即使无法访问预训练数据,困惑度能否作为模型对提示熟悉度的可靠代理?
  • RQ3基于低困惑度选择提示是否能在多种任务和模型架构上带来一致的性能提升?
  • RQ4在准确率和方差方面,低困惑度提示的性能与人工设计提示相比如何?

主要发现

  • 提示困惑度与任务性能之间存在强烈的负相关关系,低困惑度始终能更准确地预测多种任务和模型上的更高准确率。
  • 从扩展后的提示集中选取困惑度最低的三个提示,相较于人工提示,在OPT-175B上平均准确率提升1.8个百分点,在Bloom上提升3.6个百分点。
  • 低困惑度提示的性能显著更稳定,标准差更低(OPT-175B为5.07 vs. 6.86,Bloom为1.31 vs. 5.15),优于人工创建的提示。
  • 该方法SPELL在无需目标任务任何标注数据的情况下实现显著性能提升,使其对非专家用户更具实用性。
  • 最优提示集因模型而异,表明提示性能具有模型特异性,无法在不同架构间通用化。
(a)
(a)

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。