Editing models with task arithmetic
Gabriel Ilharco, Marco Túlio Ribeiro, Mitchell Wortsman, 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 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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 528 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- TIES-Merging: Resolving Interference When Merging Models 引用了 Learning Transferable Visual Models From Natural Language Supervision
- The WMDP Benchmark: Measuring and Reducing Malicious Use with Unlearning 引用了 Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting
- The WMDP Benchmark: Measuring and Reducing Malicious Use with Unlearning 引用了 Training language models to follow instructions with human feedback
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model 引用了 Language Models are Few-Shot Learners
- Inference-Time Intervention: Eliciting Truthful Answers from a Language Model 引用了 Training language models to follow instructions with human feedback
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Learning Transferable Visual Models From Natural Language Supervision 引用了 Language Models are Few-Shot Learners
- Training language models to follow instructions with human feedback 引用了 Language Models are Few-Shot Learners
- Flamingo: a Visual Language Model for Few-Shot Learning 引用了 Scaling Up Visual and Vision-Language Representation Learning With Noisy Text Supervision
- Flamingo: a Visual Language Model for Few-Shot Learning 引用了 Language Models are Few-Shot Learners
- Flamingo: a Visual Language Model for Few-Shot Learning 引用了 Learning Transferable Visual Models From Natural Language Supervision
引用它的顶会 Paper528
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister 等NeurIPS 2023 · 1,549 次引用
- TIES-Merging: Resolving Interference When Merging ModelsPrateek Yadav, Derek Tam, Leshem Choshen, Colin A. Raffel 等NeurIPS 2023 · 999 次引用
- Quantifying Language Models' Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formattingMelanie Sclar, Yejin Choi, Yulia Tsvetkov, Alane SuhrICLR 2024 · 682 次引用
- Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free LunchLe Yu, Bowen Yu, Haiyang Yu, Fei Huang 等ICML 2024 · 605 次引用
- The WMDP Benchmark: Measuring and Reducing Malicious Use with UnlearningNathaniel Li, Alexander Pan, Anjali Gopal, Summer Yue 等ICML 2024 · 390 次引用
它引用的 Paper45
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida 等NeurIPS 2022 · 24,707 次引用
- Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech 等NeurIPS 2022 · 6,707 次引用
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen 等ICML 2021 · 5,401 次引用
相关 Paper
- Task Arithmetic in the Tangent Space: Improved Editing of Pre-Trained ModelsGuillermo Ortiz-Jiménez, Alessandro Favero, Pascal FrossardNeurIPS 2023 · 272 次引用
- When is Task Vector Provably Effective for Model Editing? A Generalization Analysis of Nonlinear TransformersHongkang Li, Yihua Zhang, Shuai Zhang, Pin-Yu Chen 等ICLR 2025
- Escaping Optimization Stagnation: Taking Steps Beyond Task Arithmetic via Difference VectorsJinping Wang, Zhiqiang Gao, Dinggen Zhang, Zhiwu XieAAAI 2026
- Steering Language Models with Weight ArithmeticConstanza Fierro, Fabien RogerICLR 2026 · 19 次引用
- BadTV: Unveiling Backdoor Threats in Third-Party Task VectorsChia-Yi Hsu, Yu-Lin Tsai, Zhe Yu, Yan-Lun Chen 等CCS 2026 · 2 次引用
