理解上下文学习中的任务向量:涌现、功能与局限
Understanding Task Vectors in In-Context Learning: Emergence, Functionality, and Limitations
AI总结:
本文提出任务向量的线性组合猜想,从理论与实验上解释其在 ICL 中的涌现、功能及高秩映射失效,并给出多向量注入的增强思路。
摘要:
任务向量通过将任务特定信息提炼为单一、可复用的表示,为加速上下文学习(ICL)中的推理提供了一种颇具吸引力的机制。尽管它们在实证上取得了成功,但支配其涌现与功能的基本原理仍不清楚。本工作提出了线性组合猜想,假定任务向量充当通过原始上下文示范的线性组合形成的单个上下文示范。我们为该猜想提供了理论和实证两方面的支持。首先,我们通过损失景观分析表明,任务向量会在以三元组格式提示训练的线性 transformer 中自然涌现。接着,我们预测任务向量在表示高秩映射时会失败,并在实际 LLM 上证实了这一点。我们的发现进一步通过显著性分析和参数可视化得到验证,表明可通过向少样本提示中注入多个任务向量来增强任务向量。总之,我们的结果推进了对任务向量的理解,并阐明了基于 transformer 的模型中 ICL 的底层机制。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。