TL;DR
This paper introduces the first unified theoretical framework for model merging based on $L_2$-stability theory, successfully resolving the paradox of why over-trained "expert" models suffer from catastrophic performance collapse when merged. By decoupling a merged model's risk into optimization and generalization errors, the authors derive precise quantitative scaling laws that accurately predict performance across different architectures, optimizers, and hyperparameters.
What Problem Does This Paper Address?
Model merging is a powerful paradigm that aggregates the capabilities of multiple task-specific, fine-tuned models into a single multi-task model. Crucially, it operates entirely in the parameter space, requiring no original training data and minimal computation.
Despite its empirical success, we lack a unified theory explaining why and when it works, especially when models are fine-tuned using different hyperparameters (e.g., varying learning rates or batch sizes). Practitioners often rely on Federated Learning (FL) theory to understand weight aggregation, but this creates a theoretical paradox. FL optimization theory implies that more local training steps ($K$) monotonically improve the model. In model merging, however, over-trained experts often cause the merged model's performance to catastrophically collapse.
This paper addresses this gap by showing that model merging is not just an optimization problem, but fundamentally a generalization challenge.
Methods
The authors pioneer the integration of $L_2$-Stability theory into heterogeneous model merging environments. This mathematical framework allows them to rigorously decouple the excess risk of a merged model ($\boldsymbol{x}_{\text{avg}}$) into two distinct components:
- Optimization Error ($E_O$): How well the model minimizes the empirical loss on the training data.
- Generalization Error ($E_G$): How well the patterns learned from training data generalize to unseen data.
By analyzing how hyperparameters affect both components, they establish a stability-based excess error bound. Crucially, they extend this framework beyond simple linear weight averaging to account for state-of-the-art non-linear merging algorithms (like TIES and DARE) by defining a general Sparsification and Consensus Operator. They also show how the theory generalizes from standard SGD to adaptive optimizers like Adam by modeling them as effective step-size vectors.
Datasets
The framework was evaluated using a massive empirical setup involving thousands of fine-tuned models across 20 diverse visual classification tasks:
- Standard Benchmarks: CIFAR-10, CIFAR-100, STL-10, MNIST, SVHN, EMNIST, KMNIST.
- Fine-Grained Recognition: Stanford Cars, Oxford Flowers102, Oxford-IIIT-Pet, Food-101.
- Specialized Domains: EuroSAT and RESISC45 (satellite imagery), GTSRB (traffic signs), DTD (textures), PCAM (medical imaging), FER2013 (facial expressions), SUN397 (scene recognition), Fashion-MNIST, and Rendered-SST2 (sentiment analysis).
Key Insights and Ideas
- The Optimization-Generalization Trade-off: This is the core "aha moment" that resolves the FL paradox. While increasing fine-tuning steps ($K$) or learning rates ($\eta_l$) drives down optimization error, it simultaneously causes the generalization error (stability penalty) to explode at a rate of $\mathcal{O}(K)$ and $\mathcal{O}(\eta_l^2)$. This creates an inverted U-shape performance curve for accuracy.
- Why Sparsification Works: Non-linear methods like TIES and DARE use pruning and sign-consensus operators. The authors mathematically prove that these operators act as explicit regularizers that strictly tighten the generalization bound by filtering out conflicting updates and suppressing task heterogeneity ($\zeta_i^2$).
- Data is a "Free Lunch": Unlike other hyperparameters that introduce trade-offs, increasing the dataset size ($n_i$) strictly and monotonically tightens the generalization bound by enhancing model stability without harming optimization.
- The Learning Rate Danger: The generalization penalty scales quadratically with the learning rate ($\eta_l^2$). Therefore, keeping the learning rate small is an absolute prerequisite for successful model fusion.
Key Results
The authors validated their theoretical scaling laws across ResNet (18, 50, 152) and Vision Transformer (ViT/CLIP) architectures.
As predicted by their Optimization-Generalization trade-off, empirical results show a clear inverted U-shape for average accuracy and a U-shape for average loss when plotted against training steps.
Furthermore, the framework successfully predicted the behavior of advanced non-linear merging methods under adaptive optimizers (Adam) on ViT architectures, demonstrating its broad applicability.
Limitations and Future Work
While pioneering, the framework relies on a few standard but restrictive assumptions, such as loss function $L$-smoothness and the Polyak-Łojasiewicz (PL) condition. Deep learning landscapes are notoriously non-smooth (due to activations like ReLU). The authors acknowledge this and point to relaxing these assumptions via non-smooth analysis as a key direction for future work.
Additionally, they propose using these mathematically derived excess risk bounds as closed-form surrogates to power AutoML frameworks that can automatically select optimal hyperparameters for large-scale model merging.
Summary updated