{"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/cat-contrastive-adversarial-training-for","title":"CAT: Contrastive Adversarial Training for Evaluating the Robustness of Protective Perturbations in Latent Diffusion Models","arxiv_id":"2502.07225","date":"2025-02-11","proceeding":null,"authors":["Sen Peng","Mingyue Wang","Jianfei He","Jijia Yang","Xiaohua Jia"],"abstract":"Latent diffusion models have recently demonstrated superior capabilities in many downstream image synthesis tasks. However, customization of latent diffusion models using unauthorized data can severely compromise the privacy and intellectual property rights of data owners. Adversarial examples as protective perturbations have been developed to defend against unauthorized data usage by introducing imperceptible noise to customization samples, preventing diffusion models from effectively learning them. In this paper, we first reveal that the primary reason adversarial examples are effective as protective perturbations in latent diffusion models is the distortion of their latent representations, as demonstrated through qualitative and quantitative experiments. We then propose the Contrastive Adversarial Training (CAT) utilizing adapters as an adaptive attack against these protection methods, highlighting their lack of robustness. Extensive experiments demonstrate that our CAT method significantly reduces the effectiveness of protective perturbations in customization configurations, urging the community to reconsider and enhance the robustness of existing protective perturbation methods. Code is available at \\hyperlink{here}{https://github.com/senp98/CAT}.","url_abs":"https://arxiv.org/abs/2502.07225v1","url_pdf":"https://arxiv.org/pdf/2502.07225v1.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":"cat-contrastive-adversarial-training-for","repo_url":"https://github.com/senp98/cat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2502.07225","atlas_url":"https://app.syntology.ai/?focus=2502.07225","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.07225"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/senp98/cat","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":4},"by_repo_kind":{"official":{"samples":6,"ran":2,"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":"ff7da9accf5006b5","entry":"create_tmp_train_dir","repo":"senp98/cat","repo_kind":"official","path":"code/finetune_cat_adapter/finetune_cat_adapter.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/finetune_cat_adapter/finetune_cat_adapter.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"none","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ff7da9accf5006b5"}},{"code_sha256_prefix":"781f28d7bcf3c157","entry":"get_precomputed_embedding","repo":"senp98/cat","repo_kind":"official","path":"code/evaluate/eval_ism.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/evaluate/eval_ism.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"781f28d7bcf3c157"}},{"code_sha256_prefix":"0eb3e94e8635150e","entry":"import_model_class_from_model_name_or_path","repo":"senp98/cat","repo_kind":"official","path":"code/finetune_dreambooth_cat/train_dreambooth_cat.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/finetune_dreambooth_cat/train_dreambooth_cat.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":"0eb3e94e8635150e"}},{"code_sha256_prefix":"016374a7e217bff3","entry":"log_validation","repo":"senp98/cat","repo_kind":"official","path":"code/finetune_cat_adapter/train_cat_adapter.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/finetune_cat_adapter/train_cat_adapter.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":"016374a7e217bff3"}},{"code_sha256_prefix":"1f1d2b9b8c5b51f3","entry":"log_validation","repo":"senp98/cat","repo_kind":"official","path":"code/finetune_lora_cat/train_lora_cat.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/finetune_lora_cat/train_lora_cat.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":"1f1d2b9b8c5b51f3"}},{"code_sha256_prefix":"b1627dd5bbfc3e21","entry":"parse_args","repo":"senp98/cat","repo_kind":"official","path":"code/finetune_dreambooth_cat/train_dreambooth_cat.py","file_url":"https://github.com/senp98/cat/blob/HEAD/code/finetune_dreambooth_cat/train_dreambooth_cat.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":"b1627dd5bbfc3e21"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}