{"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/mind-the-box-l-1-apgd-for-sparse-adversarial","title":"Mind the box: $l_1$-APGD for sparse adversarial attacks on image classifiers","arxiv_id":"2103.01208","date":"2021-03-01","proceeding":null,"authors":["Francesco Croce","Matthias Hein"],"abstract":"We show that when taking into account also the image domain $[0,1]^d$, established $l_1$-projected gradient descent (PGD) attacks are suboptimal as they do not consider that the effective threat model is the intersection of the $l_1$-ball and $[0,1]^d$. We study the expected sparsity of the steepest descent step for this effective threat model and show that the exact projection onto this set is computationally feasible and yields better performance. Moreover, we propose an adaptive form of PGD which is highly effective even with a small budget of iterations. Our resulting $l_1$-APGD is a strong white-box attack showing that prior works overestimated their $l_1$-robustness. Using $l_1$-APGD for adversarial training we get a robust classifier with SOTA $l_1$-robustness. Finally, we combine $l_1$-APGD and an adaptation of the Square Attack to $l_1$ into $l_1$-AutoAttack, an ensemble of attacks which reliably assesses adversarial robustness for the threat model of $l_1$-ball intersected with $[0,1]^d$.","url_abs":"https://arxiv.org/abs/2103.01208v3","url_pdf":"https://arxiv.org/pdf/2103.01208v3.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":"mind-the-box-l-1-apgd-for-sparse-adversarial","repo_url":"https://github.com/fra31/auto-attack","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"mind-the-box-l-1-apgd-for-sparse-adversarial","repo_url":"https://github.com/jeromerony/adversarial-library","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2103.01208","atlas_url":"https://app.syntology.ai/?focus=2103.01208","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2103.01208"}},"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/fra31/auto-attack","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jeromerony/adversarial-library","reach":null}],"summary":{"ran":1,"ran_draft_wrong":7,"ran_fixture":2,"unverified":2},"by_repo_kind":{"official":{"samples":12,"ran":10,"repositories":2}},"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":"dfd8fbbc663ac95e","entry":"APGDAttack","repo":"fra31/auto-attack","repo_kind":"official","path":"autoattack/autopgd_base.py","file_url":"https://github.com/fra31/auto-attack/blob/HEAD/autoattack/autopgd_base.py","link_basis":"first_harvest_node","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":"dfd8fbbc663ac95e"}},{"code_sha256_prefix":"edab3f9c146ad457","entry":"L1_norm","repo":"fra31/auto-attack","repo_kind":"official","path":"autoattack/autopgd_base.py","file_url":"https://github.com/fra31/auto-attack/blob/HEAD/autoattack/autopgd_base.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"edab3f9c146ad457"}},{"code_sha256_prefix":"7325c49fd8c6a7d2","entry":"L1_projection","repo":"fra31/auto-attack","repo_kind":"official","path":"autoattack/autopgd_base.py","file_url":"https://github.com/fra31/auto-attack/blob/HEAD/autoattack/autopgd_base.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7325c49fd8c6a7d2"}},{"code_sha256_prefix":"70c177095b43730b","entry":"_apgd","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"70c177095b43730b"}},{"code_sha256_prefix":"5d25f9fb43f3d226","entry":"check_oscillation","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"5d25f9fb43f3d226"}},{"code_sha256_prefix":"e8b6ca4f669623e7","entry":"difference_of_logits","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"e8b6ca4f669623e7"}},{"code_sha256_prefix":"929e775a8340f085","entry":"difference_of_logits_ratio","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"929e775a8340f085"}},{"code_sha256_prefix":"0832e3bf9440362b","entry":"generate_random_targets","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/utils/attack_utils.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/utils/attack_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"0832e3bf9440362b"}},{"code_sha256_prefix":"c6344b8a7b36aea8","entry":"get_all_targets","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/utils/attack_utils.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/utils/attack_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"c6344b8a7b36aea8"}},{"code_sha256_prefix":"bbb91aff6f54a002","entry":"l1_projection","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bbb91aff6f54a002"}},{"code_sha256_prefix":"bcf13be809e95acc","entry":"apgd","repo":"jeromerony/adversarial-library","repo_kind":"official","path":"adv_lib/attacks/auto_pgd.py","file_url":"https://github.com/jeromerony/adversarial-library/blob/HEAD/adv_lib/attacks/auto_pgd.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"bcf13be809e95acc"}},{"code_sha256_prefix":"dfcb6366ce0d55d8","entry":"check_zero_gradients","repo":"fra31/auto-attack","repo_kind":"official","path":"autoattack/autopgd_base.py","file_url":"https://github.com/fra31/auto-attack/blob/HEAD/autoattack/autopgd_base.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":"dfcb6366ce0d55d8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}