Task arithmetic is a technique for model editing and multi-task adaptation where task vectors—representing the learned parameter change (or delta) from a base model to a task-specific model—are combined through linear operations like addition, negation, and interpolation. This allows for the creation of new model behaviors by arithmetically manipulating these vectors, enabling capabilities such as skill composition, negation of unwanted behaviors, and interpolation between tasks without additional training. The method builds on the principles of delta tuning and additive parameterization, treating the adaptation space as a linear, composable structure.
Glossary
Task Arithmetic

What is Task Arithmetic?
Task arithmetic is a model editing technique for multi-task adaptation where task vectors, representing learned deltas for different tasks, are combined through linear operations to create new model behaviors.
The core operation involves extracting a task vector by subtracting the weights of a pre-trained frozen backbone model from the weights of a model fine-tuned on a specific task. These vectors can then be added to the base model to combine skills (e.g., Base + Vector_A + Vector_B) or negated to remove a capability. This approach is highly parameter-efficient, as it reuses fine-tuned deltas, and is foundational for advanced concepts like model merging and modular adaptation. It demonstrates that the weight space of large models can exhibit surprising linearity with respect to learned tasks.
Key Characteristics of Task Arithmetic
Task arithmetic is a model editing technique where task vectors—representing learned parameter deltas—are combined via linear operations to create new model behaviors. Its core characteristics enable predictable, composable, and efficient multi-task adaptation.
Linear Task Vector Combination
The foundational operation of task arithmetic is the linear combination of task vectors. A task vector (τ) is defined as the difference between a model fine-tuned on a task and the base model: τ = θ_fine-tuned - θ_base. Core operations include:
- Addition: τ_A + τ_B adapts the model to perform both tasks A and B.
- Negation: θ_base - τ_A can "forget" or negate a learned task.
- Interpolation: ατ_A + (1-α)τ_B creates a blended model behavior. This linearity assumes task vectors occupy roughly orthogonal directions in parameter space, allowing for relatively clean composition.
Parameter-Space Editing
Task arithmetic operates directly in the high-dimensional parameter space of the neural network, not in the output or activation space. This makes it a form of model surgery at the weight level. The technique edits the model's fundamental knowledge representation by:
- Applying vector arithmetic to the weight matrices of the model.
- Assuming the loss landscape is locally linear around the pre-trained weights for related tasks.
- Enabling edits that persist across all possible inputs, unlike prompt-based methods which are input-dependent.
Composability and Multi-Task Creation
A primary advantage is the composability of skills. By adding task vectors, one can theoretically create a model capable of a new, combined task without training on it directly. For example:
- Adding a sentiment analysis vector to a summarization model could yield a model that summarizes with emotional tone.
- This facilitates rapid prototyping of multi-task models and exploration of the model capability space. The success of composition depends on the interference or compatibility between the constituent tasks.
Forgetting and Negation
Task arithmetic enables controlled knowledge forgetting or behavior negation through vector subtraction. This is critical for:
- Bias Mitigation: Subtracting a vector representing a biased association (e.g., gender stereotypes) from the model weights.
- Task Removal: De-adapting a model from a specific fine-tuned task to revert towards base model behavior.
- Safety Editing: Reducing the propensity for harmful outputs by subtracting a "harmful behavior" vector. Negation is not always perfect, as task vectors may not be perfectly reversible, but it provides a direct editing mechanism.
Dependence on Vector Orthogonality
The efficacy of task arithmetic relies on the empirical observation that task vectors for distinct tasks are often approximately orthogonal in parameter space. This orthogonality minimizes catastrophic interference when vectors are combined. Key implications:
- Independent Learning: Tasks fine-tuned from the same base model tend to lie in nearly orthogonal directions.
- Interference Metric: The cosine similarity between task vectors predicts the success of their combination; low similarity (high orthogonality) yields better results.
- Limitation: For very similar or conflicting tasks, vectors may not be orthogonal, leading to performance degradation upon combination.
Efficiency and Zero-Shot Adaptation
It is a highly parameter-efficient and compute-efficient post-training method. Once task vectors are created (via standard fine-tuning), new model configurations can be generated instantly without gradient updates. This enables:
- Zero-Shot Task Composition: Creating models for new task combinations at inference time by simply adding stored vectors.
- Lightweight Deployment: Storing and swapping small delta vectors (<1% of full model size) instead of multiple full model checkpoints.
- Rapid Experimentation: Testing hundreds of potential model behaviors through simple arithmetic, bypassing costly training runs.
Task Arithmetic vs. Related Adaptation Methods
This table contrasts Task Arithmetic with other parameter-efficient fine-tuning (PEFT) and modular adaptation paradigms, highlighting their core mechanisms, composability, and use cases.
| Feature / Mechanism | Task Arithmetic | Adapter-Based Tuning (e.g., Adapters, LoRA) | Prompt/Prefix Tuning | Sparse Fine-Tuning (e.g., Diff Pruning, BitFit) |
|---|---|---|---|---|
Core Adaptation Principle | Linear combination of learned task vectors (ΔW) via addition, negation, or interpolation. | Insertion and tuning of small, dense neural modules (adapters) or low-rank matrices (LoRA) into a frozen backbone. | Optimization of continuous prompt embeddings prepended to the input or hidden states. | Update of a strategically selected, sparse subset of the original model's parameters (e.g., biases, specific weights). |
Parameter Efficiency | Extremely high post-training. Composition requires only storing and manipulating vectors. | High. Trainable parameters are typically 0.1%-5% of the original model. | High. Trainable parameters are limited to the prompt embeddings (< 1% of model). | Moderate to High. Sparsity levels typically range from 0.01% to 3% of parameters. |
Primary Use Case | Post-hoc model editing, multi-task composition, and behavior steering without retraining. | Efficient adaptation to a new, single target task or domain. | Task-specific steering of model behavior via input conditioning. | Efficient single-task adaptation with minimal change to the original weight structure. |
Composability & Multi-Task | ✅ Inherently designed for composition (addition, negation, interpolation of vectors). | ✅ Supported via methods like AdapterFusion or AdapterSoup, but often requires additional training or ensembling logic. | ❌ Limited. Prompts are generally task-specific; composition is not a native property. | ❌ Limited. Sparse masks are typically task-specific and not designed for arithmetic combination. |
Inference Overhead | None post-composition. The final combined weights replace the original model. | ✅ Latency added per adapter module (sequential) or low-rank matrices (parallel). | ✅ Minimal overhead from longer input sequences. | None. The updated sparse weights are merged into the base model. |
Preserves Base Model | ✅ Yes. Operations are applied to the delta; the base model remains the reference point. | ✅ Yes. The frozen backbone is preserved; adapters are additive. | ✅ Yes. The base model is entirely frozen. | ✅ Yes. The majority of the base model's weights remain unchanged. |
Training Required for Composition | ❌ No. Composition is a mathematical operation on pre-trained vectors. | ⚠️ Often Yes. Methods like AdapterFusion require a secondary training stage to combine adapters. | ❌ No for single task, but multi-task prompting requires training separate prompts. | ❌ No for single task. Multi-task requires training separate sparse masks. |
Typical Performance Profile | Enables emergent multi-task capabilities and editing, but can suffer from interference or attenuation effects. | Strong single-task performance, often matching full fine-tuning. Multi-task requires careful orchestration. | Effective for conditioning, but can underperform on complex tasks compared to weight-updating methods. | Performance depends heavily on sparsity pattern; can match dense fine-tuning if critical parameters are selected. |
Practical Examples of Task Arithmetic
Task arithmetic enables the combination of specialized model behaviors through linear operations on task vectors. These examples illustrate its core use cases for model editing and multi-task adaptation.
Task Negation for Bias Mitigation
A primary application is bias removal. If a model exhibits a gender bias in a profession classification task, a bias task vector can be created by fine-tuning on a biased dataset. Applying task vector negation (subtracting this vector from the base model) reduces the undesired behavior.
- Process: ΔW_bias = W_biased - W_base; then W_debiased ≈ W_base - α * ΔW_bias.
- Result: The model retains its core linguistic capabilities while exhibiting reduced stereotypical associations, a form of post-hoc model editing.
Task Addition for Multi-Skill Fusion
Task arithmetic can combine distinct capabilities. For instance, a base language model can be adapted for both code generation (task A) and text summarization (task B).
- Process: Create independent task vectors: ΔW_code and ΔW_summarize. A new model for a "documentation generation" task can be formed via linear combination: W_new = W_base + α * ΔW_code + β * ΔW_summarize.
- Key Insight: This performs multi-task adaptation without multi-task training, merging skills by adding their corresponding deltas. The scaling factors (α, β) control the influence of each skill.
Task Interpolation for Controlled Blending
Interpolation between task vectors allows for smooth control over model behavior. This is useful for creating models with blended expertise or adjusting style.
- Example: Interpolate between a formal writing vector and a casual writing vector. W_blended = W_base + λ * ΔW_formal + (1-λ) * ΔW_casual.
- Application: By varying λ from 0 to 1, the model's output tone transitions smoothly from casual to formal. This demonstrates how task arithmetic enables continuous control over model attributes, facilitating fine-grained behavioral tuning.
Creating Anti-Tasks for Safety
An anti-task vector represents a direction in weight space that, when added, reduces proficiency in an undesirable task (e.g., generating harmful content).
- Method: An anti-task vector can be approximated as the negation of a safety-alignment vector: ΔW_anti-harm ≈ -(W_aligned - W_base).
- Use Case: In a multi-vector safety setup, a model's weights could be composed as W_safe = W_base + ΔW_capability + ΔW_anti-harm. This modular approach separates skill acquisition from safety enforcement, a principle in modular adaptation.
Arithmetic for Continual Learning
In a sequential learning setting, task arithmetic can help mitigate catastrophic forgetting. After learning Task B, the model's knowledge of previous Task A can be partially restored.
- Process: Store the task vector for Task A: ΔW_A. After fine-tuning on Task B to get W_B, an approximation of a multi-task model is: W_AB ≈ W_B + γ * ΔW_A.
- Limitation: This is an approximation, as tasks may not be perfectly linearly separable in weight space. However, it provides a computationally cheap method for task rehearsal without accessing old data.
Scaling and Re-normalization
The magnitude of a task vector matters. Empirical studies show that applying a task vector with a scaling coefficient (α ≠ 1) is often necessary for optimal performance.
- Key Finding: Simple addition (α=1) often underperforms. A common practice is to search for an optimal α (e.g., 0.8, 1.2) on a validation set.
- Renormalization: Some implementations apply weight normalization after vector addition to stabilize the merged model. This step counteracts potential drift in the model's output distribution caused by the arithmetic operation.
Frequently Asked Questions
Task arithmetic is a technique for model editing and multi-task adaptation where task vectors, representing learned deltas for different tasks, are combined through linear operations to create new model behaviors.
Task arithmetic is a model editing technique where the adaptation learned for a specific task is represented as a task vector—the difference between a fine-tuned model's weights and the original pre-trained model's weights. These vectors can then be combined using basic linear operations like addition, subtraction, and interpolation to create new model behaviors without additional training.
How it works:
- A base model (e.g., a large language model) is fully fine-tuned on individual tasks (e.g., translation, summarization).
- For each task, a task vector (τ) is computed: τ_task = θ_fine-tuned - θ_base.
- These vectors are combined arithmetically. For example, adding a translation vector and a summarization vector to the base model's weights can yield a model capable of both tasks: θ_new = θ_base + ατ_translation + βτ_summarization.
- The coefficients (α, β) can be scaled to control the influence of each task, and negation (e.g., θ_base - τ_toxic) can be used to 'forget' or inhibit unwanted behaviors.
This approach treats model adaptation as a linear weight space, enabling efficient composition and editing of capabilities.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Task arithmetic operates within the broader paradigm of delta tuning, where small, modular changes are applied to a base model. These related concepts define the mechanisms for creating, representing, and combining these task-specific adaptations.
Delta Tuning
The overarching paradigm where a model is adapted by learning a small, task-specific parameter change (a delta) applied to a subset of the pre-trained model's weights. The core principle is additive parameterization, where adapted weights (W') are expressed as W' = W₀ + ΔW, with the base weights W₀ frozen.
- Key Insight: Enables efficient adaptation by isolating and optimizing only the necessary change.
- Contrast with Full Fine-Tuning: Updates <1% of parameters versus 100%, drastically reducing memory and storage costs.
- Foundation for Task Arithmetic: Provides the mathematical framework (the delta ΔW) that task vectors manipulate.
Task Vectors
The mathematical object central to task arithmetic. A task vector is typically defined as the difference between a fine-tuned model's weights and the base model's weights: τ = θ_task - θ_base. This vector encodes the direction and magnitude of change needed for a specific task.
- Representation: Can be a full weight delta or a compressed representation (e.g., from a PEFT method like LoRA).
- Properties: Enables linear operations; adding a task vector to base weights instills a task, while negation can remove or invert a behavior.
- Use Case: The fundamental unit for model editing and multi-task composition via arithmetic operations.
Model Editing
A class of techniques for making precise, localized updates to a neural network's knowledge or behavior after its initial training. The goal is to correct errors, update facts, or adjust capabilities without costly retraining.
- Scope: Ranges from modifying individual neurons or layers to injecting modular components.
- Connection to Task Arithmetic: Task arithmetic is a form of parametric model editing, where edits are performed by directly manipulating the model's weight space through vector operations.
- Example: Using task vector negation to 'unlearn' a biased association learned during fine-tuning.
Additive Parameterization
A foundational mathematical strategy for delta tuning where the adapted model's weights are represented as the sum of the original frozen weights and a learned delta matrix. This explicit separation is what makes delta manipulation possible.
- Formula: W_adapted = W_base + ΔW.
- Advantage: The delta ΔW is often highly structured (e.g., low-rank, sparse), making it efficient to store and combine.
- Implementation: Directly employed by LoRA (ΔW = BA), (IA)³ (ΔW as scaling vectors), and is the implicit assumption behind task vector arithmetic.
Modular Adaptation
A design philosophy for PEFT that extends a base model with small, self-contained, and often composable neural modules (like adapters or expert layers). Each module encapsulates a specific skill or task adaptation.
- Core Idea: Create a library of reusable, plug-and-play components.
- Contrast with Blending: Unlike task arithmetic which blends weight deltas, modular adaptation often routes inputs to distinct modules (conditional computation).
- Related Techniques: AdapterFusion (learns to combine adapters), Mixture-of-Experts (dynamic routing to expert modules). Task arithmetic offers a weight-space alternative to this modularity.
Hypernetwork
A secondary neural network that generates the weights or parameters for a primary (main) model. In PEFT, a hypernetwork can dynamically produce the task-specific delta (e.g., adapter weights) conditioned on a task descriptor.
- Mechanism: Takes a low-dimensional intrinsic task vector as input and outputs the full set of adaptation parameters ΔW for the main model.
- Benefit: Decouples the size of the task representation from the size of the main model, offering extreme parameter efficiency.
- Relation to Task Arithmetic: Provides a learned, non-linear function for generating deltas, whereas task arithmetic uses direct, linear operations on pre-existing deltas.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us