{"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/adabin-improving-binary-neural-networks-with","title":"AdaBin: Improving Binary Neural Networks with Adaptive Binary Sets","arxiv_id":"2208.08084","date":"2022-08-17","proceeding":null,"authors":["Zhijun Tu","Xinghao Chen","Pengju Ren","Yunhe Wang"],"abstract":"This paper studies the Binary Neural Networks (BNNs) in which weights and activations are both binarized into 1-bit values, thus greatly reducing the memory usage and computational complexity. Since the modern deep neural networks are of sophisticated design with complex architecture for the accuracy reason, the diversity on distributions of weights and activations is very high. Therefore, the conventional sign function cannot be well used for effectively binarizing full-precision values in BNNs. To this end, we present a simple yet effective approach called AdaBin to adaptively obtain the optimal binary sets $\\{b_1, b_2\\}$ ($b_1, b_2\\in \\mathbb{R}$) of weights and activations for each layer instead of a fixed set (\\textit{i.e.}, $\\{-1, +1\\}$). In this way, the proposed method can better fit different distributions and increase the representation ability of binarized features. In practice, we use the center position and distance of 1-bit values to define a new binary quantization function. For the weights, we propose an equalization method to align the symmetrical center of binary distribution to real-valued distribution, and minimize the Kullback-Leibler divergence of them. Meanwhile, we introduce a gradient-based optimization method to get these two parameters for activations, which are jointly trained in an end-to-end manner. Experimental results on benchmark models and datasets demonstrate that the proposed AdaBin is able to achieve state-of-the-art performance. For instance, we obtain a 66.4% Top-1 accuracy on the ImageNet using ResNet-18 architecture, and a 69.4 mAP on PASCAL VOC using SSD300. The PyTorch code is available at \\url{https://github.com/huawei-noah/Efficient-Computing/tree/master/BinaryNetworks/AdaBin} and the MindSpore code is available at \\url{https://gitee.com/mindspore/models/tree/master/research/cv/AdaBin}.","url_abs":"https://arxiv.org/abs/2208.08084v2","url_pdf":"https://arxiv.org/pdf/2208.08084v2.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":"adabin-improving-binary-neural-networks-with","repo_url":"https://github.com/huawei-noah/Efficient-Computing/tree/master/BinaryNetworks/AdaBin","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"adabin-improving-binary-neural-networks-with","repo_url":"https://github.com/mindspore-ai/models/tree/master/research/cv/AdaBin","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"adabin-improving-binary-neural-networks-with","repo_url":"https://github.com/0jason000/Adabin","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"mindspore","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"classification-with-binary-neural-network","task_name":"Classification with Binary Neural Network"},{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2208.08084","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2208.08084"}},"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/mindspore-ai/models/tree/master/research/cv/AdaBin","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huawei-noah/Efficient-Computing/tree/master/BinaryNetworks/AdaBin","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/0jason000/Adabin","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":2,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":2,"repositories":2},"listed":{"samples":1,"ran":0,"repositories":1}},"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":3,"samples":[{"code_sha256_prefix":"91c2133515ba1a78","entry":"AdaBin_Conv2d","repo":"huawei-noah/Efficient-Computing","repo_kind":"official","path":"BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","file_url":"https://github.com/huawei-noah/Efficient-Computing/blob/HEAD/BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"91c2133515ba1a78"}},{"code_sha256_prefix":"c1b8833c993162fa","entry":"BinaryActivation","repo":"huawei-noah/Efficient-Computing","repo_kind":"official","path":"BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","file_url":"https://github.com/huawei-noah/Efficient-Computing/blob/HEAD/BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c1b8833c993162fa"}},{"code_sha256_prefix":"2a71c6216e006b3d","entry":"BinaryQuantize","repo":"huawei-noah/Efficient-Computing","repo_kind":"official","path":"BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","file_url":"https://github.com/huawei-noah/Efficient-Computing/blob/HEAD/BinaryNetworks/AdaBin/cifar10/utils/binarylib.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a71c6216e006b3d"}},{"code_sha256_prefix":"e6704260d6ef70f5","entry":"orthographic_projection","repo":"mindspore-ai/models","repo_kind":"official","path":"research/cv/DecoMR/models/geometric_layers.py","file_url":"https://github.com/mindspore-ai/models/blob/HEAD/research/cv/DecoMR/models/geometric_layers.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e6704260d6ef70f5"}},{"code_sha256_prefix":"7f0b5560e7ec1de7","entry":"split_imgs_and_labels","repo":"0jason000/Adabin","repo_kind":"listed","path":"src/dataset.py","file_url":"https://github.com/0jason000/Adabin/blob/HEAD/src/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7f0b5560e7ec1de7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}