{"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/solving-oscillation-problem-in-post-training","title":"Solving Oscillation Problem in Post-Training Quantization Through a Theoretical Perspective","arxiv_id":"2303.11906","date":"2023-03-21","proceeding":"CVPR 2023 1","authors":["Yuexiao Ma","Huixia Li","Xiawu Zheng","Xuefeng Xiao","Rui Wang","Shilei Wen","Xin Pan","Fei Chao","Rongrong Ji"],"abstract":"Post-training quantization (PTQ) is widely regarded as one of the most efficient compression methods practically, benefitting from its data privacy and low computation costs. We argue that an overlooked problem of oscillation is in the PTQ methods. In this paper, we take the initiative to explore and present a theoretical proof to explain why such a problem is essential in PTQ. And then, we try to solve this problem by introducing a principled and generalized framework theoretically. In particular, we first formulate the oscillation in PTQ and prove the problem is caused by the difference in module capacity. To this end, we define the module capacity (ModCap) under data-dependent and data-free scenarios, where the differentials between adjacent modules are used to measure the degree of oscillation. The problem is then solved by selecting top-k differentials, in which the corresponding modules are jointly optimized and quantized. Extensive experiments demonstrate that our method successfully reduces the performance drop and is generalized to different neural networks and PTQ methods. For example, with 2/4 bit ResNet-50 quantization, our method surpasses the previous state-of-the-art method by 1.9%. It becomes more significant on small model quantization, e.g. surpasses BRECQ method by 6.61% on MobileNetV2*0.5.","url_abs":"https://arxiv.org/abs/2303.11906v2","url_pdf":"https://arxiv.org/pdf/2303.11906v2.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":"solving-oscillation-problem-in-post-training","repo_url":"https://github.com/bytedance/mrecg","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.11906","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.11906"}},"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/bytedance/mrecg","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":1,"ran_fixture":2,"ran_draft_wrong":3,"ran":3,"unverified":8},"by_repo_kind":{"official":{"samples":17,"ran":9,"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":0,"samples":[{"code_sha256_prefix":"734e5f593576355a","entry":"layer_has_weights","repo":"bytedance/mrecg","repo_kind":"official","path":"MRECG.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/MRECG.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"734e5f593576355a"}},{"code_sha256_prefix":"b0f936d4d6ae3b8c","entry":"accuracy","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/evaluate.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/evaluate.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b0f936d4d6ae3b8c"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"bytedance/mrecg","repo_kind":"official","path":"models/resnet.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"a0131fb70c267a9e","entry":"conv_1x1_bn","repo":"bytedance/mrecg","repo_kind":"official","path":"models/mobilenet_v2.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/mobilenet_v2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a0131fb70c267a9e"}},{"code_sha256_prefix":"e087cbfa1e53486d","entry":"conv_bn","repo":"bytedance/mrecg","repo_kind":"official","path":"models/mobilenet_v2.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/mobilenet_v2.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e087cbfa1e53486d"}},{"code_sha256_prefix":"3ac6b7d76e8e3584","entry":"drop_path","repo":"bytedance/mrecg","repo_kind":"official","path":"models/layer/drop_path.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/layer/drop_path.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ac6b7d76e8e3584"}},{"code_sha256_prefix":"bc1bf5bb29e60206","entry":"is_absorbing","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/fold_bn.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/fold_bn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bc1bf5bb29e60206"}},{"code_sha256_prefix":"06ddc213753098ff","entry":"is_bn","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/fold_bn.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/fold_bn.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"06ddc213753098ff"}},{"code_sha256_prefix":"afb8f93395a730c8","entry":"parse_config","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/utils.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"afb8f93395a730c8"}},{"code_sha256_prefix":"776c7e0f77f8b8e1","entry":"adjust_ws_gs_comp","repo":"bytedance/mrecg","repo_kind":"official","path":"models/regnet.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/regnet.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":"776c7e0f77f8b8e1"}},{"code_sha256_prefix":"088c8a23c164541f","entry":"evaluate","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/evaluate.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/evaluate.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":"088c8a23c164541f"}},{"code_sha256_prefix":"cf37365adf0e1e42","entry":"get_stages_from_blocks","repo":"bytedance/mrecg","repo_kind":"official","path":"models/regnet.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/regnet.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":"cf37365adf0e1e42"}},{"code_sha256_prefix":"ef330de8e9d4a16f","entry":"load_calibrate_data","repo":"bytedance/mrecg","repo_kind":"official","path":"ptq_main.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/ptq_main.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":"ef330de8e9d4a16f"}},{"code_sha256_prefix":"747681743b94e243","entry":"node2modules","repo":"bytedance/mrecg","repo_kind":"official","path":"MRECG.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/MRECG.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":"747681743b94e243"}},{"code_sha256_prefix":"012346fa47909d5e","entry":"qnode2fpnode","repo":"bytedance/mrecg","repo_kind":"official","path":"MRECG.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/MRECG.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":"012346fa47909d5e"}},{"code_sha256_prefix":"a7f56f01db1812a0","entry":"quantize_float","repo":"bytedance/mrecg","repo_kind":"official","path":"models/regnet.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/models/regnet.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":"a7f56f01db1812a0"}},{"code_sha256_prefix":"ef0fe1948e3ae202","entry":"search_fold_and_remove_bn","repo":"bytedance/mrecg","repo_kind":"official","path":"utils/fold_bn.py","file_url":"https://github.com/bytedance/mrecg/blob/HEAD/utils/fold_bn.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":"ef0fe1948e3ae202"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}