Lune

NeurIPS2024顶会

In-Context Learning State Vector with Inner and Momentum Optimization

Dongfang Li, Zhenyu Liu, Xinshuo Hu, Zetian Sun, Baotian Hu, Min Zhang

摘要

Large Language Models (LLMs) have exhibited an impressive ability to perform In-Context Learning (ICL) from only a few examples. Recent works have indicated that the functions learned by ICL can be represented through compressed vectors derived from the transformer. However, the working mechanisms and optimization of these vectors are yet to be thoroughly explored. In this paper, we address this gap by presenting a comprehensive analysis of these compressed vectors, drawing parallels to the parameters trained with gradient descent, and introduce the concept of state vector. Inspired by the works on model soup and momentum-based gradient descent, we propose inner and momentum optimization methods that are applied to refine the state vector progressively as test-time adaptation. Moreover, we simulate state vector aggregation in the multiple example setting, where demonstrations comprising numerous examples are usually too lengthy for regular ICL, and further propose a divide-and-conquer aggregation method to address this challenge. We conduct extensive experiments using Llama-2 and GPT-J in both zero-shot setting and few-shot setting. The experimental results show that our optimization method effectively enhances the state vector and achieves the state-of-the-art performance on diverse tasks. Code is available at https://github.com/HITsz-TMG/ICL-State-Vector

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Optimization Inspired Few-Shot Adaptation for Large Language Models 引用了 Language Models are Few-Shot Learners
  • Take Off the Training Wheels! Progressive In-Context Learning for Effective Alignment 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Take Off the Training Wheels! Progressive In-Context Learning for Effective Alignment 引用了 Language Models are Few-Shot Learners
  • FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
  • Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context Learning 引用了 Language Models are Few-Shot Learners
  • An Explanation of In-context Learning as Implicit Bayesian Inference 引用了 Language Models are Few-Shot Learners
  • Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations 引用了 An Explanation of In-context Learning as Implicit Bayesian Inference
  • Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations 引用了 Language Models are Few-Shot Learners
  • Efficient Memory Management for Large Language Model Serving with PagedAttention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Memory Management for Large Language Model Serving with PagedAttention 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper8

  1. Unifying Attention Heads and Task Vectors via Hidden State Geometry in In-Context LearningHaolin Yang, Hakaze Cho, Yiqiao Zhong, Naoya InoueNeurIPS 2025 · 11 次引用
  2. Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and LimitationsYuxin Dong, Jiachen Jiang, Zhihui Zhu, Xia NingICLR 2026 · 9 次引用
  3. Context Learning for Multi-Agent DiscussionXingyuan Hua, Sheng Yue, Xinyi Li, Yizhe Zhao 等ICLR 2026 · 4 次引用
  4. Optimization Inspired Few-Shot Adaptation for Large Language ModelsBoyan Gao, Xin Wang, Yibo Yang, David A. CliftonNeurIPS 2025 · 3 次引用
  5. Take Off the Training Wheels! Progressive In-Context Learning for Effective AlignmentZhenyu Liu, Dongfang Li, Xinshuo Hu, Xinping Zhao 等EMNLP 2024 · 1 次引用

它引用的 Paper21

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
  3. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference timeMitchell Wortsman, Gabriel Ilharco, Samir Yitzhak Gadre, Rebecca Roelofs 等ICML 2022 · 1,464 次引用
  4. An Explanation of In-context Learning as Implicit Bayesian InferenceSang Michael Xie, Aditi Raghunathan, Percy Liang, Tengyu MaICLR 2022 · 1,030 次引用
  5. Efficient Memory Management for Large Language Model Serving with PagedAttentionWoosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng 等SOSP 2023 · 1,016 次引用

相关 Paper

  1. Why Can GPT Learn In-Context? Language Models Secretly Perform Gradient Descent as Meta-OptimizersDamai Dai, Yutao Sun, Li Dong, Yaru Hao 等ACL Findings 2023 · 154 次引用
  2. Label Words as Local Task Vectors in In-Context LearningBowen Zheng, Ming Ma, Zhongqiao Lin, Tianming YangACL Findings 2026
  3. In-Context Learning Creates Task VectorsRoee Hendel, Mor Geva, Amir GlobersonEMNLP Findings 2023 · 43 次引用
  4. Beyond Demonstrations: Dynamic Vector Construction from Latent RepresentationsWang Cai, Hsiu-Yuan Huang, Zhixiang Wang, Yunfang WuEMNLP 2025
  5. Learning Task Representations from In-Context LearningBaturay Saglam, Xinyang Hu, Zhuoran Yang, Dionysis Kalogerias 等ACL Findings 2025 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖