{"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/dynamic-few-shot-visual-learning-without","title":"Dynamic Few-Shot Visual Learning without Forgetting","arxiv_id":"1804.09458","date":"2018-04-25","proceeding":"CVPR 2018 6","authors":["Spyros Gidaris","Nikos Komodakis"],"abstract":"The human visual system has the remarkably ability to be able to effortlessly\nlearn novel concepts from only a few examples. Mimicking the same behavior on\nmachine learning vision systems is an interesting and very challenging research\nproblem with many practical advantages on real world vision applications. In\nthis context, the goal of our work is to devise a few-shot visual learning\nsystem that during test time it will be able to efficiently learn novel\ncategories from only a few training data while at the same time it will not\nforget the initial categories on which it was trained (here called base\ncategories). To achieve that goal we propose (a) to extend an object\nrecognition system with an attention based few-shot classification weight\ngenerator, and (b) to redesign the classifier of a ConvNet model as the cosine\nsimilarity function between feature representations and classification weight\nvectors. The latter, apart from unifying the recognition of both novel and base\ncategories, it also leads to feature representations that generalize better on\n\"unseen\" categories. We extensively evaluate our approach on Mini-ImageNet\nwhere we manage to improve the prior state-of-the-art on few-shot recognition\n(i.e., we achieve 56.20% and 73.00% on the 1-shot and 5-shot settings\nrespectively) while at the same time we do not sacrifice any accuracy on the\nbase categories, which is a characteristic that most prior approaches lack.\nFinally, we apply our approach on the recently introduced few-shot benchmark of\nBharath and Girshick [4] where we also achieve state-of-the-art results. The\ncode and models of our paper will be published on:\nhttps://github.com/gidariss/FewShotWithoutForgetting","url_abs":"http://arxiv.org/abs/1804.09458v1","url_pdf":"http://arxiv.org/pdf/1804.09458v1.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":"dynamic-few-shot-visual-learning-without","repo_url":"https://github.com/gidariss/FewShotWithoutForgetting","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dynamic-few-shot-visual-learning-without","repo_url":"https://github.com/ViswanathaReddyGajjala/FewShotWithoutForgetting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dynamic-few-shot-visual-learning-without","repo_url":"https://github.com/jaekyeom/mabas","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"dynamic-few-shot-visual-learning-without","repo_url":"https://github.com/xcmax/FewShotWithoutForgetting","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"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":"classification","task_name":"General Classification"},{"task_slug":"novel-concepts","task_name":"Novel Concepts"},{"task_slug":"object-recognition","task_name":"Object Recognition"},{"task_slug":"one-shot-learning","task_name":"One-Shot Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-imagenet-1","task":"Few-Shot Image Classification","dataset":"ImageNet (1-shot)","model":"Dynamic FSL","rank_in_archive_order":2,"of":2,"metrics":{"Top-5 Accuracy":"58.2"},"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":"Cosine similarity function + C64F feature extractor","rank_in_archive_order":81,"of":105,"metrics":{"Accuracy":"56.20"},"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":"Cosine similarity function + C64F feature extractor","rank_in_archive_order":74,"of":95,"metrics":{"Accuracy":"72.81"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1804.09458","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1804.09458"}},"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/jaekyeom/mabas","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ViswanathaReddyGajjala/FewShotWithoutForgetting","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xcmax/FewShotWithoutForgetting","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gidariss/FewShotWithoutForgetting","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":1,"unverified":11},"by_repo_kind":{"official":{"samples":9,"ran":0,"repositories":1},"listed":{"samples":4,"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":"4a4efe7627515cc5","entry":"load_data","repo":"jaekyeom/mabas","repo_kind":"listed","path":"cifar_fs_dataloader.py","file_url":"https://github.com/jaekyeom/mabas/blob/HEAD/cifar_fs_dataloader.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a4efe7627515cc5"}},{"code_sha256_prefix":"57889d72f516d105","entry":"buildLabelIndex","repo":"jaekyeom/mabas","repo_kind":"listed","path":"cifar_fs_dataloader.py","file_url":"https://github.com/jaekyeom/mabas/blob/HEAD/cifar_fs_dataloader.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57889d72f516d105"}},{"code_sha256_prefix":"0adaefcc023d86e1","entry":"L2SquareDist","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/PrototypicalNetworksHead.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/PrototypicalNetworksHead.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":"0adaefcc023d86e1"}},{"code_sha256_prefix":"0579910fda20b6c9","entry":"compute_top1_and_top5_accuracy","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"algorithms/ImageNetLowShotExperiments.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/algorithms/ImageNetLowShotExperiments.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":"0579910fda20b6c9"}},{"code_sha256_prefix":"fefd560d36d2d370","entry":"create_model","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/ClassifierWithFewShotGenerationModule.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/ClassifierWithFewShotGenerationModule.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":"fefd560d36d2d370"}},{"code_sha256_prefix":"55c49bbda53a3309","entry":"create_model","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/MatchingNetworksHead.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/MatchingNetworksHead.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":"55c49bbda53a3309"}},{"code_sha256_prefix":"a6e9e61e1b44f818","entry":"create_model","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/PrototypicalNetworksHead.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/PrototypicalNetworksHead.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":"a6e9e61e1b44f818"}},{"code_sha256_prefix":"0350c536ac315ab1","entry":"create_model","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/ResNetFeat.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/ResNetFeat.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":"0350c536ac315ab1"}},{"code_sha256_prefix":"e7d952233c878020","entry":"create_model","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"architectures/ResNetLike.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/architectures/ResNetLike.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":"e7d952233c878020"}},{"code_sha256_prefix":"da579fffad628bee","entry":"create_model","repo":"jaekyeom/mabas","repo_kind":"listed","path":"architectures/ClassifierWithFewShotGenerationModule.py","file_url":"https://github.com/jaekyeom/mabas/blob/HEAD/architectures/ClassifierWithFewShotGenerationModule.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":"da579fffad628bee"}},{"code_sha256_prefix":"9480141f35f83ef2","entry":"softmax_with_novel_prior","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"algorithms/ImageNetLowShotExperiments.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/algorithms/ImageNetLowShotExperiments.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":"9480141f35f83ef2"}},{"code_sha256_prefix":"2fb2ad87d980888f","entry":"top1accuracy","repo":"gidariss/FewShotWithoutForgetting","repo_kind":"official","path":"algorithms/FewShot.py","file_url":"https://github.com/gidariss/FewShotWithoutForgetting/blob/HEAD/algorithms/FewShot.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":"2fb2ad87d980888f"}},{"code_sha256_prefix":"200772de4b6b9600","entry":"top1accuracy","repo":"jaekyeom/mabas","repo_kind":"listed","path":"algorithms/FewShot.py","file_url":"https://github.com/jaekyeom/mabas/blob/HEAD/algorithms/FewShot.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":"200772de4b6b9600"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}