arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2305.14502cs.CLcs.AIcs.LG
收藏

RetICL:利用强化学习按顺序检索上下文示例

RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learning

University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校)

Alexander Scarlatos, Andrew Lan

AI总结:

针对上下文示例选择忽视依赖与顺序的问题,本文提出 RetICL,将顺序检索建模为马尔可夫决策过程并用强化学习训练检索器,在数学和科学任务上取得优于或持平基线的效果。

摘要:

大型预训练语言模型的最新发展,已使其在各种下游任务上取得前所未有的性能。要让这些模型达到最佳性能,通常需要利用上下文学习(in-context learning),即模型在给定一个或多个示例的情况下执行一项(可能是全新的)任务。然而,近期研究表明,示例的选择会对任务性能产生巨大影响,而找到最优示例集并非易事。尽管已有许多选择上下文示例的方法,但它们通常独立地为示例评分,忽视了示例之间的依赖关系,以及示例提供给模型时的顺序。在本工作中,我们提出 Retrieval for In-Context Learning(RetICL),这是一种可学习的方法,用于为上下文学习按顺序建模并最优选择示例。我们将顺序示例选择问题构建为马尔可夫决策过程,并使用强化学习训练一个示例检索器。我们在数学应用题求解和科学问答任务上评估 RetICL,结果表明它始终优于或持平于基于启发式和可学习的基线。我们还通过案例研究表明,RetICL 隐式学习到了问题求解策略的表示。

英文摘要:

Recent developments in large pre-trained language models have enabled unprecedented performance on a variety of downstream tasks. Achieving best performance with these models often leverages in-context learning, where a model performs a (possibly new) task given one or more examples. However, recent work has shown that the choice of examples can have a large impact on task performance and that finding an optimal set of examples is non-trivial. While there are many existing methods for selecting in-context examples, they generally score examples independently, ignoring the dependency between them and the order in which they are provided to the model. In this work, we propose Retrieval for In-Context Learning (RetICL), a learnable method for modeling and optimally selecting examples sequentially for in-context learning. We frame the problem of sequential example selection as a Markov decision process and train an example retriever using reinforcement learning. We evaluate RetICL on math word problem solving and scientific question answering tasks and show that it consistently outperforms or matches heuristic and learnable baselines. We also use case studies to show that RetICL implicitly learns representations of problem solving strategies.

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

↑