paper-with-me

홈 › Papers

Editing Models with Task Arithmetic

2022-12-08 · Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Suchin Gururangan, Ludwig Schmidt, Hannaneh Hajishirzi, Ali Farhadi

Changing how pre-trained models behave -- e.g., improving their performance on a downstream task or mitigating biases learned during pre-training -- is a common practice when developing machine learning systems. In this work, we propose a new paradigm for steering the behavior of neural networks, centered around \textit{task vectors}. A task vector specifies a direction in the weight space of a pre-trained model, such that movement in that direction improves performance on the task. We build task vectors by subtracting the weights of a pre-trained model from the weights of the same model after fine-tuning on a task. We show that these task vectors can be modified and combined together through arithmetic operations such as negation and addition, and the behavior of the resulting model is steered accordingly. Negating a task vector decreases performance on the target task, with little change in model behavior on control tasks. Moreover, adding task vectors together can improve performance on multiple tasks at once. Finally, when tasks are linked by an analogy relationship of the form ``A is to B as C is to D", combining task vectors from three of the tasks can improve performance on the fourth, even when no data from the fourth task is used for training. Overall, our experiments with several models, modalities and tasks show that task arithmetic is a simple, efficient and effective way of editing models.

📄 PDF Abstract BibTeX arXiv:2212.04089

Code (9)

mlfoundations/task_vectors 공식 구현 pytorch
AntoAndGar/task_singular_vectors pytorch
EnnengYang/AdaMerging pytorch
flowritecom/flow-merge pytorch
idankinderman/fs_merge pytorch
iurada/talos-task-arithmetic pytorch
thennal10/fisher-nodes-merging pytorch
yanyang19/ImPart pytorch
zibojia/COCOCO pytorch

Tasks

NegationTask Arithmetic

Similar Papers 제목 키워드 기반

Recurrent Inference in Text Editing

2020-09-26 · Findings of the Association for Computational Linguistics 2020 · Ning Shi, Ziheng Zeng, Haotian Zhang, Yichen Gong

In neural text editing, prevalent sequence-to-sequence based approaches directly map the unedited text either to the edited text or the editing operations, in which the performance is degraded by the limited source text …

On Fairness of Task Arithmetic: The Role of Task Vectors

2025-05-30 · Hiroki Naganuma, Kotaro Yoshida, Laura Gomezjurado Gonzalez, Takafumi Horie 외

Model editing techniques, particularly task arithmetic using task vectors, have shown promise in efficiently modifying pre-trained models through arithmetic operations like task addition and negation. Despite computation…

FairnessHate Speech DetectionModel EditingNegation+2

Efficient Model Editing with Task Vector Bases: A Theoretical Framework and Scalable Approach

2025-02-03 · Siqi Zeng, Yifei He, Weiqiu You, Yifan Hao 외

Task vectors, which are derived from the difference between pre-trained and fine-tuned model weights, enable flexible task adaptation and model merging through arithmetic operations such as addition and negation. However…

Model EditingNegationTask Arithmetic

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

2023-05-22 · NeurIPS 2023 11 · Guillermo Ortiz-Jimenez, Alessandro Favero, Pascal Frossard

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 impr…

DisentanglementImage ClassificationTask Arithmetic

Task Addition and Weight Disentanglement in Closed-Vocabulary Models

2025-11-18 · Adam Hazimeh, Alessandro Favero, Pascal Frossard arxiv

Task arithmetic has recently emerged as a promising method for editing pre-trained \textit{open-vocabulary} models, offering a cost-effective alternative to standard multi-task fine-tuning. However, despite the abundance…

Image Classification