{"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/pushing-the-limits-of-simple-pipelines-for","title":"Pushing the Limits of Simple Pipelines for Few-Shot Learning: External Data and Fine-Tuning Make a Difference","arxiv_id":"2204.07305","date":"2022-04-15","proceeding":"CVPR 2022 1","authors":["Shell Xu Hu","Da Li","Jan Stühmer","Minyoung Kim","Timothy M. Hospedales"],"abstract":"Few-shot learning (FSL) is an important and topical problem in computer vision that has motivated extensive research into numerous methods spanning from sophisticated meta-learning methods to simple transfer learning baselines. We seek to push the limits of a simple-but-effective pipeline for more realistic and practical settings of few-shot image classification. To this end, we explore few-shot learning from the perspective of neural network architecture, as well as a three stage pipeline of network updates under different data supplies, where unsupervised external data is considered for pre-training, base categories are used to simulate few-shot tasks for meta-training, and the scarcely labelled data of an novel task is taken for fine-tuning. We investigate questions such as: (1) How pre-training on external data benefits FSL? (2) How state-of-the-art transformer architectures can be exploited? and (3) How fine-tuning mitigates domain shift? Ultimately, we show that a simple transformer-based pipeline yields surprisingly good performance on standard benchmarks such as Mini-ImageNet, CIFAR-FS, CDFSL and Meta-Dataset. Our code and demo are available at https://hushell.github.io/pmf.","url_abs":"https://arxiv.org/abs/2204.07305v1","url_pdf":"https://arxiv.org/pdf/2204.07305v1.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":"pushing-the-limits-of-simple-pipelines-for","repo_url":"https://github.com/hushell/pmf_cvpr22","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"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":"image-classification","task_name":"Image Classification"},{"task_slug":"meta-learning","task_name":"Meta-Learning"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"dino","method_name":"DINO"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-cifar-fs-5","task":"Few-Shot Image Classification","dataset":"CIFAR-FS 5-way (1-shot)","model":"P>M>F (P=DINO-ViT-base, M=ProtoNet)","rank_in_archive_order":10,"of":38,"metrics":{"Accuracy":"84.3"},"uses_additional_data":true},{"leaderboard":"/sota/few-shot-image-classification-on-cifar-fs-5-1","task":"Few-Shot Image Classification","dataset":"CIFAR-FS 5-way (5-shot)","model":"P>M>F (P=DINO-ViT-base, M=ProtoNet)","rank_in_archive_order":4,"of":39,"metrics":{"Accuracy":"92.2"},"uses_additional_data":true},{"leaderboard":"/sota/few-shot-image-classification-on-meta-dataset","task":"Few-Shot Image Classification","dataset":"Meta-Dataset","model":"P>M>F (P=DINO-ViT-base, M=ProtoNet)","rank_in_archive_order":2,"of":22,"metrics":{"Accuracy":"84.75"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-2","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"P>M>F (P=DINO-ViT-base, M=ProtoNet)","rank_in_archive_order":3,"of":105,"metrics":{"Accuracy":"95.3"},"uses_additional_data":true},{"leaderboard":"/sota/few-shot-image-classification-on-mini-3","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"P>M>F (P=DINO-ViT-base, M=ProtoNet)","rank_in_archive_order":3,"of":95,"metrics":{"Accuracy":"98.4"},"uses_additional_data":true}],"syntology":{"syntology_url":"https://syntology.ai/paper/2204.07305","atlas_url":"https://app.syntology.ai/?focus=2204.07305","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2204.07305"}},"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/hushell/pmf_cvpr22","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_fixture":2,"ran_draft_wrong":4,"ran":8,"unverified":5},"by_repo_kind":{"official":{"samples":19,"ran":14,"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":"7d8eaf5537f699e4","entry":"np2th","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/resnet_v2.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/resnet_v2.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":2,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7d8eaf5537f699e4"}},{"code_sha256_prefix":"0f786c407fb1ee4c","entry":"swish","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/vit_google.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/vit_google.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"98235a49e66df4c8","entry":"DiffAugment","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"98235a49e66df4c8"}},{"code_sha256_prefix":"f0f38cfab1ecddd0","entry":"build_transform","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"datasets/cifar_fs_elite.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/datasets/cifar_fs_elite.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f0f38cfab1ecddd0"}},{"code_sha256_prefix":"b0f916df39e78ae5","entry":"conv1x1","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/resnet_v2.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/resnet_v2.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b0f916df39e78ae5"}},{"code_sha256_prefix":"4e5bf13dbdc4f008","entry":"conv3x3","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/resnet_v2.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/resnet_v2.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4e5bf13dbdc4f008"}},{"code_sha256_prefix":"1511126d79e9b40b","entry":"dataset_setting","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"datasets/mini_imagenet.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/datasets/mini_imagenet.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":"1511126d79e9b40b"}},{"code_sha256_prefix":"b1b53caaa091d2ba","entry":"dataset_setting","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"datasets/cifar_fs.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/datasets/cifar_fs.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":"b1b53caaa091d2ba"}},{"code_sha256_prefix":"196d8eff1ed207d4","entry":"dataset_setting","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"datasets/cifar_fs_elite.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/datasets/cifar_fs_elite.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":"196d8eff1ed207d4"}},{"code_sha256_prefix":"55120f2026b56aa2","entry":"drop_path","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/vision_transformer.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/vision_transformer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"55120f2026b56aa2"}},{"code_sha256_prefix":"af188f96f841e377","entry":"entropy_loss","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/deploy.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/deploy.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"af188f96f841e377"}},{"code_sha256_prefix":"011230b2b9b8fb6f","entry":"rand_brightness","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"011230b2b9b8fb6f"}},{"code_sha256_prefix":"e3e99bdecc02eb33","entry":"random_hflip","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/utils.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/utils.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":"e3e99bdecc02eb33"}},{"code_sha256_prefix":"b1abb876763549d7","entry":"unique_indices","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/deploy.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/deploy.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":"b1abb876763549d7"}},{"code_sha256_prefix":"051c35752a444b56","entry":"beit_base_patch16_224","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/beit.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/beit.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"051c35752a444b56"}},{"code_sha256_prefix":"657ea09a85528243","entry":"beit_base_patch16_384","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/beit.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/beit.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"657ea09a85528243"}},{"code_sha256_prefix":"7ef377ba295aa2db","entry":"beit_large_patch16_224","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/beit.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/beit.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7ef377ba295aa2db"}},{"code_sha256_prefix":"14af5cea1b69d0a8","entry":"vit_small","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/vision_transformer.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/vision_transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"14af5cea1b69d0a8"}},{"code_sha256_prefix":"bd29518a98e56cf5","entry":"vit_tiny","repo":"hushell/pmf_cvpr22","repo_kind":"official","path":"models/vision_transformer.py","file_url":"https://github.com/hushell/pmf_cvpr22/blob/HEAD/models/vision_transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bd29518a98e56cf5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}