SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.04693 · 2020

PROFIT: A Novel Training Method for sub-4-bit MobileNet Models

arXiv · PDF · Open in the Atlas

Code that ran

6 of 8 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; 0 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/2008.04693.json · badge: /api/ran/2008.04693.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
EunhyeokPark/PROFIT canonical (classifier label)
classifier basis: census
6 ran · 2 no recorded run
FunctionStatusWhere it lives
categorize_param Ran
ran on a synthesized input
EunhyeokPark/PROFIT/train_ts.py
code served (permissive licence) · get_code("e671e700a2be3290")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        # Parameters ending with .a, .b, .c, .d for quant list
        self.layer1_a = nn.Parameter(torch.randn(4, 3))
        self.layer1_b = nn.Parameter(torch.randn(3))
        
        # Skip list parameters (will be skipped)
        self.skip_param = nn.Parameter(torch.randn(5, 2))
        
        # Bias parameters and 1D parameters for bnbias list
        self.bias = nn.Parameter(torch.randn(4))
        self.bn_weight = nn.Parameter(torch.randn(6))
        
        # Regular weights for weight list
        self.weight1 = nn.Parameter(torch.randn(8, 4))
        self.weight2 = nn.Parameter(torch.randn(5, 7))
        
        # Parameter that requires_grad=False (should be skipped)
        self.frozen = nn.Parameter(torch.randn(2, 3))
        self.frozen.requires_grad = False

model = SimpleModel()
skip_list = ("skip",)

ARGS = {
    "model": model,
    "skip_list": skip_list,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ch_8x Ran
ran on a synthesized input
EunhyeokPark/PROFIT/conv_model/ilsvrc/MobileNetV3Large_pad_quant.py
code served (permissive licence) · get_code("7084408d2afa5563")
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)

ARGS = {
    "ch": 10
}
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_loader Ran
ran on a synthesized input
EunhyeokPark/PROFIT/my_lib/imagenet.py
code served (permissive licence) · get_code("1f7a778aac88a931")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, 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 os
import numpy as np
import torch
import tempfile
import shutil
from PIL import Image
from torchvision import datasets
import torchvision.transforms as transforms
from torch.utils.data.sampler import SubsetRandomSampler, Sampler

torch.manual_seed(0)
np.random.seed(0)

# Create a temporary directory structure for the test
temp_dir = tempfile.mkdtemp()
train_dir = os.path.join(temp_dir, 'train')
val_dir = os.path.join(temp_dir, 'val_pt')

os.makedirs(train_dir, exist_ok=True)
os.makedirs(val_dir, exist_ok=True)

# Create subdirectories for classes
class_dir_train = os.path.join(train_dir, 'class0')
class_dir_val = os.path.join(val_dir, 'class0')
os.makedirs(class_dir_train, exist_ok=True)
os.makedirs(class_dir_val, exist_ok=True)

# Create dummy images for training set
for i in range(5):
    img = Image.new('RGB', (256, 256), color=(i*50, i*50, i*50))
    img.save(os.path.join(class_dir_train, f'img_{i}.jpg'))

# Create dummy images for validation set
for i in range(5):
    img = Image.new('RGB', (256, 256), color=(i*30, i*30, i*30))
    img.save(os.path.join(class_dir_val, f'img_{i}.jpg'))

ARGS = {
    'root': temp_dir,
    'test_batch': 2,
    'train_batch': 2,
    'valid_size': 100,
    'num_workers': 0,
    'random_seed': 12345,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
get_nonlinear Ran
ran on a synthesized input
EunhyeokPark/PROFIT/conv_model/ilsvrc/MobileNetV3Large_pad_quant.py
code served (permissive licence) · get_code("2ebbfa358e20f645")
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 ReLU. 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)

class h_sigmoid(nn.Module):
    def __init__(self, inplace=True):
        super(h_sigmoid, self).__init__()
        self.relu = nn.ReLU6(inplace=inplace)

    def forward(self, x):
        return self.relu(x + 3) / 6

class h_swish(nn.Module):
    def __init__(self, inplace=True):
        super(h_swish, self).__init__()
        self.sigmoid = h_sigmoid(inplace=inplace)

    def forward(self, x):
        return x * self.sigmoid(x)

def get_nonlinear(nonlinear):
    if nonlinear == 'RE':
        return nn.ReLU(inplace=True)
    elif nonlinear == 'HS':
        return h_swish()
    else:
        raise LookupError('Unknown nonlinear')

ARGS = {
    'nonlinear': 'RE'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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
get_quant Ran
ran on a synthesized input
EunhyeokPark/PROFIT/conv_model/ilsvrc/MobileNetV3Large_pad_quant.py
code served (permissive licence) · get_code("8a0e3fe4a3562722")
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 ReLU. 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

class OpsModule:
    """Stand-in class for ops parameter with ReLU and HSwish methods"""
    
    @staticmethod
    def ReLU(inplace=True):
        return nn.ReLU(inplace=inplace)
    
    @staticmethod
    def HSwish():
        return nn.Hardswish()

ops = OpsModule()

ARGS = {
    'ops': ops,
    'nonlinear': 'RE'
}
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 ReLU — a ReLU output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ReLU 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_v2 Ran
ran on a synthesized input
EunhyeokPark/PROFIT/conv_model/ilsvrc/MobileNetV2_quant.py
code served (permissive licence) · get_code("ba91e9b63946d0c1")
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 MobileNetV2. 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 torch.nn.functional as F

torch.manual_seed(0)

# Create a mock ops object that provides the necessary operations
class MockOps:
    Conv2d = nn.Conv2d
    BatchNorm2d = nn.BatchNorm2d
    ReLU6 = nn.ReLU6
    Sequential = nn.Sequential
    Linear = nn.Linear
    Dropout = nn.Dropout
    
    class Sym(nn.Module):
        """Mock symbolic operation"""
        def forward(self, x):
            return x

# Prepare arguments for MobileNetV2
ops = MockOps()
num_classes = 10
width_mult = 1.0
inverted_residual_setting = None
round_nearest = 8
block = None

ARGS = {
    'ops': ops,
    'num_classes': num_classes,
    'width_mult': width_mult,
    'inverted_residual_setting': inverted_residual_setting,
    'round_nearest': round_nearest,
    'block': block
}
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 MobileNetV2 — a MobileNetV2 output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MobileNetV2 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
get_optimizer Not yet run
unverified (harvested, no recorded run)
EunhyeokPark/PROFIT/train_ts.py
code served (permissive licence) · get_code("4ae339455c1506ee")
How it ran

no invocation recorded.

phase_prefix Not yet run
unverified (harvested, no recorded run)
EunhyeokPark/PROFIT/train_ts.py
code served (permissive licence) · get_code("6fb29cca2f452c3c")
How it ran

no invocation recorded.

Also present in other papers' code

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

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

4-bit and lower precision mobile models are required due to the ever-increasing demand for better energy efficiency in mobile devices. In this work, we report that the activation instability induced by weight quantization (AIWQ) is the key obstacle to sub-4-bit quantization of mobile networks. To alleviate the AIWQ problem, we propose a novel training method called PROgressive-Freezing Iterative Training (PROFIT), which attempts to freeze layers whose weights are affected by the instability problem stronger than the other layers. We also propose a differentiable and unified quantization method (DuQ) and a negative padding idea to support asymmetric activation functions such as h-swish. We evaluate the proposed methods by quantizing MobileNet-v1, v2, and v3 on ImageNet and report that 4-bit quantization offers comparable (within 1.48 % top-1 accuracy) accuracy to full precision baseline. In the ablation study of the 3-bit quantization of MobileNet-v3, our proposed method outperforms the state-of-the-art method by a large margin, 12.86 % of top-1 accuracy.

For agents

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

get_harvested_code_for_paper("2008.04693")
get_code_for_paper("2008.04693")
have("2008.04693")

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

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

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

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

Connect an agent — have() is free.