NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$C^2M^3$: Cycle-Consistent Multi-Model Merging

Donato Crisostomi, Marco Fumero, Daniele Baieri, Florian Bernard, Emanuele Rodolà

Merging neural networks is a notoriously difficult challenge. Even when two models share the exact same architecture and are trained on identical data, simply averaging their weights typically results in a "broken" model with near-zero accuracy. This phenomenon occurs because neural networks possess permutation symmetries: neurons can be swapped or reordered without changing the network's function, meaning two models might learn the exact same features but store them in entirely different "slots."

While existing "weight matching" techniques attempt to solve this by permuting neurons to align models before averaging, they often fall short when scaled. $C^2M^3$ (Cycle-Consistent Multi-Model Merging) is a novel, data-free method designed to merge multiple neural networks by globally aligning their neurons across all layers, avoiding the error accumulation that plagues previous approaches.

The Problem with Existing Alignment Methods

Prior weight matching techniques face two major hurdles that prevent effective multi-model merging:

  1. Greedy Optimization: Most methods align layers sequentially. A sub-optimal permutation choice in an early layer can lead to a "cascade of errors" throughout the rest of the network, degrading the final merged model.
  2. Inconsistency in Multi-Model Merging: When merging more than two models (e.g., models A, B, and C), pairwise alignment is often "cycle-inconsistent." If you align A to B, then B to C, and finally C back to A, the resulting transformation does not return you to the starting point. This lack of global coherence makes merging large groups of models—such as in Federated Learning scenarios—highly noisy and ineffective.

The $C^2M^3$ Solution

To overcome these limitations, $C^2M^3$ introduces two key mathematical innovations to enforce global coherence, alongside an activation adjustment step:

1. Global Frank-Wolfe Optimization

Instead of a greedy, layer-by-layer approach, $C^2M^3$ utilizes the Frank-Wolfe algorithm to optimize the permutations of all layers simultaneously. By accounting for inter-layer dependencies, the alignment becomes significantly more robust and deterministic. Unlike previous state-of-the-art methods (like Git Re-Basin), which can vary in accuracy by up to 10% depending on the random order of layers processed, $C^2M^3$ produces the same high-quality merge every time.

2. The "Universe" Space

To guarantee cycle consistency for $n$ models, the authors fundamentally change how models are matched.

Pairwise mapping vs. Universe mapping for cycle consistency.

Instead of mapping models directly to each other, they factorize the problem by mapping every model to a common, abstract "universe" space. Because every model is aligned to this single reference point, any circular path of permutations is mathematically guaranteed to equal the identity map, completely eliminating error accumulation along the path.

3. Activation Renormalization (REPAIR)

After merging weights, the internal statistics of the network often shift. The authors pair their method with "REPAIR," a technique that resets the mean and variance of activations to match the original models, further boosting the performance of the merged network.

Key Insights and Results

The researchers evaluated $C^2M^3$ across a variety of standard benchmarks, including MLPs on MNIST, ResNet-20/VGG-16 on CIFAR-10/100, and ResNet-50 on ImageNet.

  • Superior Accuracy: In a challenging 5-model merge on CIFAR-100 (using ResNet-20), $C^2M^3$ achieved 69% accuracy, drastically outperforming the previous best method (MergeMany), which achieved just 50%.
  • Perfect Recovery: The authors demonstrated that $C^2M^3$ can cyclically permute a model through several others and return to the exact starting weights with zero error. Existing methods accumulate massive distances from the original model when attempting the same loop.
  • Linear Mode Connectivity: The paper confirms that coherence is key to finding a shared basin of attraction. By enforcing a closed-loop alignment, $C^2M^3$ successfully pulls the merged average into a wide, flat minimum connecting the models.
Loss landscapes demonstrating a shared low-loss basin connecting multiple models aligned with $C^2M^3$.
  • Federated Learning Potential: In a simulated federated learning environment with 10 clients, $C^2M^3$ consistently outperformed the standard FedAvg algorithm, particularly as the number of local training epochs increased and client models drifted further apart.

Limitations and Future Work

While $C^2M^3$ represents a significant step forward for weight-space merging, the authors note a few limitations:

  • The "Hardest Pair" Bottleneck: Because the method enforces global consistency across all models, if one pair of models in a set is particularly difficult to align (e.g., they learned highly divergent features), it can negatively impact the alignment quality of the entire group.
  • Computational Overhead: The global Frank-Wolfe optimization is more computationally intensive than greedy layer-wise matching. However, this overhead is generally a small price to pay compared to the massive cost of training a combined model from scratch.
  • Task Divergence: The method assumes the models are somewhat "compatible." Merging models trained on vastly different tasks (e.g., a cat classifier and a medical imaging model) remains an open challenge for weight-space merging techniques.

Summary updated

BibTeX
@inproceedings{crisostomi2024c,
  author = {Donato Crisostomi and Marco Fumero and Daniele Baieri and Florian Bernard and Emanuele Rodolà},
  title = {{$C^2M^3$: Cycle-Consistent Multi-Model Merging}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=iD18l6prA7},
}
Figure