SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.04081 · 2024

Improved Generalization of Weight Space Networks via Augmentations

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2402.04081.json · badge: /api/ran/2402.04081.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
avivsham/deep-weight-space-augmentations canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
Linear Ran
ran; our contract draft was wrong, not the code · constructed an object; no result was computed
avivsham/deep-weight-space-augmentations/models/relation_transformer/models.py
pointer only (licence: MIT); the stored copy get_code serves, from YvesWang/Machine_Translation_NLP, is pointer only (licence: NONE) · get_code("10865bbb99140edd")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from YvesWang/Machine_Translation_NLP, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

batch_to_graphs Ran
ran; our contract draft was wrong, not the code
avivsham/deep-weight-space-augmentations/models/relation_transformer/graph_constructor.py
code served (permissive licence) · get_code("3291d9b950f9b2b2")
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)

# Construct weights: list of tensors with shape (batch, num_in, num_out, feature_dim)
# Using distinct dimensions: batch=2, num_in=3, num_out=4, feature_dim=5
weights = [
    torch.randn(2, 3, 4, 5),
    torch.randn(2, 4, 6, 5),
]

# Construct biases: list of tensors with shape (batch, num_out, feature_dim)
biases = [
    torch.randn(2, 4, 5),
    torch.randn(2, 6, 5),
]

# Construct weights_mean and weights_std (same structure as weights)
weights_mean = [
    torch.randn(3, 4, 5),
    torch.randn(4, 6, 5),
]

weights_std = [
    torch.ones(3, 4, 5),
    torch.ones(4, 6, 5),
]

# Construct biases_mean and biases_std (same structure as biases)
biases_mean = [
    torch.randn(4, 5),
    torch.randn(6, 5),
]

biases_std = [
    torch.ones(4, 5),
    torch.ones(6, 5),
]

ARGS = {
    "weights": weights,
    "biases": biases,
    "weights_mean": weights_mean,
    "weights_std": weights_std,
    "biases_mean": biases_mean,
    "biases_std": biases_std,
}
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
extract_weights_and_biases Ran
ran; our contract draft was wrong, not the code
avivsham/deep-weight-space-augmentations/augmentations/augmentations.py
code served (permissive licence) · get_code("a1a1ae5b89c1989d")
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 torch.nn as nn

torch.manual_seed(0)

# Create a state dict with weight and bias tensors
sd = {
    'layer1.weight': torch.randn(4, 3),  # 2D weight tensor
    'layer1.bias': torch.randn(4),  # 1D bias tensor
    'layer2.weight': torch.randn(5, 6),  # 2D weight tensor
    'layer2.bias': torch.randn(5),  # 1D bias tensor
}

ARGS = {
    'sd': sd
}
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
make_functional Ran
ran; our contract draft was wrong, not the code
avivsham/deep-weight-space-augmentations/models/relation_transformer/probe_features.py
code served (permissive licence) · get_code("d1d584930ebaf49f")
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 torch.nn as nn
import copy

torch.manual_seed(0)

# Create a simple neural network module for testing
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

# Instantiate the model
mod = SimpleModel()

# Create ARGS dictionary with all parameters for make_functional
ARGS = {
    "mod": mod,
    "disable_autograd_tracking": False
}
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
params_to_tensor Ran
ran; our contract draft was wrong, not the code
avivsham/deep-weight-space-augmentations/models/relation_transformer/probe_features.py
code served (permissive licence) · get_code("1c6218d622c906cd")
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 torch.nn as nn

torch.manual_seed(0)

# The function expects 'params' which should be an iterable of tensors/parameters
# It calls .flatten() on each and accesses .shape on each

# Create a simple list of parameter tensors with distinct shapes
param1 = nn.Parameter(torch.randn(2, 3))
param2 = nn.Parameter(torch.randn(4, 5, 6))
param3 = nn.Parameter(torch.randn(7,))

params = [param1, param2, param3]

ARGS = {
    "params": params
}
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
tensor_to_params Ran
ran; our contract draft was wrong, not the code
avivsham/deep-weight-space-augmentations/models/relation_transformer/probe_features.py
code served (permissive licence) · get_code("2ca47312070f6b13")
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)

# The function takes a flattened tensor and reshapes it into multiple parameters
# based on the provided shapes list.

# Create a simple flattened tensor
# We'll create shapes that require different total sizes to test the logic
shapes = [(2, 3), (4,), (2, 2, 2)]

# Calculate total size needed
total_size = sum(torch.prod(torch.tensor(shape)).item() for shape in shapes)

# Create a flattened tensor with that total size
tensor = torch.randn(total_size)

ARGS = {
    "tensor": tensor,
    "shapes": shapes,
}
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

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 1 the same month, 1 later) and 5 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
Linear 58 other papers
46 dated earlier, 1 the same month, 10 later, 1 same year, order not determinable · 5 only as an assembly brick
1409.0473 (2014-09)
Neural Machine Translation by Jointly Learning to Align and Translate
1706.03762 (2017-06)
Attention Is All You Need
1904.01681 (2019-04)
Augmented Neural ODEs
and 55 more not named here

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

Learning in deep weight spaces (DWS), where neural networks process the weights of other neural networks, is an emerging research direction, with applications to 2D and 3D neural fields (INRs, NeRFs), as well as making inferences about other types of neural networks. Unfortunately, weight space models tend to suffer from substantial overfitting. We empirically analyze the reasons for this overfitting and find that a key reason is the lack of diversity in DWS datasets. While a given object can be represented by many different weight configurations, typical INR training sets fail to capture variability across INRs that represent the same object. To address this, we explore strategies for data augmentation in weight spaces and propose a MixUp method adapted for weight spaces. We demonstrate the effectiveness of these methods in two setups. In classification, they improve performance similarly to having up to 10 times more data. In self-supervised contrastive learning, they yield substantial 5-10% gains in downstream classification.

For agents

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

get_harvested_code_for_paper("2402.04081")
get_code_for_paper("2402.04081")
have("2402.04081")

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

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

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

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

Connect an agent — have() is free.