SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper · CVPR · 2022

How Well Do Sparse ImageNet Models Transfer?

Dan Alistarh, Alexandra Peste, Eugenia Iofinova, Mark Kurtz, Neural Magic

Open in the Atlas

Code that ran

10 of 11 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 6 have no contract verdict; 4 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper.json · badge: /api/ran/Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper.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
IST-DASLab/sparse-imagenet-transfer canonical (classifier label)
classifier basis: census
10 ran · 1 no recorded run
FunctionStatusWhere it lives
conv3x3 Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparse-imagenet-transfer/models/resnet_imagenet.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from lixiaotong97/DSU, is pointer only (licence: NONE) · get_code("fac5364e2f53c6db")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from lixiaotong97/DSU, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

find_classes Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparse-imagenet-transfer/utils/transfer/aircraft.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/LearnableISDA, is pointer only (licence: NONE) · get_code("0302e6bc4693eb92")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/LearnableISDA, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

mobilenet_025 Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/models/mobilenet.py
code served (permissive licence) · get_code("58ca65a06701f9ba")
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 MobileNet. 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 = {
    "num_classes": 10
}
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 MobileNet — a MobileNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MobileNet 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
mobilenet_050 Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/models/mobilenet.py
code served (permissive licence) · get_code("e8e20d94a85e66c3")
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 MobileNet. 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 = {
    "num_classes": 10
}
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 MobileNet — a MobileNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MobileNet 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
mobilenet_075 Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/models/mobilenet.py
code served (permissive licence) · get_code("4acb47b4f3df9fea")
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 MobileNet. 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 = {
    'num_classes': 10,
}
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 MobileNet — a MobileNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MobileNet 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
resnet18 Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparse-imagenet-transfer/models/resnet_imagenet.py
code served (permissive licence) · get_code("ca773bdac4553c9d")
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 math

torch.manual_seed(0)

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 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
resnet34 Ran
ran; our contract draft was wrong, not the code
IST-DASLab/sparse-imagenet-transfer/models/resnet_imagenet.py
code served (permissive licence) · get_code("1de008c8497e8be2")
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)

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 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_imgnet_model Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/finetune_pre_extracted_features.py
code served (permissive licence) · get_code("3d6d83af38b2f09d")
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)

# Create a minimal model that matches what test_imgnet_model expects
class SimpleModel(nn.Module):
    def __init__(self, num_classes=10):
        super().__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 (data, target) tuples)
# batch_size=2, input_dim=4, num_classes=10
data_loader = [
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
    (torch.randn(2, 4), torch.randint(0, 10, (2,))),
]

# Add a dataset attribute to the data_loader for len(data_loader.dataset)
class MinimalDataLoader:
    def __init__(self, batches):
        self.batches = batches
        self.dataset = type('obj', (object,), {'__len__': lambda self: 4})()
    
    def __iter__(self):
        return iter(self.batches)

data_loader = MinimalDataLoader(data_loader)

# Create model and device
model = SimpleModel(num_classes=10)
device = 'cpu'

ARGS = {
    'model': model,
    'device': device,
    'data_loader': data_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
test_transforms Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/utils/transfer/constants.py
code served (permissive licence) · get_code("3f1e6949fd94984c")
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 Compose. 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 torchvision import transforms
from PIL import Image

torch.manual_seed(0)

# means and stds are sequences of values for Normalize
means = [0.485, 0.456, 0.406]
stds = [0.229, 0.224, 0.225]

# interpolation is an interpolation mode
interpolation = Image.Resampling.BILINEAR

ARGS = {
    "means": means,
    "stds": stds,
    "interpolation": interpolation,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
train_transforms Ran
ran on a synthesized input
IST-DASLab/sparse-imagenet-transfer/utils/transfer/constants.py
code served (permissive licence) · get_code("cedd6b8b22067194")
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 Compose. 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
from torchvision import transforms

torch.manual_seed(0)

# means and stds are typically sequences of floats for normalization
# (one value per channel, commonly 3 for RGB images)
means = [0.485, 0.456, 0.406]
stds = [0.229, 0.224, 0.225]

# interpolation is an interpolation mode from PIL/torchvision
# Common values are transforms.InterpolationMode.BILINEAR, NEAREST, etc.
interpolation = transforms.InterpolationMode.BILINEAR

ARGS = {
    "means": means,
    "stds": stds,
    "interpolation": interpolation
}
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 Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
make_dataset Not yet run
unverified (harvested, no recorded run)
IST-DASLab/sparse-imagenet-transfer/utils/transfer/aircraft.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from LeapLabTHU/LearnableISDA, is pointer only (licence: NONE) · get_code("6d9b5ef60c8859ac")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from LeapLabTHU/LearnableISDA, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 5 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 5 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.

FunctionAlso present inEarliest-datedOthers named
conv3x3 686 other papers
363 dated earlier, 234 later, 89 same year, order not determinable · 31 only as an assembly brick
1406.2661 (2014-06)
Generative Adversarial Networks
1409.0575 (2014-09)
ImageNet Large Scale Visual Recognition Challenge
1412.6572 (2014-12)
Explaining and Harnessing Adversarial Examples
and 683 more not named here
resnet18 89 other papers
45 dated earlier, 30 later, 14 same year, order not determinable
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 86 more not named here
resnet34 53 other papers
35 dated earlier, 12 later, 6 same year, order not determinable
1705.09759 (2017-05)
CASENet: Deep Category-Aware Semantic Edge Detection
1801.07698 (2018-01)
ArcFace: Additive Angular Margin Loss for Deep Face Recognition
1803.00839 (2018-03)
Pose-Robust Face Recognition via Deep Residual Equivariant Mapping
and 50 more not named here
find_classes 2 other papers
2 later
2308.15074 (2023-08)
Exploring Model Transferability through the Lens of Potential Energy
2309.00399 (2023-09)
Fine-grained Recognition with Learnable Semantic Data Augmentation
make_dataset 2 other papers
2 later
2308.15074 (2023-08)
Exploring Model Transferability through the Lens of Potential Energy
2309.00399 (2023-09)
Fine-grained Recognition with Learnable Semantic Data Augmentation

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

Transfer learning is a classic paradigm by which models pretrained on large "upstream" datasets are adapted to yield good results on "downstream" specialized datasets. Generally, more accurate models on the "upstream" dataset tend to provide better transfer accuracy "downstream". In this work, we perform an in-depth investigation of this phenomenon in the context of convolutional neural networks (CNNs) trained on the ImageNet dataset, which have been pruned-that is, compressed by sparsifiying their connections. We consider transfer using unstructured pruned models obtained by applying several stateof-the-art pruning methods, including magnitude-based, second-order, re-growth, lottery-ticket, and regularization approaches, in the context of twelve standard transfer tasks. In a nutshell, our study shows that sparse models can match or even outperform the transfer performance of dense models, even at high sparsities, and, while doing so, can lead to significant inference and even training speedups. At the same time, we observe and analyze significant differences in the behaviour of different pruning methods. The code is available at: https://github.com/IST-DASLab/sparse-imagenet-transfer.

For agents

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

get_harvested_code_for_paper("Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper")
get_code_for_paper("Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper")
have("Iofinova_How_Well_Do_Sparse_ImageNet_Models_Transfer_CVPR_2022_paper")

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

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

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

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

Connect an agent — have() is free.