SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.13397 · ICML · 2024

Equivariant Deep Weight Space Alignment

Gal Chechik, Aviv Navon, Haggai Maron, Ethan Fetaya, Aviv Shamsian, Nadav Dym

arXiv · PDF · Open in the Atlas

Code that ran

4 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 2 failures of our instrument; 6 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.13397.json · badge: /api/ran/2310.13397.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
avivnavon/deep-align canonical (classifier label)
classifier basis: classifier_2025
0 ran · 3 no recorded run
AvivNavon/deep-align marked official in Papers with Code
Papers with Code archive
4 ran · 3 no recorded run
FunctionStatusWhere it lives
FCNet Ran
ran on a synthesized input
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("fc6bfd01faa5f8ea")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float, shape (2, 10) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from torch import nn
import torch.nn.functional as F

class FCNet(nn.Module):
    """Fully connected neural network with functional forward support.
    """

    def __init__(self, in_dim=28 * 28, hidden_dim=128, n_hidden=2):
        super().__init__()
        layers = [nn.Linear(in_dim, hidden_dim), nn.ReLU()]
        self.n_hidden = n_hidden
        for _ in range(n_hidden):
            layers.extend([nn.Linear(hidden_dim, hidden_dim), nn.ReLU()])
        layers.append(nn.Linear(hidden_dim, 10))
        self.seq = nn.Sequential(*layers)

    def forward(self, x, weights_and_biases=None, negative_slope=0.0):
        x = x.flatten(start_dim=1)
        if weights_and_biases is None:
            return self.seq(x)
        else:
            weights, biases = weights_and_biases
            x = (weights[0].squeeze(-1).permute(0, 2, 1) @ x.permute(1, 0)).permute(0, 2, 1) + biases[0].permute(0, 2, 1)
            for i, (w, b) in enumerate(zip(weights[1:], biases[1:])):
                x = F.leaky_relu(x, negative_slope=negative_slope)
                x = x.bmm(w.squeeze(-1)) + b.permute(0, 2, 1)
            return x


INIT_ARGS = {
    'in_dim': 4,
    'hidden_dim': 8,
    'n_hidden': 2,
}

ARGS = {
    'x': torch.randn(2, 4),
    'weights_and_biases': None,
    'negative_slope': 0.01,
}

if __name__ == '__main__':
    model = FCNet(**INIT_ARGS)
    output = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Output: {output}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 10) — shape (2, 10) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
avg_weights_and_biases Ran
ran; our contract draft was wrong, not the code
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("834bac46e740376e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small weight tensors with distinct shapes
weights0 = (
    torch.randn(4, 3),
    torch.randn(5, 4),
)

weights1 = (
    torch.randn(4, 3),
    torch.randn(5, 4),
)

# Create small bias tensors
biases0 = (
    torch.randn(4),
    torch.randn(5),
)

biases1 = (
    torch.randn(4),
    torch.randn(5),
)

# Alpha as float
alpha = 0.5

ARGS = {
    "weights0": weights0,
    "biases0": biases0,
    "weights1": weights1,
    "biases1": biases1,
    "alpha": alpha,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
permute_weights Ran
ran; our contract draft was wrong, not the code
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("ea8902cb68a8b695")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import copy
from typing import Tuple, List

torch.manual_seed(0)

# Create small tensors for weights and biases
# weights: tuple of tensors with shape (batch, in_features, out_features, out_features)
# biases: tuple of tensors with shape (batch, out_features, out_features)
# perms: list of permutation tensors with shape (batch, features, features)

batch_size = 2
feat_in = 4
feat_out = 3
feat_perm = 5

# Create weights tuple - 3 weight matrices
weights = (
    torch.randn(batch_size, feat_in, feat_out, feat_out),
    torch.randn(batch_size, feat_out, feat_out, feat_out),
    torch.randn(batch_size, feat_out, feat_out, feat_out),
)

# Create biases tuple - 3 bias matrices
biases = (
    torch.randn(batch_size, feat_out, feat_out),
    torch.randn(batch_size, feat_out, feat_out),
    torch.randn(batch_size, feat_out, feat_out),
)

# Create perms list - 2 permutation matrices (one less than weights/biases)
perms = [
    torch.randn(batch_size, feat_perm, feat_out),
    torch.randn(batch_size, feat_perm, feat_out),
]

ARGS = {
    "weights": weights,
    "biases": biases,
    "perms": perms,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
unsqueeze_like Ran
ran, violated the contract we drafted
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("872a1d3182fa7818")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create two tensors with different numbers of dimensions
# tensor: 2D tensor with shape (2, 4)
# like: 4D tensor with shape (2, 4, 3, 5)
tensor = torch.randn(2, 4)
like = torch.randn(2, 4, 3, 5)

ARGS = {
    "tensor": tensor,
    "like": like,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 4, dtype family float, shape (2, 4, 1, 1) — shape (2, 4, 1, 1) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CLFBatchSinkhorn Not yet run
unverified (harvested, no recorded run)
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("6c3e5634d197618e")
How it ran

no invocation recorded.

Sinkhorn Not yet run
unverified (harvested, no recorded run)
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("25782a75daea5300")
How it ran

no invocation recorded.

cnn_permutation_spec Not yet run
unverified (harvested, no recorded run)
avivnavon/deep-align/deepalign/matching.py
code served (permissive licence) · get_code("e2e87fef0fcfac5f")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

matching Not yet run
unverified (harvested, no recorded run)
AvivNavon/deep-align/deepalign/sinkhorn.py
code served (permissive licence) · get_code("c363c18932aa716b")
How it ran

no invocation recorded.

mlp_permutation_spec Not yet run
unverified (harvested, no recorded run)
avivnavon/deep-align/deepalign/matching.py
code served (permissive licence) · get_code("6e54909ba0908215")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

permutation_spec_from_axes_to_perm Not yet run
unverified (harvested, no recorded run)
avivnavon/deep-align/deepalign/matching.py
code served (permissive licence) · get_code("2fdfe3a9f9b65da9")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
permutation_spec_from_axes_to_perm 1 other paper
1 dated earlier
2209.04836 (2022-09)
Git Re-Basin: Merging Models modulo Permutation Symmetries

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Permutation symmetries of deep networks make basic operations like model merging and similarity estimation challenging. In many cases, aligning the weights of the networks, i.e., finding optimal permutations between their weights, is necessary. Unfortunately, weight alignment is an NPhard problem. Prior research has mainly focused on solving relaxed versions of the alignment problem, leading to either time-consuming methods or sub-optimal solutions. To accelerate the alignment process and improve its quality, we propose a novel framework aimed at learning to solve the weight alignment problem, which we name DEEP-ALIGN. To that end, we first prove that weight alignment adheres to two fundamental symmetries and then, propose a deep architecture that respects these symmetries. Notably, our framework does not require any labeled data. We provide a theoretical analysis of our approach and evaluate DEEP-ALIGN on several types of network architectures and learning setups. Our experimental results indicate that a feed-forward pass with DEEP-ALIGN produces better or equivalent alignments compared to those produced by current optimization algorithms. Additionally, our alignments can be used as an effective initialization for other methods, leading to improved solutions with a significant speedup in convergence.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.13397")
get_code_for_paper("2310.13397")
have("2310.13397")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.13397.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.13397.svg)](https://syntology.ai/paper/2310.13397)

Connect an agent — have() is free.