On the Role of Attention in Prompt-tuning
Samet Oymak, Ankit Singh Rawat, Mahdi Soltanolkotabi, Christos Thrampoulidis
摘要
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 prompttuning 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 the 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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 42 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Attention is not all you need: pure attention loses rank doubly exponentially with depth 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Attention is not all you need: pure attention loses rank doubly exponentially with depth 引用了 Language Models are Few-Shot Learners
- Inductive Biases and Variable Creation in Self-Attention Mechanisms 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Inductive Biases and Variable Creation in Self-Attention Mechanisms 引用了 Language Models are Few-Shot Learners
- Efficient large-scale language model training on GPU clusters using megatron-LM 引用了 Language Models are Few-Shot Learners
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
- JoMA: Demystifying Multilayer Transformers via Joint Dynamics of MLP and Attention 引用了 Inductive Biases and Variable Creation in Self-Attention Mechanisms
- JoMA: Demystifying Multilayer Transformers via Joint Dynamics of MLP and Attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- JoMA: Demystifying Multilayer Transformers via Joint Dynamics of MLP and Attention 引用了 Max-Margin Token Selection in Attention Mechanism
- JoMA: Demystifying Multilayer Transformers via Joint Dynamics of MLP and Attention 引用了 Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer
- Max-Margin Token Selection in Attention Mechanism 引用了 Attention is not all you need: pure attention loses rank doubly exponentially with depth
- Max-Margin Token Selection in Attention Mechanism 引用了 Inductive Biases and Variable Creation in Self-Attention Mechanisms
- Max-Margin Token Selection in Attention Mechanism 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Max-Margin Token Selection in Attention Mechanism 引用了 Language Models are Few-Shot Learners
- Max-Margin Token Selection in Attention Mechanism 引用了 Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer
- Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer 引用了 Max-Margin Token Selection in Attention Mechanism
- The Expressive Power of Low-Rank Adaptation 引用了 Language Models are Few-Shot Learners
- Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer 引用了 Inductive Biases and Variable Creation in Self-Attention Mechanisms
- Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformer 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper42
- Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer TransformerYuandong Tian, Yiping Wang, Beidi Chen, Simon S. DuNeurIPS 2023 · 125 次引用
- The Expressive Power of Low-Rank AdaptationYuchen Zeng, Kangwook LeeICLR 2024 · 116 次引用
- Linear attention is (maybe) all you need (to understand Transformer optimization)Kwangjun Ahn, Xiang Cheng, Minhak Song, Chulhee Yun 等ICLR 2024 · 92 次引用
- Max-Margin Token Selection in Attention MechanismDavoud Ataee Tarzanagh, Yingcong Li, Xuechen Zhang, Samet OymakNeurIPS 2023 · 67 次引用
- JoMA: Demystifying Multilayer Transformers via Joint Dynamics of MLP and AttentionYuandong Tian, Yiping Wang, Zhenyu Zhang, Beidi Chen 等ICLR 2024 · 49 次引用
它引用的 Paper12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Efficient large-scale language model training on GPU clusters using megatron-LMDeepak Narayanan, Mohammad Shoeybi, Jared Casper, Patrick LeGresley 等SC 2021 · 576 次引用
- Attention is not all you need: pure attention loses rank doubly exponentially with depthYihe Dong, Jean-Baptiste Cordonnier, Andreas LoukasICML 2021 · 522 次引用
- Inductive Biases and Variable Creation in Self-Attention MechanismsBenjamin L. Edelman, Surbhi Goel, Sham M. Kakade, Cyril ZhangICML 2022 · 154 次引用
相关 Paper
- APrompt: Attention Prompt Tuning for Efficient Adaptation of Pre-trained Language ModelsQifan Wang, Yuning Mao, Jingang Wang, Hanchao Yu 等EMNLP 2023 · 25 次引用
- PPT: Pre-trained Prompt Tuning for Few-shot LearningYuxian Gu, Xu Han, Zhiyuan Liu, Minlie HuangACL 2022
- Two Examples are Better than One: Context Regularization for Gradient-based Prompt TuningHyeonmin Ha, Soyoung Jung, Jinsol Park, Minjoon Seo 等ACL Findings 2023 · 1 次引用
- Two-stage LLM Fine-tuning with Less Specialization and More GeneralizationYihan Wang, Si Si, Daliang Li, Michal Lukasik 等ICLR 2024 · 45 次引用
- ADePT: Adaptive Decomposed Prompt Tuning for Parameter-Efficient Fine-tuningPengwei Tang, Xiaolin Hu, Yong LiuICLR 2025
