Mode combinability: Exploring convex combinations of permutation aligned models

Adrián Csiszárik, Melinda F. Kiss, Péter Korösi-Szabó, Márton Muntag, Gergely Papp, Dániel Varga · DOI

TL;DR

This paper introduces "mode combinability," a generalization of linear mode connectivity, by exploring element-wise convex combinations of neural network weights. They demonstrate that large regions of the weight space can form low-loss surfaces, suggesting that combining models is a robust and general phenomenon beyond simple linear interpolation.

What Problem Does This Paper Address?

Deep neural networks often exhibit "linear mode connectivity" (LMC), meaning that you can interpolate between two trained models in weight space and maintain good performance. This suggests a structured loss landscape. However, LMC is typically studied as a simple linear path between two models. This paper asks: can we explore a broader space of model combinations beyond this simple line, and if so, does this "mode combinability" also lead to good performance? They aim to understand the extent and properties of these broader combination spaces, moving beyond the limitations of simple linear interpolation.

Methods

The core of the paper is the exploration of element-wise convex combinations of neural network weights. Instead of a single interpolation parameter $\lambda$ for the entire weight vector ($\lambda \Theta_A + (1-\lambda)\Theta_B$), they use a vector of parameters $v \in [0,1]^d$, where $d$ is the number of parameters, such that $\Theta_v = v \odot \Theta_A + (1-v) \odot \Theta_B$. This allows each weight to be interpolated independently, creating a hyperrectangle of possible combinations.

They employ model re-basing (specifically, the Git Re-Basin algorithm from Ainsworth et al., 2023) to align the "modes" of two trained models before combining them. This is crucial for LMC and, by extension, for their generalized approach. They then sample from various distributions within this hyperrectangle (uniform, Bernoulli, hyperplane intersections) and analyze the resulting models' performance (loss and accuracy). They also investigate properties like transitivity of LMC and robustness to perturbations in the alignment process.

Datasets

The experiments were conducted on the CIFAR-10 dataset.

Key Insights and Ideas

  • Mode Combinability is Broad: The paper demonstrates that "mode combinability" (element-wise convex combinations) creates much larger regions of low loss and high accuracy than simple linear interpolation (LMC). This suggests that the "loss basin" of neural networks is far more expansive than previously thought.
  • Robustness to Alignment: Even with significant perturbations to the neuron matching process (used for re-basing), the resulting model combinations remain functional and perform well. This highlights the inherent robustness of the underlying model structure.
  • Transitivity of LMC: If model B can be re-based to model A, and model C can be re-based to model A, then model B and model C are also linearly mode connected. This is a non-trivial structural property of the loss landscape.
  • Non-Vacuous Combinations: The paper shows that these combined models are not just trivial interpolations; they exhibit significant functional differences from the original models, meaning they learn distinct behaviors.

Key Results

  • Broad regions of the element-wise convex combination hypercube yield models with accuracy and loss close to the original models.
  • They observed a transitivity property for LMC.
  • Model combinations showed robustness to perturbations in neuron matching.
  • Analysis of functional differences (label predictions) revealed that combined models often differ from the original models, indicating they are not simply averaging identical behaviors.

Limitations and Future Work

  • Computational Cost: A full exploration of the hypercube is computationally infeasible, necessitating the use of sampling strategies.
  • Network Width: The success of model combinations is shown to be dependent on network width, with wider networks generally performing better.
  • Future Work: The authors suggest exploring more sophisticated element-wise combinations beyond simple distributions, investigating the interplay of convolutional filter pairs, and further exploring the "non-working" regions of the hypercube. They also highlight the potential of model combinations for knowledge aggregation and extending generalization capabilities.

Summary updated

BibTeX
@misc{csiszarik2023mode,
  author = {Adrián Csiszárik and Melinda F. Kiss and Péter Korösi-Szabó and Márton Muntag and Gergely Papp and Dániel Varga},
  title = {{Mode combinability: Exploring convex combinations of permutation aligned models}},
  year = {2023},
  eprint = {2308.11511},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.11511},
}
Figure