{"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-few-shot-learning-via","title":"Diversity Helps: Unsupervised Few-shot Learning via Distribution Shift-based Data Augmentation","arxiv_id":"2004.05805","date":"2020-04-13","proceeding":null,"authors":["Tiexin Qin","Wenbin Li","Yinghuan Shi","Yang Gao"],"abstract":"Few-shot learning aims to learn a new concept when only a few training examples are available, which has been extensively explored in recent years. However, most of the current works heavily rely on a large-scale labeled auxiliary set to train their models in an episodic-training paradigm. Such a kind of supervised setting basically limits the widespread use of few-shot learning algorithms. Instead, in this paper, we develop a novel framework called Unsupervised Few-shot Learning via Distribution Shift-based Data Augmentation (ULDA), which pays attention to the distribution diversity inside each constructed pretext few-shot task when using data augmentation. Importantly, we highlight the value and importance of the distribution diversity in the augmentation-based pretext few-shot tasks, which can effectively alleviate the overfitting problem and make the few-shot model learn more robust feature representations. In ULDA, we systemically investigate the effects of different augmentation techniques and propose to strengthen the distribution diversity (or difference) between the query set and support set in each few-shot task, by augmenting these two sets diversely (i.e., distribution shifting). In this way, even incorporated with simple augmentation techniques (e.g., random crop, color jittering, or rotation), our ULDA can produce a significant improvement. In the experiments, few-shot models learned by ULDA can achieve superior generalization performance and obtain state-of-the-art results in a variety of established few-shot learning tasks on Omniglot and miniImageNet. The source code is available in https://github.com/WonderSeven/ULDA.","url_abs":"https://arxiv.org/abs/2004.05805v2","url_pdf":"https://arxiv.org/pdf/2004.05805v2.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-few-shot-learning-via","repo_url":"https://github.com/WonderSeven/ULDA","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"data-augmentation","task_name":"Data Augmentation"},{"task_slug":"diversity","task_name":"Diversity"},{"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"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/unsupervised-few-shot-image-classification-on","task":"Unsupervised Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"ULDA","rank_in_archive_order":24,"of":28,"metrics":{"Accuracy":"40.71"},"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":"ULDA","rank_in_archive_order":22,"of":28,"metrics":{"Accuracy":"56.18"},"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":"ULDA","rank_in_archive_order":12,"of":12,"metrics":{"Accuracy":"41.77"},"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":"ULDA","rank_in_archive_order":12,"of":12,"metrics":{"Accuracy":"56.78"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2004.05805","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.05805"}},"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/WonderSeven/ULDA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":13},"by_repo_kind":{"official":{"samples":13,"ran":0,"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":"b7b4ce5261d43664","entry":"Default_loader","repo":"WonderSeven/ULDA","repo_kind":"official","path":"datasets/base_dataset.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/datasets/base_dataset.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":"b7b4ce5261d43664"}},{"code_sha256_prefix":"a682370c88b559b3","entry":"PIL_loader","repo":"WonderSeven/ULDA","repo_kind":"official","path":"datasets/base_dataset.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/datasets/base_dataset.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":"a682370c88b559b3"}},{"code_sha256_prefix":"242d8f6ff665a8a0","entry":"RGB_loader","repo":"WonderSeven/ULDA","repo_kind":"official","path":"datasets/DataSets.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/datasets/DataSets.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":"242d8f6ff665a8a0"}},{"code_sha256_prefix":"b1962bd997947f9b","entry":"Rotate","repo":"WonderSeven/ULDA","repo_kind":"official","path":"compare/Rotate_dataloader.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/compare/Rotate_dataloader.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":"b1962bd997947f9b"}},{"code_sha256_prefix":"e31cea644d08aaf3","entry":"accuracy","repo":"WonderSeven/ULDA","repo_kind":"official","path":"engine/fsl_baseline.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/engine/fsl_baseline.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":"e31cea644d08aaf3"}},{"code_sha256_prefix":"a861bdb57b1efb9a","entry":"add_modules_for_DataParallel","repo":"WonderSeven/ULDA","repo_kind":"official","path":"engine/checkpointer.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/engine/checkpointer.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":"a861bdb57b1efb9a"}},{"code_sha256_prefix":"f7c5285c241ce106","entry":"default_loader","repo":"WonderSeven/ULDA","repo_kind":"official","path":"datasets/DataSets.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/datasets/DataSets.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":"f7c5285c241ce106"}},{"code_sha256_prefix":"c26bd451f1b4b267","entry":"get_function","repo":"WonderSeven/ULDA","repo_kind":"official","path":"network/inits.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/network/inits.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":"c26bd451f1b4b267"}},{"code_sha256_prefix":"7702313c16b1182f","entry":"get_norm_layer","repo":"WonderSeven/ULDA","repo_kind":"official","path":"network/net_tools.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/network/net_tools.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":"7702313c16b1182f"}},{"code_sha256_prefix":"75c1b60e3bf0b372","entry":"load_model_directly","repo":"WonderSeven/ULDA","repo_kind":"official","path":"engine/checkpointer.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/engine/checkpointer.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":"75c1b60e3bf0b372"}},{"code_sha256_prefix":"f1ac0078149b3155","entry":"one_hot","repo":"WonderSeven/ULDA","repo_kind":"official","path":"network/net_tools.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/network/net_tools.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":"f1ac0078149b3155"}},{"code_sha256_prefix":"bb5c7b957820c064","entry":"remove_modules_for_DataParallel","repo":"WonderSeven/ULDA","repo_kind":"official","path":"engine/checkpointer.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/engine/checkpointer.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":"bb5c7b957820c064"}},{"code_sha256_prefix":"f347e7f86ec8d83d","entry":"test","repo":"WonderSeven/ULDA","repo_kind":"official","path":"engine/fsl_baseline.py","file_url":"https://github.com/WonderSeven/ULDA/blob/HEAD/engine/fsl_baseline.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":"f347e7f86ec8d83d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}