SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2212.13554 · 2022

NeRN -- Learning Neural Representations for Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

5 of 6 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 5 have no contract verdict; 0 failures of our instrument; 1 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/2212.13554.json · badge: /api/ran/2212.13554.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
maorash/nern canonical (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
compute_grad_norms Ran
ran on a synthesized input
maorash/nern/NeRN/log_utils.py
code served (permissive licence) · get_code("293127a2208d8014")
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, 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 list of tensors with gradients enabled
weight1 = torch.randn(4, 3, requires_grad=True)
weight2 = torch.randn(5, 4, requires_grad=True)

# Simulate a backward pass to populate gradients
loss = weight1.sum() + weight2.sum()
loss.backward()

weights = [weight1, weight2]

ARGS = {
    "weights": weights
}
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, ndim 1, dtype family float — a list 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
create_experiment_dir Ran
ran on a synthesized input
maorash/nern/NeRN/log_utils.py
code served (permissive licence) · get_code("6b466bc72089e527")
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 str. 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 os
from datetime import datetime
import tempfile

# Create a temporary directory for logging
temp_log_dir = tempfile.mkdtemp()

ARGS = {
    'log_dir': temp_log_dir,
    'exp_name': 'test_experiment'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
get_dataloaders Ran
ran on a synthesized input
maorash/nern/NeRN/tasks/imagenet_helpers.py
code served (permissive licence) · get_code("f39c3e4ba3afe858")
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 tempfile
import os
from pathlib import Path

torch.manual_seed(0)

class TaskConfig:
    def __init__(self):
        # Create a temporary directory to act as imagenet_path
        self.temp_dir = tempfile.mkdtemp()
        self.imagenet_path = self.temp_dir
        self.original_model_name = 'ResNet18'

task_cfg = TaskConfig()

# Create minimal directory structure for imagenet dataset
train_dir = os.path.join(task_cfg.imagenet_path, 'train')
val_dir = os.path.join(task_cfg.imagenet_path, 'val')
os.makedirs(train_dir, exist_ok=True)
os.makedirs(val_dir, exist_ok=True)

# Create minimal class directories
for i in range(2):
    class_dir = os.path.join(train_dir, f'class_{i}')
    os.makedirs(class_dir, exist_ok=True)
    class_dir = os.path.join(val_dir, f'class_{i}')
    os.makedirs(class_dir, exist_ok=True)

# Create minimal dummy image files
from PIL import Image
import numpy as np

for split_dir in [train_dir, val_dir]:
    for class_idx in range(2):
        class_dir = os.path.join(split_dir, f'class_{class_idx}')
        for img_idx in range(2):
            img_path = os.path.join(class_dir, f'img_{img_idx}.jpg')
            img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
            img = Image.fromarray(img_array)
            img.save(img_path)

train_kwargs = {
    'batch_size': 2,
    'prefetcher': False,
    'no_aug': False,
    'reprob': 0.0,
    'remode': 'pixel',
    'recount': 1,
    'resplit': False,
    'scale': [0.08, 1.0],
    'ratio': [3.0 / 4.0, 4.0 / 3.0],
    'hflip': 0.5,
    'vflip': 0,
    'color_jitter': 0.4,
    'aa': 'rand-m7-mstd0.5-inc1',
    'aug_repeats': 0,
    'num_aug_splits': 0,
    'num_workers': 0,
    'distributed': False,
    'local_rank': 0,
    'world_size': 1,
    'pin_mem': False,
    'use_multi_epochs_loader': False,
    'worker_seeding': 'all',
    'channels_last': False,
}

test_kwargs = {
    'batch_size': 2,
    'prefetcher': False,
    'num_workers': 0,
    'pin_mem': False,
    'distributed': False,
    'local_rank': 0,
    'world_size': 1,
    'channels_last': False,
    'tta': 0,
    'log_interval': 40,
}

ARGS = {
    'train_kwargs': train_kwargs,
    'test_kwargs': test_kwargs,
    'task_cfg': task_cfg,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, timm, 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
get_positional_encoding_embedder Ran
ran on a synthesized input
maorash/nern/NeRN/positional_embedding.py
code served (permissive licence) · get_code("ace2c9653da1ce64")
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
from torch import nn

torch.manual_seed(0)

ARGS = {
    'multires': 4,
    'enable_encoding': True,
}
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
validate Ran
ran on a synthesized input
maorash/nern/NeRN/tasks/imagenet_helpers.py
code served (permissive licence) · get_code("40503c4c5290a252")
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 OrderedDict. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 contextlib import suppress

torch.manual_seed(0)

# Build a minimal model that returns output suitable for the validate function
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 10)
    
    def forward(self, x):
        return self.linear(x)

# Build a minimal data loader (list of batches)
# Each batch is (input, target) tuple
loader = []
for i in range(3):
    input_tensor = torch.randn(2, 4)  # batch_size=2, num_features=4
    target_tensor = torch.randint(0, 10, (2,))  # 10 classes
    loader.append((input_tensor, target_tensor))

# Build loss function
loss_fn = nn.CrossEntropyLoss()

# Build model
model = MinimalModel()

# Define ARGS dict with all parameters
ARGS = {
    'model': model,
    'loader': loader,
    'loss_fn': loss_fn,
    'amp_autocast': suppress,
    'log_suffix': ''
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type OrderedDict — a OrderedDict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a OrderedDict 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
flatten Not yet run
unverified (harvested, no recorded run)
maorash/nern/NeRN/log_utils.py
code served (permissive licence) · get_code("43c4d88296b94a63")
How it ran

no invocation recorded.

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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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

Neural Representations have recently been shown to effectively reconstruct a wide range of signals from 3D meshes and shapes to images and videos. We show that, when adapted correctly, neural representations can be used to directly represent the weights of a pre-trained convolutional neural network, resulting in a Neural Representation for Neural Networks (NeRN). Inspired by coordinate inputs of previous neural representation methods, we assign a coordinate to each convolutional kernel in our network based on its position in the architecture, and optimize a predictor network to map coordinates to their corresponding weights. Similarly to the spatial smoothness of visual scenes, we show that incorporating a smoothness constraint over the original network's weights aids NeRN towards a better reconstruction. In addition, since slight perturbations in pre-trained model weights can result in a considerable accuracy loss, we employ techniques from the field of knowledge distillation to stabilize the learning process. We demonstrate the effectiveness of NeRN in reconstructing widely used architectures on CIFAR-10, CIFAR-100, and ImageNet. Finally, we present two applications using NeRN, demonstrating the capabilities of the learned representations.

For agents

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

get_harvested_code_for_paper("2212.13554")
get_code_for_paper("2212.13554")
have("2212.13554")

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

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

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

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

Connect an agent — have() is free.