{"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/efficient-adversarial-contrastive-learning-1","title":"Efficient Adversarial Contrastive Learning via Robustness-Aware Coreset Selection","arxiv_id":"2302.03857","date":"2023-02-08","proceeding":"NeurIPS 2023 11","authors":["Xilie Xu","Jingfeng Zhang","Feng Liu","Masashi Sugiyama","Mohan Kankanhalli"],"abstract":"Adversarial contrastive learning (ACL) does not require expensive data annotations but outputs a robust representation that withstands adversarial attacks and also generalizes to a wide range of downstream tasks. However, ACL needs tremendous running time to generate the adversarial variants of all training data, which limits its scalability to large datasets. To speed up ACL, this paper proposes a robustness-aware coreset selection (RCS) method. RCS does not require label information and searches for an informative subset that minimizes a representational divergence, which is the distance of the representation between natural data and their virtual adversarial variants. The vanilla solution of RCS via traversing all possible subsets is computationally prohibitive. Therefore, we theoretically transform RCS into a surrogate problem of submodular maximization, of which the greedy search is an efficient solution with an optimality guarantee for the original problem. Empirically, our comprehensive results corroborate that RCS can speed up ACL by a large margin without significantly hurting the robustness transferability. Notably, to the best of our knowledge, we are the first to conduct ACL efficiently on the large-scale ImageNet-1K dataset to obtain an effective robust representation via RCS. Our source code is at https://github.com/GodXuxilie/Efficient_ACL_via_RCS.","url_abs":"https://arxiv.org/abs/2302.03857v5","url_pdf":"https://arxiv.org/pdf/2302.03857v5.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":"efficient-adversarial-contrastive-learning-1","repo_url":"https://github.com/godxuxilie/efficient_acl_via_rcs","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.03857","atlas_url":"https://app.syntology.ai/?focus=2302.03857","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.03857"}},"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":"deterministic:regex_extraction","url":"https://github.com/GodXuxilie/Efficient_ACL_via_RCS","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/godxuxilie/efficient_acl_via_rcs","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_fixture":1,"ran_draft_wrong":9,"unverified":3},"by_repo_kind":{"official":{"samples":16,"ran":13,"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":16,"samples":[{"code_sha256_prefix":"21c42dbea46422ff","entry":"Coreset","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.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":"21c42dbea46422ff"}},{"code_sha256_prefix":"4f24b8d92ab580fe","entry":"IndexSubset","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.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":"4f24b8d92ab580fe"}},{"code_sha256_prefix":"3cec42992290574e","entry":"JS_loss","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3cec42992290574e"}},{"code_sha256_prefix":"73ccccfd9181a1bf","entry":"PGD","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"73ccccfd9181a1bf"}},{"code_sha256_prefix":"b6ab53b0b1d32748","entry":"Subset","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b6ab53b0b1d32748"}},{"code_sha256_prefix":"d40168e2231e8a69","entry":"cost_matrix_cos","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d40168e2231e8a69"}},{"code_sha256_prefix":"2675d3b1a4707435","entry":"del_tensor_ele","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2675d3b1a4707435"}},{"code_sha256_prefix":"4a362ab42a0fc3d1","entry":"get_cost_matrix","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a362ab42a0fc3d1"}},{"code_sha256_prefix":"9b4fc11504440ef7","entry":"kl_loss","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b4fc11504440ef7"}},{"code_sha256_prefix":"b65e98b094ad2fb9","entry":"nt_xent","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b65e98b094ad2fb9"}},{"code_sha256_prefix":"1927d091cae2a0e8","entry":"pair_cosine_similarity","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1927d091cae2a0e8"}},{"code_sha256_prefix":"79f77411b14d1a67","entry":"sinkhorn","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"79f77411b14d1a67"}},{"code_sha256_prefix":"ed62e0c7d3f3f006","entry":"sinkhorn_loss_joint_IPOT","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed62e0c7d3f3f006"}},{"code_sha256_prefix":"5b14bac90e4e55c1","entry":"PGD_contrastive","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.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":"5b14bac90e4e55c1"}},{"code_sha256_prefix":"8b21ffe825b5bbb7","entry":"RCS","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.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":"8b21ffe825b5bbb7"}},{"code_sha256_prefix":"ca78310a071c219e","entry":"ot_loss","repo":"godxuxilie/efficient_acl_via_rcs","repo_kind":"official","path":"ACL_RCS/ImageNet_32/RCS.py","file_url":"https://github.com/godxuxilie/efficient_acl_via_rcs/blob/HEAD/ACL_RCS/ImageNet_32/RCS.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":"ca78310a071c219e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}