{"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/self-supervision-can-be-a-good-few-shot","title":"Self-Supervision Can Be a Good Few-Shot Learner","arxiv_id":"2207.09176","date":"2022-07-19","proceeding":null,"authors":["Yuning Lu","Liangjian Wen","Jianzhuang Liu","Yajing Liu","Xinmei Tian"],"abstract":"Existing few-shot learning (FSL) methods rely on training with a large labeled dataset, which prevents them from leveraging abundant unlabeled data. From an information-theoretic perspective, we propose an effective unsupervised FSL method, learning representations with self-supervision. Following the InfoMax principle, our method learns comprehensive representations by capturing the intrinsic structure of the data. Specifically, we maximize the mutual information (MI) of instances and their representations with a low-bias MI estimator to perform self-supervised pre-training. Rather than supervised pre-training focusing on the discriminable features of the seen classes, our self-supervised model has less bias toward the seen classes, resulting in better generalization for unseen classes. We explain that supervised pre-training and self-supervised pre-training are actually maximizing different MI objectives. Extensive experiments are further conducted to analyze their FSL performance with various training settings. Surprisingly, the results show that self-supervised pre-training can outperform supervised pre-training under the appropriate conditions. Compared with state-of-the-art FSL methods, our approach achieves comparable performance on widely used FSL benchmarks without any labels of the base classes.","url_abs":"https://arxiv.org/abs/2207.09176v1","url_pdf":"https://arxiv.org/pdf/2207.09176v1.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":"self-supervision-can-be-a-good-few-shot","repo_url":"https://github.com/bbbdylan/unisiam","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"self-supervision-can-be-a-good-few-shot","repo_url":"https://github.com/2023-MindSpore-1/ms-code-217/tree/main/unisiam","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"self-supervision-can-be-a-good-few-shot","repo_url":"https://github.com/MindSpore-paper-code-2/code3/tree/main/unisiam","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null},{"paper_slug":"self-supervision-can-be-a-good-few-shot","repo_url":"https://github.com/yangyucheng000/MSpaper/tree/main/unisiam","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"few-shot-image-classification","task_name":"Few-Shot Image Classification"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"unsupervised-few-shot-image-classification","task_name":"Unsupervised Few-Shot Image Classification"},{"task_slug":"unsupervised-few-shot-learning","task_name":"Unsupervised Few-Shot Learning"},{"task_slug":"cross-domain-few-shot-learning","task_name":"cross-domain few-shot learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-mini-2","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"UniSiam","rank_in_archive_order":54,"of":105,"metrics":{"Accuracy":"65.55"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-3","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"UniSiam","rank_in_archive_order":35,"of":95,"metrics":{"Accuracy":"83.40"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-tiered","task":"Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (1-shot)","model":"UniSiam","rank_in_archive_order":34,"of":49,"metrics":{"Accuracy":"69.60"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-tiered-1","task":"Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (5-shot)","model":"UniSiam","rank_in_archive_order":26,"of":51,"metrics":{"Accuracy":"86.51"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on","task":"Unsupervised Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"UniSiam","rank_in_archive_order":3,"of":28,"metrics":{"Accuracy":"65.55"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-1","task":"Unsupervised Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"UniSiam","rank_in_archive_order":3,"of":28,"metrics":{"Accuracy":"83.40"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-2","task":"Unsupervised Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (1-shot)","model":"UniSiam","rank_in_archive_order":2,"of":12,"metrics":{"Accuracy":"69.60"},"uses_additional_data":false},{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on-3","task":"Unsupervised Few-Shot Image Classification","dataset":"Tiered ImageNet 5-way (5-shot)","model":"UniSiam","rank_in_archive_order":2,"of":12,"metrics":{"Accuracy":"86.51"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.09176","atlas_url":"https://app.syntology.ai/?focus=2207.09176","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2207.09176"}},"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/bbbdylan/unisiam","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MindSpore-paper-code-2/code3/tree/main/unisiam","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-217/tree/main/unisiam","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yangyucheng000/MSpaper/tree/main/unisiam","reach":null}],"summary":{"ran_draft_wrong":2,"ran":3,"unverified":5},"by_repo_kind":{"official":{"samples":8,"ran":3,"repositories":1},"listed":{"samples":2,"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":"2a80220dabcb742a","entry":"conv1x1","repo":"bbbdylan/unisiam","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/model/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":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"bbbdylan/unisiam","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/model/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":"600ff2c45e0de056"}},{"code_sha256_prefix":"71f6b54bb153195b","entry":"sigmoid","repo":"yangyucheng000/MSpaper","repo_kind":"listed","path":"UNet3+/eval_onnx.py","file_url":"https://github.com/yangyucheng000/MSpaper/blob/HEAD/UNet3%2B/eval_onnx.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"71f6b54bb153195b"}},{"code_sha256_prefix":"35f8386d0382d374","entry":"sigmoid","repo":"yangyucheng000/MSpaper","repo_kind":"listed","path":"UNet3+/postprocess.py","file_url":"https://github.com/yangyucheng000/MSpaper/blob/HEAD/UNet3%2B/postprocess.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"35f8386d0382d374"}},{"code_sha256_prefix":"a4b471197204b414","entry":"translate_x_rel","repo":"bbbdylan/unisiam","repo_kind":"official","path":"transform/rand_augmentation.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/transform/rand_augmentation.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":"a4b471197204b414"}},{"code_sha256_prefix":"913d82af53065418","entry":"accuracy","repo":"bbbdylan/unisiam","repo_kind":"official","path":"util.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/util.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":"913d82af53065418"}},{"code_sha256_prefix":"830d602b5d97e75d","entry":"build_transform","repo":"bbbdylan/unisiam","repo_kind":"official","path":"transform/build_transform.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/transform/build_transform.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":"830d602b5d97e75d"}},{"code_sha256_prefix":"b8f8a709e70fae66","entry":"resnet10","repo":"bbbdylan/unisiam","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/model/resnet.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":"b8f8a709e70fae66"}},{"code_sha256_prefix":"7b4e3d0bd192b677","entry":"shear_x","repo":"bbbdylan/unisiam","repo_kind":"official","path":"transform/rand_augmentation.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/transform/rand_augmentation.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":"7b4e3d0bd192b677"}},{"code_sha256_prefix":"e31c4b500a240e69","entry":"shear_y","repo":"bbbdylan/unisiam","repo_kind":"official","path":"transform/rand_augmentation.py","file_url":"https://github.com/bbbdylan/unisiam/blob/HEAD/transform/rand_augmentation.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":"e31c4b500a240e69"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}