Skip to main content
QUICK REVIEW

[论文解读] Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting

Melanie Sclar, Yejin Choi|arXiv (Cornell University)|Oct 17, 2023
Topic ModelingComputer Science被引用 40
一句话总结

本论文分析提示格式的变化如何显著影响大语言模型性能,并引入 FormatSpread,以高效量化这种敏感性,而不依赖模型权重。

ABSTRACT

As large language models (LLMs) are adopted as a fundamental component of language technologies, it is crucial to accurately characterize their performance. Because choices in prompt design can strongly influence model behavior, this design process is critical in effectively using any modern pre-trained generative language model. In this work, we focus on LLM sensitivity to a quintessential class of meaning-preserving design choices: prompt formatting. We find that several widely used open-source LLMs are extremely sensitive to subtle changes in prompt formatting in few-shot settings, with performance differences of up to 76 accuracy points when evaluated using LLaMA-2-13B. Sensitivity remains even when increasing model size, the number of few-shot examples, or performing instruction tuning. Our analysis suggests that work evaluating LLMs with prompting-based methods would benefit from reporting a range of performance across plausible prompt formats, instead of the currently-standard practice of reporting performance on a single format. We also show that format performance only weakly correlates between models, which puts into question the methodological validity of comparing models with an arbitrarily chosen, fixed prompt format. To facilitate systematic analysis we propose FormatSpread, an algorithm that rapidly evaluates a sampled set of plausible prompt formats for a given task, and reports the interval of expected performance without accessing model weights. Furthermore, we present a suite of analyses that characterize the nature of this sensitivity, including exploring the influence of particular atomic perturbations and the internal representation of particular formats.

研究动机与目标

  • 证明尽管语义等价,LLMs 对提示格式高度敏感。
  • 在多样化任务中量化语义等价提示格式之间的性能差异。
  • 提出一种考虑预算的采样格式并在不访问模型权重的情况下估计差异的方法。
  • 表征哪些提示特征导致性能方差,以及格式如何与内部表征相关。

提出的方法

  • 构建一个对合理提示格式的形式语法,用以定义语义等价。
  • 将性能差异定义为在与原格式等价的哪些格式之间度量 m 的范围。
  • 将高/低表现格式的搜索建模为多臂赌博机并应用贝叶斯优化。
  • 引入 FormatSpread,一种考虑预算的算法,使用 Thompson 采样或 UCB 在有限评估下估计差异。
  • 在来自 Super-NaturalInstructions 的 53 项任务上,在多种模型上进行评估,包括 LLaMA-2 变体、Falcon 和 GPT-3.5,以排序准确率为主要指标。
  • 分析特征贡献以及通过嵌入和主成分对格式的可辨识性。

实验结果

研究问题

  • RQ1在任务与模型之间,语义等价的提示格式会产生多大性能变动?
  • RQ2是否通过增加模型规模、增添更多 few-shot 示例或进行指令微调来降低格式敏感性?
  • RQ3在不访问模型权重的情况下,能否在有限评估下高效估计性能差异?
  • RQ4与观察到的格式引发的性能差异相关的内部提示嵌入属性有哪些?
  • RQ5不同模型之间格式差异的影响是否一致,是否存在跨模型相关性较弱的情况?

主要发现

  • 对等格式的提示格式在某些任务上可导致高达 76 点的准确率差异。
  • 在 53 个任务中观察到中位数差异为 7.5 点;有些任务的差异超过 70 点。
  • FormatSpread 在约 51k 次评估预算下能将真实差异估计到约 1 点的精度,优于天真抽样。
  • 格式嵌入的可分离性与性能差异相关,且可通过分类器在提示嵌入中高准确地识别格式。
  • 即使增加 few-shot 示例、模型规模或进行指令微调,格式效应仍然存在。
  • 格式性能在跨模型之间通常不高度相关,增加了跨模型比较的难度。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。