[Paper Review] Git Re-Basin: Merging Models modulo Permutation Symmetries
The paper introduces three permutation-based methods to align and merge independently trained neural networks by reordering hidden units, achieving linear mode connectivity (LMC) in weight space modulo permutation symmetries across various architectures and datasets.
The success of deep learning is due in large part to our ability to solve certain massive non-convex optimization problems with relative ease. Though non-convex optimization is NP-hard, simple algorithms -- often variants of stochastic gradient descent -- exhibit surprising effectiveness in fitting large neural networks in practice. We argue that neural network loss landscapes often contain (nearly) a single basin after accounting for all possible permutation symmetries of hidden units a la Entezari et al. 2021. We introduce three algorithms to permute the units of one model to bring them into alignment with a reference model in order to merge the two models in weight space. This transformation produces a functionally equivalent set of weights that lie in an approximately convex basin near the reference model. Experimentally, we demonstrate the single basin phenomenon across a variety of model architectures and datasets, including the first (to our knowledge) demonstration of zero-barrier linear mode connectivity between independently trained ResNet models on CIFAR-10. Additionally, we identify intriguing phenomena relating model width and training time to mode connectivity. Finally, we discuss shortcomings of the linear mode connectivity hypothesis, including a counterexample to the single basin theory.
Motivation & Objective
- Investigate why SGD solves high-dimensional non-convex neural network loss landscapes and whether independent training runs inhabit a single basin modulo permutation symmetries.
- Develop algorithms to permute units and align two independently trained models so their weights can be merged in weight space.
- Empirically verify the single-basin phenomenon and zero-barrier LMC across multiple architectures and datasets.
Proposed method
- Propose three permutation-based matching methods to align units across models: activation activation matching via a linear assignment problem on layer activations; weight-based matching via a sum of bilinear assignments problem (SOBLAP); and learning permutations with a straight-through estimator to optimize permutation alignment.
- Provide a polynomial-time approximation approach for SOBLAP using a coordinated coordinate-descent over layers, reducing to linear assignment problems per step.
- Show that activation matching yields data-aware alignment, weight matching ignores data but is fast, and STE-based learning can optimize permutations end-to-end with higher computational cost.
- Discuss theoretical aspects including NP-hardness of SOBLAP and convergence of the proposed algorithms.
Experimental results
Research questions
- RQ1Can permutations of hidden units align independently trained models so that linear interpolations between them preserve performance?
- RQ2Do permutation-aware alignments reveal a single convex basin (modulo permutations) in neural network loss landscapes?
- RQ3How do model architecture, width, and training time influence the existence and quality of linear mode connectivity?
- RQ4Can merged models, formed by aligned weight space interpolation, outperform input models on combined data?
- RQ5Are there practical methods to merge models trained on disjoint datasets or under privacy constraints without retraining on full data?
Key findings
- Activation and weight-based matching can substantially reduce interpolation barriers between independently trained models.
- Zero-barrier linear mode connectivity is demonstrated for ResNets on CIFAR-10.
- Wider models exhibit better linear mode connectivity, with loss barriers decreasing as width increases.
- Merging models trained on disjoint datasets via weight matching can yield interpolated models that outperform inputs while using less memory and computation than ensembling.
- STE-based permutation learning can achieve competitive results, though with higher computational cost than data-free methods.
- A counterexample shows that universal LMC does not hold for all SGD solutions, highlighting optimization bias toward LMC rather than a universal property of all solutions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.