Papers › DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients

DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients

20 Jun 2016arXiv:1606.06160archive 2025-07-28

Shuchang Zhou, Yuxin Wu, Zekun Ni, Xinyu Zhou, He Wen, Yuheng Zou

We propose DoReFa-Net, a method to train convolutional neural networks that have low bitwidth weights and activations using low bitwidth parameter gradients. In particular, during backward pass, parameter gradients are stochastically quantized to low bitwidth numbers before being propagated to convolutional layers. As convolutions during forward/backward passes can now operate on low bitwidth weights and activations/gradients respectively, DoReFa-Net can use bit convolution kernels to accelerate both training and inference. Moreover, as bit convolutions can be efficiently implemented on CPU, FPGA, ASIC and GPU, DoReFa-Net opens the way to accelerate training of low bitwidth neural network on these hardware. Our experiments on SVHN and ImageNet datasets prove that DoReFa-Net can achieve comparable prediction accuracy as 32-bit counterparts. For example, a DoReFa-Net derived from AlexNet that has 1-bit weights, 2-bit activations, can be trained from scratch using 6-bit gradients to get 46.1% top-1 accuracy on ImageNet validation set. The DoReFa-Net AlexNet model is released publicly.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

No sample from the archive's official repository (tensorpack/tensorpack) is linked to this paper; the 13 samples below come from 4 community repositories. Syntology harvested code from tensorpack/tensorpack for 3 other papers.

tensorpack/tensorpack: Syntology's graph links these samples to Playing Atari with Deep Reinforcement Learning (arXiv:1312.5602; that paper's own run record: 64 ran (of which 24 constructed an object rather than computing a result; 46 with no instrument failure: 5 honoured, 0 violated, 41 with no contract checked; 18 where Syntology's instrument failed) · 53 unverified), Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks (arXiv:1511.06434; that paper's own run record: 128 ran (of which 61 constructed an object rather than computing a result; 111 with no instrument failure: 3 honoured, 0 violated, 108 with no contract checked; 17 where Syntology's instrument failed) · 91 unverified) and Improved Training of Wasserstein GANs (arXiv:1704.00028; that paper's own run record: 27 ran (of which 10 constructed an object rather than computing a result; 19 with no instrument failure: 1 honoured, 0 violated, 18 with no contract checked; 8 where Syntology's instrument failed) · 22 unverified); nothing checks that they implement this paper's method.

Syntology 13 code samples harvested from 4 repositories linked to this paper: 8 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 1 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.

By repository: community (archive-listed): 13 samples from 4 repositories, 8 ran (8 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

No sample is linked to this paper from 2 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

13 repositories listed; official and paper-mentioned ones first.

tensorpack/tensorpack officialmentioned on GitHubtfSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Playing Atari with Deep Reinforcement Learning (arXiv:1312.5602; that paper's own run record: 64 ran (of which 24 constructed an object rather than computing a result; 46 with no instrument failure: 5 honoured, 0 violated, 41 with no contract checked; 18 where Syntology's instrument failed) · 53 unverified), Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks (arXiv:1511.06434; that paper's own run record: 128 ran (of which 61 constructed an object rather than computing a result; 111 with no instrument failure: 3 honoured, 0 violated, 108 with no contract checked; 17 where Syntology's instrument failed) · 91 unverified) and Improved Training of Wasserstein GANs (arXiv:1704.00028; that paper's own run record: 27 ran (of which 10 constructed an object rather than computing a result; 19 with no instrument failure: 1 honoured, 0 violated, 18 with no contract checked; 8 where Syntology's instrument failed) · 22 unverified); nothing checks that they implement this paper's method. report
Abhishek2271/TransferabilityAnalysis mentioned on GitHubtfSyntology: not harvested report
Enderdead/Pytorch_Quantize_impls mentioned on GitHubpytorchMITSyntology: 2 samples, 0 ran · 2 unverified report
Jopyth/BMXNet mentioned on GitHubtfSyntology: not harvested report
Xilinx/QNN-MO-PYNQ mentioned on GitHubBSD-3-ClauseSyntology: 3 samples, 1 ran (0 instrument-failed) · 2 unverified report
alfreddzh/paperso mentioned on GitHubNOASSERTIONSyntology: not harvested report
calipos/dorefa-caffe mentioned on GitHubNOASSERTIONSyntology: not harvested report
hpi-xnor/BMXNet mentioned on GitHubmxnetSyntology: not harvested report
hpi-xnor/BMXNet-v2 mentioned on GitHubmxnetApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to A comprehensive review of Binary Neural Network (arXiv:2110.06804; that paper's own run record: 11 ran (of which 0 constructed an object rather than computing a result; 11 with no instrument failure: 0 honoured, 0 violated, 11 with no contract checked; 0 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. report
lucamocerino/Binary-Neural-Networks-PyTorch-1.0 mentioned on GitHubpytorchSyntology: not harvested report
mohdumar644/DoReFaNet-PyTorch mentioned on GitHubpytorchSyntology: 1 sample, 1 ran (0 instrument-failed) · 0 unverified report
zzzxxxttt/Pytorch_DoReFaNet mentioned on GitHubpytorchMITSyntology: 7 samples, 6 ran (0 instrument-failed) · 1 unverified report
IntelLabs/distiller pytorchnot reachable when probed 2026-09-17 — repositories for recent papers often appear after camera-readySyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

13 samples harvested: 8 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 1 honoured, 0 violated, 7 with no contract checked; 0 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
7ran
5unverified

Licence: 1 of the 13 samples is pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

Enderdead/Pytorch_Quantize_impls community (archive-listed) 2 samples, 0 ran · 2 unverified
dataframe_filter QuantTorch/compress.1.py unverified MIT (permissive) · 69deb4957901ff4f · report
filter_fails QuantTorch/compress.py unverified MIT (permissive) · 540d4c98feceae53 · report
Xilinx/QNN-MO-PYNQ community (archive-listed) 3 samples, 1 ran (0 instrument-failed) · 2 unverified
imageToColumn qnn/utils.py ran BSD-3-Clause (permissive) · 5807a473e81d05db · report fixture: signature image:ndarray/4/float, kernelHeight:int/0/int, kernelWidth:int/0/int, padding:int/0/int, stride:int/0/int · returned ndarray · level recorded 2026-09-26
columnToImage qnn/utils.py unverified BSD-3-Clause (permissive) · 1c0993dfa6267ca3 · report
conv_layer in 44 papers qnn/utils.py unverified BSD-3-Clause (permissive) · eb32c61d9c2ced17 · report
mohdumar644/DoReFaNet-PyTorch community (archive-listed) 1 sample, 1 ran (0 instrument-failed) · 0 unverified
Binarize dorefa.py ran · honoured contract fingerprinted no licence file found · pointer only · 9b288b4b39df6ef0 · report fixture: signature tensor:Tensor/2/float · returned Tensor · level recorded 2026-09-22
zzzxxxttt/Pytorch_DoReFaNet community (archive-listed) 7 samples, 6 ran (0 instrument-failed) · 1 unverified
cifar_transform utils/preprocessing.py ran MIT (permissive) · eae55d588689f5b0 · report fixture: signature is_training:bool/0/bool · returned Compose · level recorded 2026-09-26
conv2d_Q_fn utils/quant_dorefa.py ran MIT (permissive) · 83dd0e0d9e8ff52c · report fixture: signature w_bit:int/0/int · returned type · level recorded 2026-09-26
imgnet_transform utils/preprocessing.py ran MIT (permissive) · 2a3eccf3107517a4 · report fixture: signature is_training:bool/0/bool · returned Compose · level recorded 2026-09-26
linear_Q_fn utils/quant_dorefa.py ran MIT (permissive) · 9418f08dc30f8802 · report fixture: signature w_bit:int/0/int · returned type · level recorded 2026-09-26
resnet56 in 7 papers nets/cifar_resnet.py ran MIT (permissive) · 782db452fa8e9972 · report fixture: returned PreActResNet · level recorded 2026-09-26
uniform_quantize utils/quant_dorefa.py ran MIT (permissive) · caf68e4b8567c88a · report fixture: signature k:int/0/int · returned method · level recorded 2026-09-26
resnet20 in 42 papers nets/cifar_resnet.py unverified MIT (permissive) · ce5d6e10ff074840 · report

Tasks

Quantization

2 archive task tags without a task page not shown.

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

1x1 ConvolutionConvolutionDense ConnectionsDropoutGrouped ConvolutionLocal Response NormalizationMax PoolingReLUSoftmax

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections