{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/dorefa-net-training-low-bitwidth","title":"DoReFa-Net: Training Low Bitwidth Convolutional Neural Networks with Low Bitwidth Gradients","arxiv_id":"1606.06160","date":"2016-06-20","proceeding":null,"authors":["Shuchang Zhou","Yuxin Wu","Zekun Ni","Xinyu Zhou","He Wen","Yuheng Zou"],"abstract":"We propose DoReFa-Net, a method to train convolutional neural networks that\nhave low bitwidth weights and activations using low bitwidth parameter\ngradients. In particular, during backward pass, parameter gradients are\nstochastically quantized to low bitwidth numbers before being propagated to\nconvolutional layers. As convolutions during forward/backward passes can now\noperate on low bitwidth weights and activations/gradients respectively,\nDoReFa-Net can use bit convolution kernels to accelerate both training and\ninference. Moreover, as bit convolutions can be efficiently implemented on CPU,\nFPGA, ASIC and GPU, DoReFa-Net opens the way to accelerate training of low\nbitwidth neural network on these hardware. Our experiments on SVHN and ImageNet\ndatasets prove that DoReFa-Net can achieve comparable prediction accuracy as\n32-bit counterparts. For example, a DoReFa-Net derived from AlexNet that has\n1-bit weights, 2-bit activations, can be trained from scratch using 6-bit\ngradients to get 46.1\\% top-1 accuracy on ImageNet validation set. The\nDoReFa-Net AlexNet model is released publicly.","url_abs":"http://arxiv.org/abs/1606.06160v3","url_pdf":"http://arxiv.org/pdf/1606.06160v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/tensorpack/tensorpack/tree/master/examples/DoReFa-Net","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/Abhishek2271/TransferabilityAnalysis","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/Enderdead/Pytorch_Quantize_impls","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/Jopyth/BMXNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"unanswered"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/Xilinx/QNN-MO-PYNQ","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/alfreddzh/paperso","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/calipos/dorefa-caffe","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/hpi-xnor/BMXNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mxnet","reach":{"status":"unanswered"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/hpi-xnor/BMXNet-v2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mxnet","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/lucamocerino/Binary-Neural-Networks-PyTorch-1.0","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/mohdumar644/DoReFaNet-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dorefa-net-training-low-bitwidth","repo_url":"https://github.com/IntelLabs/distiller","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"tasks":[{"task_slug":null,"task_name":"CPU"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"grouped-convolution","method_name":"Grouped Convolution"},{"method_slug":"local-response-normalization","method_name":"Local Response Normalization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1606.06160","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1606.06160"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IntelLabs/distiller","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mohdumar644/DoReFaNet-PyTorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Jopyth/BMXNet","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/tensorpack/tensorpack/tree/master/examples/DoReFa-Net","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Abhishek2271/TransferabilityAnalysis","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hpi-xnor/BMXNet","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hpi-xnor/BMXNet-v2","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucamocerino/Binary-Neural-Networks-PyTorch-1.0","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/alfreddzh/paperso","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/calipos/dorefa-caffe","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Enderdead/Pytorch_Quantize_impls","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Xilinx/QNN-MO-PYNQ","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"ran_honours":1,"unverified":12},"by_repo_kind":{"listed":{"samples":13,"ran":1,"repositories":4}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":1,"samples":[{"code_sha256_prefix":"9b288b4b39df6ef0","entry":"Binarize","repo":"mohdumar644/DoReFaNet-PyTorch","repo_kind":"listed","path":"dorefa.py","file_url":"https://github.com/mohdumar644/DoReFaNet-PyTorch/blob/HEAD/dorefa.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b288b4b39df6ef0"}},{"code_sha256_prefix":"eae55d588689f5b0","entry":"cifar_transform","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"utils/preprocessing.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/utils/preprocessing.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"eae55d588689f5b0"}},{"code_sha256_prefix":"1c0993dfa6267ca3","entry":"columnToImage","repo":"Xilinx/QNN-MO-PYNQ","repo_kind":"listed","path":"qnn/utils.py","file_url":"https://github.com/Xilinx/QNN-MO-PYNQ/blob/HEAD/qnn/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"1c0993dfa6267ca3"}},{"code_sha256_prefix":"83dd0e0d9e8ff52c","entry":"conv2d_Q_fn","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"utils/quant_dorefa.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/utils/quant_dorefa.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"83dd0e0d9e8ff52c"}},{"code_sha256_prefix":"eb32c61d9c2ced17","entry":"conv_layer","repo":"Xilinx/QNN-MO-PYNQ","repo_kind":"listed","path":"qnn/utils.py","file_url":"https://github.com/Xilinx/QNN-MO-PYNQ/blob/HEAD/qnn/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"eb32c61d9c2ced17"}},{"code_sha256_prefix":"69deb4957901ff4f","entry":"dataframe_filter","repo":"Enderdead/Pytorch_Quantize_impls","repo_kind":"listed","path":"QuantTorch/compress.1.py","file_url":"https://github.com/Enderdead/Pytorch_Quantize_impls/blob/HEAD/QuantTorch/compress.1.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"69deb4957901ff4f"}},{"code_sha256_prefix":"540d4c98feceae53","entry":"filter_fails","repo":"Enderdead/Pytorch_Quantize_impls","repo_kind":"listed","path":"QuantTorch/compress.py","file_url":"https://github.com/Enderdead/Pytorch_Quantize_impls/blob/HEAD/QuantTorch/compress.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"540d4c98feceae53"}},{"code_sha256_prefix":"5807a473e81d05db","entry":"imageToColumn","repo":"Xilinx/QNN-MO-PYNQ","repo_kind":"listed","path":"qnn/utils.py","file_url":"https://github.com/Xilinx/QNN-MO-PYNQ/blob/HEAD/qnn/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5807a473e81d05db"}},{"code_sha256_prefix":"2a3eccf3107517a4","entry":"imgnet_transform","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"utils/preprocessing.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/utils/preprocessing.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a3eccf3107517a4"}},{"code_sha256_prefix":"9418f08dc30f8802","entry":"linear_Q_fn","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"utils/quant_dorefa.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/utils/quant_dorefa.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9418f08dc30f8802"}},{"code_sha256_prefix":"ce5d6e10ff074840","entry":"resnet20","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"nets/cifar_resnet.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/nets/cifar_resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce5d6e10ff074840"}},{"code_sha256_prefix":"782db452fa8e9972","entry":"resnet56","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"nets/cifar_resnet.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/nets/cifar_resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"782db452fa8e9972"}},{"code_sha256_prefix":"caf68e4b8567c88a","entry":"uniform_quantize","repo":"zzzxxxttt/Pytorch_DoReFaNet","repo_kind":"listed","path":"utils/quant_dorefa.py","file_url":"https://github.com/zzzxxxttt/Pytorch_DoReFaNet/blob/HEAD/utils/quant_dorefa.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"caf68e4b8567c88a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}