{"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/using-multiple-self-supervised-tasks-improves","title":"Using Multiple Self-Supervised Tasks Improves Model Robustness","arxiv_id":"2204.03714","date":"2022-04-07","proceeding":null,"authors":["Matthew Lawhon","Chengzhi Mao","Junfeng Yang"],"abstract":"Deep networks achieve state-of-the-art performance on computer vision tasks, yet they fail under adversarial attacks that are imperceptible to humans. In this paper, we propose a novel defense that can dynamically adapt the input using the intrinsic structure from multiple self-supervised tasks. By simultaneously using many self-supervised tasks, our defense avoids over-fitting the adapted image to one specific self-supervised task and restores more intrinsic structure in the image compared to a single self-supervised task approach. Our approach further improves robustness and clean accuracy significantly compared to the state-of-the-art single task self-supervised defense. Our work is the first to connect multiple self-supervised tasks to robustness, and suggests that we can achieve better robustness with more intrinsic signal from visual data.","url_abs":"https://arxiv.org/abs/2204.03714v1","url_pdf":"https://arxiv.org/pdf/2204.03714v1.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":"using-multiple-self-supervised-tasks-improves","repo_url":"https://github.com/mattlawhon/selfsupdefense","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2204.03714","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.03714"}},"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/mattlawhon/SelfSupDefense","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mattlawhon/selfsupdefense","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":1,"ran":5,"unverified":10},"by_repo_kind":{"official":{"samples":16,"ran":6,"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":"7325c49fd8c6a7d2","entry":"L1_projection","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"AAattack/autopgd_base.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/AAattack/autopgd_base.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7325c49fd8c6a7d2"}},{"code_sha256_prefix":"1153837ba4a94242","entry":"PreActResNet18","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/preactresnet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/preactresnet.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1153837ba4a94242"}},{"code_sha256_prefix":"1e0eb41fc8899d05","entry":"pad","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"utils.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1e0eb41fc8899d05"}},{"code_sha256_prefix":"9647e1400ee744e4","entry":"projection_l1","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"AAattack/fab_projections.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/AAattack/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9647e1400ee744e4"}},{"code_sha256_prefix":"a345677b413ef5ca","entry":"projection_l2","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"AAattack/fab_projections.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/AAattack/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a345677b413ef5ca"}},{"code_sha256_prefix":"b8bdb6e496b4b5fa","entry":"projection_linf","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"AAattack/fab_projections.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/AAattack/fab_projections.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b8bdb6e496b4b5fa"}},{"code_sha256_prefix":"d043e79456d2e240","entry":"PreActResNet18Mhead","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/preactresnet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/preactresnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d043e79456d2e240"}},{"code_sha256_prefix":"25f994ffc02d5ca9","entry":"PreActResNet18SSL","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/preactresnet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/preactresnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"25f994ffc02d5ca9"}},{"code_sha256_prefix":"8a93e041134b597a","entry":"clamp","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"cifar10_defense.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/cifar10_defense.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8a93e041134b597a"}},{"code_sha256_prefix":"ac057d3606810af8","entry":"densenet121","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/densenet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/densenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ac057d3606810af8"}},{"code_sha256_prefix":"ecc06aa5bb90a111","entry":"densenet161","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/densenet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/densenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ecc06aa5bb90a111"}},{"code_sha256_prefix":"ca1a04251cc4d85c","entry":"densenet169","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"learning/densenet.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/learning/densenet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ca1a04251cc4d85c"}},{"code_sha256_prefix":"3bb1c5ca33fbb118","entry":"getDictImageNetClasses","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"utils.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3bb1c5ca33fbb118"}},{"code_sha256_prefix":"86fba5d0611cc5ae","entry":"normal_guassian_normalize","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"cifar10_defense.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/cifar10_defense.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"86fba5d0611cc5ae"}},{"code_sha256_prefix":"d2a4ac781b2a9628","entry":"normalise","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"utils.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d2a4ac781b2a9628"}},{"code_sha256_prefix":"464c263f3a828a31","entry":"normalize","repo":"mattlawhon/SelfSupDefense","repo_kind":"official","path":"cifar10_defense_rebAA.py","file_url":"https://github.com/mattlawhon/SelfSupDefense/blob/HEAD/cifar10_defense_rebAA.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"464c263f3a828a31"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}