SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2505.02604 · ICML · 2025

Connecting Independently Trained Modes via Layer-Wise Connectivity

Yongding Tian, Zaid Al-Ars, Maksim Kitsak, H Hofstee

arXiv · PDF · Open in the Atlas

Code that ran

9 of 13 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, 0 violated it and 8 have no contract verdict; 1 failure of our instrument; 4 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/2505.02604.json · badge: /api/ran/2505.02604.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
fdraxler/PyTorch-AutoNEB canonical (classifier label)
classifier basis not recorded on the link
8 ran · 3 no recorded run
timgaripov/dnn-mode-connectivity community
Papers with Code archive
1 ran · 1 no recorded run
FunctionStatusWhere it lives
CurveNet Ran
ran on a synthesized input
timgaripov/dnn-mode-connectivity/curves.py
code served (permissive licence) · get_code("b86c230cd7b58813")
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; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np
import torch
from torch.nn import Module, Parameter, Linear
import torch.nn.functional as F


class SimpleCurveLayer(Module):
    """Simple curve layer that outputs coefficients for interpolation."""
    def __init__(self, num_bends):
        super(SimpleCurveLayer, self).__init__()
        self.num_bends = num_bends
    
    def forward(self, t):
        """Return Bezier-like coefficients for the given t value."""
        if isinstance(t, (int, float)):
            t = torch.tensor([t], dtype=torch.float32)
        if t.dim() == 0:
            t = t.unsqueeze(0)
        
        batch_size = t.shape[0]
        coeffs = torch.zeros(batch_size, self.num_bends, dtype=torch.float32)
        
        for i in range(self.num_bends):
            alpha = i / (self.num_bends - 1) if self.num_bends > 1 else 0
            coeffs[:, i] = (1 - torch.abs(t.squeeze() - alpha)) * 2
            coeffs[:, i] = torch.clamp(coeffs[:, i], 0, 1)
        
        coeffs = coeffs / (coeffs.sum(dim=1, keepdim=True) + 1e-8)
        return coeffs


class SimpleCurveModule(Module):
    """Simple curve module for testing."""
    def __init__(self, num_bends, fix_points, parameter_names=()):
        super(SimpleCurveModule, self).__init__()
        self.fix_points = fix_points
        self.num_bends = num_bends
        self.parameter_names = parameter_names
        self.l2 = 0.0
        
        for param_name in parameter_names:
            for j in range(num_bends):
                param = Parameter(torch.randn(4, 3))
                setattr(self, f'{param_name}_{j}', param)
    
    def compute_weights_t(self, coeffs_t):
        w_t = [None] * len(self.parameter_names)
        self.l2 = 0.0
        for i, parameter_name in enumerate(self.parameter_names):
            for j, coeff in enumerate(coeffs_t[0]):
                parameter = getattr(self, f'{parameter_name}_{j}', None)
                if parameter is not None:
                    if w_t[i] is None:
                        w_t[i] = parameter * coeff
                    else:
                        w_t[i] += parameter * coeff
            if w_t[i] is not None:
                self.l2 += torch.sum(w_t[i] ** 2)
        return w_t
    
    def forward(self, x, coeffs_t):
        return x


class SimpleArchitecture(Module):
    """Simple architecture with curve modules."""
    def __init__(self, num_classes, fix_points, **kwargs):
        super(SimpleArchitecture, self).__init__()
        self.num_classes = num_classes
        self.fix_points = fix_points
        self.num_bends = len(fix_points)
        
        self.curve_layer = SimpleCurveModule(
            self.num_bends,
            fix_points,
            parameter_names=('weight', 'bias')
        )
        self.linear = Linear(4, num_classes)
    
    def forward(self, x, coeffs_t):
        x = self.curve_layer(x, coeffs_t)
        x = x.mean(dim=1) if x.dim() > 2 else x
        x = self.linear(x)
        return x


INIT_ARGS = {
    'num_classes': 5,
    'curve': SimpleCurveLayer,
    'architecture': SimpleArchitecture,
    'num_bends': 3,
    'fix_start': True,
    'fix_end': True,
    'architecture_kwargs': {}
}

ARGS = {
    'input': torch.randn(2, 4),
    't': torch.tensor([0.5])
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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)
conv3x3 Ran
ran; our contract draft was wrong, not the code
fdraxler/PyTorch-AutoNEB/torch_autoneb/models/resnet.py
code served (permissive licence) · get_code("bde80d96c1e287d8")
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, through the batch API) and returned Conv2d. 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 torch.nn as nn
from torch.nn import Conv2d

torch.manual_seed(0)

def conv3x3(in_planes, out_planes, stride=1):
    """3x3 convolution with padding"""
    return Conv2d(in_planes, out_planes, kernel_size=3, stride=stride, padding=1, bias=False)

ARGS = {
    "in_planes": 3,
    "out_planes": 16,
    "stride": 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Conv2d — a Conv2d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv2d output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not 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
disconnected Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/suggest.py
code served (permissive licence) · get_code("7d32f814be36436b")
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, through the batch API) and returned tuple, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 networkx as nx

class Config:
    def __init__(self):
        self.value_key = "value"

# Create a disconnected multigraph with two components
graph = nx.MultiGraph()

# First component with global minimum node
graph.add_node(0, value=1.0)
graph.add_node(1, value=5.0)
graph.add_edge(0, 1)

# Second component with a local minimum
graph.add_node(2, value=3.0)
graph.add_node(3, value=7.0)
graph.add_edge(2, 3)

config = Config()

ARGS = {
    "graph": graph,
    "config": config
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
distribute_by_weights Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/neb_model.py
code served (permissive licence) · get_code("f548c84db1ea697f")
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, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (5, 4) 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 a simple path with 3 waypoints in 4D space
path = torch.randn(3, 4)

# Number of images to distribute
nimages = 5

# Optional: path_target tensor (can be None, function will create it)
path_target = None

# Optional: weights for spacing (can be None, defaults to uniform)
weights = None

# Optional: climbing_pivots list (can be None for simple case)
climbing_pivots = None

ARGS = {
    "path": path,
    "nimages": nimages,
    "path_target": path_target,
    "weights": weights,
    "climbing_pivots": climbing_pivots,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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 (5, 4) — shape (5, 4) 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
equal Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/fill.py
code served (permissive licence) · get_code("19a46625e3b4e045")
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, through the batch API) 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 a small chain of coordinates (3 pivots, 4-dimensional)
path_coords = torch.randn(3, 4)

# Create target distances (weights between pivots: 2 connections for 3 pivots)
target_distances = torch.tensor([0.3, 0.7])
target_distances = target_distances / target_distances.sum()

# Create the previous_cycle_data dict
previous_cycle_data = {
    'path_coords': path_coords,
    'target_distances': target_distances
}

# Number of pivots to insert between each pair
count = 2

ARGS = {
    'previous_cycle_data': previous_cycle_data,
    'count': count
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
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
leave Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/fill.py
code served (permissive licence) · get_code("3a5f3fe91d1517b4")
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, through the batch API) 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 numpy as np

torch.manual_seed(0)

previous_cycle_data = {
    'path_coords': torch.tensor([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]]),
    'target_distances': torch.tensor([[0.5, 1.5], [2.5, 3.5]])
}

ARGS = {
    'previous_cycle_data': previous_cycle_data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
move_to Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/helpers.py
code served (permissive licence) · get_code("cb7d54d7bc7e17f4")
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, through the batch API) and returned list. 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 torch.nn as nn
from torch import Tensor

torch.manual_seed(0)

# Create test data structures
test_tensor = torch.randn(2, 4)
test_list = [torch.randn(2, 4), torch.randn(3, 5)]
test_dict = {
    'tensor1': torch.randn(2, 4),
    'nested': {
        'tensor2': torch.randn(3, 5),
        'value': 42
    },
    'other': 'string'
}
test_nested_list = [
    torch.randn(2, 4),
    {'tensor': torch.randn(3, 5)},
    [torch.randn(2, 3), 100]
]

target_device = 'cpu'

ARGS = {
    'something': test_nested_list,
    'target': target_device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list 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
replace_instanciation Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/config.py
code served (permissive licence) · get_code("a1bc3b1cf779ef89")
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, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 torch.nn as nn

torch.manual_seed(0)

# Create a mock package with some classes
class MockPackage:
    class Model(nn.Module):
        def __init__(self):
            super().__init__()
            self.linear = nn.Linear(4, 3)
        
        def forward(self, x):
            return self.linear(x)
    
    class Optimizer:
        def __init__(self, lr=0.001):
            self.lr = lr
    
    class Scheduler:
        def __init__(self, step_size=10):
            self.step_size = step_size

package = MockPackage()

# Test case 1: config as dict with 'name' key
config_dict = {
    'name': 'Model',
    'hidden_size': 64,
    'dropout': 0.1
}

# Test case 2: config as string
config_string = 'Optimizer'

# Test case 3: config as None
config_none = None

# Test case 4: config as object (already instantiated)
config_object = MockPackage.Scheduler()

# Create ARGS for the function
ARGS = {
    'config': config_dict,
    'package': package
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
unfinished Ran
ran on a synthesized input
fdraxler/PyTorch-AutoNEB/torch_autoneb/suggest.py
code served (permissive licence) · get_code("71460029b4fd6d96")
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, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.

from networkx import MultiGraph

class AutoNEBConfig:
    def __init__(self, cycle_count):
        self.cycle_count = cycle_count

class Config:
    def __init__(self, cycle_count):
        self.auto_neb_config = AutoNEBConfig(cycle_count)

# Create a MultiGraph with nodes and edges
graph = MultiGraph()

# Add nodes
graph.add_node("minima_1")
graph.add_node("minima_2")
graph.add_node("minima_3")

# Add edges with cycle information
# Edge between minima_1 and minima_2 with cycles 1, 2, 3
graph.add_edge("minima_1", "minima_2", key=1)
graph.add_edge("minima_1", "minima_2", key=2)
graph.add_edge("minima_1", "minima_2", key=3)

# Edge between minima_2 and minima_3 with cycles 1, 2 (missing cycle 3)
graph.add_edge("minima_2", "minima_3", key=1)
graph.add_edge("minima_2", "minima_3", key=2)

# Create config with cycle_count = 3
config = Config(cycle_count=3)

ARGS = {
    "graph": graph,
    "config": config,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
CurveModule Not yet run
unverified (harvested, no recorded run)
timgaripov/dnn-mode-connectivity/curves.py
code served (permissive licence) · get_code("229f80d59b6789a0")
How it ran

no invocation recorded.

highest Not yet run
unverified (harvested, no recorded run)
fdraxler/PyTorch-AutoNEB/torch_autoneb/fill.py
code served (permissive licence) · get_code("5587b8aa28fe33b6")
How it ran

no invocation recorded.

load_dataset Not yet run
unverified (harvested, no recorded run)
fdraxler/PyTorch-AutoNEB/torch_autoneb/datasets.py
code served (permissive licence) · get_code("4682f3f06b3460cc")
How it ran

no invocation recorded.

ntuple Not yet run
unverified (harvested, no recorded run)
fdraxler/PyTorch-AutoNEB/torch_autoneb/helpers.py
code served (permissive licence) · get_code("0a98cc5f44b9de32")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 11 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
conv3x3 9 other papers
9 dated earlier
2001.06838 (2020-01)
Towards Stabilizing Batch Statistics in Backward Propagation of Batch Normalization
2004.00288 (2020-04)
CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition
2107.08621 (2021-07)
Face.evoLVe: A High-Performance Face Recognition Library
and 6 more not named here
ntuple 1 other paper
1 dated earlier
Wen_Class_Incremental_Learning_with_Multi-Teacher_Distillation_CVPR_2024_paper (2024 (year only))
Class Incremental Learning with Multi-Teacher Distillation

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

Empirical studies have shown that continuous lowloss paths can be constructed between independently trained neural network models. This phenomenon, known as mode connectivity, refers to the existence of such paths between distinct modes-i.e., well-trained solutions in parameter space. However, existing empirical methods do not reliably connect independently trained modes and have been evaluated mainly on a narrow set of architectures (e.g., basic CNNs, VGG, and ResNet), leaving their effectiveness on newer models unclear. In this work, we propose a new empirical algorithm for connecting independently trained modes that generalizes beyond traditional architectures and supports a broader range of networks, including MobileNet, ShuffleNet, EfficientNet, RegNet, Deep Layer Aggregation (DLA), and Compact Convolutional Transformers (CCT). In addition to broader applicability, the proposed method yields more consistent connectivity paths across independently trained mode pairs and supports connecting modes obtained with different training hyperparameters.

For agents

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

get_harvested_code_for_paper("2505.02604")
get_code_for_paper("2505.02604")
have("2505.02604")

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

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

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

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

Connect an agent — have() is free.