{"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/adversarial-patches-exploiting-contextual","title":"Role of Spatial Context in Adversarial Robustness for Object Detection","arxiv_id":"1910.00068","date":"2019-09-30","proceeding":null,"authors":["Aniruddha Saha","Akshayvarun Subramanya","Koninika Patil","Hamed Pirsiavash"],"abstract":"The benefits of utilizing spatial context in fast object detection algorithms have been studied extensively. Detectors increase inference speed by doing a single forward pass per image which means they implicitly use contextual reasoning for their predictions. However, one can show that an adversary can design adversarial patches which do not overlap with any objects of interest in the scene and exploit contextual reasoning to fool standard detectors. In this paper, we examine this problem and design category specific adversarial patches which make a widely used object detector like YOLO blind to an attacker chosen object category. We also show that limiting the use of spatial context during object detector training improves robustness to such adversaries. We believe the existence of context based adversarial attacks is concerning since the adversarial patch can affect predictions without being in vicinity of any objects of interest. Hence, defending against such attacks becomes challenging and we urge the research community to give attention to this vulnerability.","url_abs":"https://arxiv.org/abs/1910.00068v3","url_pdf":"https://arxiv.org/pdf/1910.00068v3.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":"adversarial-patches-exploiting-contextual","repo_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"adversarial-attack","task_name":"Adversarial Attack"},{"task_slug":"adversarial-robustness","task_name":"Adversarial Robustness"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"real-time-object-detection","task_name":"Real-Time Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1910.00068","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1910.00068"}},"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/UMBCvision/Contextual-Adversarial-Patches","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"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":"03a16656783821f5","entry":"build_targets","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"region_loss.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/region_loss.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":"03a16656783821f5"}},{"code_sha256_prefix":"90b2ef0e95527027","entry":"distort_image","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"image.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/image.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":"90b2ef0e95527027"}},{"code_sha256_prefix":"2329e9023f218b7e","entry":"load_conv","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"cfg.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/cfg.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":"2329e9023f218b7e"}},{"code_sha256_prefix":"bff835defe62db44","entry":"load_conv_bn","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"cfg.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/cfg.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":"bff835defe62db44"}},{"code_sha256_prefix":"93c283a4f6e6c40f","entry":"parse_cfg","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"cfg.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/cfg.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":"93c283a4f6e6c40f"}},{"code_sha256_prefix":"6a4124c294bed05b","entry":"rand_scale","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"image.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/image.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":"6a4124c294bed05b"}},{"code_sha256_prefix":"835b72f71b599016","entry":"scale_image_channel","repo":"UMBCvision/Contextual-Adversarial-Patches","repo_kind":"official","path":"image.py","file_url":"https://github.com/UMBCvision/Contextual-Adversarial-Patches/blob/HEAD/image.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":"835b72f71b599016"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}