{"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/versatile-weight-attack-via-flipping-limited","title":"Versatile Weight Attack via Flipping Limited Bits","arxiv_id":"2207.12405","date":"2022-07-25","proceeding":null,"authors":["Jiawang Bai","Baoyuan Wu","Zhifeng Li","Shu-Tao Xia"],"abstract":"To explore the vulnerability of deep neural networks (DNNs), many attack paradigms have been well studied, such as the poisoning-based backdoor attack in the training stage and the adversarial attack in the inference stage. In this paper, we study a novel attack paradigm, which modifies model parameters in the deployment stage. Considering the effectiveness and stealthiness goals, we provide a general formulation to perform the bit-flip based weight attack, where the effectiveness term could be customized depending on the attacker's purpose. Furthermore, we present two cases of the general formulation with different malicious purposes, i.e., single sample attack (SSA) and triggered samples attack (TSA). To this end, we formulate this problem as a mixed integer programming (MIP) to jointly determine the state of the binary bits (0 or 1) in the memory and learn the sample modification. Utilizing the latest technique in integer programming, we equivalently reformulate this MIP problem as a continuous optimization problem, which can be effectively and efficiently solved using the alternating direction method of multipliers (ADMM) method. Consequently, the flipped critical bits can be easily determined through optimization, rather than using a heuristic strategy. Extensive experiments demonstrate the superiority of SSA and TSA in attacking DNNs.","url_abs":"https://arxiv.org/abs/2207.12405v1","url_pdf":"https://arxiv.org/pdf/2207.12405v1.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":"versatile-weight-attack-via-flipping-limited","repo_url":"https://github.com/jiawangbai/versatile-weight-attack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"},{"task_slug":"backdoor-attack","task_name":"Backdoor Attack"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2207.12405","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.12405"}},"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/jiawangbai/versatile-weight-attack","reach":null}],"summary":{"ran_draft_wrong":1,"ran_honours":1,"unverified":2},"by_repo_kind":{"official":{"samples":3,"ran":1,"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":4,"samples":[{"code_sha256_prefix":"9c3ab6dcefe26311","entry":"pnorm","repo":"jiawangbai/versatile-weight-attack","repo_kind":"official","path":"triggered_samples_attack/TSA.py","file_url":"https://github.com/jiawangbai/versatile-weight-attack/blob/HEAD/triggered_samples_attack/TSA.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9c3ab6dcefe26311"}},{"code_sha256_prefix":"bdf2f58dce9ed6ee","entry":"project_box","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"bdf2f58dce9ed6ee"}},{"code_sha256_prefix":"1edc0d074eef5d3d","entry":"project_positive","repo":"jiawangbai/versatile-weight-attack","repo_kind":"official","path":"single_sample_attack/SSA.py","file_url":"https://github.com/jiawangbai/versatile-weight-attack/blob/HEAD/single_sample_attack/SSA.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1edc0d074eef5d3d"}},{"code_sha256_prefix":"28e24b1bfe1ac243","entry":"project_shifted_Lp_ball","repo":"jiawangbai/versatile-weight-attack","repo_kind":"official","path":"single_sample_attack/SSA.py","file_url":"https://github.com/jiawangbai/versatile-weight-attack/blob/HEAD/single_sample_attack/SSA.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"28e24b1bfe1ac243"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}