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

上下文学习如何帮助提示微调?

How Does In-Context Learning Help Prompt Tuning?

University of Massachusetts Amherst(马萨诸塞大学阿默斯特分校);Microsoft Research(微软研究院)

Simeng Sun, Yang Liu, Dan Iter, Chenguang Zhu, Mohit Iyyer

摘要:

微调大语言模型变得越来越不切实际,因为它们的快速增长的规模。这促使使用参数高效的自适应方法,例如提示微调(PT),它将少量可调嵌入添加到否则冻结的模型中,以及上下文学习(ICL),其中任务的演示以自然语言提供给模型,而无需任何额外的训练。最近,Singhal等人(2022)提出了“指令提示微调"(IPT),它通过将自然语言演示与学习到的提示嵌入相连接来将PT与ICL相结合。虽然所有这些方法在不同的任务上都被证明是有效的,但它们之间的相互作用仍然没有被探索。在本文中,我们实证研究何时以及如何在上下文中的例子提高提示微调,通过测量ICL,PT和IPT的有效性,五个文本生成任务与多个基础语言模型。我们观察到(1)IPT确实\emph{not}总是优于PT,并且实际上需要上下文演示在语义上与测试输入相似才能产生改进;(2)PT不稳定并且表现出高方差,但是将PT和ICL相结合(融入IPT)持续降低所有五项任务的差异;以及(3)通过PT学习的特定源任务的提示在与不同目标任务的上下文示例配对时表现出正迁移。我们的研究结果为针对给定任务选择合适的参数高效自适应方法提供了可操作的见解。

英文摘要:

Fine-tuning large language models is becoming ever more impractical due to their rapidly-growing scale. This motivates the use of parameter-efficient adaptation methods such as prompt tuning (PT), which adds a small number of tunable embeddings to an otherwise frozen model, and in-context learning (ICL), in which demonstrations of the task are provided to the model in natural language without any additional training. Recently, Singhal et al. (2022) propose ``instruction prompt tuning'' (IPT), which combines PT with ICL by concatenating a natural language demonstration with learned prompt embeddings. While all of these methods have proven effective on different tasks, how they interact with each other remains unexplored. In this paper, we empirically study when and how in-context examples improve prompt tuning by measuring the effectiveness of ICL, PT, and IPT on five text generation tasks with multiple base language models. We observe that (1) IPT does \emph{not} always outperform PT, and in fact requires the in-context demonstration to be semantically similar to the test input to yield improvements; (2) PT is unstable and exhibits high variance, but combining PT and ICL (into IPT) consistently reduces variance across all five tasks; and (3) prompts learned for a specific source task via PT exhibit positive transfer when paired with in-context examples of a different target task. Our results offer actionable insights on choosing a suitable parameter-efficient adaptation method for a given task.

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

↑