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

学习理解上下文学习

Learning To Retrieve Prompts for In-Context Learning

Tel Aviv University(特拉维夫大学)

Ohad Rubin, Jonathan Herzig, Jonathan Berant

摘要:

上下文学习是自然语言理解中的一种新范式,其中大型预训练语言模型(LM)观察测试实例和一些训练样本作为其输入,并直接解码输出而不对其参数进行任何更新。然而,性能已被证明在很大程度上取决于所选择的训练样本(称为提示)。在这项工作中,我们提出了一个有效的方法检索提示上下文学习使用注释数据和LM。给定一个输入-输出对,我们估计输出的概率,给定输入和候选训练样本作为提示,并基于此概率将训练样本标记为正或负。然后,我们从这些数据中训练一个高效的密集检索器,该检索器用于在测试时根据提示检索训练样本。我们评估了我们的方法在三个序列到序列的任务,其中语言的话语映射到意义表示,并发现它大大优于以前的工作和多个基线全面。

英文摘要:

In-context learning is a recent paradigm in natural language understanding, where a large pre-trained language model (LM) observes a test instance and a few training examples as its input, and directly decodes the output without any update to its parameters. However, performance has been shown to strongly depend on the selected training examples (termed prompt). In this work, we propose an efficient method for retrieving prompts for in-context learning using annotated data and a LM. Given an input-output pair, we estimate the probability of the output given the input and a candidate training example as the prompt, and label training examples as positive or negative based on this probability. We then train an efficient dense retriever from this data, which is used to retrieve training examples as prompts at test time. We evaluate our approach on three sequence-to-sequence tasks where language utterances are mapped to meaning representations, and find that it substantially outperforms prior work and multiple baselines across the board.

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

↑