Table of Contents
Fetching ...

Representation Surgery for Multi-Task Model Merging

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

TL;DR

This paper identifies representation bias as a pervasive bottleneck in model-merging based multi-task learning and introduces Representation Surgery, a post-merging Adapter module trained in a self-supervised manner on unlabeled test data to filter task-private biases from merged representations. The method is orthogonal to existing merging schemes and yields large performance gains across eight vision tasks and NLP, with negligible parameter overhead. Empirical results show substantial improvements over strong baselines and convergence toward traditional multi-task learning, including demonstrations on Vision Transformers and BERT. The work suggests that addressing representation space, not just weight space, is a crucial route to practical, privacy-preserving multi-task models and points to broader applicability across architectures and tasks.

Abstract

Multi-task learning (MTL) compresses the information from multiple tasks into a unified backbone to improve computational efficiency and generalization. Recent work directly merges multiple independently trained models to perform MTL instead of collecting their raw data for joint training, greatly expanding the application scenarios of MTL. However, by visualizing the representation distribution of existing model merging schemes, we find that the merged model often suffers from the dilemma of representation bias. That is, there is a significant discrepancy in the representation distribution between the merged and individual models, resulting in poor performance of merged MTL. In this paper, we propose a representation surgery solution called "Surgery" to reduce representation bias in the merged model. Specifically, Surgery is a lightweight task-specific module that takes the representation of the merged model as input and attempts to output the biases contained in the representation from the merged model. We then designed an unsupervised optimization objective that updates the Surgery module by minimizing the distance between the merged model's representation and the individual model's representation. Extensive experiments demonstrate significant MTL performance improvements when our Surgery module is applied to state-of-the-art (SOTA) model merging schemes.

Representation Surgery for Multi-Task Model Merging

TL;DR

This paper identifies representation bias as a pervasive bottleneck in model-merging based multi-task learning and introduces Representation Surgery, a post-merging Adapter module trained in a self-supervised manner on unlabeled test data to filter task-private biases from merged representations. The method is orthogonal to existing merging schemes and yields large performance gains across eight vision tasks and NLP, with negligible parameter overhead. Empirical results show substantial improvements over strong baselines and convergence toward traditional multi-task learning, including demonstrations on Vision Transformers and BERT. The work suggests that addressing representation space, not just weight space, is a crucial route to practical, privacy-preserving multi-task models and points to broader applicability across architectures and tasks.

Abstract

Multi-task learning (MTL) compresses the information from multiple tasks into a unified backbone to improve computational efficiency and generalization. Recent work directly merges multiple independently trained models to perform MTL instead of collecting their raw data for joint training, greatly expanding the application scenarios of MTL. However, by visualizing the representation distribution of existing model merging schemes, we find that the merged model often suffers from the dilemma of representation bias. That is, there is a significant discrepancy in the representation distribution between the merged and individual models, resulting in poor performance of merged MTL. In this paper, we propose a representation surgery solution called "Surgery" to reduce representation bias in the merged model. Specifically, Surgery is a lightweight task-specific module that takes the representation of the merged model as input and attempts to output the biases contained in the representation from the merged model. We then designed an unsupervised optimization objective that updates the Surgery module by minimizing the distance between the merged model's representation and the individual model's representation. Extensive experiments demonstrate significant MTL performance improvements when our Surgery module is applied to state-of-the-art (SOTA) model merging schemes.
Paper Structure (27 sections, 3 equations, 24 figures, 11 tables)

This paper contains 27 sections, 3 equations, 24 figures, 11 tables.

Figures (24)

  • Figure 1: Visualization of the distribution of representations extracted by the merged model (red) for the existing model merging schemes and representations extracted by the individual model (blue). We observe that there is a clear distribution discrepancy between the two.
  • Figure 2: The $L_1$ distance (or "representation bias" in Eq. \ref{['eq:l1distance']}) between representations extracted by the merged model using various model merging methods (i.e., Weight Averaging, Task Arithmetic and AdaMerging) and representations extracted by individual models.
  • Figure 3: Representation Surgery for Multi-Task Model Merging. (a) Multiple individual trained models. (b) Traditional model merging schemes (e.g., Task Arithmetic TaskArithmetic_ICLR2023, Ties-Merging TiesMerging_NeurIPS2023, AdaMerging AdaMerging_Arxiv2023, etc.) merge multiple individual models into one. However, they usually suffer from the "representation bias" problem. (c) "Representation surgery" solution is proposed in this paper. It is a task-specific lightweight module used to solve the representation bias problem.
  • Figure 4: Visualization of the distribution of features extracted by the merged model after performing the representation surgery (red) and features extracted by the individual model (blue). We observe that the distributions of the two are relatively close.
  • Figure 5: Visualization of the $L_1$ distance (or "representation bias" in Eq. \ref{['eq:l1distance']}) of the representation of the merged model with (red) and without (blue) representation surgery versus the individual model.
  • ...and 19 more figures