Analyzing the Role of Permutation Invariance in Linear Mode Connectivity

Keyao Zhan, Puheng Li, Lei Wu

Abstract

It was empirically observed in Entezari et al. (2021) that when accounting for the permutation invariance of neural networks, there is likely no loss barrier along the linear interpolation between two SGD solutions—a phenomenon known as linear mode connectivity (LMC) modulo permutation. This phenomenon has sparked significant attention due to both its theoretical interest and practical relevance in applications such as model merging. In this paper, we provide a fine-grained analysis of this phenomenon for two-layer ReLU networks under a teacher-student setup. We show that as the student network width $m$ increases, the LMC loss barrier modulo permutation exhibits a double descent behavior. Particularly, when $m$ is sufficiently large, the barrier decreases to zero at a rate $O(m^{-1/2})$. Notably, this rate does not suffer from the curse of dimensionality and demonstrates how substantial permutation can reduce the LMC loss barrier. Moreover, we observe a sharp transition in the sparsity of GD/SGD solutions when increasing the learning rate and investigate how this sparsity preference affects the LMC loss barrier modulo permutation. Experiments on both synthetic and MNIST datasets corroborate our theoretical predictions and reveal a similar trend for more complex network architectures.

Introduction

In deep learning, models trained from different random initializations typically land in distinct regions of the loss landscape. Directly averaging the weights of two such models usually results in a significant performance drop, indicating a high "loss barrier" between them. However, recent empirical research has suggested that this barrier is not intrinsic to the solutions themselves, but rather a consequence of the arbitrary ordering of neurons.

By accounting for permutation invariance—the property where swapping the order of neurons in a hidden layer preserves the network's output—researchers have found that models can often be aligned to eliminate this barrier. This concept, known as Linear Mode Connectivity (LMC) modulo permutation, is foundational for techniques like model merging and multitasking. Despite its practical success, a rigorous mathematical framework explaining why this occurs and how it scales with network complexity has been missing. This paper provides that framework, focusing on two-layer ReLU networks.

Theoretical Framework: The Teacher-Student Setup

To analyze the loss barrier, we utilize a teacher-student setup where a "teacher" network with $M$ neurons generates labels, and two "student" networks with width $m$ are trained to minimize the loss.

Our analysis employs several key methodological tools:

  • Optimal Permutation Matching: We utilize an algorithm to find the best permutation by matching neurons between student networks based on their weights and types.
  • Neural Tangent Kernel (NTK) Framework: This allows for an analytical calculation of the loss barrier along the interpolation path between two solutions.
  • PQ Index (PQI): A metric developed to quantify the sparsity of weight matrices, allowing us to link training hyperparameters to the geometry of the loss landscape.

Key Findings

1. The $O(m^{-1/2})$ Scaling Law

A primary contribution of this work is proving that the loss barrier modulo permutation decreases at a rate of $O(m^{-1/2})$ as the student network width $m$ increases. Crucially, this rate is independent of the input dimension $d$. This finding explains why LMC remains effective even in high-dimensional tasks, as it does not suffer from the "curse of dimensionality" that often plagues statistical bounds.

2. The Double Descent of the Loss Barrier

We identify a unique "double descent" behavior in the loss barrier relative to the student width $m$:

  1. Initial Drop: As $m$ approaches the teacher width $M$, the barrier begins to decrease.
  2. The Peak at $m = 2M$: The barrier reaches a local maximum when the student has exactly enough neurons to represent the teacher twice. At this point, the network lacks the "slack" or redundant neurons necessary to easily align with a different independent run.
  3. Asymptotic Decay: As $m$ increases beyond $2M$ into the over-parameterized regime, the barrier steadily vanishes toward zero.

3. Sparsity and the Role of Learning Rates

Our research reveals a "phase transition" in model sparsity controlled by the learning rate. High learning rates tend to produce sparser models where a subset of neurons have near-zero weights. We demonstrate that this sparsity is beneficial for LMC; "empty" or sparse neurons do not contribute to the loss barrier during interpolation, effectively acting as a bridge between the two models. The PQ Index confirms that as sparsity increases, the LMC barrier drops more sharply than in dense models.

Empirical Validation

Theoretical predictions were tested across three distinct settings:

  • Synthetic Data: Confirming the precise $m=2M$ peak and the $O(m^{-1/2})$ decay.
  • MNIST: Using 4-layer MLPs, we observed the barrier peaking at widths of 25-30 before dropping as width increased toward 100.
  • CIFAR-10: Tests on a 16-layer CNN demonstrated that the trends identified in two-layer networks persist in deeper, more complex architectures.

Conclusion and Future Work

This paper provides a fine-grained theoretical understanding of how permutation invariance facilitates linear mode connectivity. By identifying the double descent of the loss barrier and the role of sparsity, we offer a clearer picture of why over-parameterized networks are so amenable to model merging.

Future research will focus on extending these proofs to deeper architectures like Transformers and ResNets. Additionally, while we have identified that high learning rates promote sparsity, the underlying optimization dynamics that drive gradient descent toward these sparse, LMC-friendly solutions remain a compelling area for further investigation.

Summary updated

Abstract

It was empirically observed in Entezari et al. (2021) that when accounting for the permutation invariance of neural networks, there is likely no loss barrier along the linear interpolation between two SGD solutions -- a phenomenon known as linear mode connectivity (LMC) modulo permutation. This phenomenon has sparked significant attention due to both its theoretical interest and practical relevance in applications such as model merging. In this paper, we provide a fine-grained analysis of this phenomenon for two-layer ReLU networks under a teacher-student setup. We show that as the student network width $m$ increases, the LMC loss barrier modulo permutation exhibits a double descent behavior. Particularly, when $m$ is sufficiently large, the barrier decreases to zero at a rate $O(m^{-1/2})$. Notably, this rate does not suffer from the curse of dimensionality and demonstrates how substantial permutation can reduce the LMC loss barrier. Moreover, we observe a sharp transition in the sparsity of GD/SGD solutions when increasing the learning rate and investigate how this sparsity preference affects the LMC loss barrier modulo permutation. Experiments on both synthetic and MNIST datasets corroborate our theoretical predictions and reveal a similar trend for more complex network architectures.
BibTeX
@inproceedings{zhan2025analyzing,
  author = {Keyao Zhan and Puheng Li and Lei Wu},
  title = {{Analyzing the Role of Permutation Invariance in Linear Mode Connectivity}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2025},
  url = {https://openreview.net/forum?id=cDYM7MGYFX},
}
Figure