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

学习为上下文学习搜索有效示例序列

Learning to Search Effective Example Sequences for In-Context Learning

Intuit AI Research(Intuit人工智能研究院)

Xiang Gao, Ankita Sinha, Kamalika Das

AI总结:

本文提出BESC方法,通过束搜索在推理时联合考虑长度、组成、排列及与查询关系等因素,逐步构造最优上下文示例序列,从而提升LLM少样本学习性能。

摘要:

大型语言模型(LLMs)展现出令人印象深刻的少样本学习能力,但其性能会因上下文示例的序列不同而有很大差异。影响这一点的关键因素包括序列的长度、组成和排列方式,以及它与具体查询的关系。现有方法往往孤立地处理这些因素,忽视了它们之间的相互依赖关系。此外,选择最优序列所涉及的庞大搜索空间也使整体性方法的开发变得复杂。在这项工作中,我们提出了基于束搜索的示例序列构造器(BESC),这是一种学习构造最优示例序列的新方法。BESC在推理过程中联合考虑序列选择所涉及的所有关键因素,同时逐步构建序列。这种设计使得可以利用束搜索显著降低搜索空间的复杂度。在多个数据集和语言模型上的实验表明,性能有显著提升。

英文摘要:

Large language models (LLMs) demonstrate impressive few-shot learning capabilities, but their performance varies widely based on the sequence of in-context examples. Key factors influencing this include the sequence's length, composition, and arrangement, as well as its relation to the specific query. Existing methods often tackle these factors in isolation, overlooking their interdependencies. Moreover, the extensive search space for selecting optimal sequences complicates the development of a holistic approach. In this work, we introduce Beam Search-based Example Sequence Constructor (BESC), a novel method for learning to construct optimal example sequences. BESC addresses all key factors involved in sequence selection by considering them jointly during inference, while incrementally building the sequence. This design enables the use of beam search to significantly reduce the complexity of the search space. Experiments across various datasets and language models show notable improvements in performance.

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

↑