Towards Informative Few-Shot Prompt with Maximum Information Gain for In-Context Learning

📄 arXiv: 2310.08923v1 📥 PDF

作者: Hongfu Liu, Ye Wang

分类: cs.CL

发布日期: 2023-10-13

备注: Accepted to the Findings of EMNLP 2023


💡 一句话要点

提出最大信息增益的少样本提示方法以改善上下文学习

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 上下文学习 信息增益 少样本学习 模板偏差 模型校准

📋 核心要点

  1. 现有的上下文学习方法在示例选择上存在高方差,导致学习效果不稳定。
  2. 本文提出通过量化信息增益来评估示例的有效性,并采样最大信息增益的示例。
  3. 实验结果显示,所提方法在六个分类任务上相较于基线有14.3%的平均提升。

📝 摘要(中文)

大型语言模型(LLMs)能够通过少量示例进行上下文学习(ICL),但该学习范式存在高不稳定性,主要源于输入示例的选择、顺序和提示格式等因素的变化。本文展示了即使在这些因素保持不变的情况下,随机选择示例仍会导致高方差。因此,我们探索了数据示例的信息能力,通过量化观察给定示例候选后的信息增益(IG)来进行评估,并提出采样最大IG的示例。此外,我们识别出模板偏差,这可能导致在采样过程中对IG的不公平评估。为此,我们引入了“采样前校准”策略。实验结果表明,我们的方法在六个分类任务中使用三种LLM实现了平均14.3%的相对提升。

🔬 方法详解

问题定义:本文旨在解决上下文学习中示例选择的高方差问题,现有方法在示例选择上随机性导致学习效果不稳定。

核心思路:通过量化信息增益(IG)来评估示例的有效性,选择信息增益最大的示例进行学习,从而提高学习的稳定性和效果。

技术框架:整体流程包括示例候选的选择、信息增益的计算、最大IG示例的采样以及校准策略的应用,确保采样过程的公平性。

关键创新:引入了信息增益的量化评估和“采样前校准”策略,解决了模板偏差问题,显著提高了示例选择的有效性。

关键设计:在信息增益的计算中,考虑了示例的预测准确性和多样性,设计了相应的损失函数以优化模型性能。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,所提方法在六个分类任务中相较于基线模型实现了平均14.3%的性能提升,展示了信息增益在示例选择中的有效性和重要性。

🎯 应用场景

该研究的潜在应用领域包括自然语言处理中的少样本学习、智能问答系统和对话生成等。通过提高上下文学习的稳定性和效果,能够在数据稀缺的场景中实现更高效的模型训练,具有重要的实际价值和未来影响。

📄 摘要(原文)

Large Language models (LLMs) possess the capability to engage In-context Learning (ICL) by leveraging a few demonstrations pertaining to a new downstream task as conditions. However, this particular learning paradigm suffers from high instability stemming from substantial variances induced by factors such as the input distribution of selected examples, their ordering, and prompt formats. In this work, we demonstrate that even when all these factors are held constant, the random selection of examples still results in high variance. Consequently, we aim to explore the informative ability of data examples by quantifying the Information Gain (IG) obtained in prediction after observing a given example candidate. Then we propose to sample those with maximum IG. Additionally, we identify the presence of template bias, which can lead to unfair evaluations of IG during the sampling process. To mitigate this bias, we introduce Calibration Before Sampling strategy. The experimental results illustrate that our proposed method can yield an average relative improvement of 14.3% across six classification tasks using three LLMs.