Skip to main content
QUICK REVIEW

[论文解读] Task Arithmetic in the Tangent Space: Improved Editing of Pre-Trained Models

Guillermo Ortiz-Jiménez, Alessandro Favero|arXiv (Cornell University)|May 22, 2023
Domain Adaptation and Few-Shot Learning被引用 5
一句话总结

本文提出在切线空间中对视觉-语言模型进行线性化,以通过增强权重解耦来提升任务算术性能——即不同权重方向控制独立的、局部的输入区域。通过在切线空间中微调,该方法在基准测试中实现任务相加时准确率最高提升5.8个百分点,任务相反时准确率降低13.1个百分点,揭示出权重解耦而非NTK本身才是预训练模型中有效任务算术的关键驱动因素。

ABSTRACT

Task arithmetic has recently emerged as a cost-effective and scalable approach to edit pre-trained models directly in weight space: By adding the fine-tuned weights of different tasks, the model's performance can be improved on these tasks, while negating them leads to task forgetting. Yet, our understanding of the effectiveness of task arithmetic and its underlying principles remains limited. We present a comprehensive study of task arithmetic in vision-language models and show that weight disentanglement is the crucial factor that makes it effective. This property arises during pre-training and manifests when distinct directions in weight space govern separate, localized regions in function space associated with the tasks. Notably, we show that fine-tuning models in their tangent space by linearizing them amplifies weight disentanglement. This leads to substantial performance improvements across multiple task arithmetic benchmarks and diverse models. Building on these findings, we provide theoretical and empirical analyses of the neural tangent kernel (NTK) of these models and establish a compelling link between task arithmetic and the spatial localization of the NTK eigenfunctions. Overall, our work uncovers novel insights into the fundamental mechanisms of task arithmetic and offers a more reliable and effective approach to edit pre-trained models through the NTK linearization.

研究动机与目标

  • 理解预训练模型中支持任务算术的根本机制。
  • 探究尽管神经正切核(NTK)存在局限性,任务算术为何在非线性模型中仍能生效。
  • 通过在切线空间中进行线性化微调,提升模型编辑的可靠性和性能。
  • 建立权重解耦与NTK特征函数空间定位性之间的关联。
  • 证明权重解耦是预训练过程中涌现的特性,而非随机初始化时即存在。

提出的方法

  • 作者将任务算术形式化为一种性质(性质1),使其能够实现特定任务的权重更新相加组合。
  • 提出线性化微调方法,通过使用模型的切线空间近似其动态行为,从而在预训练权重附近实现模型的线性化。
  • 通过解耦误差度量来量化权重解耦程度,该度量衡量不同权重方向对不同输入区域的影响独立性。
  • 分析NTK特征函数的空间定位性,以建立核结构与线性化模型中功能解耦之间的联系。
  • 在CLIP、ConvNeXt和T5-Base模型上开展实验,覆盖视觉与自然语言处理任务,以验证跨架构与模态的发现。
  • 在多个基准测试(包括VQA、Hateful Memes和IMDB/QASC)中对比非线性与线性化微调方法,评估其在任务相加与相反任务上的性能表现。

实验结果

研究问题

  • RQ1是什么基本性质使得任务算术在预训练模型中成为可能,而为何在随机初始化模型中会失败?
  • RQ2神经正切核在多大程度上能够解释非线性预训练模型中的任务算术?
  • RQ3在切线空间中对模型进行线性化,如何影响权重解耦程度与任务算术性能?
  • RQ4权重解耦是否为预训练过程的涌现特性?如果是,它在何时出现?
  • RQ5NTK特征函数的空间定位性与模型权重的功能解耦之间存在何种关系?

主要发现

  • 线性化微调显著提升了任务算术性能,在任务相加时准确率最高提升5.8个百分点,任务相反时准确率降低13.1个百分点,优于非线性微调。
  • 权重解耦——即不同权重方向控制互不重叠的输入区域——是实现任务算术的关键因素,而非NTK本身。
  • 权重解耦在预训练过程中出现,且在随机初始化时完全缺失,表明其是预训练过程的涌现特性。
  • 预训练模型中NTK特征函数的空间定位性与功能解耦之间存在相关性,为线性化微调的成功提供了理论依据。
  • 该方法在架构与模态之间具有泛化能力,体现在视觉模型(CLIP、ConvNeXt)与自然语言处理模型(T5-Base)中均成功实现任务算术。
  • 随机初始化模型在任务算术上失败,并非由于学习能力不足,而是由于缺乏权重解耦,即使其在单任务上达到了中等准确率。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。