arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.03426cs.LGcs.CL
收藏

面向大语言模型的自适应任务向量

Adaptive Task Vectors for Large Language Models

Yonsei University(延世大学)

Joonseong Kang, Soojeong Lee, Subeen Park, Sumin Park, Taero Kim, Jihee Kim, Ryunyi Lee, Kyungwoo Song

AI总结:

本文提出自适应任务向量(ATV)框架,通过小型语言模型根据每个输入查询动态生成任务向量,以克服上下文学习和固定任务向量方法在泛化性和适应性上的局限,并在理论上证明其表达能力等价于LoRA且优于Prefix-Tuning。

摘要:

上下文学习(In-Context Learning, ICL)使大语言模型(Large Language Models, LLMs)能够通过在提示中提供少量演示来执行任务,而无需更新参数。尽管ICL取得了成功,但它仍存在若干局限,包括对演示顺序敏感、上下文长度受限以及计算效率低下。为应对这些挑战,基于任务向量的方法将任务信息压缩为单一向量。然而,这些方法通常从固定的演示集合中构建任务向量,并在不同输入查询之间重复使用,而不依据具体输入进行条件化。当输入查询与底层演示不一致时,这一局限可能导致模型难以有效适应,从而降低其在未见任务上的泛化性能。为克服这一局限,我们提出了自适应任务向量(Adaptive Task Vectors, ATV),这是一个简单而有效的框架,能够根据每个输入查询动态生成任务向量。ATV使用一个小型语言模型生成任务向量,随后对这些向量进行变换以匹配目标LLM的架构,并将其应用于引导输出生成。与依赖固定演示集及其对应向量的ICL和以往基于向量的方法不同,ATV能够针对每个具体输入查询和任务动态生成定制化的任务向量。因此,ATV即使在未见任务上也展现出强大的性能和泛化能力。此外,我们提供了理论分析,表明在相同秩预算下,ATV在表达能力上与LoRA等价,并且比Prefix-Tuning更具表达力,从而为其表示优势提供了形式化支持。

英文摘要:

In-Context Learning (ICL) enables Large Language Models (LLMs) to perform tasks without parameter updates by conditioning on a few demonstrations provided in the prompt. Despite its success, ICL suffers from several limitations, including sensitivity to demonstration order, context length constraints, and computational inefficiency. To address these challenges, task vector-based approaches compress task information into a single vector. However, these methods typically construct task vectors from fixed sets of demonstrations and reuse them across input queries, without conditioning on the specific input. This limitation can lead models to struggle with effective adaptation when the input query is not well aligned with the underlying demonstrations, consequently degrading their generalization performance on unseen tasks. To overcome this limitation, we propose Adaptive Task Vectors (ATV), a simple and effective framework that dynamically generates task vectors conditioned on each input query. ATV employs a small language model to generate task vectors, which are then transformed to match the target LLM's architecture and applied to guide its output generation. In contrast to ICL and previous vector-based approaches, which rely on fixed demonstration sets and their corresponding vectors, ATV dynamically generates task vectors tailored to each specific input query and task. Consequently, ATV demonstrates strong performance and generalization capabilities, even for unseen tasks. Furthermore, we provide a theoretical analysis indicating that ATV is expressively equivalent to LoRA under equal rank budgets and more expressive than Prefix-Tuning, thereby offering formal support for its representational advantage.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑