Introduction
The proliferation of foundational models has led to a wealth of specialized "expert" models—pre-trained architectures like ViT or BERT fine-tuned for specific niche tasks. While these experts excel in their respective domains, the practical challenge lies in consolidating their capabilities into a single, unified multi-task model. Traditional Multi-Task Learning (MTL) is often prohibitively expensive, requiring access to original centralized datasets and significant computational resources.
Model merging has emerged as a cost-effective alternative, attempting to combine the weights of multiple fine-tuned models directly. However, this approach frequently encounters the "interference" dilemma. Global-aware methods, such as Task Arithmetic, modify all parameters, leading to conflicting updates that degrade performance. Conversely, local-aware methods attempt to isolate specific parameters for each task but often fail to ensure these parameters function harmoniously within the global context of the merged model.
To address these challenges, we present Consensus-Aware Localized Merging (CALM). CALM is a novel framework designed to identify and extract localized information that is effective for a specific task while remaining in "consensus" with all other tasks, achieving performance that rivals traditional MTL without the associated costs.
The CALM Framework
CALM operates through a three-stage pipeline designed for efficiency, scalability, and performance.
1. Class-Balanced Entropy Minimization Sampling (CB-EMS)
A primary hurdle in model merging is the absence of original training labels. CALM utilizes unsupervised data to optimize the merging process. To avoid the pitfalls of standard entropy minimization—which often favors high-confidence, easy-to-classify samples and ignores difficult classes—CALM introduces CB-EMS. This method selects an equal number of low-entropy samples from each predicted class, ensuring that the "credible dataset" used for optimization is both representative and balanced across the entire label space.
2. Efficient-Aware Framework
Merging a large number of tasks sequentially can be computationally taxing. CALM employs a hybrid strategy to maintain scalability. Tasks are divided into two groups: a large set is merged rapidly using Task Arithmetic to form a "base" model, while a smaller subset of "sequential tasks" is integrated one by one using the core CALM optimization. This allows the framework to handle dozens of tasks with high efficiency.
3. Consensus-Aware Mask Optimization
The heart of CALM lies in its mask optimization strategy. For each sequential task, the framework learns a binary mask ($M$). This mask acts as a selector, determining whether to retain parameters from the existing merged model or to incorporate weights from the new task expert. Crucially, the mask is optimized to minimize loss across all currently integrated tasks. This "consensus-aware" approach ensures that the addition of new specialized knowledge does not disrupt the existing capabilities of the model, effectively finding conflict-free zones in the parameter space.
Experimental Evaluation
The authors evaluated CALM across diverse domains and architectures, including CLIP ViT-B/32, ViT-L/14, and RoBERTa-base.
- Computer Vision: The framework was tested on 8 classification tasks ranging from satellite imagery (RESISC45) and traffic signs (GTSRB) to textures (DTD) and house numbers (SVHN).
- Natural Language Processing (NLP): Evaluation spanned 12 tasks, including the GLUE benchmark, covering sentiment analysis, linguistic inference, and paraphrase detection.
Performance Results
In vision tasks using ViT-B/32, CALM achieved an average accuracy of 87.7%. This significantly outperformed established baselines like TIES-Merging (72.4%) and AdaMerging (80.1%). Most notably, CALM's performance closely approached the "upper bound" of Traditional MTL (88.9%), despite CALM not requiring full retraining or original data.
In the NLP domain, CALM consistently dominated other merging baselines. In specific instances, such as the RTE and MRPC tasks, the merged CALM model actually surpassed the performance of the individual fine-tuned expert models, suggesting a beneficial cross-task transfer effect.
Key Insights: Redundancy and Consensus
Analysis of the learned masks provided valuable insights into the nature of fine-tuned models:
- High Parameter Redundancy: CALM requires activating only 3.5% to 4% of parameters to integrate a new task effectively. This indicates that fine-tuned models possess significant redundancy, allowing multiple tasks to be "packed" into a single weight set if the selection is sufficiently surgical.
- Task Complexity: There is a direct correlation between task difficulty and parameter requirements. Complex tasks like SUN397 or DTD required a higher proportion of active parameters in the mask compared to simpler tasks like MNIST, validating the mask's ability to capture task-specific complexity.
- Optimization Efficiency: CALM is remarkably fast, reaching near-convergence in approximately 10 iterations (roughly 4 minutes on a single RTX 3090). This makes it significantly more practical for real-world applications than methods requiring hundreds of optimization steps.
Conclusion and Future Directions
CALM demonstrates that localized, consensus-aware parameter selection is a powerful tool for multi-task model merging. By minimizing interference and leveraging parameter redundancy, it offers a scalable path toward unified foundational models. While the framework showed a slight performance dip on highly complex texture datasets (DTD), future work aims to refine the optimization process for specialized domains and explore the application of CALM to large language models (LLMs) like Llama-3, where managing parameter interference is increasingly critical.
Summary updated