Provable In-Context Vector Arithmetic via Retrieving Task Concepts
Dake Bu, Wei Huang, Andi Han, Atsushi Nitanda, Qingfu Zhang, Hau-San Wong, Taiji Suzuki
摘要
In-context learning (ICL) has garnered significant attention for its ability to grasp functions/tasks from demonstrations. Recent studies suggest the presence of a latent task/function vector in LLMs during ICL. Merullo et al. (2024) showed that LLMs leverage this vector alongside the residual stream for Word2Veclike vector arithmetic, solving factual-recall ICL tasks. Additionally, recent work empirically highlighted the key role of Question-Answer data in enhancing factual-recall capabilities. Despite these insights, a theoretical explanation remains elusive. To move one step forward, we propose a theoretical framework building on empirically grounded hierarchical concept modeling. We develop an optimization theory, showing how nonlinear residual transformers trained via gradient descent on cross-entropy loss perform factualrecall ICL tasks via vector arithmetic. We prove 0-1 loss convergence and show the strong generalization, including robustness to concept recombination and distribution shifts. These results elucidate the advantages of transformers over static embedding predecessors. Empirical simulations corroborate our theoretical insights.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 5 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Physics of Language Models: Part 3.1, Knowledge Storage and Extraction 引用了 Locating and Editing Factual Associations in GPT
- Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
- Trained Mamba Emulates Online Gradient Descent in In-Context Linear Regression 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection 引用了 What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
- Towards a Theoretical Understanding of In-context Learning: Stability and Non-I.I.D Generalisation 引用了 Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
引用它的顶会 Paper5
- Causality ≠ Invariance: Function and Concept Vectors in LLMsGustaw Opielka, Hannes Rosenbusch, Claire E. StevensonICLR 2026 · 7 次引用
- Mechanism of Task-oriented Information Removal in In-context LearningHakaze Cho, Haolin Yang, Gouki Minegishi, Naoya InoueICLR 2026 · 3 次引用
- Trained Mamba Emulates Online Gradient Descent in In-Context Linear RegressionJiarui Jiang, Wei Huang, Miao Zhang, Taiji Suzuki 等NeurIPS 2025 · 2 次引用
- Towards a Theoretical Understanding of In-context Learning: Stability and Non-I.I.D GeneralisationYingjie Wang, Yutian Zhou, Shi Fu, Yuzhu Chen 等ICLR 2026
- Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic InsightsHaolin Yang, Hakaze Cho, Kaize Ding, Naoya InoueICLR 2026
它引用的 Paper34
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 次引用
- What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 次引用
- Merging Models with Fisher-Weighted AveragingMichael Matena, Colin RaffelNeurIPS 2022 · 741 次引用
- Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong 等NeurIPS 2023 · 356 次引用
- Physics of Language Models: Part 3.1, Knowledge Storage and ExtractionZeyuan Allen-Zhu, Yuanzhi LiICML 2024 · 258 次引用
相关 Paper
- In-Context Learning Creates Task VectorsRoee Hendel, Mor Geva, Amir GlobersonEMNLP Findings 2023 · 43 次引用
- Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias 等ACL Findings 2025 · 1 次引用
- In-Context Learning with Representations: Contextual Generalization of Trained TransformersTong Yang, Yu Huang, Yingbin Liang, Yuejie ChiNeurIPS 2024 · 45 次引用
- Transformers Efficiently Perform In-Context Logistic Regression via Normalized Gradient DescentChenyang Zhang, Yuan CaoICML 2026 · 1 次引用
- Function Vectors in Large Language ModelsEric Todd, Millicent L. Li, Arnab Sen Sharma, Aaron Mueller 等ICLR 2024 · 229 次引用
