{"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/binaryrelax-a-relaxation-approach-for","title":"BinaryRelax: A Relaxation Approach For Training Deep Neural Networks With Quantized Weights","arxiv_id":"1801.06313","date":"2018-01-19","proceeding":null,"authors":["Penghang Yin","Shuai Zhang","Jiancheng Lyu","Stanley Osher","Yingyong Qi","Jack Xin"],"abstract":"We propose BinaryRelax, a simple two-phase algorithm, for training deep\nneural networks with quantized weights. The set constraint that characterizes\nthe quantization of weights is not imposed until the late stage of training,\nand a sequence of \\emph{pseudo} quantized weights is maintained. Specifically,\nwe relax the hard constraint into a continuous regularizer via Moreau envelope,\nwhich turns out to be the squared Euclidean distance to the set of quantized\nweights. The pseudo quantized weights are obtained by linearly interpolating\nbetween the float weights and their quantizations. A continuation strategy is\nadopted to push the weights towards the quantized state by gradually increasing\nthe regularization parameter. In the second phase, exact quantization scheme\nwith a small learning rate is invoked to guarantee fully quantized weights. We\ntest BinaryRelax on the benchmark CIFAR and ImageNet color image datasets to\ndemonstrate the superiority of the relaxed quantization approach and the\nimproved accuracy over the state-of-the-art training methods. Finally, we prove\nthe convergence of BinaryRelax under an approximate orthogonality condition.","url_abs":"http://arxiv.org/abs/1801.06313v3","url_pdf":"http://arxiv.org/pdf/1801.06313v3.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":"binaryrelax-a-relaxation-approach-for","repo_url":"https://github.com/Akaza994/Binary-Quantization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"unanswered"}},{"paper_slug":"binaryrelax-a-relaxation-approach-for","repo_url":"https://github.com/lzj994/Binary-Quantization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1801.06313","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1801.06313"}},"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/Akaza994/Binary-Quantization","reach":{"status":"unanswered"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lzj994/Binary-Quantization","reach":null}],"summary":{"ran_draft_wrong":2,"ran_fixture":1},"by_repo_kind":{},"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":"03a0be4fb7381bd2","entry":"conv3x3","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"03a0be4fb7381bd2"}},{"code_sha256_prefix":"c9385e42b40d1dea","entry":"get_model2","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"c9385e42b40d1dea"}},{"code_sha256_prefix":"cff17e6f91a48ebd","entry":"quantize_bw","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"cff17e6f91a48ebd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}