SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1909.10364 · 2019

Class-dependent Compression of Deep Neural Networks

arXiv · PDF · Open in the Atlas

Code that ran

9 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; 3 failures of our instrument; 2 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/1909.10364.json · badge: /api/ran/1909.10364.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
rahimentezari/Sensys-ml2020 canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
alexnet Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/models/AlexNet.py
code served (permissive licence) · get_code("6226f06e01e888e3")
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 AlexNet. 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 AlexNet — a AlexNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AlexNet 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
alexnet Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/models/AlexNet2.py
code served (permissive licence) · get_code("d4465321aa394bf1")
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 AlexNet. 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 AlexNet — a AlexNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AlexNet 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
alexnet Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/models/AlexNet3.py
code served (permissive licence) · get_code("0e2ea538c8fb0e03")
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 AlexNet. 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 alexnet function takes:
# - pretrained (bool): whether to load pretrained weights
# - **kwargs: additional keyword arguments passed to AlexNet.__init__

# Looking at the function body:
# - It creates an AlexNet model with **kwargs
# - If pretrained=True, it tries to load weights (we'll set to False to avoid network)
# - It modifies avgpool and classifier layers
# - The only parameter used is 'pretrained' and potentially 'num_classes' in kwargs

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 AlexNet — a AlexNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AlexNet 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
alexnet Ran
ran; our contract draft was wrong, not the code
rahimentezari/Sensys-ml2020/models/alexnet_layer_input.py
code served (permissive licence) · get_code("955a24768ec4558c")
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 AlexNet. 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 AlexNet — a AlexNet output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a AlexNet 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
count_params Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/Decon_edit.py
code served (permissive licence) · get_code("7353badf6d3508bf")
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 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 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_one_hot Ran
ran; our contract draft was wrong, not the code
rahimentezari/Sensys-ml2020/MobileNet/MobileNet.py
pointer only (licence: MIT); the stored copy get_code serves, from Yikai-Wang/SPR-LNL, is pointer only (licence: NONE) · get_code("b215cd24009a0d36")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Yikai-Wang/SPR-LNL, 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.

my_hook4d_conv1 Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/Decon_edit.py
code served (permissive licence) · get_code("c3c4412f0402d0e3")
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 4, dtype family float, shape (2, 4, 3, 5) 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

torch.manual_seed(0)

# Define the index_dict4d that the hook function uses
index_dict4d = dict([('conv1', []), ('conv2', []), ('conv3', []), ('conv4', []), ('conv5', []), ('lin1', []), ('lin2', []), ('lin3', [])])

# Create a sample gradient tensor with shape (2, 4, 3, 5)
# This represents a 4D tensor (batch_size=2, channels=4, height=3, width=5)
grad = torch.randn(2, 4, 3, 5, requires_grad=False)

# Add some indices to index_dict4d['conv1'] for testing
index_dict4d['conv1'] = [(0, 1, 2, 3), (1, 2, 1, 4)]

ARGS = {
    'grad': grad
}
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) 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
my_hook4d_conv2 Ran
ran on a synthesized input
rahimentezari/Sensys-ml2020/Decon_edit.py
code served (permissive licence) · get_code("90ecdfb82590ae20")
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 4, dtype family float, shape (2, 4, 3, 5) 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)

# Populate index_dict4d with some sample indices for conv2
index_dict4d = dict([('conv1', []), ('conv2', []), ('conv3', []), ('conv4', []), ('conv5', []), ('lin1', []), ('lin2', []), ('lin3', [])])

# Add some sample indices to conv2 that will be zeroed out
# Format: (a, b, c, d) where a, b, c, d are indices into a 4D tensor
index_dict4d['conv2'] = [(0, 0, 0, 0), (1, 1, 1, 1), (0, 2, 1, 3)]

# Create a sample gradient tensor with shape (2, 4, 3, 5) to match indexing
# Shape: (batch/filter, channels, height, width) typical for conv2d gradients
grad = torch.randn(2, 4, 3, 5, requires_grad=False)

ARGS = {
    'grad': grad
}
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 4, dtype family float, shape (2, 4, 3, 5) — shape (2, 4, 3, 5) 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
wrapped_partial Ran
ran; our contract draft was wrong, not the code
rahimentezari/Sensys-ml2020/MobileNet/mobilenet_v1.py
code served (permissive licence) · get_code("b6e06004f7efe660")
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 partial. 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 functools
import torch

def example_function(x, y, z=10):
    """A simple function to partially wrap"""
    return x + y + z

def another_function(a, b, c=5):
    """Another function for testing"""
    return a * b + c

torch.manual_seed(0)

ARGS = {
    "func": example_function,
    "args": (5, 3),
    "kwargs": {"z": 20}
}
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 partial — a partial output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a partial 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
alexnet Not yet run
unverified (harvested, no recorded run)
rahimentezari/Sensys-ml2020/models/CNN_3.py
code served (permissive licence) · get_code("8697ae6dc65daae7")
How it ran

no invocation recorded.

tf_confusion_metrics Not yet run
unverified (harvested, no recorded run)
rahimentezari/Sensys-ml2020/MobileNet/MobileNet.py
code served (permissive licence) · get_code("f7c79a5644300715")
How it ran

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, 3 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 3 later) and 8 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
wrapped_partial 8 other papers
5 dated earlier, 3 later
1701.06487 (2017-01)
Dirty Pixels: Towards End-to-End Image Processing and Perception
1703.07737 (2017-03)
In Defense of the Triplet Loss for Person Re-Identification
1710.06081 (2017-10)
Boosting Adversarial Attacks with Momentum
and 5 more not named here
alexnet 5 other papers
3 dated earlier, 2 later
1811.06965 (2018-11)
GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism
1812.00332 (2018-12)
ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardware
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
and 2 more not named here
get_one_hot 2 other papers
2 later
2203.07788 (2022-03)
Scalable Penalized Regression for Noise Detection in Learning with Noisy Labels
2306.08419 (2023-06)
Mediated Multi-Agent Reinforcement Learning

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

Today's deep neural networks require substantial computation resources for their training, storage, and inference, which limits their effective use on resource-constrained devices. Many recent research activities explore different options for compressing and optimizing deep models. On the one hand, in many real-world applications, we face the data imbalance challenge, i.e. when the number of labeled instances of one class considerably outweighs the number of labeled instances of the other class. On the other hand, applications may pose a class imbalance problem, i.e. higher number of false positives produced when training a model and optimizing its performance may be tolerable, yet the number of false negatives must stay low. The problem originates from the fact that some classes are more important for the application than others, e.g. detection problems in medical and surveillance domains. Motivated by the success of the lottery ticket hypothesis, in this paper we propose an iterative deep model compression technique, which keeps the number of false negatives of the compressed model close to the one of the original model at the price of increasing the number of false positives if necessary. Our experimental evaluation using two benchmark data sets shows that the resulting compressed sub-networks 1) achieve up to 35% lower number of false negatives than the compressed model without class optimization, 2) provide an overall higher AUC_ROC measure, and 3) use up to 99% fewer parameters compared to the original network.

For agents

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

get_harvested_code_for_paper("1909.10364")
get_code_for_paper("1909.10364")
have("1909.10364")

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

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

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

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

Connect an agent — have() is free.