arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.08923cs.CL
收藏

面向上下文学习的信息增益最大化的少样本提示

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

National University of Singapore(新加坡国立大学)

Hongfu Liu, Ye Wang

AI总结:

本文提出通过最大化信息增益选择示例,并引入采样前校准以消除模板偏差,在六个分类任务上平均提升14.3%。

摘要:

大型语言模型(LLMs)具备通过利用与新下游任务相关的少量示例作为条件进行上下文学习(ICL)的能力。然而,这种学习范式存在高度不稳定性,这种不稳定性源于所选示例的输入分布、排序和提示格式等因素引起的显著方差。在本工作中,我们证明即使所有这些因素保持不变,随机选择示例仍会导致高方差。因此,我们旨在通过量化在观察给定示例候选后预测中获得的信息增益(IG)来探索数据示例的信息能力。然后,我们提出采样具有最大IG的示例。此外,我们识别出模板偏差的存在,这种偏差可能导致采样过程中对IG的不公平评估。为缓解此偏差,我们引入了采样前校准策略。实验结果表明,我们提出的方法在使用三种LLM的六个分类任务上平均可获得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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑