﻿# Task arithmetic: adding and subtracting changes relative to a common base

Understand task vectors, common-base subtraction, coefficient selection and why negating a task direction is not proof that training information has been erased.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-task-arithmetic-common-base-vectors/
Language: en

Task arithmetic represents a learned task as the parameter difference between a fine-tuned model and its pretrained origin. Those differences can be scaled, combined or negated before being applied to a base. The original research explores how such simple operations steer behavior, with their usefulness established through task evaluation rather than vector arithmetic alone.

## Define the origin before the direction

A task vector depends on which base was subtracted. If sources began from different revisions, their differences may include unrelated pretraining or architecture changes. Preserve full checkpoint identities and parameter mapping. For an illustrative combination of two specialists, first reconstruct each source by adding its own delta back to the stated common origin.

## Interpret coefficients as model selection

The scale of an applied task vector changes the resulting model. A coefficient selected using task examples is a tuned model choice, even when no gradient optimizer runs during merging. Record the validation procedure and search budget. Keep final evaluation separate so a favorable recipe is not mistaken for an untuned property of the source task vectors.

## Test addition on each task

Adding deltas does not imply that independent skills add without interference. Compare the composed result against the base and individual specialists on their respective tasks. Include general-language retention where relevant. A combined average can obscure a specialist regression, while one mixed prompt cannot establish broad compatibility between the learned directions.

## Treat negation claims carefully

The paper studies behavior changes from negating a task direction. Reduced performance on a target task is not proof that particular training examples or sensitive information have been removed. Information can remain accessible through other prompts or representations. Describe the measured behavioral change precisely and use a dedicated removal assessment if actual data deletion is the requirement.

## Export a traceable result

Save base and source identities, arithmetic operations, coefficients, dtype and tokenizer configuration. Test the materialized checkpoint after a fresh load rather than assuming a successful merge implies useful predictions. The authors' implementation and adapter-merging documentation offer concrete contexts for reproduction, with differences in representation and configuration to preserve. Task arithmetic is valuable as a transparent experiment when aligned origins and independent behavior checks support the chosen edit.

## Primary references

[Editing Models with Task Arithmetic](https://arxiv.org/abs/2212.04089).

[Task vectors author implementation](https://github.com/mlfoundations/task_vectors).

[AdapterHub merging adapters](https://docs.adapterhub.ml/merging_adapters.html).

Related explanations: [weight-update arithmetic](/journal/lora-adapter-merge-linear-layer/); [selection and independent testing](/journal/document-level-data-split-leakage/).
