{"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/imbalanced-gradients-a-new-cause-of","title":"Imbalanced Gradients: A Subtle Cause of Overestimated Adversarial Robustness","arxiv_id":"2006.13726","date":"2020-06-24","proceeding":null,"authors":["Xingjun Ma","Linxi Jiang","Hanxun Huang","Zejia Weng","James Bailey","Yu-Gang Jiang"],"abstract":"Evaluating the robustness of a defense model is a challenging task in adversarial robustness research. Obfuscated gradients have previously been found to exist in many defense methods and cause a false signal of robustness. In this paper, we identify a more subtle situation called Imbalanced Gradients that can also cause overestimated adversarial robustness. The phenomenon of imbalanced gradients occurs when the gradient of one term of the margin loss dominates and pushes the attack towards to a suboptimal direction. To exploit imbalanced gradients, we formulate a Margin Decomposition (MD) attack that decomposes a margin loss into individual terms and then explores the attackability of these terms separately via a two-stage process. We also propose a multi-targeted and ensemble version of our MD attack. By investigating 24 defense models proposed since 2018, we find that 11 models are susceptible to a certain degree of imbalanced gradients and our MD attack can decrease their robustness evaluated by the best standalone baseline attack by more than 1%. We also provide an in-depth investigation on the likely causes of imbalanced gradients and effective countermeasures. Our code is available at https://github.com/HanxunH/MDAttack.","url_abs":"https://arxiv.org/abs/2006.13726v4","url_pdf":"https://arxiv.org/pdf/2006.13726v4.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":"imbalanced-gradients-a-new-cause-of","repo_url":"https://github.com/hanxunh/mdattack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"}],"methods":[{"method_slug":"label-smoothing","method_name":"Label Smoothing"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2006.13726","atlas_url":"https://app.syntology.ai/?focus=2006.13726","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.13726"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/hanxunh/mdattack","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":3,"unverified":5},"by_repo_kind":{"official":{"samples":9,"ran":4,"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":"20c10282e0a610a7","entry":"margin_loss","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/PGD.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/PGD.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"20c10282e0a610a7"}},{"code_sha256_prefix":"9647e1400ee744e4","entry":"projection_l1","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/fab_projections.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9647e1400ee744e4"}},{"code_sha256_prefix":"a345677b413ef5ca","entry":"projection_l2","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/fab_projections.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a345677b413ef5ca"}},{"code_sha256_prefix":"b8bdb6e496b4b5fa","entry":"projection_linf","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/fab_projections.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b8bdb6e496b4b5fa"}},{"code_sha256_prefix":"4dcc85b6c29ae57b","entry":"adv_check_and_update","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/utils.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4dcc85b6c29ae57b"}},{"code_sha256_prefix":"74ec6769bff8da35","entry":"cw_loss","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/PGD.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/PGD.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74ec6769bff8da35"}},{"code_sha256_prefix":"44930808e0a51ad4","entry":"load_json","repo":"hanxunh/mdattack","repo_kind":"official","path":"collect_results.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/collect_results.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"44930808e0a51ad4"}},{"code_sha256_prefix":"f65d4de4b1f07c14","entry":"one_hot_tensor","repo":"hanxunh/mdattack","repo_kind":"official","path":"attacks/utils.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/attacks/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f65d4de4b1f07c14"}},{"code_sha256_prefix":"02c1271594f3092e","entry":"setup_logger","repo":"hanxunh/mdattack","repo_kind":"official","path":"util.py","file_url":"https://github.com/hanxunh/mdattack/blob/HEAD/util.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"02c1271594f3092e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}