{"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/ssl-cleanse-trojan-detection-and-mitigation","title":"SSL-Cleanse: Trojan Detection and Mitigation in Self-Supervised Learning","arxiv_id":"2303.09079","date":"2023-03-16","proceeding":null,"authors":["Mengxin Zheng","Jiaqi Xue","ZiHao Wang","Xun Chen","Qian Lou","Lei Jiang","XiaoFeng Wang"],"abstract":"Self-supervised learning (SSL) is a prevalent approach for encoding data representations. Using a pre-trained SSL image encoder and subsequently training a downstream classifier, impressive performance can be achieved on various tasks with very little labeled data. The growing adoption of SSL has led to an increase in security research on SSL encoders and associated Trojan attacks. Trojan attacks embedded in SSL encoders can operate covertly, spreading across multiple users and devices. The presence of backdoor behavior in Trojaned encoders can inadvertently be inherited by downstream classifiers, making it even more difficult to detect and mitigate the threat. Although current Trojan detection methods in supervised learning can potentially safeguard SSL downstream classifiers, identifying and addressing triggers in the SSL encoder before its widespread dissemination is a challenging task. This challenge arises because downstream tasks might be unknown, dataset labels may be unavailable, and the original unlabeled training dataset might be inaccessible during Trojan detection in SSL encoders. We introduce SSL-Cleanse as a solution to identify and mitigate backdoor threats in SSL encoders. We evaluated SSL-Cleanse on various datasets using 1200 encoders, achieving an average detection success rate of 82.2% on ImageNet-100. After mitigating backdoors, on average, backdoored encoders achieve 0.3% attack success rate without great accuracy loss, proving the effectiveness of SSL-Cleanse. The source code of SSL-Cleanse is available at https://github.com/UCF-ML-Research/SSL-Cleanse.","url_abs":"https://arxiv.org/abs/2303.09079v3","url_pdf":"https://arxiv.org/pdf/2303.09079v3.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":"ssl-cleanse-trojan-detection-and-mitigation","repo_url":"https://github.com/ucf-ml-research/ssl-cleanse","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"self-supervised-learning","task_name":"Self-Supervised Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.09079","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.09079"}},"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/ucf-ml-research/ssl-cleanse","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":1,"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":"2d19f4f3143c2ccf","entry":"get_head","repo":"ucf-ml-research/ssl-cleanse","repo_kind":"official","path":"detector/core/model.py","file_url":"https://github.com/ucf-ml-research/ssl-cleanse/blob/HEAD/detector/core/model.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d19f4f3143c2ccf"}},{"code_sha256_prefix":"832b608dd0de04f2","entry":"PCGrad","repo":"ucf-ml-research/ssl-cleanse","repo_kind":"official","path":"detector/core/utils.py","file_url":"https://github.com/ucf-ml-research/ssl-cleanse/blob/HEAD/detector/core/utils.py","link_basis":"harvester_set","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":"832b608dd0de04f2"}},{"code_sha256_prefix":"68cda5db67f7fd9b","entry":"draw","repo":"ucf-ml-research/ssl-cleanse","repo_kind":"official","path":"detector/core/utils.py","file_url":"https://github.com/ucf-ml-research/ssl-cleanse/blob/HEAD/detector/core/utils.py","link_basis":"harvester_set","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":"68cda5db67f7fd9b"}},{"code_sha256_prefix":"06ebbacf39d65124","entry":"get_model","repo":"ucf-ml-research/ssl-cleanse","repo_kind":"official","path":"detector/core/model.py","file_url":"https://github.com/ucf-ml-research/ssl-cleanse/blob/HEAD/detector/core/model.py","link_basis":"harvester_set","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":"06ebbacf39d65124"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}