NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Representation Surgery for Multi-Task Model Merging

Enneng Yang, Li Shen, Zhenyi Wang, Guibing Guo, Xiaojun Chen, Xingwei Wang, Dacheng Tao

Representation Surgery for Multi-Task Model Merging

Abstract

Model merging offers a parameter-efficient alternative to traditional multi-task joint training by fusing independently trained models. However, merged models often suffer from significant performance degradation. This paper identifies "Representation Bias"—the internal feature discrepancy between merged and individual models—as the primary cause. We propose "Representation Surgery," a lightweight, post-merging technique that uses task-specific adapters and unsupervised optimization to align representations, effectively closing the performance gap with joint training.

The Problem: Representation Bias

Multi-task learning (MTL) traditionally requires joint training, which is costly and poses data privacy challenges. Model merging (e.g., Weight Averaging, Task Arithmetic) provides a flexible alternative by fusing task-specific weights. However, the authors find that merged models exhibit a significant "distribution shift" in their internal representations compared to the original specialized models. This discrepancy, termed representation bias, is the primary driver of performance loss.

t-SNE visualizations showing the separation between individual model representations (blue) and merged model representations (red) across various merging techniques. This separation illustrates the "Representation Bias" that degrades performance.

Methods: Representation Surgery

To mitigate this bias, the authors introduce "Surgery," a task-specific, lightweight module added to the merged model's output.

  • Architecture: Surgery utilizes a tiny bottleneck adapter consisting of a downward linear projection, a ReLU activation, and an upward linear projection. This module adds only approximately 0.01% more parameters to the base model.
  • Unsupervised Optimization: The module is optimized to minimize the $L_1$ distance between the merged model's representations and those of the original individual models (acting as teachers). This process is unsupervised, requiring only a small amount of unlabeled test data.
  • Method-Agnostic: Surgery can be applied after any existing merging scheme, including Weight Averaging, Task Arithmetic, or AdaMerging.

Quantifying Representation Discrepancy

The $L_1$ distance serves as a quantitative measure of the representation bias. The following figure illustrates this discrepancy across different merging methods and datasets, highlighting the gap that Surgery aims to close.

L1 distance between merged and individual model representations for Weight Averaging, Task Arithmetic, and AdaMerging across eight CV datasets. The Surgery module is designed to minimize this distance.

Key Results and Insights

  • Performance Gains: Applying Surgery to "Task Arithmetic" on ViT-B/32 boosted average accuracy from 69.1% to 80.9%. When combined with the state-of-the-art "AdaMerging," it reached 87.5%, nearly matching the 88.9% achieved by traditional joint training.
  • Efficiency: On a large model, the Surgery module adds only about 131,000 parameters (a 0.014% increase) and typically converges within 200 to 400 iterations.
  • Data Efficiency: The method is highly effective even with minimal data; using just 1% of available unlabeled data provides a significant performance boost.
  • Versatility: The researchers successfully evaluated the method across both Computer Vision (ViT) and Natural Language Processing (BERT) domains.

Conclusion

Representation Surgery introduces a new paradigm for model merging: focusing on "cleaning up" representations post-merge rather than solely perfecting weight-space fusion. This lightweight, unsupervised approach makes efficient multi-task learning more accessible and effective across diverse architectures and tasks.

Summary updated

BibTeX
@inproceedings{yang2024representation,
  author = {Enneng Yang and Li Shen and Zhenyi Wang and Guibing Guo and Xiaojun Chen and Xingwei Wang and Dacheng Tao},
  title = {{Representation Surgery for Multi-Task Model Merging}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=Sbl2keQEML},
}
Figure