Skip to main content
QUICK REVIEW

[论文解读] Calibrate Before Use: Improving Few-Shot Performance of Language Models

Tony Z. Zhao, Eric Wallace|arXiv (Cornell University)|Feb 19, 2021
Topic Modeling参考文献 33被引用 72
一句话总结

本论文提出情境校准以修正 GPT-3/GPT-2 的少样本学习中由提示引起的偏差,在不需要额外训练数据的情况下显著提升准确性并降低提示方差。

ABSTRACT

GPT-3 can perform numerous tasks when provided a natural language prompt that contains a few training examples. We show that this type of few-shot learning can be unstable: the choice of prompt format, training examples, and even the order of the training examples can cause accuracy to vary from near chance to near state-of-the-art. We demonstrate that this instability arises from the bias of language models towards predicting certain answers, e.g., those that are placed near the end of the prompt or are common in the pre-training data. To mitigate this, we first estimate the model's bias towards each answer by asking for its prediction when given the training prompt and a content-free test input such as "N/A". We then fit calibration parameters that cause the prediction for this input to be uniform across answers. On a diverse set of tasks, this contextual calibration procedure substantially improves GPT-3 and GPT-2's average accuracy (up to 30.0% absolute) and reduces variance across different choices of the prompt.

研究动机与目标

  • 激发并量化大语言模型在上下文内提示下的少样本学习的不稳定性。
  • 识别驱动不稳定预测的偏差(多数标签、最近性、常见标记)。
  • 提出一种无数据的校准方法,使模型输出在不同答案之间对齐。
  • 展示校准在多样化任务和提示格式下提升准确性并降低方差。

提出的方法

  • 识别导致少样本提示不稳定性的三种偏差来源:多数标签偏差、最近性偏差和共同标记偏差。
  • 提出一种无数据校准程序,使用内容空输入(如 'N/A')来估计每个答案的偏差。
  • 计算对角仿射校准(向量缩放)以变换输出概率,使内容空的情况在各答案之间保持一致。
  • 在固定提示和多格式/示例的条件下,将校准应用于 GPT-3、GPT-2(以及 GPT-3 的变体)在多任务上。
  • 证明校准可以以极低开销实现,且不需要额外的训练数据。

实验结果

研究问题

  • RQ1在大型语言模型中,少样本性能在提示格式、示例选择和顺序上的不稳定性有多大?
  • RQ2在上下文学习过程中,哪些偏差驱动模型预测的变异性?
  • RQ3无数据校准程序是否能使输出更符合任务需求,并对提示变异具有鲁棒性?
  • RQ4情境校准在多样化的NLP任务中在多大程度上提高准确性并降低方差?

主要发现

  • 情境校准在跨任务和提示下实现了多达 30.0% 的绝对平均准确率提升。
  • 校准降低了由不同提示选择和示例排列造成的性能方差。
  • 在某些任务上,经过校准后,GPT-3 2.7B 可以超过 GPT-3 175B 基线(最高 19.3% 绝对提升)。
  • 校准同样提升了 GPT-2,表明该方法不仅限于 GPT-3。
  • 该方法适用于文本分类、事实检索(LAMA)和信息抽取,显示出广泛的适用性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

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