Superpose Task-specific Features for Model Merging

Haiquan Qiu, You Wu, Dong Li, Jianmin Guo, Quanming Yao

TL;DR

Superpose Task-specific Features (STF) is a novel model-merging framework that moves beyond simple parameter averaging by leveraging the "linear representation hypothesis." By identifying and superposing task-specific features using Singular Value Decomposition (SVD) and solving a tailored linear system, STF preserves the specialized capabilities of individual models more effectively than existing state-of-the-art methods across NLP and computer vision tasks.

What Problem Does This Paper Address?

As the cost of training large-scale models skyrockets, model merging has become a popular way to combine the capabilities of multiple specialized "expert" models into a single multi-task model without additional training.

However, most current methods (like weight averaging or task vectors) operate at the parameter level. They treat neural network weights as simple numbers to be averaged or added, ignoring the underlying mechanism of how these networks actually represent information. This often leads to "interference," where the features of one task overwrite or degrade the features of another, resulting in a merged model that is a "jack of all trades, master of none."

Methods

The authors introduce STF, which is grounded in the Linear Representation Hypothesis—the idea that neural networks encode information as linear combinations of feature vectors.

The core algorithm follows these steps:

  1. Extract Task Matrices: Instead of merging full model weights, STF focuses on the "task matrix" ($M = P_{fine-tuned} - P_{pre-trained}$), which isolates the changes made during specialized training.
  2. Identify Features via SVD: The method applies Singular Value Decomposition (SVD) to these task matrices. This identifies the "singular vectors" that represent the most critical directions (features) the model learned for a specific task.
  3. Feature Superposition: Rather than averaging these vectors, STF formulates a linear system designed to ensure the merged model's output preserves the task-specific features of each individual input model.
  4. Solving the Linear System: By solving the equation $(U \circ V)\alpha = \sigma$, the authors find optimal merging weights ($\alpha$) that minimize feature loss.
  5. Scaling and Sparsity: The method incorporates a scaling factor ($\gamma$) to balance task preservation against inter-task interference and a sparsity ratio ($\eta$) to filter out noise by keeping only the most significant parameters.

Datasets

The authors validated STF across a wide array of benchmarks:

  • NLP (T5-base): Seven diverse tasks including QASC (reasoning), WikiQA (question answering), and PAWS (paraphrase identification).
  • PEFT/LoRA (GPT-2): Table-to-text (E2E), knowledge graphs (WebNLG), and structured data (DART).
  • Large Language Models (Llama-2-7B): CMMLU (Chinese language), GSM8K (Math), and HumanEval (Code).
  • Vision (ViT-B/32 & ViT-L/14): Eight classification tasks including EuroSAT (satellite imagery) and GTSRB (traffic signs).
  • Out-of-Distribution (OOD): Evaluated on the T0 mixture (e.g., Cosmos QA, Social IQA) to test generalization.

Key Insights and Ideas

  • Feature Preservation = Performance: The authors demonstrate a strong correlation between how well a merging method preserves task-specific features (measured mathematically) and its actual accuracy on benchmarks.
  • The "Delta" Matters: Merging the differences (task matrices) between fine-tuned and pre-trained models is significantly more effective than merging the raw fine-tuned weights. The deltas better isolate task-specific information.
  • The Power of Top Singular Vectors: A key discovery was that you can discard up to 80% of the smallest singular vectors with almost no performance loss, but losing even the top 5% of the largest vectors causes a catastrophic drop. This confirms that a few "heavy hitter" features drive most of the model's capability.
  • Efficiency at Scale: While SVD is computationally heavy, STF is actually more memory-efficient for very large models (like Llama-2) because it processes tasks one by one on the GPU, whereas baseline methods often require loading all models into CPU memory simultaneously.

Key Results

  • State-of-the-Art NLP: On T5-base merging, STF achieved an average score of 73.7%, outperforming the previous best (PCB-Merging) by 1.4%. It showed massive gains on specific tasks like Story Cloze (+12.5%).
  • Mathematical Reasoning: When merging Llama-2-7B experts, STF outperformed baselines by ~10% on the GSM8K benchmark, showing it handles complex, interference-prone tasks better than simple averaging.
  • Vision Superiority: STF outperformed existing techniques by 1.1% (ViT-B) and 0.3% (ViT-L) on average across 8 vision tasks, with particularly strong results in remote sensing (EuroSAT).
  • Robustness: STF showed the best out-of-distribution generalization (38.2% avg), suggesting the merged features are more robust than those created by parameter-level operations.

Limitations and Future Work

  • Semantic Mapping: While STF preserves mathematical features, it doesn't yet explicitly identify the semantic meaning of those features (e.g., "this vector represents syntax"). The authors suggest integrating sparse autoencoders in the future to bridge this gap.
  • Interference Management: Currently, STF relies on a global scaling factor ($\gamma$) to manage interference between tasks. More sophisticated, automated methods for selectively removing conflicting features could further boost performance.
  • Computational Cost: The SVD step and solving the linear system add overhead. While manageable for 7B models, further optimization may be needed for 70B+ parameter models.

Summary updated

BibTeX
@misc{qiu2025superpose,
  author = {Haiquan Qiu and You Wu and Dong Li and Jianmin Guo and Quanming Yao},
  title = {{Superpose Task-specific Features for Model Merging}},
  year = {2025},
  eprint = {2502.10698},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.10698},
}
Figure