{"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/unsupervised-feature-learning-by-cross-level","title":"Unsupervised Feature Learning by Cross-Level Instance-Group Discrimination","arxiv_id":"2008.03813","date":"2020-08-09","proceeding":"CVPR 2021 1","authors":["Xudong Wang","Ziwei Liu","Stella X. Yu"],"abstract":"Unsupervised feature learning has made great strides with contrastive learning based on instance discrimination and invariant mapping, as benchmarked on curated class-balanced datasets. However, natural data could be highly correlated and long-tail distributed. Natural between-instance similarity conflicts with the presumed instance distinction, causing unstable training and poor performance. Our idea is to discover and integrate between-instance similarity into contrastive learning, not directly by instance grouping, but by cross-level discrimination (CLD) between instances and local instance groups. While invariant mapping of each instance is imposed by attraction within its augmented views, between-instance similarity could emerge from common repulsion against instance groups. Our batch-wise and cross-view comparisons also greatly improve the positive/negative sample ratio of contrastive learning and achieve better invariant mapping. To effect both grouping and discrimination objectives, we impose them on features separately derived from a shared representation. In addition, we propose normalized projection heads and unsupervised hyper-parameter tuning for the first time. Our extensive experimentation demonstrates that CLD is a lean and powerful add-on to existing methods such as NPID, MoCo, InfoMin, and BYOL on highly correlated, long-tail, or balanced datasets. It not only achieves new state-of-the-art on self-supervision, semi-supervision, and transfer learning benchmarks, but also beats MoCo v2 and SimCLR on every reported performance attained with a much larger compute. CLD effectively brings unsupervised learning closer to natural data and real-world applications. Our code is publicly available at: https://github.com/frank-xwang/CLD-UnsupervisedLearning.","url_abs":"https://arxiv.org/abs/2008.03813v5","url_pdf":"https://arxiv.org/pdf/2008.03813v5.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":"unsupervised-feature-learning-by-cross-level","repo_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"unsupervised-feature-learning-by-cross-level","repo_url":"https://github.com/frank-xwang/debiased-pseudo-labeling","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"semi-supervised-image-classification","task_name":"Semi-Supervised Image Classification"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"unsupervised-image-classification","task_name":"Unsupervised Image Classification"}],"methods":[{"method_slug":"1x1-convolution","method_name":"1x1 Convolution"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"bottleneck-residual-block","method_name":"Bottleneck Residual Block"},{"method_slug":"colorjitter","method_name":"ColorJitter"},{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"global-average-pooling","method_name":"Global Average Pooling"},{"method_slug":"infonce","method_name":"InfoNCE"},{"method_slug":"kaiming-initialization","method_name":"Kaiming Initialization"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"moco","method_name":"MoCo"},{"method_slug":"moco-v2","method_name":"MoCo v2"},{"method_slug":"npid","method_name":"NPID"},{"method_slug":"nt-xent","method_name":"NT-Xent"},{"method_slug":"random-gaussian-blur","method_name":"Random Gaussian Blur"},{"method_slug":"random-resized-crop","method_name":"Random Resized Crop"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"residual-block","method_name":"Residual Block"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"simclr","method_name":"SimCLR"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2008.03813","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2008.03813"}},"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/frank-xwang/CLD-UnsupervisedLearning","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/frank-xwang/debiased-pseudo-labeling","reach":null}],"summary":{"ran_draft_wrong":2,"unverified":6},"by_repo_kind":{"official":{"samples":8,"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":"d9def42110729a85","entry":"conv1x1","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"infomin/resnet.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/infomin/resnet.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":"d9def42110729a85"}},{"code_sha256_prefix":"160bb14bd76201b4","entry":"conv3x3","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"infomin/resnet.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/infomin/resnet.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":"160bb14bd76201b4"}},{"code_sha256_prefix":"9b8289076669fe4f","entry":"accuracy","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"main_imagenet_moco_cld.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/main_imagenet_moco_cld.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9b8289076669fe4f"}},{"code_sha256_prefix":"693513ff2d202308","entry":"center_crop","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"lib/custom_transforms.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/lib/custom_transforms.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":"693513ff2d202308"}},{"code_sha256_prefix":"d4783c4a6100b3cc","entry":"get_scheduler","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"lib/lr_scheduler.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/lib/lr_scheduler.py","link_basis":"first_harvest_node","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":"d4783c4a6100b3cc"}},{"code_sha256_prefix":"abf95b2d2f20e322","entry":"random_num_generator","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"lib/custom_transforms.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/lib/custom_transforms.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":"abf95b2d2f20e322"}},{"code_sha256_prefix":"2985b79b38118299","entry":"resnet18","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"infomin/resnet.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/infomin/resnet.py","link_basis":"first_harvest_node","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":"2985b79b38118299"}},{"code_sha256_prefix":"382714b2c227ba48","entry":"to_tensor","repo":"frank-xwang/CLD-UnsupervisedLearning","repo_kind":"official","path":"lib/custom_transforms.py","file_url":"https://github.com/frank-xwang/CLD-UnsupervisedLearning/blob/HEAD/lib/custom_transforms.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":"382714b2c227ba48"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}