[Paper Review] TIES-Merging: Resolving Interference When Merging Models
Ties-Merging (TrIm, Elect Sign & Merge) merges multiple fine-tuned models by trimming redundant parameters, resolving sign conflicts, and merging only parameters aligned with the elected sign, outperforming existing merging methods across NLP and vision tasks.
Transfer learning - i.e., further fine-tuning a pre-trained model on a downstream task - can confer significant advantages, including improved downstream performance, faster convergence, and better sample efficiency. These advantages have led to a proliferation of task-specific fine-tuned models, which typically can only perform a single task and do not benefit from one another. Recently, model merging techniques have emerged as a solution to combine multiple task-specific models into a single multitask model without performing additional training. However, existing merging methods often ignore the interference between parameters of different models, resulting in large performance drops when merging multiple models. In this paper, we demonstrate that prior merging techniques inadvertently lose valuable information due to two major sources of interference: (a) interference due to redundant parameter values and (b) disagreement on the sign of a given parameter's values across models. To address this, we propose our method, TRIM, ELECT SIGN & MERGE (TIES-Merging), which introduces three novel steps when merging models: (1) resetting parameters that only changed a small amount during fine-tuning, (2) resolving sign conflicts, and (3) merging only the parameters that are in alignment with the final agreed-upon sign. We find that TIES-Merging outperforms several existing methods in diverse settings covering a range of modalities, domains, number of tasks, model sizes, architectures, and fine-tuning settings. We further analyze the impact of different types of interference on model parameters, and highlight the importance of resolving sign interference. Our code is available at https://github.com/prateeky2806/ties-merging
Motivation & Objective
- Motivate why merging task-specific fine-tuned models is desirable for multitask capabilities and generalization.
- Identify sources of interference during naïve model merging and quantify their impact.
- Propose and validate a three-step merging procedure (trim, elect signs, disjoint merge) to improve multitask performance.
- Evaluate Ties-Merging across modalities, model sizes, and fine-tuning regimes, including settings with and without validation data.
Proposed method
- Represent each task as a task vector tau_t = theta_ft^t - theta_init.
- Trim: retain only the top-k% magnitude values in each tau_t and reset others to zero.
- Elect: compute an elected sign gamma_m by taking the sign of the sum of trimmed task vectors across tasks.
- Disjoint Merge: for each parameter, average only those trimmed values whose signs match the elected sign, ignoring zero-valued entries.
- Merge by theta_m = theta_init + lambda * tau_m, where tau_m is the disjoint-mean vector formed from aligned signs.
- Compare against baselines such as Simple Averaging, Fisher Merging, RegMean, and Task Arithmetic across NLP and vision benchmarks.
Experimental results
Research questions
- RQ1Can interference between model parameters during merging be characterized and mitigated?
- RQ2Does trimming redundant parameters and resolving sign conflicts improve multitask performance when merging multiple fine-tuned models?
- RQ3How does Ties-Merging perform across modalities (language and vision), model sizes, and fine-tuning regimes (full vs PEFT) compared to existing methods?
- RQ4Is sign-resolution essential for maintaining or improving parameter magnitudes and task performance after merging?
- RQ5How robust is Ties-Merging when a validation set is unavailable during merging?
Key findings
- Ties-Merging consistently outperforms existing merging methods across NLP and vision tasks with and without a validation set.
- On in-domain evaluation, Ties-Merging averages a 2.3% absolute improvement in NLP and 1.7% in vision over strongest baselines.
- For out-of-domain generalization, Ties-Merging improves by 1.0% (T5-base) and 4.4% (T5-large) absolute over the strongest baseline.
- In the absence of validation data, Ties-Merging with a fixed recipe (top-20% trimming, lambda=1) still outperforms baselines like Task Arithmetic on vision and NLP tasks.
- Ablations show removing trimming, sign election, or the disjoint-mean components degrades performance, with scaling and disjoint-mean contributing notably to gains.
- Resolving sign interference is crucial: flipping directions of top-magnitude parameters can catastrophically reduce performance, underscoring the importance of correct sign estimation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.