Editing Models with Task Arithmetic
Open accessAbstract
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.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Ilharco et al (2022) showed that task vectors can be used to improve the performance of the model on multiple tasks by adding their vectors.
“The authors show that this method can be used to improve the performance of the model on multiple tasks by adding their vectors.”
From Digital forgetting in large language models: a survey of unlearning methods (2025) · cites this paper as Ilharco et al (2022)
Papers seeking to mitigate toxicity of generated texts sometimes rely on off-the-shelf metrics such as Perspective API or Toxicity.
“Papers seeking to mitigate the toxicity of generated texts (Ilharco et al 2022; Lu et al 2022 ) sometimes rely on off-the-shelf metrics, such as Perspective API 4 or Tox-”
From Digital forgetting in large language models: a survey of unlearning methods (2025) · cites this paper as Ilharco et al 2022
The citation lists haven’t been fetched yet
Cited by 66
- Authors
- Ilharco, G., Ribeiro, M. T., Wortsman, M., Gururangan, S., Schmidt, L., Hajishirzi, H., & Farhadi, A.
- Affiliations
- University of Washington (US)
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2022
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2212.04089
- OpenAlex
- W4310998073
- Cited by
- 66
- References
- 0
- Citations by year
- 2026: 1 · 2025: 24 · 2024: 25 · 2023: 16
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Locations
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University) (cc-by)
- Funders
- National Science Foundation (2044660, 1652052)
- Open Philanthropy Project
- Defense Advanced Research Projects Agency (N66001, N66001-19-2-4031, N66001-19)
- Multidisciplinary University Research Initiative
- Office of Naval Research (N00014‐18‐1‐2670, N00014-18, N00014-18-1-2826, ONR-N00014, MURI N00014-18-1-2670, N00014)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
- Keywords
- task vectors, task arithmetic, pre-trained model fine-tuning, analogical reasoning, bias mitigation, multi-task learning
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review