TL;DR
This paper introduces TIES-MERGING, a novel method for combining multiple fine-tuned models into a single multitask model. By addressing parameter interference, specifically redundant values and sign conflicts, TIES-MERGING significantly outperforms existing methods across various tasks and modalities, leading to better performance and generalization.
What Problem Does This Paper Address?
The widespread success of transfer learning has led to a plethora of task-specific fine-tuned models. While these models excel at their individual tasks, they often operate in isolation, failing to benefit from each other. Model merging techniques offer a way to combine these models into a single, more capable multitask model without costly retraining. However, existing methods often overlook crucial "interference" between model parameters. This interference, arising from redundant parameter updates and conflicting sign directions across models, can lead to significant performance degradation, especially when merging many models. The authors aim to tackle this interference to create more effective and robust merged models.
Methods
The core contribution of this paper is the TIES-MERGING (TrIm, Elect Sign & Merge) algorithm, which introduces three key steps to mitigate parameter interference:
- Trim: This step addresses interference from redundant parameter values. For each task's fine-tuned model, a "task vector" is computed (representing the changes from the original pre-trained model). TIES-MERGING trims these task vectors by retaining only the top-k% most influential parameter updates (based on magnitude) and setting the rest to zero. This effectively filters out minor, potentially noisy updates.
- Elect Sign: This step tackles interference from conflicting parameter signs. After trimming, for each parameter, the algorithm determines the most frequent or dominant sign across the task vectors. This "elected sign" represents the consensus direction of change for that parameter.
- Disjoint Merge: Finally, the algorithm merges the parameter values. It only considers parameters from models whose task vectors align with the elected sign. The final merged parameter is the average of these aligned values. This ensures that conflicting signs don't cancel each other out and that only influential, consistently-signed updates contribute to the merged model.
The authors also explore using an "oracle sign vector" derived from a multitask model to further improve performance, highlighting the importance of accurate sign estimation.
Datasets
The paper evaluates TIES-MERGING across a wide range of datasets and tasks, including:
- NLP: Datasets for sentence completion (COPA, H-SWAG, Story Cloze), natural language inference (ANLI, CB, RTE), coreference resolution (WSC, Winogrande), word sense disambiguation (WiC), question answering (QASC, WikiQA, QuaRTz, Cosmos QA, Social IQA, QuAIL), and paraphrase identification (PAWS).
- Vision: Datasets for image classification such as Cars, DTD, EuroSAT, GTSRB, MNIST, RESISC45, SUN397, and SVHN.
The authors leverage existing benchmarks and datasets, often using established splits and evaluation protocols from prior work on model merging and transfer learning.
Key Insights and Ideas
- Interference is a major bottleneck: The paper convincingly demonstrates that parameter interference, particularly from redundant updates and sign conflicts, is a significant reason why simple model merging techniques underperform.
- Trimming is crucial for magnitude: Removing low-magnitude parameter updates (redundancy) is essential for preserving the influence of genuinely important parameter changes.
- Sign matters more than you think: Resolving sign conflicts is critical. A parameter's direction of change can be more impactful than its magnitude when merging models.
- TIES-MERGING scales well: The proposed method shows consistent improvements across varying numbers of tasks, model sizes, and fine-tuning strategies.
- Estimating signs is key: The authors show that using an "oracle" sign vector (derived from a multitask model) can significantly boost performance, suggesting that better sign estimation is a promising avenue for future research.
Key Results
TIES-MERGING consistently outperforms several state-of-the-art model merging baselines, including Simple Averaging, Task Arithmetic, Fisher Merging, and RegMean.
- NLP: TIES-MERGING achieved an average improvement of 2.3% (T5-base) and 1.7% (T5-large) on in-domain tasks compared to the strongest baseline.
- Vision: Similar improvements were observed, with TIES-MERGING outperforming baselines by 1.8% and 1.5% on average for ViT models.
- Out-of-Domain Generalization: TIES-MERGING showed significant gains, improving performance by 1.0% (T5-base) and 4.4% (T5-large) on held-out tasks.
- Robustness: When merging multiple checkpoints of the same task, TIES-MERGING also demonstrated superior robustness.
- Hyperparameter Sensitivity: TIES-MERGING was found to be less sensitive to hyperparameter choices (like the scaling factor λ) compared to Task Arithmetic.
Limitations and Future Work
- Theoretical Understanding: The authors acknowledge the limited theoretical understanding of why weight interpolation works and its connection to mode connectivity, a limitation shared with existing merging methods.
- Multitask Training Gap: Merging individual task models still lags behind training a single multitask model from scratch.
- Sign Estimation: While TIES-MERGING resolves sign conflicts, using an "oracle" sign vector from a multitask model yields even better results. Future work could focus on developing more effective methods for estimating multitask signs without full multitask training.
- Domain-Specific Merging: The paper notes that it's not yet clear how to best select checkpoints for merging to create models optimized for specific domains.
- Initialization Dependence: The effectiveness of merging can depend on the common initialization of the models.
Summary updated