SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2003.03033 · 2020

What is the State of Neural Network Pruning?

arXiv · PDF · Open in the Atlas

Code that ran

11 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 10 have no contract verdict; 1 failure 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/2003.03033.json · badge: /api/ran/2003.03033.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
jjgo/shrinkbench canonical (classifier label)
classifier basis: census
11 ran · 1 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; our contract draft was wrong, not the code
jjgo/shrinkbench/metrics/accuracy.py
code served (permissive licence) · get_code("b870f3841d427d99")
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 ndarray, ndim 1, dtype family float, shape (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
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Define a simple model that takes input and produces classification output
class SimpleModel(nn.Module):
    def __init__(self, input_dim, num_classes):
        super().__init__()
        self.linear = nn.Linear(input_dim, num_classes)
    
    def forward(self, x):
        return self.linear(x)

# Create model
model = SimpleModel(input_dim=4, num_classes=5)

# Create a simple dataloader (list of (input, target) tuples)
# Batch size 2, input dimension 4, num_classes 5
batch1_input = torch.randn(2, 4)
batch1_target = torch.randint(0, 5, (2,))

batch2_input = torch.randn(2, 4)
batch2_target = torch.randint(0, 5, (2,))

dataloader = [(batch1_input, batch1_target), (batch2_input, batch2_target)]

# Add dataset attribute to dataloader for len(dataloader.dataset)
class SimpleDataLoader:
    def __init__(self, batches):
        self.batches = batches
        self.dataset = self
    
    def __iter__(self):
        return iter(self.batches)
    
    def __len__(self):
        return sum(len(batch[0]) for batch in self.batches)

dataloader = SimpleDataLoader([(batch1_input, batch1_target), (batch2_input, batch2_target)])

ARGS = {
    "model": model,
    "dataloader": dataloader,
    "topk": (1, 3)
}
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 ndarray, ndim 1, dtype family float, shape (2,) — shape (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
conv2d_flops Ran
ran on a synthesized input
jjgo/shrinkbench/metrics/abstract_flops.py
code served (permissive licence) · get_code("ea28692522bc6071")
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 int, ndim 0, dtype family int, 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 numpy as np

# Set up arguments for conv2d_flops function
ARGS = {
    'in_channels': 10,
    'out_channels': 15,
    'input_shape': (4, 5),
    'kernel_shape': (3, 2),
    'padding': 'same',
    'strides': (1, 2),
    'dilation': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
correct Ran
ran on a synthesized input
jjgo/shrinkbench/metrics/accuracy.py
code served (permissive licence) · get_code("dae9edbccd1023f5")
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)

# Create small tensors for testing
# output: model predictions with shape (batch_size, num_classes)
# We use batch_size=2, num_classes=4
batch_size = 2
num_classes = 4

output = torch.randn(batch_size, num_classes)
target = torch.tensor([1, 3])  # target labels for each sample in batch

ARGS = {
    "output": output,
    "target": target,
    "topk": (1, 2)
}
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
dataset_path Ran
ran on a synthesized input
jjgo/shrinkbench/datasets/datasets.py
code served (permissive licence) · get_code("1b4a7337eb8e904c")
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 PosixPath. 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 pathlib
import os
import tempfile

# Create a temporary directory structure to simulate dataset locations
temp_dir = tempfile.TemporaryDirectory()
temp_path = pathlib.Path(temp_dir.name)

# Create a fake dataset directory
dataset_dir = temp_path / "MNIST"
dataset_dir.mkdir(parents=True, exist_ok=True)

# Create a fake file in the dataset directory to make it "exist"
(dataset_dir / "data.txt").touch()

ARGS = {
    "dataset": "MNIST",
    "path": str(temp_path)
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
dense_flops Ran
ran on a synthesized input
jjgo/shrinkbench/metrics/abstract_flops.py
code served (permissive licence) · get_code("6339375cb9607ec8")
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 int, ndim 0, dtype family int, 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
import numpy as np

torch.manual_seed(0)

# The function dense_flops takes two integer parameters: in_neurons and out_neurons
# It simply multiplies them together to compute FLOPs for a dense layer

ARGS = {
    "in_neurons": 128,
    "out_neurons": 256,
}
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 int, ndim 0, dtype family int, 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
get_classifier_module Ran
ran on a synthesized input
jjgo/shrinkbench/models/head.py
code served (permissive licence) · get_code("e5e70e38817af64f")
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 Linear. 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 torchvision.models

torch.manual_seed(0)

# Create a ResNet model (one of the MODELS_WITH_FC)
model = torchvision.models.resnet18(pretrained=False)

ARGS = {
    "model": model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
mark_classifier Ran
ran on a synthesized input
jjgo/shrinkbench/models/head.py
code served (permissive licence) · get_code("d40ad3113b27ca66")
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 ResNet. 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 torchvision.models

torch.manual_seed(0)

# Create a ResNet model (one of MODELS_WITH_FC)
model = torchvision.models.resnet18(pretrained=False)

# Verify the model has the expected 'fc' attribute
assert hasattr(model, 'fc'), "ResNet should have 'fc' attribute"

ARGS = {
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ResNet — a ResNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ResNet 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
reduce_linear_layer Ran
ran on a synthesized input
jjgo/shrinkbench/models/head.py
code served (permissive licence) · get_code("3a12702023a2fdf5")
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 Linear. 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
from torch import nn

torch.manual_seed(0)

# Create a linear layer with in_features=4, out_features=10 (original number of classes)
layer = nn.Linear(in_features=4, out_features=10)

# Define the number of classes to reduce to
n_classes = 3

# Define whether to keep weights
keep_weights = True

ARGS = {
    "layer": layer,
    "n_classes": n_classes,
    "keep_weights": keep_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 Linear — a Linear output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Linear 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
resnet_factory Ran
ran on a synthesized input
jjgo/shrinkbench/models/cifar_resnet.py
code served (permissive licence) · get_code("ad3e13d20798cd64")
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)

# Create a mock pretrained_weights function that the resnet_factory calls
def pretrained_weights(name):
    # Return a dict with state_dict key containing model weights
    model = nn.Linear(10, 10)
    return {'state_dict': model.state_dict()}

# Define the arguments for resnet_factory
ARGS = {
    'filters': [2, 2, 2],  # num_blocks for each layer
    'num_classes': 5,      # number of output classes
    'name': 'resnet20'     # model name for pretrained weights lookup
}
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
vgg_bn_drop Ran
ran on a synthesized input
jjgo/shrinkbench/models/cifar_vgg.py
code served (permissive licence) · get_code("898a6816feed8f15")
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 VGGBnDrop. 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 math

torch.manual_seed(0)

# Mock the pretrained_weights function since it's called in vgg_bn_drop
def pretrained_weights(model_name):
    """Return a mock state dict for the model"""
    model = VGGBnDrop(num_classes=10)
    # Return the current state dict as mock pretrained weights
    return model.state_dict()

ARGS = {
    'pretrained': 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 VGGBnDrop — a VGGBnDrop output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGGBnDrop 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
vgg_bn_drop_100 Ran
ran on a synthesized input
jjgo/shrinkbench/models/cifar_vgg.py
code served (permissive licence) · get_code("3ee17008fcbc8808")
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 VGGBnDrop. 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 math

torch.manual_seed(0)

# Create a mock pretrained_weights function that returns a state dict
def pretrained_weights(model_name):
    model = nn.Sequential(
        nn.Conv2d(3, 64, 3, padding=1),
        nn.BatchNorm2d(64),
        nn.ReLU(inplace=True)
    )
    return model.state_dict()

ARGS = {
    'pretrained': 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 VGGBnDrop — a VGGBnDrop output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGGBnDrop 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
pretrained_weights Not yet run
unverified (harvested, no recorded run)
jjgo/shrinkbench/models/pretrained.py
code served (permissive licence) · get_code("c4cd80b80f8cfb29")
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, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 7 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
accuracy 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
conv2d_flops 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
dataset_path 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
dense_flops 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
get_classifier_module 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
mark_classifier 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization
reduce_linear_layer 1 other paper
1 later
2203.04940 (2022-03)
Data-Efficient Structured Pruning via Submodular Optimization

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 network pruning---the task of reducing the size of a network by removing parameters---has been the subject of a great deal of work in recent years. We provide a meta-analysis of the literature, including an overview of approaches to pruning and consistent findings in the literature. After aggregating results across 81 papers and pruning hundreds of models in controlled conditions, our clearest finding is that the community suffers from a lack of standardized benchmarks and metrics. This deficiency is substantial enough that it is hard to compare pruning techniques to one another or determine how much progress the field has made over the past three decades. To address this situation, we identify issues with current practices, suggest concrete remedies, and introduce ShrinkBench, an open-source framework to facilitate standardized evaluations of pruning methods. We use ShrinkBench to compare various pruning techniques and show that its comprehensive evaluation can prevent common pitfalls when comparing pruning methods.

For agents

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

get_harvested_code_for_paper("2003.03033")
get_code_for_paper("2003.03033")
have("2003.03033")

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

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

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

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

Connect an agent — have() is free.