{"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/sparse-patches-adversarial-attacks-via","title":"Sparse patches adversarial attacks via extrapolating point-wise information","arxiv_id":"2411.16162","date":"2024-11-25","proceeding":null,"authors":["Yaniv Nemcovsky","Avi Mendelson","Chaim Baskin"],"abstract":"Sparse and patch adversarial attacks were previously shown to be applicable in realistic settings and are considered a security risk to autonomous systems. Sparse adversarial perturbations constitute a setting in which the adversarial perturbations are limited to affecting a relatively small number of points in the input. Patch adversarial attacks denote the setting where the sparse attacks are limited to a given structure, i.e., sparse patches with a given shape and number. However, previous patch adversarial attacks do not simultaneously optimize multiple patches' locations and perturbations. This work suggests a novel approach for sparse patches adversarial attacks via point-wise trimming dense adversarial perturbations. Our approach enables simultaneous optimization of multiple sparse patches' locations and perturbations for any given number and shape. Moreover, our approach is also applicable for standard sparse adversarial attacks, where we show that it significantly improves the state-of-the-art over multiple extensive settings. A reference implementation of the proposed method and the reported experiments is provided at \\url{https://github.com/yanemcovsky/SparsePatches.git}","url_abs":"https://arxiv.org/abs/2411.16162v1","url_pdf":"https://arxiv.org/pdf/2411.16162v1.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":"sparse-patches-adversarial-attacks-via","repo_url":"https://github.com/yanemcovsky/sparsepatches","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2411.16162","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2411.16162"}},"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":"deterministic:regex_extraction","url":"https://github.com/yanemcovsky/SparsePatches","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yanemcovsky/sparsepatches","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"unverified":23},"by_repo_kind":{"official":{"samples":26,"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":26,"samples":[{"code_sha256_prefix":"92df69bfd3a2a190","entry":"ResNet34","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"92df69bfd3a2a190"}},{"code_sha256_prefix":"58e05164be3f07cb","entry":"clip_image_values","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SF/utils.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SF/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"58e05164be3f07cb"}},{"code_sha256_prefix":"9d39a04fb10e4cc3","entry":"prox_pixel","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d39a04fb10e4cc3"}},{"code_sha256_prefix":"a2b9ee409e65e7a2","entry":"CWLoss","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a2b9ee409e65e7a2"}},{"code_sha256_prefix":"2379910c53e2ed47","entry":"CWLoss","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2379910c53e2ed47"}},{"code_sha256_prefix":"85a21969756306fa","entry":"F","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85a21969756306fa"}},{"code_sha256_prefix":"e2c5ff4fa9ef0826","entry":"F","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e2c5ff4fa9ef0826"}},{"code_sha256_prefix":"0235b3a7db71daaa","entry":"Homotopy","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0235b3a7db71daaa"}},{"code_sha256_prefix":"4842fd34ecb61152","entry":"ResNet18","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4842fd34ecb61152"}},{"code_sha256_prefix":"861cf376d1226ed5","entry":"ResNet18","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"861cf376d1226ed5"}},{"code_sha256_prefix":"a44db322b52fd5bb","entry":"ResNet34","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a44db322b52fd5bb"}},{"code_sha256_prefix":"8e83bc6d19a7d996","entry":"ResNet50","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8e83bc6d19a7d996"}},{"code_sha256_prefix":"5b7d80579a854622","entry":"ResNet50","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"models/cifar10/resnet.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/models/cifar10/resnet.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5b7d80579a854622"}},{"code_sha256_prefix":"f4a098b394100f28","entry":"after_attack","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f4a098b394100f28"}},{"code_sha256_prefix":"db3499b998ec5515","entry":"after_attack","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db3499b998ec5515"}},{"code_sha256_prefix":"9bacc39d0c970f9b","entry":"compute_run_args","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"parser.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/parser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9bacc39d0c970f9b"}},{"code_sha256_prefix":"f289915c7cc84fc5","entry":"deepfool","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SF/deepfool.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SF/deepfool.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f289915c7cc84fc5"}},{"code_sha256_prefix":"2701b68cba70825d","entry":"flat2square","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SIA/cornersearch_attacks.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SIA/cornersearch_attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2701b68cba70825d"}},{"code_sha256_prefix":"1f152334e797e0eb","entry":"homotopy","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1f152334e797e0eb"}},{"code_sha256_prefix":"89ff72f9a51a6b5a","entry":"inception_v3","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"models/imagenet/inception_v3.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/models/imagenet/inception_v3.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"89ff72f9a51a6b5a"}},{"code_sha256_prefix":"4cc853931342a664","entry":"inv_tf","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SF/utils.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SF/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4cc853931342a664"}},{"code_sha256_prefix":"c3f72bcd75fa91ad","entry":"nmAPG","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c3f72bcd75fa91ad"}},{"code_sha256_prefix":"1874404dae88b799","entry":"onepixel_perturbation","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SIA/cornersearch_attacks.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SIA/cornersearch_attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1874404dae88b799"}},{"code_sha256_prefix":"c9ca34596232d79b","entry":"onepixel_perturbation_image","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SIA/cornersearch_attacks.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SIA/cornersearch_attacks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c9ca34596232d79b"}},{"code_sha256_prefix":"1c11a323cdb59f22","entry":"search_lambda","repo":"yanemcovsky/sparsepatches","repo_kind":"official","path":"attacks/SAHomotopy/attack.py","file_url":"https://github.com/yanemcovsky/sparsepatches/blob/HEAD/attacks/SAHomotopy/attack.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1c11a323cdb59f22"}},{"code_sha256_prefix":"657e8dd167ee4c4b","entry":"valid_bounds","repo":"yanemcovsky/SparsePatches","repo_kind":"official","path":"attacks/SF/utils.py","file_url":"https://github.com/yanemcovsky/SparsePatches/blob/HEAD/attacks/SF/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"657e8dd167ee4c4b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}