Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Task Arithmetic in the Tangent Space: Improved Editing of Pre-Trained Models

About

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.

Guillermo Ortiz-Jimenez, Alessandro Favero, Pascal Frossard• 2023

Related benchmarks

TaskDatasetResultRank
Task addition8 Vision
Absolute Score88
65
Task Negation8 Vision
Control Accuracy74.39
61
Task addition8 classification datasets (Cars, DTD, EuroSAT, GTSRB, MNIST, RESISC45, SUN397, SVHN) (test)
Absolute Accuracy86.19
27
Task additionTask Arithmetic Benchmark (test)
Avg Absolute Accuracy88.5
12
Task Negation14-Vision
Target Accuracy19.9
8
Task addition14-Vision
Absolute Score75.5
7
Task addition6NLI base (test)
Absolute Accuracy76.1
7
ClassificationMIMIC
OOD AUPRC0.518
6
ClassificationHate Speech
OOD AUPRC56
6
ClassificationSHAC
OOD AUPRC66.7
6
Showing 10 of 12 rows

Other info

Code

Follow for update