{"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/jumping-through-local-minima-quantization-in","title":"Jumping through Local Minima: Quantization in the Loss Landscape of Vision Transformers","arxiv_id":"2308.10814","date":"2023-08-21","proceeding":"ICCV 2023 1","authors":["Natalia Frumkin","Dibakar Gope","Diana Marculescu"],"abstract":"Quantization scale and bit-width are the most important parameters when considering how to quantize a neural network. Prior work focuses on optimizing quantization scales in a global manner through gradient methods (gradient descent \\& Hessian analysis). Yet, when applying perturbations to quantization scales, we observe a very jagged, highly non-smooth test loss landscape. In fact, small perturbations in quantization scale can greatly affect accuracy, yielding a $0.5-0.8\\%$ accuracy boost in 4-bit quantized vision transformers (ViTs). In this regime, gradient methods break down, since they cannot reliably reach local minima. In our work, dubbed Evol-Q, we use evolutionary search to effectively traverse the non-smooth landscape. Additionally, we propose using an infoNCE loss, which not only helps combat overfitting on the small calibration dataset ($1,000$ images) but also makes traversing such a highly non-smooth surface easier. Evol-Q improves the top-1 accuracy of a fully quantized ViT-Base by $10.30\\%$, $0.78\\%$, and $0.15\\%$ for $3$-bit, $4$-bit, and $8$-bit weight quantization levels. Extensive experiments on a variety of CNN and ViT architectures further demonstrate its robustness in extreme quantization scenarios. Our code is available at https://github.com/enyac-group/evol-q","url_abs":"https://arxiv.org/abs/2308.10814v3","url_pdf":"https://arxiv.org/pdf/2308.10814v3.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":"jumping-through-local-minima-quantization-in","repo_url":"https://github.com/enyac-group/evol-q","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"infonce","method_name":"InfoNCE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.10814","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.10814"}},"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/enyac-group/evol-q","reach":null}],"summary":{"ran":1,"ran_fixture":2,"unverified":11},"by_repo_kind":{"official":{"samples":14,"ran":3,"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":"ff00939376938287","entry":"BitType","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"ff00939376938287"}},{"code_sha256_prefix":"ed7e8d54fc7c6786","entry":"_no_grad_trunc_normal_","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ed7e8d54fc7c6786"}},{"code_sha256_prefix":"ef92035251726e40","entry":"trunc_normal_","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ef92035251726e40"}},{"code_sha256_prefix":"6ee85e42ebc1d6f2","entry":"Attention","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"6ee85e42ebc1d6f2"}},{"code_sha256_prefix":"2f230e43c422b7d9","entry":"AttentionSubsample","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"2f230e43c422b7d9"}},{"code_sha256_prefix":"d0f599cb7ffea02f","entry":"Attention_ViT","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"d0f599cb7ffea02f"}},{"code_sha256_prefix":"aa38141acf199942","entry":"JointQuantization","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"aa38141acf199942"}},{"code_sha256_prefix":"67df42ad12cf5b40","entry":"Linear_BN","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"67df42ad12cf5b40"}},{"code_sha256_prefix":"6f8cd782636ef9fa","entry":"QAct","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"6f8cd782636ef9fa"}},{"code_sha256_prefix":"b3c00ba82f2d83b0","entry":"QIntSoftmax","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"b3c00ba82f2d83b0"}},{"code_sha256_prefix":"eb6dbc7891671631","entry":"QLinear","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"eb6dbc7891671631"}},{"code_sha256_prefix":"51db0bbb72998d98","entry":"WindowAttention","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"51db0bbb72998d98"}},{"code_sha256_prefix":"8cb5ec6686c3494a","entry":"collect_act","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"8cb5ec6686c3494a"}},{"code_sha256_prefix":"9af13c14f3cecefe","entry":"hist_act","repo":"enyac-group/evol-q","repo_kind":"official","path":"joint_evol_opt.py","file_url":"https://github.com/enyac-group/evol-q/blob/HEAD/joint_evol_opt.py","link_basis":"first_harvest_node","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":"9af13c14f3cecefe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}