SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2202.12002 · 2022

Rare Gems: Finding Lottery Tickets at Initialization

arXiv · PDF · Open in the Atlas

Code that ran

9 of 15 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; 1 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 1 failure of our instrument; 6 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.12002.json · badge: /api/ran/2202.12002.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
ksreenivasan/pruning_is_enough canonical (classifier label)
classifier basis not recorded on the link
9 ran · 6 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ksreenivasan/pruning_is_enough/imagenet/imagenet_main.py
code served (permissive licence) · get_code("131a82fd65128218")
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 list, ndim 2, 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
batch_size = 2
num_classes = 4

# output: logits/scores tensor of shape (batch_size, num_classes)
output = torch.randn(batch_size, num_classes)

# target: class indices tensor of shape (batch_size,)
target = torch.tensor([1, 3])

# topk: tuple of k values to compute accuracy for
topk = (1, 2)

ARGS = {
    "output": output,
    "target": target,
    "topk": topk,
}
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 list, ndim 2, 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
evaluate Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/ddp_poc.py
code served (permissive licence) · get_code("0e83bd2013f6f15f")
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 float, 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
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal model that accepts flattened images and outputs class logits
class TinyModel(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.fc = nn.Linear(32 * 32 * 3, num_classes)
    
    def forward(self, x):
        return self.fc(x)

# Create model instance
model = TinyModel(num_classes=10)

# Device (CPU only)
device = torch.device('cpu')

# Create a minimal test loader with 2 batches of 2 samples each
# Each image is flattened to 32*32*3 = 3072 features, but we'll create small stand-in data
# The function reshapes to (-1, 32*32*3), so input should be (batch, channels, height, width) = (batch, 3, 32, 32)
test_loader = [
    (torch.randn(2, 3, 32, 32), torch.tensor([0, 1])),
    (torch.randn(2, 3, 32, 32), torch.tensor([2, 3]))
]

ARGS = {
    'model': model,
    'device': device,
    'test_loader': test_loader
}
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 float, 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
get_gaussian_data Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/bad_global_minima_2d_brute_force.py
code served (permissive licence) · get_code("3b3f08aa02409200")
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. 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)

ARGS = {
    "x1": (25, 0),
    "x2": (-25, 0),
    "std": 2,
    "lin_sep": True,
    "n": 100,
}
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 — a list 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_model_norm Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/ddp_poc.py
code served (permissive licence) · get_code("48b1ee1243eeb2e8")
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
import torch.nn as nn

torch.manual_seed(0)

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

model = SimpleModel()

ARGS = {
    "model": model
}
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
hinge_loss Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/bad_global_minima_2d_brute_force.py
code served (permissive licence) · get_code("8e452c2493ffbb3e")
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
import torch.nn as nn

torch.manual_seed(0)

# Construct valid arguments for hinge_loss
# The function expects:
# - output: tensor of predictions (real-valued scores)
# - target: tensor of labels (typically -1 or 1 for hinge loss)

output = torch.randn(2, 4)  # batch size 2, dimension 4
target = torch.randint(-1, 2, (2, 4)).float() * 2 - 1  # -1 or 1 values

ARGS = {
    "output": output,
    "target": target,
}
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
randomize_labels Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/bad_global_minima_2d_brute_force.py
code served (permissive licence) · get_code("b7486c2e2253eff1")
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. 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 numpy as np

torch.manual_seed(0)

# The function expects 'data' to be an iterable of (data_i, target_i) tuples
# It iterates through the data, accesses len(data), and creates tensors
# Each element should be a tuple of (tensor, some_target_value)

data = [
    (torch.randn(4, 3), 1),
    (torch.randn(4, 3), -1),
]

ARGS = {
    "data": data
}
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 — a list 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
resnet20 Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/IMP_codebase/cifar_model_resnet.py
code served (permissive licence) · get_code("8d4c82954b75940e")
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

torch.manual_seed(0)

# The function resnet20 takes one parameter: ignore_name
# Looking at the ResNet.__init__ method, ignore_name is used as:
# if ignore_name is not None:
#     self.prunable_layer_names -= set(ignore_name.split(','))
# So it should be either None or a comma-separated string of layer names to ignore

ARGS = {
    'ignore_name': 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 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
test Ran
ran on a synthesized input
ksreenivasan/pruning_is_enough/mnist_pruning_exps.py
code served (permissive licence) · get_code("dc2c00b33a3a97ed")
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 float, 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
import torch.nn as nn
from torch.utils.data import TensorDataset, DataLoader

torch.manual_seed(0)

# Create a simple model
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.fc = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.fc(x)

model = SimpleModel()

device = 'cpu'

criterion = nn.CrossEntropyLoss()

# Create a small test dataset
data = torch.randn(2, 4)
target = torch.randint(0, 3, (2,))
dataset = TensorDataset(data, target)
test_loader = DataLoader(dataset, batch_size=2)

ARGS = {
    'model': model,
    'device': device,
    'criterion': criterion,
    'test_loader': test_loader
}
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 float, 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
validate Ran
ran, honoured the contract we drafted
ksreenivasan/pruning_is_enough/imagenet/imagenet_main.py
code served (permissive licence) · get_code("32caae9f59d57828")
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. 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, 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 torch.nn.functional as F

torch.manual_seed(0)

# Minimal model that accepts images and produces classification output
class SimpleModel(nn.Module):
    def __init__(self, num_classes=1000):
        super(SimpleModel, self).__init__()
        self.fc = nn.Linear(4, num_classes)
    
    def forward(self, x):
        # x shape: (batch_size, 4)
        return self.fc(x)

# Create a minimal data loader (list of tuples)
def create_val_loader(batch_size=2, num_batches=3):
    loader = []
    for _ in range(num_batches):
        # images: (batch_size, 4), target: (batch_size,)
        images = torch.randn(batch_size, 4)
        target = torch.randint(0, 1000, (batch_size,))
        loader.append((images, target))
    return loader

# Create model and criterion
model = SimpleModel(num_classes=1000)
criterion = nn.CrossEntropyLoss()
val_loader = create_val_loader(batch_size=2, num_batches=3)

# Create args object as a simple class
class Args:
    def __init__(self):
        self.gpu = None
        self.print_freq = 1

args = Args()

ARGS = {
    'val_loader': val_loader,
    'model': model,
    'criterion': criterion,
    'args': args
}
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
get_layer_sparsity Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/mnist_pruning_exps.py
code served (permissive licence) · get_code("11443528f7e75536")
How it ran

no invocation recorded.

get_layer_sparsity Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/binary_gadget_mnist.py
code served (permissive licence) · get_code("003ade9fd51ab38a")
How it ran

no invocation recorded.

get_layer_sparsity Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/imagenet/debug_from_ckpt.py
code served (permissive licence) · get_code("bde6efdb01ba494a")
How it ran

no invocation recorded.

get_model_sparsity Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/mnist_pruning_exps.py
code served (permissive licence) · get_code("c3487f1c2e385038")
How it ran

no invocation recorded.

get_model_sparsity Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/binary_gadget_mnist.py
code served (permissive licence) · get_code("251b99e816095f4a")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
ksreenivasan/pruning_is_enough/imagenet/imagenet_main.py
code served (permissive licence) · get_code("fdaf8b4fcf382ea3")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 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
accuracy 116 other papers
36 dated earlier, 1 the same month, 75 later, 4 same year, order not determinable · 8 only as an assembly brick
1502.03044 (2015-02)
Show, Attend and Tell: Neural Image Caption Generation with Visual Attention
1610.05820 (2016-10)
Membership Inference Attacks Against Machine Learning Models
1905.03696 (2019-05)
HAWQ: Hessian AWare Quantization of Neural Networks with Mixed-Precision
and 113 more not named here
validate 1 other paper
1 dated earlier
2201.09191 (2022-01)
Revisiting Global Pooling through the Lens of Optimal Transport

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

Large neural networks can be pruned to a small fraction of their original size, with little loss in accuracy, by following a time-consuming "train, prune, re-train" approach. Frankle & Carbin conjecture that we can avoid this by training "lottery tickets", i.e., special sparse subnetworks found at initialization, that can be trained to high accuracy. However, a subsequent line of work by Frankle et al. and Su et al. presents concrete evidence that current algorithms for finding trainable networks at initialization, fail simple baseline comparisons, e.g., against training random sparse subnetworks. Finding lottery tickets that train to better accuracy compared to simple baselines remains an open problem. In this work, we resolve this open problem by proposing Gem-Miner which finds lottery tickets at initialization that beat current baselines. Gem-Miner finds lottery tickets trainable to accuracy competitive or better than Iterative Magnitude Pruning (IMP), and does so up to $19\times$ faster.

For agents

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

get_harvested_code_for_paper("2202.12002")
get_code_for_paper("2202.12002")
have("2202.12002")

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

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

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

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

Connect an agent — have() is free.