arXiv:2510.09658cs.LGcs.AI2025-10中稿 · ICLR被引 3

用梯度符号掩码实现任务向量跨模型迁移,仅需少量样本无需微调。

Gradient-Sign Masking for Task Vector Transport Across Pre-Trained Models

  • 通过目标模型梯度符号结构修正源任务向量方向。
  • 在视觉与语言任务上超越直接拼接和少量微调效果。
  • 适合需要快速迁移任务知识的模型更新场景。

当新版本基础模型发布时,用户通常需重新微调,即便相同任务已在旧版完成。一种替代方案是复用捕捉模型适配特定任务的参数变化(即任务向量)。然而,由于不同预训练模型参数空间错位,这些向量往往难以跨模型迁移。本文发现,成功迁移高度依赖于目标模型的梯度符号结构。基于此,我们提出GradFix:仅用少量标注样本计算目标模型梯度,近似理想符号结构,并据此对源任务向量进行掩码,实现无参数更新的知识迁移。该方法确保一阶下降,理论可保证性能提升。实验表明,在多个视觉与语言基准上,显著优于朴素任务向量叠加和少样本微调。进一步验证了任务向量迁移在多任务及多源模型合并中的优势。代码已开源。

原文摘要 · Abstract (English)

When a new release of a foundation model is published, practitioners typically need to repeat fine-tuning, even if the same task was already tackled in the previous version. A promising alternative is to reuse the parameter changes (i.e., task vectors) that capture how a model adapts to a specific task. However, these vectors often fail to transfer across different pre-trained models because their parameter spaces are misaligned. In this work, we show that successful transfer depends strongly on the gradient-sign structure of the new model. Based on this insight, we propose GradFix, which approximates the ideal sign structure and leverages it to transfer knowledge using only a handful of labeled samples. Notably, this requires no additional fine-tuning: we only compute a few target-model gradients without parameter updates and mask the source task vector accordingly. This yields an update that is locally aligned with the target loss landscape, effectively rebasing the task vector onto the new pre-training. We provide a theoretical guarantee that our method ensures first-order descent. Empirically, we demonstrate significant performance gains on vision and language benchmarks, consistently outperforming naive task vector addition and few-shot fine-tuning. We further show that transporting task vectors improves multi-task and multi-source model merging. Code is available at https://github.com/fillo-rinaldi/GradFix.

任务向量模型迁移少样本学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。