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.


翻译:当基础模型发布新版本时,即使相同任务已在先前版本中完成,实践者通常仍需重复微调。一种有前景的替代方案是复用记录模型如何适应特定任务的参数变化(即任务向量)。然而,这些向量常因参数空间未对齐而无法在不同预训练模型间有效迁移。本研究发现,迁移成功与否主要取决于新模型的梯度符号结构。基于此洞见,我们提出GradFix方法:通过近似理想符号结构,仅利用少量标注样本即可实现知识迁移。该方法无需额外微调——仅需计算目标模型的若干梯度(不更新参数),并据此对源任务向量进行掩码处理。由此产生的更新与目标损失函数局部对齐,实现了任务向量在新预训练空间的有效重映射。我们提供了该方法确保一阶下降的理论保证。实验结果表明,在视觉与语言基准测试中,该方法均取得显著性能提升,持续优于朴素任务向量加法与小样本微调。进一步研究表明,任务向量迁移可提升多任务与多源模型融合效果。代码发布于https://github.com/fillo-rinaldi/GradFix。

0
下载
关闭预览

相关内容

梯度的本意是一个向量(矢量),表示某一函数在该点处的方向导数沿着该方向取得最大值,即函数在该点处沿着该方向(此梯度的方向)变化最快,变化率最大(为该梯度的模)。
预训练视觉模型的参数高效微调
专知会员服务
32+阅读 · 2024年3月19日
【ICML2023】基于最优多任务插值的多模态基础模型迁移
专知会员服务
31+阅读 · 2023年4月29日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
【迁移学习】简述迁移学习在深度学习中的应用
产业智能官
15+阅读 · 2018年1月9日
迁移学习在深度学习中的应用
专知
24+阅读 · 2017年12月24日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
超越网格:作战环境对炮兵的影响
专知会员服务
1+阅读 · 今天15:35
KDD 2026 | MixRAGRec:面向LLM推荐的混合专家KG-RAG框架
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
4+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
14+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
8+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
相关VIP内容
预训练视觉模型的参数高效微调
专知会员服务
32+阅读 · 2024年3月19日
【ICML2023】基于最优多任务插值的多模态基础模型迁移
专知会员服务
31+阅读 · 2023年4月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员