{"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/defending-against-transfer-attacks-from","title":"PubDef: Defending Against Transfer Attacks From Public Models","arxiv_id":"2310.17645","date":"2023-10-26","proceeding":null,"authors":["Chawin Sitawarin","Jaewon Chang","David Huang","Wesson Altoyan","David Wagner"],"abstract":"Adversarial attacks have been a looming and unaddressed threat in the industry. However, through a decade-long history of the robustness evaluation literature, we have learned that mounting a strong or optimal attack is challenging. It requires both machine learning and domain expertise. In other words, the white-box threat model, religiously assumed by a large majority of the past literature, is unrealistic. In this paper, we propose a new practical threat model where the adversary relies on transfer attacks through publicly available surrogate models. We argue that this setting will become the most prevalent for security-sensitive applications in the future. We evaluate the transfer attacks in this setting and propose a specialized defense method based on a game-theoretic perspective. The defenses are evaluated under 24 public models and 11 attack algorithms across three datasets (CIFAR-10, CIFAR-100, and ImageNet). Under this threat model, our defense, PubDef, outperforms the state-of-the-art white-box adversarial training by a large margin with almost no loss in the normal accuracy. For instance, on ImageNet, our defense achieves 62% accuracy under the strongest transfer attack vs only 36% of the best adversarially trained model. Its accuracy when not under attack is only 2% lower than that of an undefended model (78% vs 80%). We release our code at https://github.com/wagner-group/pubdef.","url_abs":"https://arxiv.org/abs/2310.17645v2","url_pdf":"https://arxiv.org/pdf/2310.17645v2.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":"defending-against-transfer-attacks-from","repo_url":"https://github.com/wagner-group/pubdef","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2310.17645","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2310.17645"}},"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/ZhengyuZhao/TransferAttackEval","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wagner-group/pubdef","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"ran_draft_wrong":2,"unverified":2},"by_repo_kind":{"found_in_text":{"samples":12,"ran":10,"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":12,"samples":[{"code_sha256_prefix":"54085cfa802ab165","entry":"TI_multi","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/input_augmentation_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/input_augmentation_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"54085cfa802ab165"}},{"code_sha256_prefix":"713cbb90b09f2f2d","entry":"accuracy","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/utils_data.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/utils_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"713cbb90b09f2f2d"}},{"code_sha256_prefix":"7a1a277b5455acbd","entry":"avg","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/feature_disruption_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/feature_disruption_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a1a277b5455acbd"}},{"code_sha256_prefix":"c753988805f48831","entry":"backward_hook","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/surrogate_refinement_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/surrogate_refinement_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c753988805f48831"}},{"code_sha256_prefix":"411972c3dc337b0d","entry":"backward_hook_norm","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/surrogate_refinement_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/surrogate_refinement_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"411972c3dc337b0d"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/utils_iaa.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/utils_iaa.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/utils_iaa.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/utils_iaa.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"600ff2c45e0de056"}},{"code_sha256_prefix":"c7faa7d1457e3557","entry":"gkern","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/input_augmentation_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/input_augmentation_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7faa7d1457e3557"}},{"code_sha256_prefix":"20790bad3577ddcb","entry":"linbp_forw_resnet50","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/surrogate_refinement_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/surrogate_refinement_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"20790bad3577ddcb"}},{"code_sha256_prefix":"6dd3f399496d6497","entry":"sow_images","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/feature_disruption_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/feature_disruption_attacks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6dd3f399496d6497"}},{"code_sha256_prefix":"7ce71b5da4faa32b","entry":"TI","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/input_augmentation_attacks.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/input_augmentation_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":"7ce71b5da4faa32b"}},{"code_sha256_prefix":"bfc5e139026a885d","entry":"resnet50","repo":"ZhengyuZhao/TransferAttackEval","repo_kind":"found_in_text","path":"attacks/utils_iaa.py","file_url":"https://github.com/ZhengyuZhao/TransferAttackEval/blob/HEAD/attacks/utils_iaa.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":"bfc5e139026a885d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}