Chip Foundry Services Request Assessment

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: $\tau_A = \theta_A - \theta_0$ (difference between $\text{fine-tuned} \theta_A$ and $\text{pre-trained} \theta_0$).
  • Addition: $\theta_A+B = \theta_0 + \tau_A + \tau_B$ (combine capabilities of tasks A and $B$).
  • Negation: $\theta_{-A} = \theta_0 - \tau_A$ (remove task A capabilities, e.g., forget toxic behavior).
  • Scaling: $\theta_0 + \lambda \tau_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.