Papers › Dynamic Few-Shot Visual Learning without Forgetting

Dynamic Few-Shot Visual Learning without Forgetting

25 Apr 2018CVPR 2018 6arXiv:1804.09458archive 2025-07-28

Spyros Gidaris, Nikos Komodakis

The human visual system has the remarkably ability to be able to effortlessly learn novel concepts from only a few examples. Mimicking the same behavior on machine learning vision systems is an interesting and very challenging research problem with many practical advantages on real world vision applications. In this context, the goal of our work is to devise a few-shot visual learning system that during test time it will be able to efficiently learn novel categories from only a few training data while at the same time it will not forget the initial categories on which it was trained (here called base categories). To achieve that goal we propose (a) to extend an object recognition system with an attention based few-shot classification weight generator, and (b) to redesign the classifier of a ConvNet model as the cosine similarity function between feature representations and classification weight vectors. The latter, apart from unifying the recognition of both novel and base categories, it also leads to feature representations that generalize better on "unseen" categories. We extensively evaluate our approach on Mini-ImageNet where we manage to improve the prior state-of-the-art on few-shot recognition (i.e., we achieve 56.20% and 73.00% on the 1-shot and 5-shot settings respectively) while at the same time we do not sacrifice any accuracy on the base categories, which is a characteristic that most prior approaches lack. Finally, we apply our approach on the recently introduced few-shot benchmark of Bharath and Girshick [4] where we also achieve state-of-the-art results. The code and models of our paper will be published on: https://github.com/gidariss/FewShotWithoutForgetting

PaperPDFConference PDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 13 code samples harvested from 2 repositories linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 1 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 9 samples from 1 repository, 6 ran (6 with no instrument failure; 0 where Syntology's instrument failed); community (archive-listed): 4 samples from 1 repository, 4 ran (3 with no instrument failure; 1 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-24 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 10 samples that ran has no recorded date.

gidariss/FewShotWithoutForgetting officialmentioned in papermentioned on GitHubpytorchMITSyntology: 9 samples, 6 ran (0 instrument-failed) · 3 unverified report
ViswanathaReddyGajjala/FewShotWithoutForgetting mentioned on GitHubpytorchMITSyntology: not harvested report
jaekyeom/mabas mentioned on GitHubpytorchMITSyntology: 4 samples, 4 ran (1 instrument-failed) · 0 unverified report
xcmax/FewShotWithoutForgetting mentioned on GitHubpytorchMITSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested: 10 ran (of which 0 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 1 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · our draft was wrong
9ran
3unverified

Licence: 2 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

gidariss/FewShotWithoutForgetting official repository 9 samples, 6 ran (0 instrument-failed) · 3 unverified
create_model in 163 papers architectures/MatchingNetworksHead.py ran MIT (permissive) · 55c49bbda53a3309 · report fixture: signature opt:dict/0/? · returned MatchingNetwork · level recorded 2026-09-25
create_model in 163 papers architectures/PrototypicalNetworksHead.py ran MIT (permissive) · a6e9e61e1b44f818 · report fixture: signature opt:dict/0/? · returned PrototypicalNetwork · level recorded 2026-09-25
create_model in 163 papers architectures/ResNetFeat.py ran MIT (permissive) · 0350c536ac315ab1 · report fixture: signature opt:dict/0/? · returned ResNet · level recorded 2026-09-25
create_model in 163 papers architectures/ResNetLike.py ran MIT (permissive) · e7d952233c878020 · report fixture: signature opt:dict/0/? · returned ResNetLike · level recorded 2026-09-25
softmax_with_novel_prior algorithms/ImageNetLowShotExperiments.py ran MIT (permissive) · 9480141f35f83ef2 · report fixture: signature scores:Tensor/2/float, novel_inds:list/1/int, base_inds:list/1/int, prior_m:float/0/float · returned Tensor · level recorded 2026-09-25
top1accuracy algorithms/FewShot.py ran fingerprinted MIT (permissive) · 2fb2ad87d980888f · report fixture: signature output:Tensor/2/float, target:Tensor/1/int · returned Tensor · level recorded 2026-09-25
L2SquareDist architectures/PrototypicalNetworksHead.py unverified MIT (permissive) · 0adaefcc023d86e1 · report
compute_top1_and_top5_accuracy algorithms/ImageNetLowShotExperiments.py unverified MIT (permissive) · 0579910fda20b6c9 · report
create_model in 163 papers architectures/ClassifierWithFewShotGenerationModule.py unverified MIT (permissive) · fefd560d36d2d370 · report
jaekyeom/mabas community (archive-listed) 4 samples, 4 ran (1 instrument-failed) · 0 unverified
load_data in 700 papers cifar_fs_dataloader.py ran · our draft was wrong MIT (permissive) here; the stored copy is pointer only · 4a4efe7627515cc5 · report fixture: signature file:str/0/str · returned dict · level recorded, date not recorded
buildLabelIndex in 8 papers cifar_fs_dataloader.py ran fingerprinted MIT (permissive) here; the stored copy is pointer only · 57889d72f516d105 · report fixture: signature labels:list/1/int · returned dict · level recorded 2026-09-24
create_model in 163 papers architectures/ClassifierWithFewShotGenerationModule.py ran MIT (permissive) · da579fffad628bee · report fixture: signature opt:dict/0/? · returned Classifier · level recorded 2026-09-26
top1accuracy algorithms/FewShot.py ran MIT (permissive) · 200772de4b6b9600 · report fixture: signature output:Tensor/2/float, target:Tensor/1/int · returned float · level recorded 2026-09-26

Tasks

Few-Shot Image ClassificationFew-Shot LearningGeneral ClassificationNovel ConceptsObject RecognitionOne-Shot Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Image Classification ImageNet (1-shot) Dynamic FSL Top-5 Accuracy 58.2 #2 of 2 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (1-shot) Cosine similarity function + C64F feature extractor Accuracy 56.20 #81 of 105 Archive leaderboard report
Few-Shot Image Classification Mini-Imagenet 5-way (5-shot) Cosine similarity function + C64F feature extractor Accuracy 72.81 #74 of 95 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections