{"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/class-aware-contrastive-semi-supervised","title":"Class-Aware Contrastive Semi-Supervised Learning","arxiv_id":"2203.02261","date":"2022-03-04","proceeding":"CVPR 2022 1","authors":["Fan Yang","Kai Wu","Shuyi Zhang","Guannan Jiang","Yong liu","Feng Zheng","Wei zhang","Chengjie Wang","Long Zeng"],"abstract":"Pseudo-label-based semi-supervised learning (SSL) has achieved great success on raw data utilization. However, its training procedure suffers from confirmation bias due to the noise contained in self-generated artificial labels. Moreover, the model's judgment becomes noisier in real-world applications with extensive out-of-distribution data. To address this issue, we propose a general method named Class-aware Contrastive Semi-Supervised Learning (CCSSL), which is a drop-in helper to improve the pseudo-label quality and enhance the model's robustness in the real-world setting. Rather than treating real-world data as a union set, our method separately handles reliable in-distribution data with class-wise clustering for blending into downstream tasks and noisy out-of-distribution data with image-wise contrastive for better generalization. Furthermore, by applying target re-weighting, we successfully emphasize clean label learning and simultaneously reduce noisy label learning. Despite its simplicity, our proposed CCSSL has significant performance improvements over the state-of-the-art SSL methods on the standard datasets CIFAR100 and STL10. On the real-world dataset Semi-iNat 2021, we improve FixMatch by 9.80% and CoMatch by 3.18%. Code is available https://github.com/TencentYoutuResearch/Classification-SemiCLS.","url_abs":"https://arxiv.org/abs/2203.02261v3","url_pdf":"https://arxiv.org/pdf/2203.02261v3.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":"class-aware-contrastive-semi-supervised","repo_url":"https://github.com/tencentyouturesearch/classification-semicls","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"pseudo-label","task_name":"Pseudo Label"},{"task_slug":"semi-supervised-image-classification","task_name":"Semi-Supervised Image Classification"}],"methods":[{"method_slug":"fixmatch","method_name":"FixMatch"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-cifar-10-40-labels","task":"Image Classification","dataset":"CIFAR-10 (40 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuarcy":"30.89"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-34","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10 (250 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"67.2"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-35","task":"Semi-Supervised Image Classification","dataset":"CIFAR-10 (4000 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"88.77"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-33","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100 (10000 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"71.12"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-30","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100 (250 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":1,"of":2,"metrics":{"Accuarcy":"56.3"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-29","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100 (400 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"24.53"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-9","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100, 2500 Labels","model":"CCSSL(FixMatch)","rank_in_archive_order":4,"of":16,"metrics":{"Percentage error":"24.3"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-8","task":"Semi-Supervised Image Classification","dataset":"CIFAR-100, 400 Labels","model":"CCSSL(FixMatch)","rank_in_archive_order":11,"of":21,"metrics":{"Percentage error":"38.81"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-stl-5","task":"Semi-Supervised Image Classification","dataset":"STL-10 (1000 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"82.0"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn-9","task":"Semi-Supervised Image Classification","dataset":"SVHN (1000 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"88.6"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn-7","task":"Semi-Supervised Image Classification","dataset":"SVHN (250 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"80.39"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-svhn-8","task":"Semi-Supervised Image Classification","dataset":"SVHN (40 Labels, ImageNet-100 Unlabeled)","model":"CCSSL","rank_in_archive_order":2,"of":2,"metrics":{"Accuracy":"50.02"},"uses_additional_data":false},{"leaderboard":"/sota/semi-supervised-image-classification-on-cifar-2","task":"Semi-Supervised Image Classification","dataset":"cifar-100, 10000 Labels","model":"CCSSL(FixMatch)","rank_in_archive_order":3,"of":29,"metrics":{"Percentage error":"19.32"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.02261","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.02261"}},"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/tencentyouturesearch/classification-semicls","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/TencentYoutuResearch/Classification-SemiCLS","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"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":3,"samples":[{"code_sha256_prefix":"0299a91f36b01f3b","entry":"SoftSupConLoss","repo":"TencentYoutuResearch/Classification-SemiCLS","repo_kind":"official","path":"trainer/comatch_ccssl.py","file_url":"https://github.com/TencentYoutuResearch/Classification-SemiCLS/blob/HEAD/trainer/comatch_ccssl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0299a91f36b01f3b"}},{"code_sha256_prefix":"6812d4a16d197894","entry":"Trainer","repo":"TencentYoutuResearch/Classification-SemiCLS","repo_kind":"official","path":"trainer/comatch_ccssl.py","file_url":"https://github.com/TencentYoutuResearch/Classification-SemiCLS/blob/HEAD/trainer/comatch_ccssl.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"6812d4a16d197894"}},{"code_sha256_prefix":"df87773228d6cb58","entry":"CoMatchCCSSL","repo":"TencentYoutuResearch/Classification-SemiCLS","repo_kind":"official","path":"trainer/comatch_ccssl.py","file_url":"https://github.com/TencentYoutuResearch/Classification-SemiCLS/blob/HEAD/trainer/comatch_ccssl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"df87773228d6cb58"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}