SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.08132 · 2022

Prospect Pruning: Finding Trainable Weights at Initialization using Meta-Gradients

arXiv · PDF · Open in the Atlas

Code that ran

5 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 3 have no contract verdict; 2 failures of our instrument; 7 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/2202.08132.json · badge: /api/ran/2202.08132.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
mil-ad/prospr canonical (classifier label)
classifier basis not recorded on the link
5 ran · 7 no recorded run
FunctionStatusWhere it lives
conv1x1 Ran
ran; our contract draft was wrong, not the code
mil-ad/prospr/models/resnet_custom.py
code served (permissive licence) · get_code("d9def42110729a85")
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 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

torch.manual_seed(0)

# The function conv1x1 takes in_planes, out_planes, and stride as parameters
# It returns an nn.Conv2d layer configured for 1x1 convolution
# We need to provide valid integer arguments for these parameters

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1
}
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 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
conv3x3 Ran
ran; our contract draft was wrong, not the code
mil-ad/prospr/models/resnet_custom.py
code served (permissive licence) · get_code("160bb14bd76201b4")
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 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

torch.manual_seed(0)

ARGS = {
    "in_planes": 3,
    "out_planes": 64,
    "stride": 1,
    "groups": 1,
    "dilation": 1,
}
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 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
functional_sgd Ran
ran on a synthesized input
mil-ad/prospr/prospr/prospr.py
code served (permissive licence) · get_code("2e0a7ab17059596d")
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 small parameter tensors
param1 = torch.randn(4, 3, requires_grad=True)
param2 = torch.randn(2, 5, requires_grad=True)

# Create corresponding gradient tensors
grad1 = torch.randn(4, 3)
grad2 = torch.randn(2, 5)

# Create momentum state (initially None for first step)
momentum_state1 = None
momentum_state2 = None

ARGS = {
    "params": [param1, param2],
    "grads": [grad1, grad2],
    "momentum_state": [momentum_state1, momentum_state2],
    "lr": 0.01,
    "momentum": 0.9,
    "weight_decay": 0.0001,
    "dampening": 0.0,
    "nesterov": 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 — 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
get_imagenet Ran
ran on a synthesized input
mil-ad/prospr/datasets.py
code served (permissive licence) · get_code("6bc530d5e9c4de0a")
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 tempfile
from pathlib import Path
from torchvision import datasets, transforms
import os

# Create a temporary directory structure that mimics imagenet layout
temp_dir = tempfile.mkdtemp()
root = Path(temp_dir)

# Create imagenet/train and imagenet/val directories with minimal structure
imagenet_dir = root / 'imagenet'
train_dir = imagenet_dir / 'train'
val_dir = imagenet_dir / 'val'

train_dir.mkdir(parents=True, exist_ok=True)
val_dir.mkdir(parents=True, exist_ok=True)

# Create minimal class directories (ImageFolder expects class subdirectories)
for class_idx in range(2):
    class_train_dir = train_dir / f'class_{class_idx}'
    class_val_dir = val_dir / f'class_{class_idx}'
    class_train_dir.mkdir(exist_ok=True)
    class_val_dir.mkdir(exist_ok=True)

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

for class_idx in range(2):
    # Create dummy train images
    for img_idx in range(2):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img_path = train_dir / f'class_{class_idx}' / f'image_{img_idx}.jpg'
        img.save(img_path)
    
    # Create dummy val images
    for img_idx in range(2):
        img_array = np.random.randint(0, 256, (224, 224, 3), dtype=np.uint8)
        img = Image.fromarray(img_array)
        img_path = val_dir / f'class_{class_idx}' / f'image_{img_idx}.jpg'
        img.save(img_path)

ARGS = {
    'root': root,
    'standardize': True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torchvision — 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
pruning_filter_factory Ran
ran on a synthesized input
mil-ad/prospr/prospr/utils.py
code served (permissive licence) · get_code("7b2200bb55802830")
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 function. 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 takes num_classes and structured as parameters
# It returns a filter function that checks layer types and properties
# The filter function is called with nn.Module instances (m parameter)
# It checks isinstance(m, nn.Conv2d) and isinstance(m, nn.Linear)
# For Linear layers, it checks m.out_features against num_classes

ARGS = {
    "num_classes": 10,
    "structured": 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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
apply_masks_with_hooks Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/prospr/utils.py
code served (permissive licence) · get_code("87ed2acbb021de28")
How it ran

no invocation recorded.

attach_masks_as_parameter Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/prospr/utils.py
code served (permissive licence) · get_code("d1b161cee5bff7e5")
How it ran

no invocation recorded.

create_logdir Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/utils.py
code served (permissive licence) · get_code("4ba948355d6b2b2f")
How it ran

no invocation recorded.

get_cifar10 Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/datasets.py
code served (permissive licence) · get_code("035a3c7ada3cd3eb")
How it ran

no invocation recorded.

get_cifar100 Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/datasets.py
code served (permissive licence) · get_code("e953f0a585a2f2d9")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/models/resnet_custom.py
code served (permissive licence) · get_code("75ac27c2c68e8305")
How it ran

no invocation recorded.

unconcatenate Not yet run
unverified (harvested, no recorded run)
mil-ad/prospr/utils.py
code served (permissive licence) · get_code("ebcb887f8a78c073")
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, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 2 the same month, 2 later) and 10 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
conv1x1 431 other papers
169 dated earlier, 4 the same month, 246 later, 11 same year, order not determinable, 1 undated · 38 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1506.01186 (2015-06)
Cyclical Learning Rates for Training Neural Networks
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
and 428 more not named here
conv3x3 312 other papers
103 dated earlier, 2 the same month, 197 later, 9 same year, order not determinable, 1 undated · 31 only as an assembly brick
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1507.05717 (2015-07)
An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
and 309 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

Pruning neural networks at initialization would enable us to find sparse models that retain the accuracy of the original network while consuming fewer computational resources for training and inference. However, current methods are insufficient to enable this optimization and lead to a large degradation in model performance. In this paper, we identify a fundamental limitation in the formulation of current methods, namely that their saliency criteria look at a single step at the start of training without taking into account the trainability of the network. While pruning iteratively and gradually has been shown to improve pruning performance, explicit consideration of the training stage that will immediately follow pruning has so far been absent from the computation of the saliency criterion. To overcome the short-sightedness of existing methods, we propose Prospect Pruning (ProsPr), which uses meta-gradients through the first few steps of optimization to determine which weights to prune. ProsPr combines an estimate of the higher-order effects of pruning on the loss and the optimization trajectory to identify the trainable sub-network. Our method achieves state-of-the-art pruning performance on a variety of vision classification tasks, with less data and in a single shot compared to existing pruning-at-initialization methods.

For agents

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

get_harvested_code_for_paper("2202.08132")
get_code_for_paper("2202.08132")
have("2202.08132")

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

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

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

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

Connect an agent — have() is free.