task arithmetic
**Task Arithmetic** is a **model editing technique that represents task-specific knowledge as "task vectors" (the difference between fine-tuned and pre-trained weights)** — these vectors can be added, negated, or combined to create models with new task capabilities.
**How Does Task Arithmetic Work?**
- **Task Vector**: $ au_A = heta_A - heta_0$ (difference between fine-tuned $ heta_A$ and pre-trained $ heta_0$).
- **Addition**: $ heta_{A+B} = heta_0 + au_A + au_B$ (combine capabilities of tasks A and B).
- **Negation**: $ heta_{-A} = heta_0 - au_A$ (remove task A capabilities, e.g., forget toxic behavior).
- **Scaling**: $ heta_0 + lambda au_A$ (control the strength of task A).
- **Paper**: Ilharco et al. (2023).
**Why It Matters**
- **Model Editing**: Add, remove, or modify model capabilities without retraining.
- **Multi-Task**: Combine task-specific fine-tunes into a single multi-task model.
- **Safety**: Negate toxic task vectors to reduce harmful model behaviors.
**Task Arithmetic** is **algebra for neural network capabilities** — adding and subtracting task knowledge using simple vector operations in weight space.