Localize-and-Stitch: Efficient Model Merging via Sparse Task Arithmetic
Authors: Yifei He
Yuzheng Hu
Yong Lin
Tong Zhang
Han Zhao
Venue: Accepted by TMLR ()

Abstract: Model merging offers an effective strategy to combine the strengths of multiple finetuned models into a unified model that preserves the specialized capabilities of each. Existing methods merge models in a global manner, performing arithmetic operations across all model parameters. However, such global merging often leads to task interference, degrading the performance of the merged model. In this work, we introduce Localize-and-Stitch, a novel approach that merges models in a localized way. Our algorithm works in two steps: i) Localization: identify tiny ($1\%$ of the total parameters) localized regions in the finetuned models containing essential skills for the downstream tasks, and ii) Stitching: reintegrate only these essential regions back into the pretrained model for task synergy. We demonstrate that our approach effectively locates sparse regions responsible for finetuned performance, and the localized regions could be treated as compact and interpretable representations of the finetuned models (tasks). Empirically, we evaluate our method on various vision and language benchmarks, showing that it outperforms existing model merging methods under different data availability scenarios. Beyond strong empirical performance, our algorithm also facilitates model compression and preserves pretrained knowledge, enabling flexible and continual skill composition from multiple finetuned models with minimal storage and computational overhead.

Published in Transactions on Machine Learning Research (12/2024)
Localize-and-Stitchh Efficient Model Merging via Sparse Task Arithmetic
Yifei He University of Ilinois Urbana- Chanpaign
yifeihee@@llimois.ccee edu
Yuzheng Hu
yh466hllkmois.co edu
University of Ilinois
Yong Lin Princeton University
g176300@äprincetonnce
Tong Zhang University of Ilinois Crtuna-Champaige
torhang@illnoois. edu
Han Zhao
bonchoo@ilinnois.coo edu
University of Nlinois Trbana-Champont
Reviewed on OpenReview: https: // opwnreviee.. net/ forum? id= 9CWU80186d
Abstract
Model merging offers an effective strategy to combine the strengths of multiple finetuned models into unified model that preserves the specialized capabilities of each. Existing methods merge models in global manner, performing arithmetic operations across all model parameters. However, such global merging often leads to task interference, degrading the performance of the merged model. In this work, we introduce Localize- aaaittnnn-tttcchh a novel approach that merges models in a localized way. Our algorithm works two steps: i) Localization: identify tiny (1% of the total paramcters) localized regions the finetuned models containing essential skills for the downstream tasks, and ii) Stitching: reintegrate only these essential regions back into the pretrained model for task synergy. We demonstrate that approach effectively locates sparse regions responsible for finetuned performance, and the localized regions could be treated as compact and interpretable representations of the finetuned models (lasks). Empirically, we evaluate our method on various vision and language benchmarks, showing that it outperforms existing model merging methods under different data availability scenarios. Beyond strong empirical performance, our algorithm also facili- tates model compression and preserves pretrained knowledge, enabling flexible and continual skill composition from multiple finetuned models with minimal storage and computational overhead. Our code is available at http://hhhhh..coooocccccccaaaaaa
1 Introduction
Pretrained models DDvlin et al. 2018 Liu et al. 2019 Raffel et al. 2020 Radford et al. 2021 contain wealth of rich and genoralizable information, and finetuning these models for specific downstream tasks significantly enhances performance compared lo training from scratch (Chen et al. 2020b). With the growing popularity of the pretrain-fimm finetune paradigm, a vast array finetuned models have been made available on platforms like Hugging Face (Wolf al. 2020), and many of them originate from the same protrained models, such CLIP (Radford et al.] (2021). However, deploying multiple finetuned models independently, each for a different. downstream task, incurs large storage and maintenance cost, and limits knowledge transfer across them.

---

Published in Transactions on Machine Learning Research (12/2024)
Y f
Localize
Apr
2 aerged
Seitch
f
Yn f/c
Localize
Figure 1: Localize-and-Stiton Given models \ finetuned from 8pe, first localize regions containing skills acquired during finetuning through per-model binary masks {- then stitch the localized regions (x008 Je=1 onto the pretrained model, where @ is the element-wise product. Empty nodes after the localization step mean that the mask is activated that position. Since the localized regions are tiny (~ 1%), we reduce potential task conflicts and make minimal changes to the pretrained model.
Vi
Model merging offers viable solution to these challenges by integrating the strengths of multiple finetuned models into a single model that retains the specialized capabilities of each. The key advantage of model merging over traditional multi-task learning (MTL) (Caruana 1997 Zhang& & Yang 2021 Hu et al. 2024 He et al. 2024 is its efficiency, in that it does not require joint training on data across all tasks, but only involves arithmetic operations in the weight space, Existing methods merge models by averaging model parameters via arithmetic
mcan [Wortsman al.) 2022a I]harco et al., 2023), Fisher information (Matena & Raffel 2022), regression mean (Jin et al., 2022) learned merging weights (Yang et al. (023). Those methods all average the models in global manner, meaning that they perform arithmetic operations to all parameters of the finetuned models.
However, similar to the conflicting gradient problem in MTL (Yu et al. 2020 Liu et al. 2021 parameters in different finetuned models often have interference with each other, leading to suboptimal performance of the merged model. Recent works find that redundant parameter updates in finetuning are sources of conflicts (Ydav et al. 2023). Although the majority model parameters are updated during finetuning, only very few contribute to improving the performance on downstream tasks (Chen al., 2020a Hoefter et al. 2021
To overcome these limitations, we propose focalize-and-Se Stitch, an efficient algorithm that merges models in localized manner. The algorithm (Figure I involves two steps: Localization: identify tiny localized regions in the finetuned models containing essential skills for the downstrcam tasks. ii) Stitching: reintegrate only these essential regions back into the pretrained model. In the experiments, we verify that the changes in finetuend parameters are highly redundant, as we can efficiently identify just. 1% of the total parameters that recovers over 99% of the finetuned performance. We evaluate our method on various language and vision tasks, showing that outperforms existing model merging methods under different data availability scenarios.
Beyond the superior performance on model merging, our approach has several distinct advantages: i) Interpretability of task relations: each localized region encapsulates task-specific skills from the finetuned models, and overlap among them is indicative of knowledge sharing. ii) Model compression: Our localization method enables compact representation of finetuned models, significantly reducing the storage space to only 1% of the original without sacrificing performance. This enables flcxible integration of finetuned models' capabilities with minimal storage and computational overhead. iii) Preservation of pretrained knowledge: By making minimal and localized changes the pretrained model, our merged model maintains its generalizability and achieves superior multi-task performance, effectively mitigating catastrophic forgetting associated with finetuning.
2 Preliminaries
Notation. Given a set of n tasks, we denote the pretrained model parameters as 6pr E Rd, the model param- eters finetuned the i-th task 0/0) IRd. Note that all of0 finetuned from the same pretrained model.
2

---

Published in Transactions on Machine Learning Research (12/2024)
Table 1: Baselines for model merging.
Category
Method
Mathenaatical expression
Note
Simple averaging
(Wocteman
2022a
Purrget -E g0
Elemmnt-wine mestt o tunel on volidiaiion set
Task arithmetie
[A] (ilbaren of al 2024
Rungdl Rpe +0
Globol
Fisher merzing
Matera & Raffel
2022
Rarrge Ei- Rig Ex- P
Weighted by Fisher information matrices
RegMeau Jin
Oueget -121 X, Xi) De (X. x
Mininuizes difference merged individual activstions
AdaMerging
Yang
(Cunga 1ha = 10pm0-- Eis Aot Hi
Layer wise weights learted by estropy minimixation
Trins the paramneters in bask vectors with stalll maguitades, eleci a eign as each position
Localiiod
TIES Merrengg
Yodav al. 2023
only keep pazameters with the sign.
Compute mrlti-tnsk task vectors: Carr flunaga Mue with Blooggd obteined by any merging mothod.
Consensus TA, TIISS Wang
2024b
Construct taok musier M[m] ITura Ae).
Apply conamnans mask Mequsemnn I (ianntyy my 2) Yurzs-
Task vectors. A task vector is the element-wise difference of the finetuned and pretrained parameters, denoted as = (/0 Ppr E Rd. These vectors encapsulate the knowledge acquired during the finctuning process. This knowledge can be elfectively manipulated through task arithmetic (Ilaacco et al. 2023), which involves performing arithmetic operations on task vectors to compose learned skills across tasks.
Model merging. The goal of model merging to efficiently aggregate the paramcters of the n finctuned models into single multi-task model meerged without the need to retrain the model on the initial task-specific data. The resulting merged model should perform well on all the tasks simultaneously.
Existing methods perform merging in the general form merrged = Ppr + Ei= T;T;, and their difference mainly lies in the way of determining the scaling factors ag We introduce the baselines in Table ! and categorize them into global and localized methods based on whether the algorithm incorporates selection strategies to identify which parameters to merge. Localized algorithms specifically target sparse and localized regions, while global algorithms merge parameters indiscriminately. We provide detailed comparisons with the two localized algorithms, in Appendix [ and Appendix [ respectively. Note that AdaMerging has two variants: one learns layer-wisc weights and another learns task-wise weights. In this work, we refer to AdaMerging the layer-wise version because of its superior performance over its lask-wise counterpart.
Data requirements. Fisher merging (Matena & Raffel 2022p requires over 256 data points per task to esti- mate Fisher information. RegMean (Jin et al. 2022) requires more than 1600 data points per task to compute the inner product matrices ellectively. Ada
YYnng el al. 2023 needs access to the full unlabeled lest. set for entropy minimization. Consensus TA/TIES (Wang et al. 2024b requires a validation set tune hyper- parameters. In contrast, simple averaging (Wortsman et al.) 2022a),, task arithmetic (Ihharco et al. 2023) and Merg-Mggging (Yddav al. 2023) can be implemented without additional data. However, to achieve the best performance, both task arithmetic and TIES-Merging require tuning the hyperparameter a on validation set.
3 Localize-and-Stitch
We now introduce our main algorithm. In Section 3.1 we start by outlining two insights that underpin effective model merging, accompanied by motivating examples. In Section 3.2 and Section 3.3 we provide a detailed description of two key components of the algorithm: localization and stitching.
3.1 Motivation and objectives
Sparsity is important, but how to locate sparse regions the key. Previous research identifies that during the finetuning stage, a significant portion of parameter updates is redundant, introducing interference in model merging Yadaav et al.) 2023). This underscores the need for locating sparse regions to reduce such interference. While the importance of sparsity is recognized, strategies for achieving it remain underexplored. Earlier approaches typically identify sparse regions through random sclection (Yu ct al. 2023) or selecting regions with the top-&% largest magniludes in task vectors (Yadav et al., 2023). However, they often fall short in identifying the most effective sparse regions for model merging. In Figure 2 we evaluate the efficacy of different localization methods across twelve language tasks, comparing the quality of their localized regions (specified by the binary mask 7s). The performance is assessed on individual grafted models for each task, denoted as Pre + 74 @ Tt, where T; is the task vector of the i-th task and @ is the element-wise product.
3

---

Published in Transactions on Machine Learning Research (12/2024)
Average sing le-task acc/F3
0.8
Average merged accuracy
0.69
Localize-and-Se
0.68
Simple averaging
0.7
0.66
0.5
Our localization
Top-k
0.65
0.4
Random
10
10
10-1
10
0.0
0.2
0.4 0.6
0.8
1.0
Sparsity level
Overlapped proportion
Figure 2: Our method most effectively locates sparse regions essential for finetuned performance. Sparsity level indicates the proportion of total parameters localized. By localizing only 1% of parameters (at sparsity level 0.01), our approach recovers 99% of the finetuned performance (at sparsity level 1).
Figure 3: Merged models with more parameter overlap manifest more task conflicts, resulting in performance decrease. The overlapped proportion over the model's total parameter count. The simple averaging baseline is over all model parameters.
This grafted performance measures how well the finetuned skills are preserved when only keeping parameter updates during finetuning in localized regions. Unlike previous methods, we directly optimize the binary masks to maximally retain finetuned performance, detailed in Section 3.2 Our method significantly outperforms others, especially at lower sparsity levels. The strength of our approach lies in its precision in identifying small but informative regions, which is particularly advantageous for model merging.
Sparse regions with Icss overlap reduce task conflicts. Identifying the smallest possible regions with essential finetuned skills is key to minimizing potential conflicts among lask vectors, as smaller localized regions naturally incur less overlap among tasks. With reduced overlap, each task can occupy its own, relatively disjoint localized region, thereby reducing task conflicts. This has the intuitive explanation that when two conflicting tasks share highly overlapping localized regions, they will compete to steer the parameters within these regions to their advantage in the merged model, leading performance degradation. We demonstrate this by case study (Figure 3) merging models finetuned on two conflicting language tasks: QNLI (Wang et al. 2018) and MNLI (Bowman et al. 2015). QNLI involves prodicting whether context contains the answer to the given question, and MNLI involves predicting text entailment given a sentence pair. These tasks are conflicting, manifested by a noticeable performance decline for both tasks when using simple averaging to merge the corresponding finetuned models. However, the localized regions are small yet sufficiently informative about their respective tasks, the reduced overlap between these regions decreases task conflicts and enhances overall performance after merging. Tn other words, long the localized region contains sufficient. task-specific knowledge, including more parameters than necessary in them only introduces additional task interference.
3.2 Localization
Motivated by the importance of locating informative yet small sparse regions, outline two objectives for localization in finetuned models: i) the regions should encapsulate essential skills acquired during finetuning, and ii) they should contain minimal number of parameters.
The objectives are grounded in the findings of Pannigraii et al. (002). , which demonstrates that skills developed during finetuning are localizable. Specifically, grafting a small subset of finetuned parameters onto the pretrained model can almost fully recover the performance of the finetuned model. Panigrahi et al. (2023) propase the following optimization problem to identify the localized parameters, and we adapt in the model merging setting. With the constraint the sparsity level 8, on the i-th task with the loss function and task vector 7a optimize for binary mask "/ such that only adding up the masked portion of the task vector onto the pretrained model performs well on the i-th task
2 =
arg min
(1 + (
4

---

Published in Transactions on Machine Learning Research (12/2024)
55T2
00
0.19
0.28
0.07
0.04
0.05 0.01 0.02 0.62 9.03 0.03 0.03
551-2
1.00
0.94
0.96
0.89
0.07
0.11
0,10
0.11 0.09 0.04
0.07 0.16
CR 0
1.00
0.21
0.10
0.04
0.05 0.01 0.01 0.01 0.03 0.04 0.04
CR
0.94
1.00
0.95
0.91
0.05
0.10
0.10
0.12 0.31 0.11 0.13 0.11
0.04
0.06
0.01 0.01 0.01 9.33 0.06
-088
0.
0.95
0.50
0.03
0.14
0.07
0.10 0.04 0.02 0.09 0.13
0.8
MPOA
0.04
0.06
0.00
0.01 0.01 0.02
MP0A
0.89
1.00
0.00
0.06
0:08
0.12 0.33 0.14
TREC-
1.00
0.05 0.01 0.01 0.01 9,03
TREC
0.00
1.00
0.14 0:08
0.10 0.09
0,00 0.3.6
0.0
SUG/-0005
0.06 0.05
1.00
0.01 0.01 0.01 0.03
SUG)-
0.14
0.06 0.13
ONLI-0.01
0.06 0.67 0.03
SNLI-0.0
MNLI 02
0.2
-0.2
0.04 0.01 0.01 0.01 0.04 1.00
MRPC
0.16 0.15
0.53
0.34
0.49
0.54
1.00
0.53
00P-0.00 0.06 D.05 0.05 0.01 0.11 0.01 0.03
0.00
0OP
.036
0.00 0.03
0.01
0.55
0.56
0.64
0:51
S51
TREC-
SUBI-
ITE.
NRPC
QOP
SST-2
MPOA
TREC-
SUB)
DHU
SNU
1NU
IITE
NAPC
QOF
(a) Jaccard similarity of pairwise lask masks.
(b) Cosine similarity of masked task vectors.
Figure 4: Our localized regions (each task with 1% of total parameters) have little pairwise overlap, with the majority of Jaccard similarity below 5% The sentiment classification tasks (SST-2, CR, MR, MPQA) have relatively large overlap because they share similar skills in the overlapping regions, and verify this by showing that they have high cosine similarity of masked task vectors.
where @ denotes the element- product. For the ease of optimization, we follow Panigrahi et al. (0023 to reparametrize the binary mask y as a real-valued vector S. To control the sparsity, we additionally relax the Lo sparsity constraint to be L, As a result, the optimization is reformulated as
S. = arg min (Opre + OSS) T.) 7.)+ + (111
(1)
SER"
where a is the sigmoid function, and À controls the strength of the Lı regularization. At the end of the optimization, we round oSS)) to be binary.
In comparison, Panigrahi et al. (2023) uses the following formulation
S arg min (i(7 @ On (1 7) 3 Ppro); SERd
== Tbase @ - (S)) + (1 - )base) O
(2)
where Tasse is the top-k% largest elements in the task vector, which serves as initialization for the optimization. There are two main advantages of formulation I over 2 Firstly, our formulation of S is more straightforward, as we directly have (S). In contrast, S in Equation
? serves as a selector of whether to take the value from Yass, lcading to more complex computation. Socondly, our approach uses the L2 constraint to control the sparsity in a more fine-grained manner, while Equation (2) does not have this coistraint, and they control the sparsity via early stopping instead. A detailed empirical performance comparison between our localization technique and the one in (Panigrahi et al.) 2023) is presented in Appendix E
Note that the optimization is highly elficient, requiring as few as 8-shot data with 10 epochs of training using SGD. A detailed ablation on the impact of data availability on the mask quality is shown in Section 4.4
Interpretation of task relationships. In Figure 4 we validate that our localization method effectively identifies task-specific regions with minimal overlap. In Figure 4a we report the Jaccard similarity of all pairwise lask masks, namely for each pair of masks 7 and 75. we compute 17s 7/l//1 7gl. The majority of task pairs exhibit a Jaccard similarity below 5%, confirming minimal overlap. For the few pairs with Jaccard similarity larger than 10% (upper left corner of Figure 4a), we further compute the cosine similarity of their masked task vectors in Figure 4b and find that their cosine similarities are almost 1, indicating high agreement of the parameters within the overlapped regions. Since these four tasks are all sentiment.
5

---

Published in Transactions on Machine Learning Research (12/2024)
SST-2
7.00%
SST-2
35.00%
CR
30.00%
6.00%
MR
MPQA
25.00%
MPQA
5.00%
TREC-
SUB]
20.00%
SUB]
4.00%
QNLI
15.00%
SNLI
QNLI
33.0%
MNLI
10.00%
RTE
MNLI
MRPC-
5.00%
RTE
-2.00%
QQP
MRPC
-1.00%
Attention quary
Attention kny
Attention valuee
Attention HLP
Attention LayerNerm
intermediate MLP
Output MLP.
Outmut LayerNom
QQP
Layer
Layer
Layer
Layer
Layer
Layer
Layer
Layer
Layer
Layer 10
Layer 11
Layer 12
(a) Distribution localized regions different network (b) Distribution of localized regions in different network components in the RoBERTa-base model.
layers in the RoBERTa-base model.
Figure 5: The localized regions are predominantly found in the LayerNorm parameters, while different tasks are associated with different layers. The percentages represent the proportion localized parameters in each component.
classification tasks, this phenomenon intuitively suggests a shared skill set across the tasks, located in the overlapped regions. We claborate our resolution for the overlapped regions in Scction 3.3
It is important note that the meaningfulness of cosine similarity depends heavily on the presence of substantial overlap, indicated by Jaccard similarity. In cases where overlap is minimal, high cosine similarity might imply a strong relationship due to well-aligned parameters. Yet, this interpretation could be misleading without the broader context provided by Jaccard similarity, which could reveal that the actual interaction between the tasks is limited. This understanding is crucial for accurately assessing the nature of the relationships between tasks based on their localized parameters.
Distribution of localized regions. We analyze the distribution of the localized regions for language lasks in RoBERTa-base models Figure 5 both in terms of the layer index and the transformer components. For the layers, different tasks seem to occupy different layers, although the earlier layers in the network seldomly appear in the localized regions. Interestingly, most of the localized regions concentrate in the LayerNorm [Bal 2016) parameters. This pattern can possibly be attributed to distribution shift observed in the finetuning data compared to the pretraining data, necessitating adjustments to the LayerNorm parameters to accommodate this shift. The same plots for GPT2-XL and ViT can be found in Appendix B and the findings hold true for those models as well.
Localization without validation data. In the rare cases where no labeled data is available, we adopt similar strategy the "Trim" step in Terg-Merging (Yadav et al. 2023). which selects positions in task vectors with the top-&% largest magnitudes, i.e., the parameters changed the most during finetuning. We Sanalizz--nd-Stitee
refer to our approach as Dataless of localization with validation data, the dataless version typically requires locating larger regions. This expansion necessary to encapsulate sufficient skills acquired during finetuning, but also leads to increased task conflicts. Nevertheless, in Section 4. we show that our dataless version still outperforms all other methods that do not require additional validation data.
As shown in Figure 2 to match the performance
Despite the similarity, there are two key differences between Dataless i) Smaller localized region: We find selecting the top-5% of parameters is sufficient for our pipeline, compared to the top-20% recommended by TIES-Merging. Our smaller selected region incurs less overlapping, leading to reduced task interference. Note that this is not the only advantage of our approach, as reducing the threshold in TIES to be 5% does not yield an improved performance as demonstrated in Appendix C (Tables 12 and 13). ii) Better merging performance: We use "Stitching" described in the next section for merging the localized regions, instead of the "Elect" procedure in TIES. The "Flect" approach in TIES
and TIES:

---

Published in Transactions on Machine Learning Research (12/2024)
might work well when overlapping regions involve a larger number of tasks, allowing sign determination and selective averaging to better capture consensus among task vectors. However, when only two tasks are involved in the overlapping regions (which is often the case as shown in Figure 12 in Appendix C TIES may only retain parameters predominantly from the task with the larger magnitude at each position. In such scenarios, important parameters for both tasks could be alternately ignored, impairing the overall efficacy in maintaining crucial task-specific information, particularly in tightly contested regions. We provide a more detailed discussion about the advantages of Dataless Localize-and-Stite over TIES-Merging with empirical evidence in Appendix C
3.3 Stitching
After obtaining the binary mask for each task, we integrate these masks, and apply them to task vectors construct the merged model. Given the sparsity, the masks generally activate different positions for different. tasks, minimizing overlap. However, in instances where overlaps occur that is, where multiple tasks share the same mask positions- we address this by averaging the parameters in these regions. Specifically, for each final mask Y. the value at the k-th position, denoted kk[,], is calculated as the reciprocal of the total number of tasks that have a mask value of 1 at that position; the original mask value 7/s [k] is 0, it remains
in the processed mask: <[[A] = [k] / (Σ)= (kl) After we obtain the processed masks (0 we
apply them to the task vectors and stitch the masked task vectors to get the final merged model
meeggod = 8prc + Σ O))..
The complete algorithm is presented in Algorithm [ Note that our stitching stop docs not involve tuning the scaling factors a other methods mentioned in Section which typically requires grid search or other optimization strategies for tuning. This distinction simplifies our method and avoids the computational overhead. comparison of runtime is provided in Appendix
Algorithm 1 Localize-and-Stitch
Input: Pretrained model Ppre, finetuned models
(0(²) |a threshold k
regularization coefficient X, magnitude
Output: Merged model Omerged, binary masks {w)
// Step 1: Localization
for i = 1,2, do
Compute the task vector 7; 0/60) 0 pre if validation data available then
Remark. In Serallize-nd-Stittae the majority of computational overhead lies in the localization step, while the subsequent stitching process is notably efficient. This distribution of workload is ideal because the more intensive localization step is performed separately on each individual finetuned model. This property provides simple extension in continual learning settings: When integrating a new model into the existing merged model (or updating any of the merged models), only the localization step for that new model incurs cost, followed by stitching. This is in contrast to most model merging methods Jin et al. (2022); Ilharco et al. (203): Yadav et al. (2023): Yang et al. (2023) which necessitate restarting the whole merging process, as the scaling factors of task vectors are tuned or learned based on the performance of the merged model. We provide an experiment of continual learning in Section 4.4 to illustrate this advantage.
S; arg ming 4, (0pre + o(S) O T.) + (S)
// make the mask binary 74t = (a elsc
// Dataless Localization n| > top=k([7.)] otherwise
end if
end for // Step 2: Stitching for i = ... do
for k = 1.2. do
// take average for overlaps
M[k = 7 [k]/ (E 75lk) (sk))
end for end for return @merged = 6pr + En (1/ TT))
7

---

Published in Transactions on Machine Learning Research (12/2024)
Table 2: Multi-task performance of merged RoBERTa-boe basse models on twelve NLP tasks and merged CLIP ViT-B/32 models eight vision tasks. The reported performance metric is average absolute and normalized (in parentheses) accuracy, with the only exceplion of MRPC which is evaluated via F1 score due to data imbalance.
Method
Validation data
Ace/F1 on 12 NLP tasks Acc 8 vision tasks
Single-task finetuned
0.811
0.905
Simple averaging WWorsman et 2022a
X
0.563 (0.006)
0,658 (0.731)
Task artihmetic (hhacco et al. 2023
X
0.626 (0.777)
0.692 (0.708)
TIES (Yadav et al. [223
X
0.600 (0.743)
0.725 (0.796)
Dataloss Localize-and-50 Stitch
X
0.734 (0.911)
0.740 (0.818)
Task arithmetic [[haroc et al. 2023
0.675 (0.840)
0.701 (0.778)
TIES (Ydda ot al. 20233
0.621 (0.772)
0. 737366 (0.812)
Fisher merging Matena & Ratiel
2022
0.690 (0.863)
0,683 (0.763)
RegMran (Jin et al. 2022
0.739 (0.911)
0.718 (0.7922)
AdaMerging ( Yang et al. 2023
0.637 (0.700)
0.801 (0.880)
Concensus TA Wang et al.
2024b
0.715 (0.889)
0.737 (0.510)
Cousensus TIES [Wang
2024b
0.695 (0.863)
0.748 (0.822)
Localize-und-Stitch
0.759 (0.936)
0.799 (0.880)
4 Experiments
We evaluate Localize-and-Stite with baselines described in Section 2 under various experimental settings. Our localization step is performed with 64-shot validation data, and the sparsity is chosen to be 1%. In the dataless version, the sparsity is chosen to be 5%.
4.1 Merging finetuned secoder-based language models
Following Panigrahi et al.
(002)), we finetune the RoBERTa-base (Liu et al., 2019) model on twelve
GLUE (Wang et al., 2018
tasks. Specifically, the dataset suite includes six single-sentence tasks
(SST-2 (Socher et al.
2013),
CR (Hu & Liul 2004), MR (Pang & Lee 2005) ; MPQA (Wiebe et al. 20055).
TREC (Voorhees et al.) 1999
SUBJ (Pang & Lee, 2004)) and six pairwise-sentence tasks (QNLI (Wang et al.
2018
SNLI (Bowman el al.]
2015). MNLI (Willians et al., 2017), RTE (Wang et 2118). Dolan
& BBrockett (2005), QQP (Iyer et al.)). The dataset details can be found in Appendix G
We present the results in Table 2 and leave the detailed per-task results in Table 4 of Appendix A The table is structured into three blocks for clarily: the upper block displays the performance
individually finetuned models for each task, the middle block lists algorithms that operate without the need for validation data, whereas the lower block includes algorithms that require validation data. Note that both the middle and lower blocks contain Task arithmetic and TIES because they are applicable with or without data. Both algorithms are able to utilize validation data to tune the merging coefficients a, as in mergged = Ppr + a E Тi We follow common practice to search over 0.2, ... 1} to obtain the optimal coefficients. When no validation data is available, we use their suggested merging coefficient of 0.4.
From Table 2 regardless of data availability, our approach consistently putperosrs other baselines. Notably, the dataless version of our algorithu provides more than 10% performance increase over task arithmetic and surpasses methods that depend on validation data (Fisher merging and AdaMerging), demonstrating its effectiveness. Note that TIES- Merging, although sharing one similar step with our dataless version, performs worse than task arithmetic. This performance decrease is also obscrved in similar language evaluation settings with similar model size Yadav et al. (2023). This phenomenon can be altributed to the two possible factors we identify in Section 3.3 i) the larger localized regions of TIES potentially lead to more task conflicts; ii) the sign eloction mechanism it employs tends be less effective overlapping regions that involve only a few tasks, par- ticularly when just two are present. This can lead to suboptimal retention of essential task-speeific information. We provide further analysis comparing Dataless wwwlllizeannd-ee and TIES-Merging in Appendix
8

---

Published in Transactions on Machine Learning Research (12/2024)
Table 3: Multi-task performance of merged GPT2-XL models (normalized metrics shown in the parentheses).
Task
MMLU (6-shot Acc)
TrushfulQA (MC2)
ARC (Ace)
Average
Single-task
0,273
0.488
0.472
0.111
Simple averaging (Wortsman el al. 2022
0.234 (0.857)
0.390 (0.795)
0,406 c0.560:
0.344 (0.839)
Task arithmetic (Ilaarco et al 2123
0.231 (0.857)
0.390 (0.799)
0.399 (0.845)
0.341 (0.834)
'IES (Yrday et al. 2023
0.233 (0.853)
0.448 (0.918)
0.310 (0.657)
0.330 (0.800)
Consensus 1A Wang of al.
2024b
0.234 (0.857)
0.412 (0.544)
0.373 (0.790)
0.340 (0.831)
Consensus TIES [Wang ot sL.
2021b
0.232 (0.850)
0.395 (0.500)
0,386 (0.818)
0.337 (0.820)
Dataless Localize-and-Stiiel
0.256 (0.958)
0.394 (0.807)
0.427 (0.905)
0.359 (0.863)
Bocalize-and-Stiter
0,247 (0.905)
0.358 (0.796)
0.467 (0.989)
0.367 (0.896)
4.2 Merging finetuned vision models
Following the practice in Ilharco et al. 20233 we finetune the CLIP (Radford et al. 2021 image encoder
with the ViT-B/32 (Dosovitskiy al.
2021) architecture on eight image classification tasks, incorporating
diverse categories of images such remote sensing, satellite images and traffic signs. Specifically, the dataset
suite includes SUN397 (Xiao et al.
2016), Stanford Cars Krause et al. (2013), RESISC45 (Cheng et al. 2017]
EuroS AT (Helber el al. 2019). SVHN (Neizer et al. 2011), GTRSB (Stalkkamp et al. 2011), MNIST LeCun
et al. 2010 and DTD Cimpoi et al.
2014). The details of each dataset can be found in Appendix G.
We present the results in Table 2 and leave the detailed per-task results in Table 5 of Appendix A Similarly, even in the absence of validation data, the dataless version of our approach can outperform methods requiring validation data (Fisher merging and RegMean). When validation data is available, our method also demonstrates competitive performance. Note that AdaMerging, while achioving similar results ours, imposes more demanding data availability requirement, and incurs higher computational cost. It necessitates entropy minimization across the entire (unlabeled) test set, rendering it approximately 15 times slower than our method.
4.3 Merging finetuned decoder- based language models
Compared with encoder-only language models, decoder-based language models benefit from increased number of parameters and perform well on complicated generative tasks. We use GPT2-XL (Radford et al. 2019) as the base model, and obtain three supervised finetuned checkpoints from the Hugging Face model hub (Wolf iet al. 2020), each tuned for distinct functionalities: general reasoning, scientific knowledge and truthfulness respectively. Further details about these models are specified in Appendix
To assess these models, we use MMLU (Hendrycks et al. 2021 , ARC (Clark et al. 2018) and TruthfulQA (Lin) et al.) 2021) as evaluation datasets for the respective domains. Unlike datasets in the previous section, these are typically used in their entirety for evaluation, without a designated train-test split. However, using these datasets for both evaluation and localization could lead to data leakage. To prevent this, we use data from three surrogate datasets with similar purposes for localization, namely Alpaca (Taori et al. 2023 ),
GSMSK (Cobbe et al. 2021 and HotpotQA (Yang et al. 2018).
We compare our approach with other methods directly applicable in this setting in Table Both versions of Localize-and-Stitee noticeably outperforms other baselines. The result verifies that even for complex generative tasks, skills can still be localized within tiny regions of finetuned models. Moreover, this shows that good localization performance can be achieved without access to the original finctuning data; using similar data from other sources also suffices. This aligns with the finding from (Panigrahi el al. 2023) that localized regions exhibit transfer among similar tasks, meaning that a localized region for one task can facilitate performance in related tasks. This further reduces the dependency on data availability, making our approach more versatile. Overall, these findings highlight the capability of Localize- and-Stitch to integrate the strengths from multiple language models, demonstrating its effectiveness across a variety of linguistic challenges.
4.4 Empirical analysis
Sparsity-performance trade-off. In the localization step, we optimize for two competing objectives: identifying regions containing sufficient finetuned skills, and minimizing the number of parameters involved.
9

---

Published in Transactions on Machine Learning Research (12/2024)
Average merged acc/F]
Average merged acc/F1
0.79
Localize-and-Sttkee (1%)
Dataless Localize-and-Stitel (5%)
0.70
0.78
0.65
0.77
0.76
0.55
0.50
Localize-and
0.75
Dataless Localize-and-Stitch
0.45
Simple averaging
0.74
0.40
10-
10a
2
2
2
2
Sparsity level
Number of data per class
Figure 6: Sparsity-performancc trade-off for our gorithm on the language tasks. Localization achieves the best performance at sparsity around 1,, while the dataless version requires 5 10%.
Figure 7: With only 8-shot data, performance of our algorithm improves over the dataless ver- sion. With more data available, the performance of our method continues to increase. Numbers in brackets represent sparsity levels each method.
Here, we study the tradc-off by presenting the performance of our approach the language tasks at different sparsity levels in Figure i Across all models and lasks tested, we observe that sparsity level around 1% yields the best results using our localization method, whereas dataless localization requires 5 - 10%. When the localized regions are too small to retain adequate finetuned knowledge, the benefit of less overlap is diminished. Conversely, when the localized regions are too large, although the regions possess sufficient finetuned knowledge, the increased overlap among task-specific regions leads to more task interference.
Effect of data availability. We present the performance of our method across various data availability scenarios with localization region of 1% (Figure 7 the language tasks. One clear trend is that with more data, the quality of localization improves, resulting in enhanced performance of the merged model. Notably, even with as few as 8-shot data, the merged performance surpasses that of the dataless approach, highlighting its effectiveness under constrained data conditions.
Avoid forgetting of pretrained knowledge. Pre- trained models contain rich and generalizable informa- tion, derived from their diverse training data. However, finetuning often incurs catastrophic forgetting of skills in the pretrained model (He et al.) 2021 Luo et al.) 2023), which is carried over when these finetuned mod- cls are merged. As our method makes minimal change to the pretrained model, such forgetting is substantially mitigated. For instance, in the vision setting where we localize 1% parameters for each task, the total param- eters changed in our merged model compared with the pretrained model is only around 7% for the tasks as a result of minimal overlap. We evaluate the retention of pretrained capabilitics with a general vision task that the pretrained CLIP model excels, namely zero-shot ImageNet classification (Deng et al., 2209). and report the results in Figure Our method most effectively preserves the pretrained performance, while achieves superior performance on the eight merged tasks.
accuracy on eight tasks
0.8
AdaMerging Lacalize-and-Sttch
RegMean
0.7
Task arithmmttii
Simple averaging
Average Averageaccuss
Fretrained
0.70
0.75
0.80
ImageNet top-5 accuracy
Figure 8: Our method retains the pretrained skill the best due to the minimal updates (7% of total parameters) the pretrained model, while performs well on the eight merged tasks (upper right better).
Model compression through localization. Our localization approach enables a compact represent a tion of the finetuned model. In our experiments, we find that localizing only 1% of the total parameters recovers over 99% of the performance achieved by single-task finetuning (full evaluation reported Appendix B). The efficiency allows us to store only the masked task vectors for each task (7s O 73) instead of the entire finetuned models, without noticeable loss in performance. Given the sparsity of these masked task vectors,
10

---

Published in Transactions on Machine Learning Research (12/2024)
Average normalized accuracy
10000
1.00
Runtime step
9000
0.98
Localize-and-Stcch
6000
Task arithmetic
TIES
4000
Consensus TA
Consensus TIES
0.92
Continual learning
2000
0.90
SST+
.TREC
(SU8) Added tasks
+00P
SST-CR
+TREC
SUB)
ONLI
-0OP
Added tasks
Figure 9: Comparison performance (left) and efficiency (right) for continual learning. localize-and-Stitcch con- sistently outperforms baselines with generally constant runtime for each additional task.
can store them in Compressed Sparse Row (CSR) format (Pissanetzky 1984 Golub & Van Loan 2013
which drastically reduces the model size to about 1% of the original. For example, a RoBERTa-baas model, which typically requires ~ 650MB of memory to store, can be represented using only a ~ 7MB sparse matrix, achieving memory reduction of 99%. Although we still need to store the full pretrained model, this storage overhead will be amortized with more finetuned models. This model compression, combined with the case of update mentioned in Section 3.3 enables flexible composition of skills from multiple finetuned models with minimal storage and computational overhead.
Continual learning. As mentioned in Section our approach is particularly efficient in the continual learning setting. To illustrate the efficioncy, we start from merging the SST-2 and CR RoBERTa models, and incrementally add 4 more tasks to simulate a continual learning set set ting. The lasks are selected by representative- ness (including sentiment analysis, sentence classification, NLI, etc). We compare our method against five base- lines: task arithmetic, TIES, Consensus TA, Consonsus TIES and continual training. Following common prac- tice, the merging coefficients are tuned across {0.0, 0.., 1.0}. The continual training results are obtained by sequential training each task, using the model from the previous task the starting point. The results from Figure g demonstrate that: i) Performance:
33
Seaalize-and-Stitee consistently outperforms the base- lines, with the performance margin increasing as more tasks are involved, showing its ability to reduce task inter- ference. ii) Runtime: The runtime for other baselines increases with each added task due to the need for hyper- parameter search from scratch and performance validations, while the runtime of Localize-and aotee-nnnd-tttttt gen- erally remains constant, reflecting its efficiency in continual learning scenarios. While continual training performs better than other model merging baselines, it still falls short of focalize-and-Stiie suggests potential avenue for enhancing continual learning: instead of finetuning on top of the last task model, it may be advantageous to first finetune the pretrained model on the new task and then merge it with the existing multi-task model on the old lasks. We leave further exploration of this approach for future work.
This
5 Related works
Model merging. Model merging aims at efficiently integrating multiple finetuned models into single model that retains the capabilities of each. This approach enhances the efficiency, generalization and multi-task capabilities of finetuned models. In scenarios where models are trained on the same lask with different
training configurations, Singh & Jaggi 2020 Ainsworth et al. (2022); Jolicoear-Martinenn Martineau et al. 2024 show that merged models perform comparably to ensemble models but with significantly lower deployment costs. Additionally, Wortsman et al. [2022a] b) demonstrate that the merged model improves the out-of-distribution (OOD) robustness. When merging finetuned models from different tasks, the merged model can provide better initialization for new tasks (Choshen et al. 2022 Gueta et al. 2023). Finetuned models with different
specialized skills can also be combined to enhance multi-task capabilities [Ilharco et al. 2023 Tam et al.
2023 Matena & Raffe] 2022 Jin el al. 2022 Yang et al. 2023 Yu et al.) 2023 Wang el. al. 2024b a). More recently, a new line work has emerged that uses a mixture of experts (MoE) strategy (Jiang et al.
2023
Tang et al. 2024). Instead of single unified model, the MoE approach incorporates routing mechanisms
direct inputs to task-specific networks. In this work, we primarily focus on merging specialized models into single unified model for enhancing multi-task performance. Similar to the gradient conflict problem Yuu
11

---

Published in Transactions on Machine Learning Research (12/2024)
et al. 2020 Liu et al. 2021] in multi-task learning, finetuned models also manifest conflict when merged together, and our method provides an effective solution to this problem.
Our approach stands out with four key advantages: i) Localized merging: Instead of global merging, we localize merging to specific regions with finetuned skills, effectively decreasing task conflicts. ii) Simplified process: Existing works often require computationally intensive grid search or optimization to determine the optimal merging coefficients, while our stitching procedure does not have the requirement. iii) Data flexibility: Our method works with or without validation data, and provides competitive results in various data availability scenarios. iv) Benefits beyond model merging: This includes interpretability of task relations, model compression and presorvation of pretrained knowledge.
Knowledge attribution. Recent works find that. knowledge contained in language models is localizable, meaning that model behavior can be attributed to small subsets of model parameters. One line of work identifies such regions to edit the knowledge contained in the networks. [Sundararajan et al. (2017) uses integrated gradients for knowledge attribution, which measures how sensitive each neuron's 's gradient is to the change of imput. Dai et al. (2021) applies integrated gradients to edit factual knowledge contained in BERT models. However, the relationship between the editing success and the localized regions remains unclear Hase ct al. 2024). Knowledge attribution can also be applied for enhancing interpretability. Vig et al. (2020) applies causal mediation analysis
Pearl
2022 to identify individual neurons contributing to gender bias.
Recently, Panigrahi et al. (2023) optimizes for a binary mask to localize skills contained in finetuned language models. There are two key differences between our localization formulation and theirs. Firstly, our formulation of S is more straightforward,
we directly have y = (S) in Equation D In contrast. Panigrahi ct al. 2023 uses S as selector of whether to take the value from the initial mask, leading to more complex computation. Secondly, our approach uses the Lı constraint to control the sparsity in a more fine-grained manner, while Panigrahi et al. (2023) does not have this constraint, and controls sparsity via early stopping. We empirically show that our localization formulation identifies regions with improved quality in Appendix
Pruning. Similar to localization, pruning is a stralegy to identify key regions in the parameter space that are important to model performance. Han et al. (2015a b) propose magnitude pruning, which preserves weights with high magnitudes, and the method inspires various variants (Zhu & Gupta 2017 Paganini & Forde
2020 Zafrir et al. 2021 Parameter significance measured by performance sensitivity is another effective
criteria for identilying important, parameters (Sanh et al. 2020 Liang et al. 2021 Zhang et al. 2022). For instance, Lee et al. (2018) proposes SNIP score, which computes the change of loss when each neuron is set
to 0. Pruming mothods are widely applicd to modern large language models (Zhang et al. 2023 Sun et al.
2023
Xia et al.
2023 Zhao el al. 2024 Cheng el al. 2024).
The primary distinction between pruning and localization lies in their treatment of parameters outside the iden- tified regions. In pruming, these parameters are set to zero, effectively removing them, allowing the pruned net- work to function as standalone model. Conversely, in localization, parameters outside the localized regions are retained at their pretrained values, requiring the localized regions to be combined with the pretrained model for deployment. Despite these differences, the uonceptual overlap between them suggests that pruning techniques could be adapted for localization. Exploring such adaptations presents an interesting direction for future work.
6 Conclusion
In this work, we study the problem of task interference in the context of model merging. We find that globally merging models typically leads to task interference, due to the parameter redundancy in task vectors. To tackle this challenge, we introduce Localize-ant aaatze--nd--Sttchhaeee which performs localized merging via sparse task arithmetic. We first identify tiny regions in the finetuned models that contain essential skills acquired during finetuning, and stitch only those regions back onto the pretrained model. Empirical evaluation on various vision and language benchmarks validate the effectiveness of our approach. Beyond model merging, our approach performs effective model compression, which compresses the model size to be 1% of the original without sacrificing performance. Additionally, Localize-and-Stitee also excels at retaining the pretrained knowledge. Overall, our approach offers a novel pathway for flexible and continual skills composition from finetuned models with minimal storage and computational overhead.
12

---

Published in Transactions on Machine Learning Research (12/2024)
References
Samuel K Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git re-basin: Merging models modulo permutation symmetrics. arXiv preprint arXiv:2209.0480 04836, 2022.
Jimmy Lei Ba. Layer normalization. arXiv preprint vrXie:1607.04550 2016.
Luisa Bentivogli, Peter Clark, Ido Dagan, and Danilo Giampiccolo. The fifth pascal recognizing textual entailment challenge. TAC, 7(8):1, 2009.
Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher Manning. A large annotatod corpus for learning natural language inference. arXiv preprinl arXiv:1 508.05326, 2015.
Rich Caruana. Multitask learning. Machine learning, 28:41-75, 1997.
Tianlong Chen, Jonathan Frankle, Shiyu Chang, Sijia Liu, Yang Zhang, Zhangyang Wang, and Michael Carbin. The lottery ticket hypothesis for pre-trained bert networks. Advances in neural information processing systems, 33:15834-15846, 2020a.
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning visual representations. International conference on machine learning, pp. 1597 1607. PMLR, 2020b.
Gong Cheng, Junwei Han, and Xiaoqiang Lu. Remote sensing image scene classification: Benchmark and state of the art. Proceedings of the IEEE, 105(10):1865 1883, 2017.
Hongrong Cheng, Miao Zhang, and Javen Qinfeng Shi. A survey on deep neural network pruning: Taxonomy, comparison, analysis, and recommendations. IEEE Transactions Pattern Analysis and Machine Intelligence, 2024.
Leshem Choshen, Elad Venezian, Noam Slonim, and Yoav Katz. Fusing finetuned models for better pretraining. arXiv preprint arXiv:2004, 03044, 2022.
Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3606 3613, 2014.
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try are, the ai2 reasoning challenge. arXiv preprint arxiv: 10o::8033.050 003.05457, 2018.
Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichhro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arxiv:21100 10. 14168, 2021.
Ido Dagan, Oren Glickman, and Bernardo Magnini. The pascal recognising textual entailment challenge. In Machine learning challenges workshop, pp. 177-199 Springer, 2005.
Damai Dai, Li Dong, Yaru Hao, Zhifang Sui, Baobao Chang, and Furu Wei. Knowledge neurons in pretrained transformers. arXiv preprint arXiv:2104.088 08696, 2021.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248 255. leee, 2009.
Jacob Devlin, Ming- Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. orXiv preprinl 1000:08800004855, 2018.
Bill Dolan and Chris Brockett. Automatically constructing a corpus of sentential paraphrases. In Third international workshop on paraphrasing (TWP2005), 2005.
13

---

Published in Transactions on Machine Learning Research (12/2024)
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Usækoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2021. URL htttp:://peereeiieee http://w.ee/efooooe net/foruunidd/icbFdry
Danilo Giampiccolo, Bernardo Magnini, Ido Dagan, and William B Dolan. The third pascal recognizing textual entailment challenge. In Proceedings of the ACL-PASCAL workshop on teatual entailment ond poraphrasing, pp. 1 1-9, 2007.
Gene H. Golub and Charles F Van Loan. Matris compulations. JHU press, 2013.
Almog Gueta, Elad Venezian, Colin Raffel, Noam Slonim, Yoav Katz, and Leshem Choshen. Knowledge is region in weight space for fine-tuned language models. arXic preprint Xiv: 04863, 2023.
R Bar Haim, Ido Dagan, Bill Dolan, Lisa Forro, Danilo Giampiccolo, Bernardo Magnini, and Idan Szpektor. The second pascal recognising textual entailment challenge. In Proceedings of the Second PASCAL Challenges Workshop Recognising Tertual Entailment, volume 7, pp. 785 794, 2006.
Song Han, Huizi Mao, and William J Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149 2015a.
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient. neural network. Advances in neural information processing systems, 28, 2015b.
Peter Hase, Mohit Bansal, Been Kim, and Asma Ghandeharioun. Does localization inform editing? surprising differences in causality-basee localization vs. knowledge editing in language models. Advances in Neural Information Processing Systems, 36, 2024.
Tianxing He, Jun Liu, Kyunghyun Cho, Myle Ott, Bing Liu, James Glass, and Fuchun Peng. Analyzing the forgelting problem pretrain-finetuiing of open-domain dialogue response models. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pp. 1121-1133, 2021.
Vifei He, Shiji Zhou, Guojun Zhang, Hyokun Yun, Yi Xu, Belinda Zeng, Trishul Chilimbi, and Han Zhao. Robust multi-task learning with excess risks. In Proceedings of the 41st International Conference on Machine Learning, volume 235 of Proceedings of Machine Learning Research, pp. 18094 18114. PMLR, 21-27 Jul 2024. URL https::/ mlr Tttess/2335/h222 html
Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: novel dataset and deep learning benchmark for land use and land cover classification. IEFE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217 2226, 2019.
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. Mcasuring massive multitask language understanding. Proceedings of the International Conference Learning Representations (ICLR), 2021.
Torsten Hoefler, Dan Alistarh, Tal Ben-Nun, Nikoli Dryden, and Alexandra Peste. Sparsity in deep learning: Pruning and growth for efficient. inference and training in neural networks. Journal of Machine Learning Research, 22(241):1-12) 124, 2021.
Minqing Hu and Bing Liu. Mining and summarizing customer reviews. In Proceedings of the tenth ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 168-177, 2004.
Yuzheng Hu, Ruicheng Xian, Qilong Wu, Qiuling Fan, Lang Yin, and Han Zhao. Revisiting scalarization multi-task learning: A theoretical perspective. Advances in Neural Information Processing Systems, 36, 2024.
Gabriel Iharco,, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannanch Hajishirzi, and Ali Farhadi. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations, 2023. URL hatts:///gaaeeeiiee..ee//rrrrrte
14

---

Published in Transactions on Machine Learning Research (12/2024)
Shankar Iyer, Nikhil Dandckar, and Kornél Csernai. First quora dataset release: Question pairs. URL httpps:/quoradata..qu
Weisen Jiang, Baijiong Lin, Han Shi, Yu Zhang, James T Kwok, et al. Effective and parameter-cffiion reusing fine-tuned models. arxiv preprint or arNi::2310.01886 2023.
Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. arXiv preprint arXiu:2212. 09849, 2022.
Alexia Jolicoeu--Martineau, Emy Gervais, Kilian FATRAS, Yan Zhang, and Simon Lacoste-Julien. Population parameter averaging (PAPA). Transactions on Machine Learning Research, 2024. ISSN 2835-8856. URL
Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained calegorization. In Proceedings of the IEEE international conference on compuler vision workshops, pp- 554-561, 2013.
Yann LeCun, Corinna Cortes, Chris Burges, al. Mnist handwritten digit database, 2010.
Namhoon Lee, Thalaiyasingam Ajanthan, and Philip HS Torr. Snip: Single-shot network pruning based on connection scnsitivity. arXiv preprint arxiv: 1111888000204... 2018.
Chen Liang, Simiao Zuo, Minshuo Chen, Haoming Jiang, Xiaodong Liu, Pengcheng He, Tuo Zhao, and Weizhu Chen. Super tickets in pre-trained language models: From model compression to improving generalization. arXiv preprint arxix:2105. 12002, 2021.
Stephanie Lin, Jacob Hilton, and Owain Evans. Truthfulqa: Measuring how models mimie human falsehoods. arXiv preprint Xtx::210090070 07958, 2021.
Bo Liu, Xingchao Liu, Xiaojie Jin, Peter Stone, and Qiang Liu. Conflict-averse gradient descent for multi-takk learning. Advances in Neural Information Processing Systems, 34:18878-18890, 2021.
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.1169: 2019.
Yun Luo, Zhen Yang, Xuefeng Bai, Fandong Meng, Jie Zhou, and Yue Zhang, Investigating forgetting in pre-trained representations through continual learning. arXiv preprint arXiv:2305.052: 2023.
Michael S Matena and Colin Raffel. Merging models with wisghteweighted averaging. Advances in Neural Information Processing Systems, 35:1 17:37703-1 -1711,, 2022.
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Baolin Wu, Andrew Y Ng, et al. Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupercised feature learning, volume 2011, pp. 7. Granada, Spain, 2011.
Michela Paganini and Jessica Forde. On iterative neural network pruning, reinitialization, and the similarity of masks. arXiu preprint arXiv:2001.05050 2020.
Bo Pang and Lillian Lec. A sentimental education: Sentiment analysis using subjectivity summarization based on minimum cuts. arXie preprinl cs/0409058, 2004.
Bo Pang and Lillian Loe. Sceing stars: Exploiting class relationships for sentiment categorization with respect rating scales. arXiv preprint cs/0506075, 2005.
Abhishek Panigrahi, Nikunj Saunshi, Haoyu Zhao, and Sanjeev Arora. Task-specific skill localization in fine-tuned language models. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (cds.), Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 27011-27033. PMLR, 23-29 29 Jul 2023. URI. httpps:/pproceedings.. mlr. wttp:/ssmww..see.eaeeeeeeme
httpe/dddngg.....rreeee/e/////// pr2sss/v202pamigraaae html
15

---

Published in Transactions on Machine Learning Research (12/2024)
Judea Pearl. Direct and indirect effects. In Probabilistic and causal inference: the works of Judea Pearl, pp. 373 1773-992.00 2022.
Sergio Pissanetzky. Sparse matria techmology-electrooiic edition. Academic Press, 1984.
Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Tlya Sutskever. Language models are unsupervised multitask learners. 2019.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference machine learning, pp.
PMLR, 2021.
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with unified lext-lo-texi transformer. Journal of machine learning research, 21(140):1667, 2020.
Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100,000++ questions for machine comprehension of text. arXiv preprint arXi::1606.0522 2016.
Victor Sanh, Thomas Wolf, and Alexander Rush. Movement pruning: Adaptive sparsity by fine-tuning. Advances in neurol information processing systems, 33:20378-2088 20389, 2020.
Sidak Pal Singh and Martin Jaggi. Model fusion via optimal transport. Advances in Neural Information Processing Systems, 1--20045-22055 2020.
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp- 1631-1642, 2013.
Johannes Stallkamp, Mare Schlipsing, Jan Salmen, and Christian Igel. The german traffic sign recognition benchmark: multi-class classification competition. In The 2011 international joint conference on neural networks, pp. 1453-1460. TEEE, 2011.
Mingjic Sun, Zhuang Liu, Anna Bair, and J Zico Kolter. A simple and effective pruning approach for large language models. arXiv preprint Xrxi2:2306. 11695, 2023.
Mukund Sundararajan, Ankur Taly, and Qiqi Yan. Axiomatic attribution for deep networks. In International conference on machine learning, pp. 3319 3328..3332200000100001100331 PMLR, 2017.
Derek Tam, Mohit Bansal, and Colin Raffel. Merging by matching models in task subspaces. arXie preprint arXiv:2312.04330 2023.
Derck Tam, Yash Kant, Brian Lester, Igor Gilitschenski, and Colin Raffel. Realistic evaluation of model merging for compositional generalization. arXie preprint orXiv:2409.1880 18314, 2024.
Anke Tang, Li Shen, Yong Luo, Nan Yin, Lefei Zhang, and Dacheng Tao. Merging multi-task models via weight--nnsembling mixture of experts. arXiv preprint arX0:22402.0033, 2024.
Rohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xucchen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Stanford alpaca: An instruction-followig Ilama model. https://githubl com/
Batsu-labb/ttanfod_aall alpaca 2023.
Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shicber. Investigating gender bias language models using causal modiation analysis. Advances in neural information processing systems, 33:12388-1225 12401, 2020.
Ellen M Voorhees et al. The trec-8 question answering track report. In Tree, volume 99, pp. 77- 82, 1999.
16

---

Published in Transactions on Machine Learning Research (12/2024)
Alex Wang, Amanprect Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman, Glue: A multi- task benchmark and analysis platform for natural language understanding. arXic preprint Xiv: Xix:118844... 804.07461, 2018.
Haoxiang Wang, Pavan Kumar Anasosalu Vasu, Fartash Faghri, Raviteja Vemulapalli, Mehrdad Farajtabar, Sachin Mchta, Mohammad Rastegari, Oncel Tuzel, and Hadi Pouransari. Sam-clip: Merging vision foundation models towards semantic and spatial understanding, In Proceedings of the IEEE/CVF Conference on Computer Vision and Pottern Recognition, pp. 3635-3647 2024a.
Ke Wang, Nikolaos Dimitriadis, Guillermo Ortiz-Jimenez, François Fleuret, and Pascal Frossard. Localizing task information for improved model merging and compression. In Forty-first International Conference on Machine Learning, 2024b.
Janyce Wiebe, Theresa Wilson, and Claire Cardie. Annotating expressions of opinions and emotions in language. Language resources and evaluation, 39:165-210, 2005.
Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arxiv: 1704. 704. 05426, 2017.
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, al. Transformers: State-of-the-ar natural language processing. In Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations, pp. 38-45, 2020.
Mitchell Wortsman, Gabriel Ilbarco, Samir Ya Gadre, Rebecca Roelofs, Raphael Gontijo-oppes, Ari S Morcos, Hongseok Namkoong, Ali Farhadi, Yair Carmon, Simon Kornblith, et al. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In International conference on machvine learning, pp. 23965 23998. PMLR, 2022a.
Mitchell Wortsman, Gabriel Ilharco, Jong Wook Kim, Mike Li, Simon Korublith, Rebecca Roelofs, Raphael Gontijo Lopes, Hannaneh Hajishirzi, Ali Farhadi, Hongseok Namkoong, et al. Robust fine- tuming of zero-shot models. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 7959 7971, 2022b.
Mengzhou Xia, Tianyu Gao, Zhiyuan Zeng, and Danqi Chen. Sheared Ilama: Accelerating language model pre-training via structured pruning. arXio preprinl or orXiv:2310.0660 2023.
Jianxiong Xiao, Krista A Ehinger, James Hays, Antonio Torralba, and Aude Oliva. Sun database: Exploring large collection of scene categories. International Journal of Computer Vision, 119:3 22, 2016.
Prateek Yadav, Derek Tam, Leshem Choshen, Colin Raffel, and Mohit Bansal. merginergnn:: Resolving interference when merging models. In seirtty Conference on Neural Information Processing Systems, 2023. URL http://pppereeeeeeeeeeeerrrrraaa
Enneng Yang, Zhenyi Wang, Li Shen, Shiwci Liu, Guibing Guo, Xingwei Wang, and Dacheng Tao. Adamerging: Adaptive model merging for multi-task learning. arXiv preprinl 0rX.022310.02575, 2023.
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W Cohen, Ruslan Salakhuldinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. Xiv preprint ar Xiv: 09600, 2018.
Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, and Yongbin Li. Language models are super mario: Absorbing abilitics from homologous models as a free lunch. arXiv preprint vrXiv:2311.00000 2023.
Tianhe Yu, Saurabh Kumar, Abhishek Gupta, Sergey Levine, Karol Hausman, and Chelsca Finn. Gradient surgery for multi-task learning. Advances in Neural Information Processing Systems, 33:5824-5836, 2020.
Ofir Zafrir, Ariel Larey, Guy Boudoukh, Haihao Shen, and Moshe Wasserblat. Prune once for all: Sparse pre-trained language models. Xiv preprint 1rXiv:2111.055 2021.
17

---

Published in Transactions on Machine Learning Research (12/2024)
Mingyang Zhang, Hao Chen, Chunhua Shen, Zhen Yang, Linlin Ou, Xinyi Yu, and Bohan Zhuang. Loraprune: Pruning meets low-rank parameter-efficiet fine-tuning. arXie preprint arXiv:2305. 10039055.18400 18403, 2023.
Qingru Zhang, Simiao Zuo, Chen Liang, Alexander Bukharin, Pengcheng He, Weizhu Chen, and Tuo Zhao. Platon: Pruming large transformer models with upper confidence bound of weight importance. In International conference on machine learning, pp. 26809 26823. PMLR, 2022.
Yu Zhang and Qiang Yang. A survey on multi-task learning. IEEE Transactions on Knowledge and Dala Engineering, 34(12):5586 5609, 2021.
Bowen Zhao, Hannaneh Hajishirzi, and Qingqing Cao. Apt: Adaptive pruning and luning pretrained language models for efficient training and inference. arXiv preprint arXiv:2401. 12200. 2024.
Michael Zhu and Suyog Gupta. To prune, not to prune: exploring the efficacy of pruning for model compression. Xie preprint arxiv: 110.001877 2017.
A Full experimental results
Table 4: Multi-task accuracy (1F1) of merged RoBERTa- base models on twelve NLP tasks.
Thok
SST-2
CR
MR.
MPQA
TREC
SUBJ
QNLI
SNLI
MNLI
KTE.
MRPC!
QQP
Averago Anc/F1
Stnglolaok fintunne
0,808
0.894
0.844
0.848
0.938
0.531
0.766
0.791
0.706
0.643
0.786
0.716
0.811
Stmple neetaging Wartsman et wl. 2022a
0.877
0.851
0.820
0.658
0.304
0.478
0.508
0.452
0.462
0.263
0.311
0.469
B.563
Thok arithmotii Nlarto
0.846
0.856
0.760
0.810
0.156
0.584
0.607
0.538
0.403
0.538
0.822
0.581
0.626
TIES (Ydda es
0.791
0.226
0.552
0.501
0.379
0.477
0.816
0.800
Datalass Lacali MeccllA--in---- Stiteh
0.50
0.307
0.864
0.821
0.462
0.762
0.558
0.600
0.618
0.088
0.837
0.083
0.734
Task urtiinetic [hatoo
2005
0.885
0.882
0.803
0.829
0.320
0.610
0.620
0.561
0.495
0.656
0.828
0.623
0.675
TIFS (Yadey
0.835
0.548
0.504
Fisber misying Mittioa < Ratel
2022
0.500
0.858
0.837
0.758
0.260
0.548
0.542
0.725
0.652
0.658
0.833
0.677
0.890
Regliaa Jii 61 di 2i0e
0.807
0.897
0.847
0.826
0.730
0,791
1.559
0
1.508
0.638
1.7744
0.642
0.789
AcloMerging Yony
272g
0.547
Cocsetimss T3 Wank dui
Awuhh
0.802
0.894
0.866
0.852
0.376
0.506
0.714
0.665
0.520
0.630
0.88]
0.664
0.715
Couscusus TIES Vranng <t Am 2300
0.888
0.854
0.847
0.802
0.314
0.631
1.689
0,804
1.461
0.630
118012
0.644
Localie-and-Stiaa
0.734
0.759
Table 5: Multi-lask accuracy of merged CLIP ViT-B/32 models on eight vision tasks.
Task
SUNW97
Cars
RESISC45
EuroSAT
SVHN
GTSRB
MNIST
DTD
Average Ace
Singlo-tusk finetuned
0.753
0.777
0.961
0.997
0.975
0.987
0.997
0.794
0.905
Simple sveraging
Worteman et al.
2022g
0.653
0.634
0.714
0.717
0.612
0.528
0.875
0.501
0.658
Tusk arithmetio Tharo 06 al 2023
0.552
0.549
0.667
0.780
0.802
0.697
0.973
0.504
0.692
TIES (adda
2023
0.586
0.862
0.721
0.725
Dataless Localize-aas Sttii
0.669
0.617
0.768
0.716
0.817
0. 0.726
0.973
0.576
0.740
Tisk arishmetic Ilharco e6 al.
2023
0.638
0.621
0.720
0.776
0.744
0.651
0.970
0.522
0.701
TIES (Yaday et 5. 2023
0.6188
0 0.629
0.7413
0.789
0.831
0.71/1
0.976
0.562
0.77 0.736
Fisluer merging MMi
Rtfiel
2012
0.
0.664
0.511
0.683
RegMean Jin et al M122
0.653
0.635
0.756
0.786
0.781
0.67-1
0.937
0.520
0.718
AdaMerging, Yang rt al.
2023
0.645
0.681
0.792
0.938
0.870
0.919
0.975
0.501
0.801
Couserauus Wang
2124b
01755
0.794
0.816
0.609
0.980
0.737
Cousersus TIES Wang 2024b
0.623
0.622
0.745
0.800
0.877
0.775
0.986
0.553
0.748
Localizeandd-Sttch
0.672
0.683
(1818
0.894
0.879
0.866
0.948
0.629
0.799
We present the per-task performance in Table 4 and Table by
The reported normalized accuracy is computed
aCCmerged
Normalized accuracy
T
ACC
TE(T]
B
More experiments
More on task interference. To assess our method's effectiveness on tasks with different task similarities, created two subsets: i) Conceptually similar subset: Composed entirely of sentiment classification tasks
18

---

Published in Transactions on Machine Learning Research (12/2024)
(SST-2, CR, MR, MPQA). ii) Conceptually dissimilar subset: Including tasks from different categories (SST-2 for sentiment classification, TREC for question classification, SUBJ for subjectivity, and MNLJ for entailment). In Table G we report the average performance for each subset. In the similar subset, where tasks share similar skills, all merging methods perform equally well. However, in the dissimilar subsct, where task skills differ and may even conflict, Localize-and-Stiee shows a significant advantage, demonstrating its ability to effectively resolve task interference.
Table 6: Performance comparison for merging similar and dissimilar tasks.
Method
Average acc on similar subset
Average acc on dissimilar subset
Task arithmetic TIES
0.878
0.802
0.875
0.812
Localize-and-Stitcch
0,850
0.831
Where are the localized regions? We analyze the distribution of the localized regions for both language and vision tasks in Figure I0 both in terms of the layer index and the transformer components. For the layers, different. tasks seem to occupy different layers, although the earlier layers in the network seldomly appear in the localized regions. Interestingly, most of the localized regions concentrate in the LayerNorm parameters. This pattern can possibly be attributed to a distribution shift observed in the finetuning data compared to the pretraining data, necessitating mdjustments to the LayerNorm parameters to accommodate this shift.
Table 7: Single-task grafted accuracy (1F of RoBERTa-base models on twelve NLP tasks.
Task
185T-2
CR
MR
MPQA
TREC
SUBI
QNLI
SNLI
MNL1
RTE
MRPC
QQP
|Average ace/F'l
Single-tack finetuned
0.891
0.814
0.931
0.761
0.786
0.716
Single-tusk tusk grafted
0.897
0.883
0.855
0.844
0.918
0.933
0.751
0.772
0.703
0.639
0.745
0.708
0.804
Recovered proportion
0.909
0.988
1.013
0.995
0.979
1.002
0.983
0.976
0.996
0.994
0.973
0.959
0.991
Table 8: Single-task grafted accuracy of GPT2-XT. models on three NLP tasks.
Task
MMLU (5-shot Acc)
TruthfulQA (MC2)
ARC (Aec)
Average
Single-task finetuned Single-task grafted
0.273
0.488
0.472 0.475
0.411
0.264
0.436
0.392
Recovered proportion
0,969
0.893
1.007
0.953
Table 9: Single-task grafted accuracy of CLIP VIT-B/32 models on eight vision tasks.
Task
SUN397
Cars
RESISC45
EuroSAT
SVHN
GTSRB
MNIST
DTD
Average ace
Single-tas task unnetuned
0.753
0.777
0.961
0.997
0.975
0.987
0.997
0.794
0.905
Single-task grafeed
0.731
0.772
0.955
0.989
0.963
0.973
0.996
0.781
0.595
Recuvered proportion
0.970
0.993
0.994
0.992
0.988
0.985
0.999
0.983
0.989
Full grafted performance. We evaluate the quality of the localized regions by the grafted performance. For the i-th task, we only add up the localized regions the task vectors back to the pretrained model, i.c., ppre + 7/4 3 Tj. The results with a localization region of 1% is shown in Tables 7 to For almost all tasks, using only the tiny localized region recovers nearly 99% of the finetuned performance. For GPT2-XL, the performance is slightly worse because cannot use the evaluation data for the localization step. However, the results are still strong even with surrogate datasets with similar purposes, demonstrating the flexibility and robustness of our algorithm. Overall, this shows that our localization approach is effective in locating regions containing essential skills acquired during finetuning, and the localized regions can be viewed as compact representations of the finetuned models.
Effect of data availability, Similar to Figure 7 we plot the same trend of our method across various data availability scenarios with localization regions of 1% on the vision tasks well (Figure 11]. We can still
19

---

Published in Transactions on Machine Learning Research (12/2024)
SST-2
7.00%
SST-2
35.00%
CR
30.00%
6.00%
MR
MPQA
25.00%
MPQA
5.00%
TREC-
20.00%
SUB]
QNLI
15.00%
SNLI
QNLI
33.0%
MNLI
10.00%
RTE
MNLI
MRPC
5.00%
RTE
-2.00%
QQP
MRPC
-1.00%
Attention quaryy
Attention Kny
Attention valuee
Attention HLP
Attention LayerNerm
intermediate MLP
Output MLP
Outmut LayerNom
QQP
Layer 10 Layer 11
Layer 12
Layer
Layer
Layer
Layer
Layer
Layer
Layer
Layer
Layer
(a) Distribution localized regions different network (b) Distribution of localized regions different network components for language tasks in the RoBERTa-bas
layers for language tasks in the RoBERTa-baa base model. model.
3.50%
Instruction
20.00%
Instruction
3.00%
15.00%
2.50%
Truthfulness
10.00%
Truthfulness
2.00%
Science
-5.00%
1.50%
1.00%
Attention Layentom
Attention
Attention MLP
Output Layertiom
Internediate MLP
Output MLP
Science
0.50%
9 13 17
45
(c) Distribution of localized regions in different network (d) Distribution of localized regions in different network layers for language tasks in the GPT2-XL model.
components for language tasks in the GPT22XL model.
SUN397-
3.00%
SUN397
Cars
8.00%
Cars
2.50%
RESISC45
RESISC45
EuroSAT
6,00%
EuroSAT
2.00%
SVHN
GTSRB
-4.00%
SVHN
1.50%
MNIST
-2.00%
GTSRB
1.00%
DTD
MNIST
Attention LayerNorm
Attention input MLP
Attention output MLP
MLP LayerNorm
Emh Embedding MLP
Projection MLP
0.50%
DTD
Layer
Layer
3
Laver-4
Layer 5
Layer 6
Layer
Layer B
Layer g
Layer 10
Layer 11
Layer 12
(e) Distribution of localized regions in different network (f) Distribution of localized regions in different network layers for vision tasks.
components for vision tasks.
Figure 10: The localized regions are predominantly found in the LayerNorm parameters, while different tasks are associated with different layers. The percentages represent the proportion of localized parameters in each component.
20

---

Published in Transactions on Machine Learning Research (12/2024)
Average merged accuracy
0.82
0.80
0.78
0.76
0.72
Localize stitch (1%)
Dataless localize and stitch (5%)
0.70
2
2
24
2
2
2
2a
2
Number of data per class
Figure 11: Merged performance versus available data vision tasks.
see the clear pattern that the performance monotonically increases with more data available, and does not show saturation even with 512-shot data. In addition, with 8-shot data, the performance of localization improves over the dataless version, the same observation as in langnage tasks.
Table 11: Runtime for algorithms requiring data.
Table 10: Runtime for dataless algorithms.
Method
Runtime (s)
Fisher Merging
293.33
Method
Runtime (s)
Task arithmetic (tuned)
6562.14
Simple averaging
189.17
TIES- TIES-Merging (tuned)
24042.43 43
Task arithmetic
186.32
RegMean
22987.5 .54
TIES-Merging
350.47
AdaMcrging
81326.57
Dataless Localize-and-Stitch
304.85
Consensus TA
7361.52
Consensus TIES
26042.43
Localize-and-Stitch
5130.05
Runtime. We compare the runtime of Localize-and-Stite and other baselines. We divide the algorithms fall in both
into two categories: dataless and requiring data. Note that task arithmetic and TIES-Merging categories, with the difference of whether performing hyperparameter tuning (scaling factor for both, and sparsity for TIES). For the hyperparameter tuning, we follow the common practice in [hharco et al. (022);; Yadav et al. (023) to grid search over (0.1,022... ... .1} for the scaling factor and {0.1, 0.2, 0.3} for the sparsity.
We report the runtime Tables 10 and for merging twelve NLP tasks with RoBERTa- base. For the dataless algorithms, simple averaging and task arithmetic are very efficient, as they only involve arithmetic operations the weights. Both TIES and our dataless version requires sorting the task vectors get the top-k% largest elements, the runtime is slower. Compared with TIES, we do not have the step for resolving sign conflicts, it takes less time. For algorithms requiring data, Fisher merging is the most efficient, as it uses diagonal estimate of the Fisher information matrices with little data (256 per task). Both task arithmetic and TIES-Merging show substantial time increase, as they need to do grid search on 9 and 27 hyperparameterss respectively as well as evaluating on the validation data in each run. AdaMerging takes significantly more runtime to execute compared with others, and the reason could be that entropy minimization converges slowly, as we observe that AdaMerging requires around 500 epochs to converge. Compared with other algorithms, Local iieezzzee und-Stitch executes in relatively short amount. of time, showing its effectiveness.
21

---

Published in Transactions on Machine Learning Research (12/2024)
C
Comparison between Dataless Localize-and-Stitch and TIES-Merging
Due to the similarity of the dataless version of our approach with TIES- Merging compare them in detail.
Yaddv et al. 2023 we
Table 12: Accuracy (1F comparison of Dataless Localize-and and TIES on language tasks.
Tosk
S
CR
MR
MPQA
TREC
SCBJ
QNLI
SNLI
MNLI
RTE
MRPC!
QQP
Average act/F]
Localixe-titchh (5%)
0.909
0.907
0.864
0.821
0.690
0.688
0.837
0.993
TIES (5%)
0.858
0.837
0.822
0.712
0.142
0.290
0.467
0.191
0.271
0.438
0.743
0.358
0.510
TIPS (209))
0.791
0.600
Table 13: Accuracy comparison of Dataless Semelize-and-Stieee and TIES on vision tasks.
Task
SUN397
Cars
RESISC45
FuroSAT
SVHN
GTSRB
MNIST
DTD
Average
Dataless Locallze-Stitch (5%)
0.609
0.617
0.768
0.716
0,817
0.726
0.973
0.576
0.740
TIES (5%)
0.520
0.552
0.689
0.683
0.874
0.606
0.982
0.480
0.671
(20%)
0.598
0.983
0.542
0.725
The first step of both algorithms is similar: select the top-k% largest positions in the task vector. The primary difference lies in the selection threshold: Dataless Localize-and-Stitae selects the top-5% while TIES selects the top-20%. However, as shown in Section 3.1 we find that when localized region already contains sufficient task-specific knowledge, including more parameters only introduces more lask interference. This observation could partially explain our superior performance. However, this is not the only limitation in TIES, reducing the threshold in TIES to be 5% does not yield improved performance demonstrated in Tables 12 and 13
In the subsequent merging step, Dataless awralize-and-Stttee can be viewed as a simplified version of TIES. When dealing with overlap for the localized regions, Dataless Localize-and-Stitad simply averages the parameters these overlapping area. On the other hand, TIES first sums positive and negative parameters separately at each overlapping position, and determines the dominant sign based their total magnitudes, a process akin to weighted majority vote. Then, TIES only keep the parameter values that aligus with the elected sign, and compute the mean.
Proportion arrong overtapped parametors
0.35
Average merged accuracy
0.66
0.30
0.64
0.25
0.62
Dataless Localize-ane Saalizeeand-Sttchhh
0.2
0.60
TIES-Merging
0.58
Simple averaging
0.15
0.56
0.10
0.05
0.52
0.00
0.3
2
10
12
Sparsity level
Number of tasks occupying the same parameter
Figure 12: When merging 12 NLP tasks with top- 20% selection in TIES, most overlapping regions only involve 2 or 3 tasks. This the regime where the sign election process in TIES is less effective in.
Figure 13: When dealing with two conflicting tasks, the sigu election slage of TIES is not effective. The performance of TIES consistently worse than simple averaging all parameters.
This approach by TIES might be more advantageous when overlapping regions involve a larger number of tasks. The rationale that with more tasks contributing to an overlap, the process of sign determination and selective averaging may more accurately capture the consensus of task vectors for all tasks as a whole. However, when only two tasks are involved (which is often the case as shown in Figure 12h. TIES may only retain param- eters predominantly from the task with the larger magnitude at each position. Tn such scenarios, important.
22

---

Published in Transactions on Machine Learning Research (12/2024)
parameters for both tasks could be alternately ignored, potentially degrading performance for both tasks. This selective process might, therefore, impair the overall efficacy in maintaining crucial task-specific information, particularly in tightly contested regions. We demonstrate this in Figure 13 where we use the same example of confficting tasks as in Section 3.1 i.c., QNLI and MNLI. When merging models on two conficting tasks, the per- formance of TIES is siguificantly worse than simple averaging on all model parameters across all sparsity levels.
D Comparison between Local and Consensus Merging
Given the similarity of our approach with Consensus Merging (Wang et al. 2024b we compare them in detail. In T we have demonstrated Localize-and-Stiie has superior performance, and we provide further empirical analysis as follows.
Localization arca. Our method is able to localize as little as 1% of total parameters, compared 20% required by (Wang et al. 2024b). Our small localized regions lead to less lask interference, better multi-task performance and much better compression rates. In Consensus Merging, the sparsity is controlled by the hyperparameter A, which is chosen among {0.2, 0.3, 0.4, 0.5, 0.6}. Note that is not directly used as the sparsity, rather, it serves as scaling factor to determine the magnitude threshold for localization, as shown in Equation (5) in [Wang et al. 2024b). Intuitively, a larger imposes a stricter threshold, resulting in a smaller localized region. We present the resulting average sparsity corresponding to each choice of in Table 14 While the resulting sparsity might vary depending on the specific tasks and models, we find that all choices of À lead to average sparsity of al. least 25%, which is substantially larger than the 1% sparsity achieved by our localization method.
Table 14: Correspondence between À and sparsity.
X
Average sparsity (language)
Average sparsity (vision)
0.2
0.4977
0.5071
0.3
0.4316
0.4144
0.4
0.3864
0.3456
0.5
0.3544
0.2939
Ablation sparsity. Similar to Appendix[[] we provide an ablation study to demonstrate that the superior performance of our method is not only due to the sparsity, but also the effectiveness of our localization approach. To achieve the same sparsity level of 1% as our method, we find that we need to set the sparsity hyperparameter À in (Wang et al.) 2024b) to be at least 0.95. This value falls significantly outside the range of the hyperparameter space they consider, indicating that TALL masks are unlikely to perform well when used identify regions this small. Indeed, our experiments in Table [5] confirm that TALL masks with 1% sparsity yield poor performance on both vision and language benchmarks. This further illustrates the effectiveness of our localization approach in identifying tiny regions containing essential information, contributing to reduction of task interference and substantially better compression rates.
Table 15: Comparison with Wang et al. 2024bb at the same sparsity level.
Method
Sparsity
Average language ace
Average vision ace
Consensus TA
1%
0.477
0.518
Consensus TIES
1%
0.463
0.524
Dataless localize-ande and-Stitch
5%
0.734
0.740
Localize-and-Stii
1%
0.759
0.799
Runtime comparison. The larger runtime observed (Table II for Consensus TA compared to our method is primarily due to its extensive hyperparameter tuning process. Take merging vision models as an example, for the formulation of (Wang et al. 2024bb, the hyperparameter tuning process as follows: i) Tune sparsity for all tasks, which requires 40 evaluations for 5 choices of on tasks. ii) Tune scaling factor, which requires
23

---

Published in Transactions on Machine Learning Research (12/2024)
88 evaluations for 11 choices of on 8 tasks. In total, there are 128 fask-specife evaluations required to select the two huperporamelers following Appendix A.2 in (Wang et al. 2024b), which we find very time-consuming in practice. In contrast, our algorithm does not require hyperparameter tuning. It operates by training on 8-shot data for 10 epochs, a process we find highly efficient.
Furthermore, hyperparameter tuning, particularly for scaling factors, has been shown to greatly influence model merging performance, making methods like Consensus TA sensitive these choices as highlighted in (Tam et al. 2024). On the other hand, our method avoids these complexitics, offering more efficient and robust approach that enhances performance consistency.
E Details on localization
Here, detail the skill attribution method in Panigrahi et al. (2023) and explain the difference with our formulation. Panigrahi et al. (2023) aims to localize task-specific skills contained in finetuned language models. They introduce model grafting, where for given pretrained and finetuned model parameters Opre and la, they graft parameters of On the region y onto the pretrained model as
0n(() = 7 On + (1 7) @ pre
With the grafting operation, they find the localized region with the following optimization procedure, where they essentially find the region leading to the best grafted performance.
arg min L @ On + (1 - 7) @ pre)
(6(0.1) 7l1.S.
They also use reparametrization of the binary mask 7 as the sigmoid of real-valued vector S, and reformulate the problem as
arg min l 2 On + +(1 (1--7) (1- Ppre):
SERd
Those 2 (1 - (S)) + (1 Thase) 2 (S),
(3)
where Thase is the top-k% largest elements in the task vector. This serves as an inilialization for the optimization. In comparison, our formulation is as follows
S, arg min l, (Opre + ( (| SER"
There are two main differences between the formulations. Firstly, our formulation of S is more straightforward, we directly have 7 (S). In contrast, S in Equation serves selector of whether to take the value from "Bsse leading to more complex computation. Secondly, our approach uses the L1 constraint to control the sparsity in a more fino-grainod manner, while Equation does not have this constraint, and the authors control the sparsity via early stopping.
Table 16: Accuracy (1F1) comparison of localization methods on RoBERTa-base models on twelve language tasks,
Thik
S8T-2
CR
MPQA
TREC
SUBJ
QNLI
SNLJ
MNL.1
RTE
MRPC!
QQ2
Averae aoc/F1
Singlettakk Eneetmed
0.898
0.894
0.844
0.548
0.935
0.051
0.761
0.791
0.706
0.643
0.786
0.716
0.811
Single-task grafted (Ours)
1.897
0.84
0.383
0.751
0.703
0.639
0.745
0.7118
0.804
Singh-laok gralted [Panigrahi
0.002
0.008
0.862
0.551
0.884
0.825
0.752
0.756
0.676
0.643
0.757
0.683
0.901
Mergad (Chrr)
0.896
0.886
0.849
0,828
0.782
0.820
0.734
0.621
0.590
0.633
0.520
0.651
0.759
Minged
Panigrabi et
2025
0.807
0.865
0.847
0.31
0.816
0.805
0.727
0.649
0.580
6.633
0.819
0.656
0.763
We present the performance comparison of the two localization methods in Tables 16 and 17
In both cases, our approach with Equation (1) outperforms Panigrahi et al. (2023). The performance may come from the fact that Panigrahi et al. (2023) use early stopping to control the sparsity, which results in incomplete optimization for the masks. We also report the merged performance by following the same stitching process. On the language tasks, the performance is similar, while on the vision tasks, our localization leads to better merged performance.
24

---

Published in Transactions on Machine Learning Research (12/2024)
Table 17: Comparison of localization methods on CLIP ViT-B/32 models on eight vision tasks.
Task
SUN397
Cars
RESISC45
EuroSAT
SVIN
GTSRB
MNIST
DTD
Average
Single-task finetuned
0.753
0.777
0.961
0.997
0.975
0.987
0.997
0.791
0.905
Single-task graßtd (Ours)
0.731
0.772
0.955
0.989
0.963
0.973
0,996
0.781
0.895
Single-task grafted Panigrahi et al.
2023
0.731
0.750
0.935
0.959
0,929
0.932
0.976
0.753
0.871
Merged (Ours)
0.672
0.683
0.818
0.894
0.879
0.866
0.948
0.629
0.799
Merged Panigrahi et al.
2023
0.609
0.678
0.798
0.861
0.846
0.826
0.919
0.653
0.781
F GPT2-XL experiment details
For the experiments in Section 4.3
use the following three checkpoints from Hugging Face:
Onlydrinlwwatrr/gp22111aaa _athe__________ 5200522011011 10base
Nachnett/gpt2xx1-alpee
They are all finetuned on the original release of the GPT2-XL model opena--commuitt//gp22--1 The selection of the three models and associated tasks is result of extensive evaluation process. After testing dozens of finetuned GPT-2XL checkpoints, we establish specific criteria ensure the relevance and rigor of our experiments: The checkpoints should
be fully finetuned instead of PEFT,
have well-defined and evaluable downstream task,
perform noticeably better than the pretrained model on its respective task.
We find that most finetuned checkpoints do not meet the last criterion, which is crucial for substantiating the benefits of our merging method. Consequently, the three models and tasks combinations chosen best satisfy all three criteria, making them the most appropriate for our purposes.
G Datasets
Vision datasets Following the practice in Tharco et al. 2023
the following 8 datasets for the
vision part of our experiments:
SUN397 Xiao et al. 2016 The Scene UNderstanding dataset contains 108,754 images of 397 classes.
Stanford Cars Krause al. 2013) The Stanford Cars dataset contains 16,185 images of 196 classes of cars.
RESISC45 (Cheng et al.
2017). The REmote Sensing Image Scene Classification dataset contains
31,500 images, covering 45 scene classes.
2019 The EuroSAT dataset consists of 10 classes with 27000 labeled and geo-raferenced samples. Each class represents different land use and land cover.
EuroSAT Helber al.
SVHN (Netzer et al. 2011). The Street View House Numbers dataset contains 600,000 digit images in 10 classes of printed digits cropped from pictures of house number plates.
GTRSB (Stallkamp al. 2011). The German Traffic Sign Recognition Benchmark contains 43 classes of traffic signs with more than 50,000 images.
25

---

Published in Transactions on Machine Learning Research (12/2024)
MNIST LeCun al. 2010
The MNIST dataset contains 60,000 training images and 10,000 testing images of 10 handwritien digits.
DTD (Cimpoi et al. 2014). The Describable Texture Dataset contains 5,640 texture images in the
wild with 47 classes.
SUN397, RESISC45 and DTD are under the Creative Commons AttibutionnShaareAliie 4.0 International License. Stanford Cars is under the ImageNet License. EuroSAT is under MIT License. MNIST is under Gnu General Public License. GTRSB and SVHN are under CCBY-SA License.
Language datasets Following the practice in Panigrahi et. al. 2023 we use the following 12 dalasets for the language part of our experiments. The majority comes from the GLUE benchmark (Wang et al. 2018).
SST-2 (Socher al. 2013). The Stanford Sentiment Treebank is sentiment analysis dataset, which contains sentences from movie reviews and human annotated binary sentiments.
CR (Hu & Liu 2004). The Customer Review dataset consists of customer reviews on e-commerce products with binary sentiment labels.
MR (Pang & Lee 2005). The Movie Review dataset consists of movie reviews with binary sentiment
labels.
MPQA Wiebe et al. 2005 The Multi-Penspective Question Answering dataset contains news articles and text documents manually annotated for opinions and other private states including beliefs, emotions, sentiments, etc. Here, we use it for binary sentiment classification.
TREC VVorhhes et al. 1999. The Text REtrieval Conference (TREC) dataset contains 6k questions phrased by users and categorized into small number of categories. The task is to classify the questions into these categories.
SUBJ Pang & Lee 2004). The SUBJectivity dataset contains 10k movie reviews with an annotation of whether the review describes something subjective or objective about the movie.
QNLI (Wang et al. 2018). The Question-answering NLI dataset converted from the Stanford Question Answering Dataset (SQuAD) (Rajpurkar et al. 2016), which contains questions and the paragraphs that contain the answer to the corresponding questions. QNLI converts SQuAD into sentence pair classification by forming pair between each question and each sentence in the corresponding context, where the task is to predict whether the context contains the answer to the qucstion.
SNLI Bowman et al. 2015). The Stanford Natural Language Inference datasot contains 570k sentence pairs manually labeled entailment, contradiction or neutral.
The Multi-Genre Natural Language Inference Corpus is collection of 433k sentence pairs annotated with textual entailment information.
MNLI Williams el al.
2017
RTE (Wang et al. 2018 The Recognizing Textual Entialment dataset contains a series of textual entailment challenges, including RTE1 (Dagan et al. 2005), RTE2 (Haim al., 22066), RTE3 (Gi ampiccolo al. 2007 and RTE5 (Bentivogli al. 2009) The neutral and contradiction classes are combined into entailment class.
MRPC Dolan & Brockett (2005). The Microsoft Research Paraphrase Corpus consists of sentence pairs from online news sources, with human annotations of whether the sentences in the pair are semantically equivalent. Since the classes are imbalanced, we report the Fl score.
QQP [yer et al.). The Quora Question Pairs dataset consists of question-answer pairs from the website Quora. The task is to determine whether two questions semantically equivalent.
26

---

Published in Transactions on Machine Learning Research (12/2024)
CR, RTE, MRPC, QQP, QNLI are under CCBY-SA License. MRPC is under Microsoft Research License.
MNLI is under OANC's License. SNLI is under Creative Commons AttributionSShareAlii 4.0 International License.
GPT datasets
We introduce the datasets used for GPT2-XT experiments.
2021 The Massive Multitask Language Understanding measures knowledge in 57 subjects across STEM, humanitics, social science, etc.
MMLU (Hendrycks et al.
ARC (Clark et al. 2018 The A12 Reasoning Challenge dataset contains 7,787 grade-school level, multiple choice science questions.
TruthfulQA [in et al. 2021 The TruthfulQA datasct mcasure whether a model truthful comprises 817 questions spanning 38 categories, including health,
generating answers to questions. law, finance, etc.
Alpaca Taori et al.
2023 The Alpaca dataset contains 52,000 instruction-followeee examples.
The Grade School Math 8K dataset contains 8,500 high quality grade school math problems created by human problem writers. The problems take to 8 stpes to solve.
GSM8k (Cobbe al.
2021
HotpotQA Yang el al. 2018 The HotpotQA datasel is a question answering dataset featuring
multi-hop questions.
ARC is under CC BY-SA License. TruthfulQA and Alpaca are under Apache License 2.0. MMLU and GSM8k are under MIT License. HotpotQA is under CC BY-SA 4.0 License.
Implementation details
The experiments are run on NVIDIA RTX A6000 GPUs with 48GB memory.
Finetuning. For the experiments on RoBERTa-base, we perform the finetuning process following the same procodure as Panigrahi
al. (2023). Specifically, we use a batch size of and Icarning rate of 2c-5 finetune on each of the language lasks for 10 epochs with the SGD optimizer. For the experiments CLIP VIT, we directly use the finetuned checkpoints provided in Ilharco et al. (203) with the data preprocessing step provided in (Yang et al. 2023) The finctuned models in the GPT2-XL experiments in provided in Appendix
Localization. Following the practice in Panigrahi et al. 2023) in the localization step, we initialize the trainable real-valued vector S as the mask for top-A% largest entries in the task vector. Since the actual map is rounded from (S) but not S, we choose the initial values of to be either 0 3, as (3) is sufficiently close to 1. To achieve sparsity level of 1,, we the learning rate 1e7, batch size 16, La regularization factor A 1e-5 and perform the optimization for 10 epochs 64-shot data from each task. Following common practice in Panigrahi et al. (2023); Yadav et al. (0023 we only perform localization in the transformer blocks, and do not consider embedding layers.
Baselines. We use both task arithmetic and TIES- TIES-Merging in a dataless manner, meaning that we directly use their recommended hyperparameters without luning it. To be specific, for task arithmetic, the recommended scaling factor 0.4. For TIES-Merging the recommended scaling factor is 1 and sparsity level 20%. This ensures fair comparison with Dataless Localize ieaalizeeaddd- and-Stitch. which also apply fixed sparsity level across all experiments, namely 5%.
27


Reviews:
[{"review_id": "VQ8P5UJkYW", "reviewer": "Reviewer_Qb5Q", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths** \n\n* The highlighted problem is valid and the proposed method is intuitive, easy to understand and simple to implement making it easily applicable in many scenarios.\n* I quite like the way the paper is written. The authors do a good job of highlighting the analysis and the logic behind their formulation of the `Localize-and-Stitch` method.\n\n\n**Weaknesses**\n\n***Disjointedness of localized parameters across tasks***\n\n* The goal of the work is to avoid task interference. The idea is to localize task vector parameters to a very small subset of parameters. \n* While I understand that the objective mentioned in Equation 1 should achieve the sparsity effect in the resulting task vector, the paper lacks a solid analysis of how the generated sparse task vectors are relatively disjoint between tasks.\n* Some analysis in this direction is present in Figure 4 of the paper. But \n\na) how conceptually similar/different are the datasets/tasks analysed in this Figure? Also, \n\nb) how does the cosine similarity heatmap of Figure 4b compare with a similar heatmap from other task vector/model merging methods?\n\nc) In the experiments section, you could create subsets of fine-tuned datasets from Table 4 (say) where some of the dataset subsets have higher conceptual overlap and some have lower. Compare in these 2 settings to highlight the win from this paper.\n* In a nutshell, I am trying to say that if avoiding task interference is the goal, the analysis and experiments on the method should highlight that the goal is achieved.\n\n\n***Model Merging and Continual Learning***\n\n* Model merging and continual learning genres of work have very similar goals, i.e., for a model to be performant at several fine-tuned tasks together. Continual learning does the fine-tuning sequentially (continually) whereas model merging does it often together with multiple individually fine-tuned models.\n* I appreciate the paper's highlighted point on a comparison with continual learning methods.\n* The paper can also go a step further and:\n\na) include CL baselines as competitive baselines with the model merging ones it already mentions in Table 5. This would give a bigger picture view on the relative performance benefits/drawbacks of both genres of methods.\n\nb) Specify the pre-trained performance of the final model (merged model I mean) on tasks it wasn't fine-tuned on, highlighting how much of the pre-trained knowledge it forgot as a result of fine-tuning + model merging. Achieving excellent performance on forgetting is a stretch goal for this paper, but nonetheless these insights are important to highlight for the community's benefit.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "In the pre-training fine-tuning paradigm, model merging has emerged as a promising approach to multi-task learning with the goal of obtaining fine-tuned performance on multiple downstream tasks. However, most existing model merging methods use all the parameters of the pre-trained/fine-tuned model which can lead to task interference. \n\n* As a solution to this problem, the paper proposes a model merging method, `Localize-and-Stitch` as an improved approach.\n* The paper first proposes a method to find localized (`localize`) parameters within the fine-tuned neural network which contribute the most to fine-tuned performance. It does this by making a modified formulation of Panigrahi et al. (2023) to train a real-valued vector $S$ over all model parameters to mask the task vector for task $i$, $\\tau_i$, with the minimum possible number of parameters.\n* The proposed method then combines (`stitch`es) the sparse task vectors into a single model claiming to obtain multi-task performance while minimizing interference at the same time.\n* Through experiments on both vision and language benchmarks, the paper shows the benefits of the proposed method and highlights additional benefits.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Please see the **Weaknesses** section above. I have tried to mention possible experiments and analyses which should make your work more foolproof.", "broader_impact_concerns": "None", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "LvxYYqPk3i", "reviewer": "Reviewer_x7BD", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "## Strengths \n* The motivation behind the proposed method, along with its distinction from prior work, is thoroughly discussed and supported by experiments.\n* The method is evaluated across multiple models in both language and vision domains.\n* The ablation studies effectively explain the method's success, and additional experiments in the Appendix, such as runtime comparisons, further enhance the completeness of the paper.\n\n## Weaknesses \nThe reviewer did not find any major weaknesses in the paper. One suggestion is that the proposed method, particularly the localization step, bears a strong resemblance to prior work on model pruning (e.g., [1][2]). It would be valuable to discuss this relationship, as it may reveal opportunities for future work and potential improvements to the method\n\n[1] Sanh et al; Movement Pruning: Adaptive Sparsity by Fine-Tuning.\n\n[2] Zhang et al; PLATON: Pruning Large Transformer Models with Upper Confidence Bound of Weight Importance.\n[2]", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper addresses the model merging problem, aiming to leverage a pre-trained model across multiple downstream tasks. The proposed method, Localize-and-Stitch, tackles this by first identifying task-specific important but sparse parameters through importance training, and then stitching these parameters together. Extensive experiments across both language and vision tasks demonstrate the approach's effectiveness. Additional ablation studies including visualizations of localized regions and Jaccard Index comparisons, further validate the method's success.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "None", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "dRw2E1B8L6", "reviewer": "Reviewer_aS31", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1. This paper proposes a simple yet effective method to merge multiple fine-tuned models into a unified model and the proposed method can be effectively applied in scenarios with or without validation data.\n2. Extensive experiments are conducted on vision and language domains to demonstrate the effectiveness of the proposed method.\n\nWeaknesses:\n1. The proposed method shares similarities with the approach in [1] that localizes and merges the task-specific information. Thus, it would be beneficial to discuss and compare with it in the paper.\n2. Although reducing task conflicts, the performance of merged models using the proposed method is still largely behind that of single-task fine-tuned models, indicating there may be additional challenges in model merging that go beyond task interference. [2] proposes to inject task-specific knowledge into the merged model to alleviate the performance deterioration problem. It would be interesting to discuss with it in the paper.\n\n[1] Wang et al. Localizing Task Information for Improved Model Merging and Compression. ICML, 2024.\n\n[2] Jiang et al. BYOM: Building Your Own Multi-Task Model For Free. arXiv:2310.01886, 2023.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper introduces \"Localize-and-Stitch,\" an innovative model merging approach that efficiently combines the strengths of multiple fine-tuned models into a unified model while preserving their specialized capabilities. This method addresses the issue of task interference common in global model merging by identifying and merging only essential skill regions within fine-tuned models. Evaluated across various vision and language benchmarks, \"Localize-and-Stitch\" outperforms existing methods under different data availability scenarios.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. Adding a discussion with [1] and comparing it in the experiments, since the method [1] is related to the proposed method in this paper.\n2. Adding a discussion with [2], which is about the performance deterioration problem of merged models.\n\nPlease refer to Weaknesses for details.", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Meta-review: The paper considers the problem of merging multiple models, fine-tuned from the same pretrained model, each on a specific downstream task. The goal is to efficiently merge the fine-tuned models into a single multi-task model that will perform well on all the tasks. 
Most existing model merging methods merge models globally across all parameters, which can lead to task interference.
The authors propose a new model merging approach called Localize-and-Stitch to address this issue. The proposed method identifies in each fine-tuned model, a small (1% of the total parameters) localized region  important for the corresponding downstream task, then adds the average of these localized regions back into the pretrained model. The localization method used is based on that of [Panigrahi et al., 2023], with some modifications which improves over it. Experiments show superior performance over existing methods, on both vision and language benchmarks, under different data availability scenarios.

Strengths:
- The paper is well written, with a clear motivation, and presentation of the proposed method and its relation to prior work.
- The problem studied is important
- Proposed method is simple to implement and outperforms existing model merging method. Choosing very sparse regions from each fine-tuned model also leads to advantages beyond multi-task performance, namely better model compression, task interpretability, and preservation of pretrained knowledge. 
- Claims are well supported by experiments on both vision and language benchmarks, and ablation studies effectively explain the method's success.

Weaknesses:
- the performance of merged models using the proposed method is still behind that of single-task fine-tuned models
- a more detailed comparison with the related work [1] is needed.

All reviewers recommended to accept the paper and weakly recommended it for the ICLR Journal-to-Conference Track. The authors have addressed in their responses the reviewers' concerns. My main concern was about the big similarity between the proposed method and that of [1]. The authors provided some experimental results showing that their method outperforms that of [1]. 
Hence, I am recommending to accept this paper with minor revision.

[1] Wang et al. Localizing Task Information for Improved Model Merging and Compression. ICML, 2024.


Requested revisions: 
- add the results on tasks with different conceptual overlap and the results of the additional baseline of continual training, from the response to Reviewer Qb5Q. 
- comparison with the method in [1]:
	- Discuss the difference between your method and [1] (beyond just the advantages of your method highlighted in the response to Reviewer aS31) 
	- Add the method of [1] as a baseline in all the experiments in the paper.  
	- Include the ablation study you provided where you select $\lambda_t$ in [1] to achieve $1\\%$ sparsity for all task masks
	- Include the explanation you provided on why Consensus TA has a larger runtime than your method.
- Include the discussion about reference [2] from the response to Reviewer aS31.
- Specify the performance metric in all the results tables and figures.
- Add a discussion of the relation between localization and pruning (beyond the comment in your response to Reviewer x7BD). Note that most pruning methods can be easily adapted to the localization setting. 

- Add a discussion of related work on merging models trained on the same task with different training configurations, such as (and many others):
	- Sidak Pal Singh and Martin Jaggi. Model fusion via optimal transport. Advances in Neural Information Processing Systems, 2020.
	- Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git Re-Basin: Merging Models modulo
Permutation Symmetries. In International Conference on Learning Representations, 2023.
	- Jolicoeur-Martineau, A., Gervais, E., Fatras, K., Zhang, Y., & Lacoste-Julien, S. (2023). Population parameter averaging (papa). arXiv preprint arXiv:2304.03094.
	
Suggested optional revisions that would strengthen the paper:
- As stated in [1], since their method operates on the multi-task vector, it can be combined with any model merging method. It would be interesting to include the combination of your method with that of [1] as another baseline in your experiments.
- Compare your localization method with some SOTA pruning methods (beyond the very simple top-k baseline) adapted to localization setting. This has the potential of improving your method!
Decision: Accept (poster)