arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2408.07505cs.CL
收藏

大型语言模型知道什么构成典范性上下文

Large Language Models Know What Makes Exemplary Contexts

Nanyang Technological University(南洋理工大学);The Chinese University of Hong Kong(香港中文大学)

Quanyu Long, Jianda Chen, Wenya Wang, Sinno Jialin Pan

AI总结:

本文提出一个统一框架,使大型语言模型能自我选择、排序并优化上下文示例,通过参数高效检索头和强化学习增强上下文学习性能。

摘要:

上下文学习(ICL)已被证明是大型语言模型(LLMs)发展中的一项重要能力。通过使用少样本示范性示例来指导LLMs,ICL使它们能够执行广泛的任务,而无需更新数百万参数。本文为LLMs提出了一个统一框架,使其能够自我选择有影响力的上下文示例来组成其上下文;对不同示范组合的候选进行自我排序;通过强化学习自我优化示范的选择和排序。具体而言,我们的方法设计了一个参数高效的检索头,在利用LLM自身偏好的奖励进行训练后生成优化的示范。实验结果验证了所提方法在增强ICL性能方面的有效性。此外,我们的方法能有效识别并选择当前任务中最具代表性的示例,并在检索中纳入更多多样性。

英文摘要:

In-context learning (ICL) has proven to be a significant capability with the advancement of Large Language models (LLMs). By instructing LLMs using few-shot demonstrative examples, ICL enables them to perform a wide range of tasks without needing to update millions of parameters. This paper presents a unified framework for LLMs that allows them to self-select influential in-context examples to compose their contexts; self-rank candidates with different demonstration compositions; self-optimize the demonstration selection and ordering through reinforcement learning. Specifically, our method designs a parameter-efficient retrieval head that generates the optimized demonstration after training with rewards from LLM's own preference. Experimental results validate the proposed method's effectiveness in enhancing ICL performance. Additionally, our approach effectively identifies and selects the most representative examples for the current task, and includes more diversity in retrieval.

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

↑