Change Partners at Every Layer: Balanced Random Regrouping for Model Merging

Kaiyang Li, Shaobo Han, Shihao JiarXiv 2026

TL;DR

When combining dozens of specialized neural networks into a few shared models to save memory, intuition suggests grouping similar experts together or keeping the same "merge partners" throughout the network. This paper reveals a surprising truth: randomly shuffling which models get merged together at every single layer—like a neural square dance—handily beats both strategies. Why? Because constantly changing partners prevents individual merging errors from pointing in the same direction and snowballing across layers.

What Problem Does This Paper Address?

Suppose you start with one foundational model (like CLIP) and fine-tune it separately on 100 different tasks. Storing 100 distinct models in production is expensive. Model merging tries to squash all those fine-tuned weights back into a single model without retraining—often by adding together "task vectors" (the weight differences between each fine-tuned specialist and the base model). Unfortunately, merging 100 experts into one pot causes severe interference, tanking accuracy.

A practical middle ground is grouped merging: if your memory budget allows storing $K=10$ models instead of 100, you divide your 100 experts into 10 groups at each layer and merge each group into a shared module. At inference time, since you know which task you are solving, you route the input through the merged modules belonging to that task's group.

The core question is: how should you group the experts? Two choices seem obvious: pick one grouping and reuse it at every layer, or cluster experts with mathematically similar weights. Surprisingly, neither is optimal.

Methods

The authors propose Balanced Random Regrouping (BRR), a dead-simple, data-free wrapper around existing merging algorithms (such as Task Arithmetic, TSV-M, Iso-CTS, and ACE-Merging).

Instead of inventing a new math formula for combining weights, BRR changes who gets merged with whom as data flows deeper into the network:

  • BRR-layer: At every transformer layer, independently shuffle the $N$ experts and deal them into $K$ equal-sized ("balanced") groups.
  • BRR-matrix: Do the exact same independent random shuffle, but at the finer granularity of every individual weight matrix (e.g., 6 matrices per layer in ViT).
Figure 1. Shared grouping versus BRR (schematic). (a) Four tasks (T1–T4) and three units (layers or weight matrices); at each unit, the experts are merged in two equal-sized groups. Shared grouping reuses one grouping, whereas BRR draws one independently at each unit; the red line follows the modules selected by T1. The accuracies shown are those of shared grouping and BRR-layer on 100 ViT-B/32 tasks (TSV-M, K=10, α=1). (b) Under a first-order approximation, each red arrow shows the shift that merging at one unit adds to T1’s final output features, and the dashed arrow is their sum. In this illustration, fixed partners give shifts in similar directions that accumulate, whereas new partners give shifts in different directions that accumulate less.

To explain why randomness wins, the authors use a first-order Taylor expansion (linearizing how small weight changes shift the final output features). Guided by this math, they also test a search-based grouping method that uses a few unlabeled validation images to actively pick partners whose errors cancel out even better than random chance.

Datasets

No brand-new datasets are introduced, though the authors construct a large-scale pool of fine-tuned checkpoints for stress-testing:

  • 100-task CLIP Pools: CLIP ViT-B/32 and ViT-L/14 models fine-tuned separately across 100 image-classification tasks spanning natural images and specialized domains.
  • Public CLIP Checkpoints: Existing 8-, 14-, and 20-task benchmarks (from Wang et al., 2024) to ensure findings aren't an artifact of their custom 100-task pool.
  • Vision-Language Models (VLMs): InternVL2.5-1B and Qwen2-VL-7B fine-tuned on 10 tasks (6 visual question-answering and 4 multiple-choice classification tasks).

Key Insights and Ideas

  • The Vector Random Walk ("Aha!" Moment): Merging Task 1's weights with Task 2's weights nudges Task 1's final output features slightly off-course. Empirically, the nudges caused by the same partner at different layers tend to point in similar directions. If Task 1 is stuck with Task 2 at every layer, those errors reinforce each other and accumulate (see Figure 1b above). Changing partners at every layer makes the error vectors point in independent directions, so they partially cancel out rather than snowballing.
  • Why Similarity Clustering Backfires: Grouping experts by parameter similarity (like the baseline FlexMerge) seems smart locally, but similar experts tend to be similar everywhere. As a result, similarity clustering repeats about 27%–30% of partner pairs across weight matrices (compared to just 9% for BRR-matrix), unintentionally bringing back cross-layer error accumulation!
  • Randomness Gets You 90% of the Way: Actively searching for optimal partners using unlabeled data beats random BRR, but only by ~0.5 percentage points—whereas random BRR beats fixed partners by up to 4.6 points. Independent randomness captures almost all the available upside for free.

Key Results

  • Clean Sweep on 100 CLIP Tasks: Across 2 backbones, 3 storage budgets ($K \in \{5, 10, 20\}$), and 4 merging algorithms (24 total settings), accuracy strictly follows BRR-matrix > BRR-layer > Shared grouping. Both BRR variants beat shared grouping by 1.0 to 6.8 percentage points.
  • Beating Similarity Baselines: BRR-matrix outperforms similarity-based FlexMerge in all 24 CLIP configurations (by 2.33 to 8.35 points on ViT-B/32 at $K=10$).
  • VLM Generalization: On InternVL2.5-1B ($K=2$), BRR-matrix beats both shared grouping (by 0.35–0.85 points) and FlexMerge across all four merging methods. On Qwen2-VL-7B, gains are strong under Task Arithmetic (+1.93 points over shared), though muted on stronger merging methods where a single merged model already nearly matches individual experts.
  • Predictive Theory: Using their cross-layer covariance math, the authors predicted the accuracy of 27 partially shared groupings before evaluating them—landing within 0.16 percentage points of actual test accuracy on average.

Limitations and Future Work

  • Task Identity Required at Inference: Like other grouped merging setups, BRR assumes you know which task an input belongs to at test time so you can route it through the right sequence of modules. Future work aims to infer module routing directly from the input.
  • Linear Approximation Limits: Their theoretical model assumes weight perturbations behave linearly. While great at predicting the gap between shared and random groupings, the linear approximation's raw error grows as weight changes get large, leaving room to model nonlinear feature shifts in future grouping searches.
  • Routing Overhead: While total FLOPs per input match a single model, switching weight matrices per task introduces serving/routing overhead depending on batching and hardware implementation.

Summary updated

Abstract

Model merging combines fine-tuned experts into one model that serves many tasks without retraining, but merging many experts this way substantially reduces accuracy. Grouping offers a middle ground: at every layer or weight matrix, the $N$ experts are divided into $K<N$ groups, the experts in a group are merged into one shared module, and a task uses the module merged from its expert's group. Natural choices are to keep the same partners across layers or to group similar experts. Surprisingly, we find that randomly changing partners at every layer outperforms both. We call this Balanced Random Regrouping (BRR): it independently partitions the experts into $K$ equal-sized random groups at each layer (BRR-layer) or weight matrix (BRR-matrix) and merges each group with an existing method. With validation-selected merge scales, both BRR variants outperform reusing one grouping across layers in all 24 CLIP settings, by 1.0-6.8 points, and BRR-matrix also outperforms the similarity-based FlexMerge in every setting. A first-order analysis explains this gain. At each layer, merging a task's expert with its partners shifts the task's output features; when the partners are the same at every layer, these shifts tend to point in similar directions and add up, whereas with new partners at every layer they vary independently and add up less on average. A series of experiments supports this analysis, which further guides a grouping search that can outperform BRR.
BibTeX
@misc{li2026change,
  author = {Kaiyang Li and Shaobo Han and Shihao Ji},
  title = {{Change Partners at Every Layer: Balanced Random Regrouping for Model Merging}},
  year = {2026},
  eprint = {2611.33308},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.33308},
}
Figure