Aligning Permutation Invariant Networks for Model Fusion

This direction is merged into another direction: permutation invariance (permutation symmetry). Its last version stays readable and citable here.

Version 1 of 172 papers72 conceptsfrozen 2026-10-04

If you take two neural networks with the exact same architecture, trained on the same data but with different random initializations, and average their weights, the resulting model will almost certainly perform no better than random noise. This failure is not due to a lack of shared knowledge, but rather a fundamental property of neural networks: permutation invariance.

The Permutation Problem

A neural network is essentially a collection of interchangeable parts. In any hidden layer, you can swap the positions of two neurons—along with their corresponding incoming and outgoing weights—without changing the mathematical function the network computes. As Derek Lim and Stefanie Jegelka explore in The Empirical Impact of Neural Parameter Symmetries, these symmetries mean that there are $N!$ ways to represent the same function in a layer with $N$ neurons.

When we train models independently, they converge to different "permutations" of the same solution. Model A might learn to detect vertical edges in its first neuron, while Model B learns that same feature in its fiftieth neuron. Naively averaging the weights at index 1—combining a "vertical edge" detector with whatever Model B put there—results in destructive interference. This "structural misalignment" is the primary barrier to merging models in "model zoos" or aggregating updates in Federated Learning.

Aligning Neurons via Optimal Transport

To merge models successfully, we must first find a way to "un-permute" them—aligning neurons that perform similar functional roles. Martin Jaggi and Sidak Pal Singh pioneered a solution to this in Model Fusion via Optimal Transport.

Instead of looking at raw weight values, they treat neurons as distributions. By using Optimal Transport (OT), they calculate the most efficient way to "move" the mass of neurons from Model A to match the neurons in Model B. This creates a "one-shot" alignment that allows models to be merged even if they were trained on heterogeneous data or have different widths. This approach has been extended to complex architectures like Transformers, where Marco Giordano and Sidak Pal Singh use OT to "soft-align" multi-head attention and residual streams in Transformer Fusion with Optimal Transport.

Graph Matching and Second-Order Alignment

While OT focuses on the weights themselves, other researchers argue that the relationship between neurons is just as important. Chang Liu and Li Shen frame this as a graph matching problem in Deep Neural Network Fusion via Graph Matching.

Their algorithm, GAMF, doesn't just look at whether two neurons have similar weights; it looks at whether they are connected to similar neurons in the next layer. By aligning these "second-order" structures, they can more accurately match channels in deep convolutional networks, where simple linear assignment often fails. Similarly, Yongcheng Jing applies this logic to Graph Neural Networks in Deep Graph Mating, using topology-aware alignment to merge GNNs without any retraining or labeled data.

Merging in the Wild: Federated Learning and Task Vectors

The practical implications of alignment are most visible in decentralized training. Standard Federated Learning (FedAvg) often struggles with "non-IID" data—where different users have very different datasets. Federated Matched Averaging (FedMA) addresses this by using layer-wise matching to ensure that specialized features learned by one client are correctly mapped to the global model, rather than being averaged into oblivion.

This concept is now evolving into "Model Portability." As new versions of base models (like BERT or CLIP) are released, researchers face the "re-fine-tuning" tax. Filippo Rinaldi and Giacomo Capitani introduced TransFusion in Update Your Transformer to the Latest Release: Re-Basin of Task Vectors, which uses weight permutation to "port" fine-tuned knowledge (task vectors) from an old model to a new one. By aligning the internal "basins" of these models, they allow developers to upgrade their underlying architecture without losing the specific skills they've already taught their AI.

The Intuition of the Common Basin

Ultimately, this research direction suggests that different training runs of the same architecture aren't just random points in a high-dimensional space. As Aditya Kumar Akash argues in Wasserstein Barycenter-based Model Fusion, once you account for permutations, these models often reside in the same "functional basin." Alignment is the mathematical key that unlocks this shared space, allowing us to treat neural networks not as black-box weights, but as modular components that can be traded, merged, and upgraded.

Papers in this version

Showing 60 of 72 papers.

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_aligning_permutation_invariant_networks__989c2ef8,
  title = {Aligning Permutation Invariant Networks for Model Fusion},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/aligning-permutation-invariant-networks-for-model-fusion/rdr_989c2ef8a9074b94b4009c82c4d3047a},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-02},
}

This exact version (version 1, frozen text):

@misc{lacuna_aligning_permutation_invariant_networks__989c2ef8_v1,
  title = {Aligning Permutation Invariant Networks for Model Fusion},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/aligning-permutation-invariant-networks-for-model-fusion/rdr_989c2ef8a9074b94b4009c82c4d3047a/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-02},
}