Task Vectors in In-Context Learning: Emergence, Formation, and Benefit
Not on the map. Why?
Abstract (arXiv)
In-context learning is a remarkable capability of transformers, referring to their ability to adapt to specific tasks based on a short history or context. Previous research has found that task-specific information is locally encoded within models, though their emergence and functionality remain unclear due to opaque pre-training processes. In this work, we investigate the formation of task vectors in a controlled setting, using models trained from scratch on synthetic datasets. Our findings confirm that task vectors naturally emerge under certain conditions, but the tasks may be relatively weakly and/or non-locally encoded within the model. To promote strong task vectors encoded at a prescribed location within the model, we propose an auxiliary training mechanism based on a task vector prompting loss (TVP-loss). This method eliminates the need to search for task-correlated encodings within the trained model and demonstrably improves robustness and generalization.
Key facts. Cited by 20 papers in the map (data through 7 Oct 2026). First posted on arXiv 16 Jan 2025.
Builds on
0 of 0 references.
No references here yet.
Built on by
Citing papers per year: 2025: 14; 2026: 6.
20 papers.
Sort:
By area:
- 2025Learning without training: The implicit dynamics of in-context learningcited by 41
- 2025Text Generation Beyond Discrete Token Samplingcited by 21
- 2025Representation Engineering for Large-Language Models: Survey and Research Challengescited by 18
- 2025Internal Chain-of-Thought: Empirical Evidence for Layer-wise Subtask Scheduling in LLMscited by 9
- 2025Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitationscited by 8
- 2025Scaling can lead to compositional generalizationcited by 7
- 2025Just-in-time and distributed task representations in language modelscited by 7
- 2025Adaptive Task Vectors for Large Language Modelscited by 4
- 2025Where and What Matters: Sensitivity-Aware Task Vectors for Many-Shot Multimodal In-Context Learningcited by 4
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
- 2025Transmuting prompts into weightscited by 3
- 2026In-Context Learning Operates as Concept Subspace Learningcited by 3
8 more
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledgecited by 2
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspectivecited by 0
- 2025Look the Other Way: Designing 'Positive' Molecules with Negative Data via Task Arithmeticcited by 0
- 2025Beyond Plain Demos: A Demo-centric Anchoring Paradigm for In-Context Learning in Alzheimer's Disease Detectioncited by 0
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encodingcited by 0
- 2026DeCoVec: Building Decoding Space based Task Vector for Large Language Models via In-Context Learningcited by 0
- 2026Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoderscited by 0
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learningcited by 0
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning20 May 2026
- 2026In-Context Learning Operates as Concept Subspace Learning12 May 2026
- 2026Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoders2 May 2026
- 2026DeCoVec: Building Decoding Space based Task Vector for Large Language Models via In-Context Learning13 Apr 2026
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge21 Mar 2026
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2025Where and What Matters: Sensitivity-Aware Task Vectors for Many-Shot Multimodal In-Context Learning11 Nov 2025
- 2025Beyond Plain Demos: A Demo-centric Anchoring Paradigm for In-Context Learning in Alzheimer's Disease Detection10 Nov 2025
- 2025Transmuting prompts into weights9 Oct 2025
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insight29 Sep 2025
- 2025Just-in-time and distributed task representations in language models28 Aug 2025
- 2025Look the Other Way: Designing 'Positive' Molecules with Negative Data via Task Arithmetic23 Jul 2025
8 more
- 2025Learning without training: The implicit dynamics of in-context learning21 Jul 2025
- 2025Scaling can lead to compositional generalization9 Jul 2025
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspective19 Jun 2025
- 2025Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations10 Jun 2025
- 2025Adaptive Task Vectors for Large Language Models3 Jun 2025
- 2025Text Generation Beyond Discrete Token Sampling20 May 2025
- 2025Internal Chain-of-Thought: Empirical Evidence for Layer-wise Subtask Scheduling in LLMs20 May 2025
- 2025Representation Engineering for Large-Language Models: Survey and Research Challenges24 Feb 2025
- 2025Learning without training: The implicit dynamics of in-context learningcited by 41
- 2025Text Generation Beyond Discrete Token Samplingcited by 21
- 2025Representation Engineering for Large-Language Models: Survey and Research Challengescited by 18
- 2025Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitationscited by 8
- 2025Scaling can lead to compositional generalizationcited by 7
- 2025Just-in-time and distributed task representations in language modelscited by 7
- 2025Adaptive Task Vectors for Large Language Modelscited by 4
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insightcited by 3
- 2025Transmuting prompts into weightscited by 3
- 2026In-Context Learning Operates as Concept Subspace Learningcited by 3
- 2025Next-Token Prediction Should be Ambiguity-Sensitive: A Meta-Learning Perspectivecited by 0
- 2025Look the Other Way: Designing 'Positive' Molecules with Negative Data via Task Arithmeticcited by 0
12 most cited of 17 All 17 (JSON)
- 2026Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning20 May 2026
- 2026In-Context Learning Operates as Concept Subspace Learning12 May 2026
- 2026Embedding-based In-Context Prompt Training for Enhancing LLMs as Text Encoders2 May 2026
- 2026DeCoVec: Building Decoding Space based Task Vector for Large Language Models via In-Context Learning13 Apr 2026
- 2026Reconciling In-Context and In-Weight Learning via Dual Representation Space Encoding13 Mar 2026
- 2025Beyond Plain Demos: A Demo-centric Anchoring Paradigm for In-Context Learning in Alzheimer's Disease Detection10 Nov 2025
- 2025Transmuting prompts into weights9 Oct 2025
- 2025Task Vectors, Learned Not Extracted: Performance Gains and Mechanistic Insight29 Sep 2025
- 2025Just-in-time and distributed task representations in language models28 Aug 2025
- 2025Look the Other Way: Designing 'Positive' Molecules with Negative Data via Task Arithmetic23 Jul 2025
- 2025Learning without training: The implicit dynamics of in-context learning21 Jul 2025
- 2025Scaling can lead to compositional generalization9 Jul 2025
12 newest of 17 All 17 (JSON)