SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2306.00183 · NeurIPS · 2023

Diffused Redundancy in Pre-trained Representations

Soheil Feizi, Adrian Weller, John Dickerson, Vedant Nanda, Till Speicher, Krishna Gummadi

arXiv · PDF · Open in the Atlas

Code that ran

10 of 12 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 9 have no contract verdict; 1 failure of our instrument; 2 no recorded run), measured 2026-11-23; 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/2306.00183.json · badge: /api/ran/2306.00183.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
nvedant07/STIR canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
FunctionStatusWhere it lives
add_args_to_parser Ran
ran; our contract draft was wrong, not the code
nvedant07/STIR/stir/model/defaults.py
code served (permissive licence) · get_code("078da01e51a28471")
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 ArgumentParser. 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 argparse

ARGS = {
    'arg_list': [
        ['learning_rate', float, 'Learning rate for optimization', 0.001],
        ['batch_size', int, 'Batch size for training', 32],
        ['model_type', ['lstm', 'gru', 'transformer'], 'Type of model to use', 'lstm'],
        ['epochs', int, 'Number of training epochs', 10],
        ['optimizer', ['adam', 'sgd'], 'Optimizer to use', 'adam'],
    ],
    'parser': argparse.ArgumentParser(description='Test parser'),
}
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 ArgumentParser — a ArgumentParser output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ArgumentParser 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
centering Ran
ran on a synthesized input
nvedant07/STIR/stir/CKA_pytorch.py
code served (permissive licence) · get_code("3618a159ae4e6c6f")
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 (4, 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 as ch

ch.manual_seed(0)

# K should be a square matrix (kernel/Gram matrix)
# The function expects it to have shape [n, n] and device attribute
K = ch.randn(4, 4).float()

ARGS = {
    "K": K
}
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 (4, 4) — shape (4, 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
forward_models Ran
ran on a synthesized input
nvedant07/STIR/stir/attack/losses.py
code served (permissive licence) · get_code("b7b8027b897178e1")
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 (2, 3) 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
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal model that satisfies the function's usage
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, inp, with_latent=False, fake_relu=False, layer_num=None):
        # The function calls model(inp, with_latent=True, fake_relu=..., layer_num=...)
        # so the model must accept these keyword arguments
        return self.linear(inp)

# Create input tensor: batch_size=2, feature_dim=4
inp = torch.randn(2, 4)

# Create model instance
model = SimpleModel()

# Define all arguments for forward_models function
ARGS = {
    "model": model,
    "inp": inp,
    "layer_num": None
}
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 (2, 3) — shape (2, 3) 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
image_plot Ran
ran on a synthesized input
nvedant07/STIR/stir/plot_helper.py
code served (permissive licence) · get_code("38eecfafc4f839af")
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 numpy as np
import tempfile
import os

# Create a temporary directory for results
temp_dir = tempfile.mkdtemp()

# Create a valid image object - RGB image (3 channels)
# Shape should be (height, width, 3) for RGB
image_object = np.random.rand(4, 5, 3).astype(np.float32)

# Define arguments
ARGS = {
    'image_object': image_object,
    'results_dir': temp_dir,
    'filename': 'test_image',
    'extension': 'png'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, seaborn — 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
kernel_HSIC Ran
ran on a synthesized input
nvedant07/STIR/stir/CKA_pytorch.py
code served (permissive licence) · get_code("1ed3811c7af7289d")
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 0, dtype family float, shape () 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 as ch

ch.manual_seed(0)

# The function kernel_HSIC takes X, Y (both tensors), and sigma (float or None)
# X and Y are used in rbf() which does matrix operations
# They need to be 2D tensors (n_samples, n_features)
# rbf returns a kernel matrix, centering operates on square matrices

X = ch.randn(2, 4, dtype=ch.float32)
Y = ch.randn(2, 3, dtype=ch.float32)
sigma = 1.0

ARGS = {
    "X": X,
    "Y": Y,
    "sigma": sigma,
}
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 0, dtype family float, shape () — shape () 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
list_as_floats Ran
ran on a synthesized input
nvedant07/STIR/stir/helper.py
code served (permissive licence) · get_code("129b2365166bddfa")
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 numpy as np

torch.manual_seed(0)

# The function takes a single parameter 'arg' which should be a string
# It splits the string by commas and converts each element to float
# If an element is 'none' (case-insensitive), it becomes None instead

ARGS = {
    'arg': '1.5,2.3,none,4.7,None,0.0'
}
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 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
list_as_ints Ran
ran on a synthesized input
nvedant07/STIR/stir/helper.py
code served (permissive licence) · get_code("eed7ebd73f4d076e")
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

torch.manual_seed(0)

ARGS = {
    "arg": "1,2,3,none,5"
}
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
list_as_strs Ran
ran on a synthesized input
nvedant07/STIR/stir/helper.py
code served (permissive licence) · get_code("fe88a8117264e87e")
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

torch.manual_seed(0)

def list_as_strs(arg):
    return [str(x) if x.lower() != 'none' else None for x in arg.split(',')]

ARGS = {
    'arg': 'hello,world,NONE,test'
}
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
make_loaders Ran
ran on a synthesized input
nvedant07/STIR/stir/model/loaders.py
code served (permissive licence) · get_code("8de5a4001dbcbb38")
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
import numpy as np
from torch.utils.data import Dataset
from torchvision import transforms
import os
import tempfile
import shutil

torch.manual_seed(0)

# Create a minimal custom dataset class
class DummyDataset(Dataset):
    def __init__(self, root, train=True, download=False, transform=None):
        self.root = root
        self.train = train
        self.transform = transform
        self.data = np.random.randn(20, 3, 4, 4).astype(np.float32)
        self.targets = [i % 5 for i in range(20)]
    
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        img = torch.from_numpy(self.data[idx])
        label = self.targets[idx]
        if self.transform:
            img = self.transform(img)
        return img, label

# Create dummy transforms
transform_train = transforms.Compose([
    transforms.ToTensor(),
])
transform_test = transforms.Compose([
    transforms.ToTensor(),
])

# Create a temporary directory structure for the dataset
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val')
os.makedirs(train_dir, exist_ok=True)
os.makedirs(val_dir, exist_ok=True)

# Create minimal ImageFolder-like structure with some dummy files
for split_dir in [train_dir, val_dir]:
    for class_idx in range(3):
        class_dir = os.path.join(split_dir, f'class_{class_idx}')
        os.makedirs(class_dir, exist_ok=True)
        for i in range(2):
            filepath = os.path.join(class_dir, f'img_{i}.txt')
            with open(filepath, 'w') as f:
                f.write('dummy')

# Define ARGS dictionary with all parameters for make_loaders
ARGS = {
    'workers': 0,
    'batch_size': 4,
    'transforms': (transform_train, transform_test),
    'data_path': temp_dir,
    'data_aug': True,
    'custom_class': DummyDataset,
    'dataset': 'dummy_dataset',
    'label_mapping': None,
    'subset': None,
    'subset_type': 'rand',
    'subset_start': 0,
    'val_batch_size': None,
    'only_val': False,
    'shuffle_train': True,
    'shuffle_val': True,
    'seed': 1,
    'custom_class_args': {},
    'n_classes': None,
    'n_samples': None,
    'pin_memory': False,
    'return_datasets': False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torchvision — 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
rbf Ran
ran on a synthesized input
nvedant07/STIR/stir/CKA_pytorch.py
code served (permissive licence) · get_code("603a14d591c9dfb5")
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 (2, 2) 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 as ch

ch.manual_seed(0)

# Create a small tensor for X
# The function uses X in matmul(X, X.T), so X should be 2D
# Let's make it batch_size=2, features=4
X = ch.randn(2, 4)

# sigma is optional - the function handles None by computing it from the data
sigma = None

ARGS = {
    "X": X,
    "sigma": sigma,
}
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 (2, 2) — shape (2, 2) 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
TransformedLoader Not yet run
unverified (harvested, no recorded run)
nvedant07/STIR/stir/model/loaders.py
code served (permissive licence) · get_code("e96e72db9f288269")
How it ran

no invocation recorded.

setup_args Not yet run
unverified (harvested, no recorded run)
nvedant07/STIR/stir/model/train_model.py
code served (permissive licence) · get_code("71f7ddd8aa721475")
How it ran

no invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 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, 1 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
add_args_to_parser 3 other papers
2 dated earlier, 1 later
2106.02078 (2021-06)
Improving Neural Network Robustness via Persistency of Excitation
2305.19101 (2023-05)
Which Models have Perceptually-Aligned Gradients? An Explanation via Off-Manifold Robustness
2308.06887 (2023-08)
Robustified ANNs Reveal Wormholes Between Human Category Percepts

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-23.

Repositories linked to this paper

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

Abstract

Representations learned by pre-training a neural network on a large dataset are increasingly used successfully to perform a variety of downstream tasks. In this work, we take a closer look at how features are encoded in such pre-trained representations. We find that learned representations in a given layer exhibit a degree of diffuse redundancy, i.e., any randomly chosen subset of neurons in the layer that is larger than a threshold size shares a large degree of similarity with the full layer and is able to perform similarly as the whole layer on a variety of downstream tasks. For example, a linear probe trained on 20% of randomly picked neurons from the penultimate layer of a ResNet50 pre-trained on Ima-geNet1k achieves an accuracy within 5% of a linear probe trained on the full layer of neurons for downstream CIFAR10 classification. We conduct experiments on different neural architectures (including CNNs and Transformers) pretrained on both ImageNet1k and ImageNet21k and evaluate a variety of downstream tasks taken from the VTAB benchmark. We find that the loss & dataset used during pre-training largely govern the degree of diffuse redundancy and the "critical mass" of neurons needed often depends on the downstream task, suggesting that there is a task-inherent redundancy-performance Pareto frontier. Our findings shed light on the nature of representations learned by pre-trained deep neural networks and suggest that entire layers might not be necessary to perform many downstream tasks. We investigate the potential for exploiting this redundancy to achieve efficient generalization for downstream tasks and also draw caution to certain possible unintended consequences. Our code is available at https://github.com/nvedant07/diffused-redundancy.

For agents

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

get_harvested_code_for_paper("2306.00183")
get_code_for_paper("2306.00183")
have("2306.00183")

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

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

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

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

Connect an agent — have() is free.