Saved in:
Bibliographic Details
Main Authors: Dong, Yuxin, Jiang, Jiachen, Zhu, Zhihui, Ning, Xia
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2506.09048
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910999029743616
author Dong, Yuxin
Jiang, Jiachen
Zhu, Zhihui
Ning, Xia
author_facet Dong, Yuxin
Jiang, Jiachen
Zhu, Zhihui
Ning, Xia
contents Task vectors offer a compelling mechanism for accelerating inference in in-context learning (ICL) by distilling task-specific information into a single, reusable representation. Despite their empirical success, the underlying principles governing their emergence and functionality remain unclear. This work proposes the Linear Combination Conjecture, positing that task vectors act as single in-context demonstrations formed through linear combinations of the original ones. We provide both theoretical and empirical support for this conjecture. First, we show that task vectors naturally emerge in linear transformers trained on triplet-formatted prompts through loss landscape analysis. Next, we predict the failure of task vectors on representing high-rank mappings and confirm this on practical LLMs. Our findings are further validated through saliency analyses and parameter visualization, suggesting an enhancement of task vectors by injecting multiple ones into few-shot prompts. Together, our results advance the understanding of task vectors and shed light on the mechanisms underlying ICL in transformer-based models.
format Preprint
id arxiv_https___arxiv_org_abs_2506_09048
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations
Dong, Yuxin
Jiang, Jiachen
Zhu, Zhihui
Ning, Xia
Machine Learning
Task vectors offer a compelling mechanism for accelerating inference in in-context learning (ICL) by distilling task-specific information into a single, reusable representation. Despite their empirical success, the underlying principles governing their emergence and functionality remain unclear. This work proposes the Linear Combination Conjecture, positing that task vectors act as single in-context demonstrations formed through linear combinations of the original ones. We provide both theoretical and empirical support for this conjecture. First, we show that task vectors naturally emerge in linear transformers trained on triplet-formatted prompts through loss landscape analysis. Next, we predict the failure of task vectors on representing high-rank mappings and confirm this on practical LLMs. Our findings are further validated through saliency analyses and parameter visualization, suggesting an enhancement of task vectors by injecting multiple ones into few-shot prompts. Together, our results advance the understanding of task vectors and shed light on the mechanisms underlying ICL in transformer-based models.
title Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations
topic Machine Learning
url https://arxiv.org/abs/2506.09048