arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.03435cs.LGcs.CLstat.ML
收藏

论注意力在 Prompt-tuning 中的作用

On the Role of Attention in Prompt-tuning

University of Michigan(密歇根大学);UC Riverside(加州大学河滨分校);Google Research(谷歌研究院);University of Southern California(南加州大学);University of British Columbia(不列颠哥伦比亚大学)

Samet Oymak, Ankit Singh Rawat, Mahdi Soltanolkotabi, Christos Thrampoulidis

AI总结:

本文提出自包含 prompt-attention 模型,从表达能力、梯度学习轨迹和有限样本性能三方面分析提示微调中注意力的作用,并通过真实数据集实验验证理论结论。

摘要:

Prompt-tuning(提示微调)是一种新兴策略,通过从数据中学习一个(软)提示参数,使大型语言模型(LLM)适应下游任务。尽管它在 LLM 中取得了成功,但人们对 prompt-tuning 的能力以及注意力机制在提示中的作用仍缺乏理论理解。在本文中,我们探索用于一层注意力架构的 prompt-tuning,并研究上下文混合模型,其中每个输入 token 属于上下文相关集合或上下文无关集合。我们通过一个自包含的 prompt-attention 模型来分离 prompt-tuning 的作用。我们的贡献如下:(1)我们证明,在我们的上下文数据模型下,softmax-prompt-attention 比 softmax-self-attention 和 linear-prompt-attention 具有可证明更强的表达能力。(2)我们分析梯度下降的初始轨迹,表明它以近最优样本复杂度学习提示和预测头,并展示提示如何可证明地注意稀疏的上下文相关 token。(3)在提示已知但预测头未知的假设下,我们刻画 prompt-attention 的确切有限样本性能,揭示其基本性能极限以及上下文信息的精确收益。我们还提供实验,在真实数据集上验证我们的理论洞见,并展示 prompt-tuning 如何使模型注意上下文相关信息。

英文摘要:

Prompt-tuning is an emerging strategy to adapt large language models (LLM) to downstream tasks by learning a (soft-)prompt parameter from data. Despite its success in LLMs, there is limited theoretical understanding of the power of prompt-tuning and the role of the attention mechanism in prompting. In this work, we explore prompt-tuning for one-layer attention architectures and study contextual mixture-models where each input token belongs to a context-relevant or -irrelevant set. We isolate the role of prompt-tuning through a self-contained prompt-attention model. Our contributions are as follows: (1) We show that softmax-prompt-attention is provably more expressive than softmax-self-attention and linear-prompt-attention under our contextual data model. (2) We analyze the initial trajectory of gradient descent and show that it learns the prompt and prediction head with near-optimal sample complexity and demonstrate how prompt can provably attend to sparse context-relevant tokens. (3) Assuming a known prompt but an unknown prediction head, we characterize the exact finite sample performance of prompt-attention which reveals the fundamental performance limits and the precise benefit of the context information. We also provide experiments that verify our theoretical insights on real datasets and demonstrate how prompt-tuning enables the model to attend to context-relevant information.

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

↑