Abstract
Model merging has emerged as a cost-effective strategy to combine specialized neural networks into a single multi-task model without additional training. However, traditional parameter-level merging often suffers from feature interference. We present STF (Superpose Task-specific Features), a novel approach grounded in the Linear Representation Hypothesis. By identifying task-specific features via Singular Value Decomposition (SVD) and formulating merging as a linear superposition problem, STF preserves critical input-output relationships. Our method consistently outperforms state-of-the-art merging techniques across NLP, Computer Vision, and Large Language Model benchmarks, demonstrating superior performance and computational efficiency.
Introduction
As the scale of foundation models grows, the computational cost of multi-task fine-tuning becomes prohibitive. Model merging offers a solution by aggregating weights from multiple specialist models. Yet, existing methods like Task Arithmetic and Ties-Merging primarily operate on individual parameters, ignoring the underlying feature-based processing of neural networks. This often leads to "interference," where features from different tasks conflict, degrading overall performance.
STF addresses this by treating weights as processors of linear features. By focusing on the "task matrix"—the delta between fine-tuned and pre-trained weights—STF isolates and superposes the most significant singular features, ensuring that the merged model retains the specialized capabilities of its constituents.
Methods: Superposing Singular Features
The STF framework shifts the merging paradigm from parameter averaging to feature preservation. The process involves several key stages:
- Task Matrix Isolation: Instead of merging raw fine-tuned weights, we define the task matrix $\Delta W = W_{fine-tuned} - W_{pre-trained}$. Merging deltas avoids the redundancy of shared pre-trained features.
- Feature Identification via SVD: We apply Singular Value Decomposition to each task matrix. The right singular vectors act as feature detectors, while the left singular vectors and singular values represent the corresponding output features.
- Linear Superposition: We model the merging process as a linear system. The objective is to find a merged matrix $M$ such that for any task $k$, $M v_i^{(k)} \approx \sigma_i^{(k)} u_i^{(k)}$, where $v, \sigma, u$ are the singular components of task $k$.
- Optimization: We solve this system to determine optimal weights ($\alpha$) for each singular component, followed by global scaling and sparsity-based noise reduction.
Experimental Evaluation
We evaluated STF across diverse architectures and modalities:
- NLP: T5-base models merged across seven tasks (e.g., PAWS, WikiQA).
- LLMs: Llama-2-7B variants specialized in Chinese (CMMLU), Math (GSM8K), and Code (HumanEval).
- Computer Vision: ViT-B/32 and ViT-L/14 models merged across eight classification datasets.
- Generalization: Testing on the T0 mixture to assess out-of-distribution performance.
Results and Discussion
STF demonstrates a clear advantage over baseline methods. In T5 merging, it achieved an average score of 73.7%, a significant improvement over standard Task Arithmetic. In LLM consolidation, STF provided a 2.7% overall boost, with a notable 10% jump in mathematical reasoning on the GSM8K benchmark.
A key insight is the importance of "load-bearing" singular vectors. Preserving the top 5% of singular vectors is crucial for performance, a requirement STF explicitly prioritizes. Furthermore, STF is computationally efficient; by processing task matrices sequentially and utilizing GPU acceleration, it remains faster than many parameter-level competitors for large-scale models.
Conclusion and Future Work
STF provides a theoretically grounded and empirically superior approach to model merging by focusing on linear feature superposition. While highly effective, the method currently lacks semantic interpretability of the preserved features and relies on manual scaling factors. Future research will explore integrating mechanistic interpretability tools and automating hyperparameter selection to further refine the merging process.
Summary updated