Introduction
In the quest for modular artificial intelligence, researchers have discovered a surprising property: if a pre-trained model is fine-tuned on different tasks, one can often average their weights—or add their "task vectors"—to create a single, multi-task model. This phenomenon is known as model compositionality.
However, most existing theoretical frameworks explaining why this works rely on "linearized" networks, essentially treating deep neural networks as simple linear functions. This assumption fails to match the reality of the complex, non-linear models deployed in practice. Furthermore, while compositionality is empirically possible, the exact conditions that guarantee its success in incremental learning scenarios (where tasks arrive sequentially) remain poorly understood. This paper moves beyond the linearized network assumption to provide a theoretical foundation for model compositionality in standard non-linear deep networks, introducing two novel algorithms for high-performance incremental learning and flexible model editing.
Theoretical Framework and Methods
The authors demystify compositionality by utilizing a second-order Taylor approximation of the loss function centered around the pre-trained weights ($\theta_0$). This perspective reveals a critical insight: compositionality is highly effective when models remain within the "pre-training basin"—a region in the loss landscape that is relatively well-behaved and approximately convex.
Building on this theory, the paper proposes two dual approaches to incremental learning:
- Incremental Task Arithmetic (ITA): This approach focuses on individual training. Each task is assigned its own "task vector," representing its displacement from the pre-trained weights. To ensure these vectors can be seamlessly combined later, ITA employs a regularization term based on the Fisher Information Matrix. This prevents the model from drifting too far from the pre-training basin.
- Incremental Ensemble Learning (IEL): This approach focuses on ensemble training. Rather than optimizing models individually, IEL directly optimizes the composed model (the average of all task vectors). The authors derive a closed-form gradient for a regularization term that encourages "pairwise alignment" between task vectors, resulting in a more robust ensemble.
Both methods incorporate a "pre-consolidation" phase using linear probing to ensure the classification heads are adequately optimized before the main fine-tuning process begins.
Key Insights
- The Importance of the Pre-training Basin: Compositionality is not arbitrary; it is a direct consequence of staying within a region where the loss function remains approximately convex. If a fine-tuned model wanders too far from its pre-trained initialization, its task vector will fail to compose effectively with others.
- Jensen’s Inequality Guarantee: Under the second-order approximation, the authors demonstrate that the risk of a composed model is upper-bounded by the average risk of the individual models. This provides a formal guarantee: if individual models perform well and stay within the basin, their combination will also perform well.
- Model Editing as a Superpower: Because these models are composed of additive task vectors, practitioners can perform "zero-shot" model surgery. For instance, to make the model an expert on birds, one simply applies the CUB-200 task vector. To make it "forget" a specific task, that task's vector can simply be subtracted.
- ITA vs. IEL Trade-offs: While IEL (ensemble training) generally yields higher raw accuracy, ITA (individual training) proves vastly superior for "specialization." Training models in isolation appears to create more distinct, modular knowledge representations.
Experimental Results
The researchers evaluated their methods on a diverse set of class-incremental benchmarks, including standard domains (ImageNet-R, CIFAR-100), specialized domains (CUB-200, Caltech-256, MIT-67), and challenging shifts with low similarity to ImageNet pre-training (RESISC45, CropDiseases).
- Outperforming the State-of-the-Art: As shown in the results, ITA and IEL consistently outperform established incremental learning methods like EWC, L2P, and CODA across almost all benchmarks.
- The Non-linear Advantage: The proposed methods significantly exceed the performance of TMC (Tangent Model Composition), a baseline that relies on older linearization theory. This empirically validates that embracing non-linearity is worth the added theoretical complexity.
- Specialization Gains: In zero-shot specialization tests, ITA-LoRA improved accuracy on target tasks by significant margins (e.g., +11.40% on ImageNet-R and +5.21% on CUB) simply by selecting the appropriate subset of task vectors.
- Computational Efficiency: Both algorithms maintain a constant complexity of $O(1)$ in terms of time and memory relative to the number of tasks, making them highly scalable for long sequences of continuous learning.
Limitations and Future Directions
While the second-order approximation is highly accurate near the pre-trained weights, parameter drift remains a challenge. As a model learns an increasing number of tasks, it may eventually drift out of the pre-training basin, causing the approximation (and thus compositionality) to break down. Furthermore, for computational efficiency, the authors utilized a diagonal approximation of the Fisher Information Matrix; exploring more complex approximations (like Kronecker-factored ones) could yield better results at a higher compute cost.
Future research could explore how to explicitly "expand" the pre-training basin to allow for more aggressive fine-tuning without losing compositionality. Additionally, extending this framework beyond closed-set classification to open-vocabulary models (like CLIP) or generative architectures represents a highly promising next step.
Summary updated