arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.13874cs.CL
收藏

$Se^2$:面向上下文学习的顺序示例选择

$Se^2$: Sequential Example Selection for In-Context Learning

Microsoft Corporation(微软公司)

Haoyu Liu, Jianfeng Liu, Shaohan Huang, Yuefeng Zhan, Hao Sun, Weiwei Deng, Furu Wei, Qi Zhang

AI总结:

本文提出顺序感知的上下文学习示例选择方法$Se^2$,利用LLM反馈和束搜索构建高质量示例序列,在23个NLP任务上显著优于基线并实现42%的相对提升。

摘要:

大语言模型(LLMs)在上下文学习(ICL)中的卓越能力需要通过演示示例来激活。先前的工作广泛探索了ICL中示例的选择,主要遵循“先选择后组织”的范式,这类方法往往忽视示例之间的内部关系,并且在训练和推理之间存在不一致。在本文中,我们将该问题形式化为一个顺序选择($Se$quential $Se$lection)问题,并提出$Se^2$,一种具有顺序感知能力的方法,利用LLM对不同上下文的反馈,帮助捕捉示例之间的相互关系和顺序信息,显著丰富ICL提示的上下文性和相关性。同时,我们利用束搜索来寻找和构建示例序列,从而提升质量和多样性。在来自8个不同类别的23个NLP任务上的大量实验表明,$Se^2$显著超越竞争性基线,并相比随机选择实现了42%的相对提升。进一步的深入分析显示了所提策略的有效性,突出$Se^2$在各种场景下卓越的稳定性和适应性。代码可在https://github.com/microsoft/LMOps获取。

英文摘要:

The remarkable capability of large language models (LLMs) for in-context learning (ICL) needs to be activated by demonstration examples. Prior work has extensively explored the selection of examples for ICL, predominantly following the "select then organize" paradigm, such approaches often neglect the internal relationships between examples and exist an inconsistency between the training and inference. In this paper, we formulate the problem as a $Se$quential $Se$lection problem and introduce $Se^2$, a sequential-aware method that leverages the LLM's feedback on varying context, aiding in capturing inter-relationships and sequential information among examples, significantly enriching the contextuality and relevance of ICL prompts. Meanwhile, we utilize beam search to seek and construct example sequences, enhancing both quality and diversity. Extensive experiments across 23 NLP tasks from 8 distinct categories illustrate that $Se^2$ markedly surpasses competitive baselines and achieves 42\% relative improvement over random selection. Further in-depth analysis shows the effectiveness of proposed strategies, highlighting $Se^2$'s exceptional stability and adaptability across various scenarios. Code available at https://github.com/microsoft/LMOps.

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

↑