Prototypical Networks for Few-shot Learning
Jake Snell, Kevin Swersky, Richard S. Zemel
Code Available — Be the first to reproduce this paper.
ReproduceCode
- github.com/jakesnell/prototypical-networksOfficialpytorch★ 1,223
- github.com/learnables/learn2learnpytorch★ 2,878
- github.com/sicara/easy-few-shot-learningpytorch★ 1,301
- github.com/cnguyen10/few_shot_meta_learningpytorch★ 257
- github.com/amazon-research/dsepytorch★ 43
- github.com/RongKaiWeskerMA/INSTApytorch★ 13
- github.com/jsalbert/prototypical-networkspytorch★ 8
- github.com/msfuxian/DualAttentionNetmindspore★ 6
- github.com/ajfisch/few-shot-cppytorch★ 6
- github.com/andrewbo29/mtm-meta-learning-sapytorch★ 3
Abstract
We propose prototypical networks for the problem of few-shot classification, where a classifier must generalize to new classes not seen in the training set, given only a small number of examples of each new class. Prototypical networks learn a metric space in which classification can be performed by computing distances to prototype representations of each class. Compared to recent approaches for few-shot learning, they reflect a simpler inductive bias that is beneficial in this limited-data regime, and achieve excellent results. We provide an analysis showing that some simple design decisions can yield substantial improvements over recent approaches involving complicated architectural choices and meta-learning. We further extend prototypical networks to zero-shot learning and achieve state-of-the-art results on the CU-Birds dataset.
Tasks
Benchmark Results
| Dataset | Model | Metric | Claimed | Verified | Status |
|---|---|---|---|---|---|
| CUB 200 50-way (0-shot) | Prototypical Networks | Accuracy | 54.6 | — | Unverified |
| Dirichlet Mini-Imagenet (5-way, 1-shot) | ProtoNet | 1:1 Accuracy | 53.6 | — | Unverified |
| Dirichlet Mini-Imagenet (5-way, 5-shot) | ProtoNet | 1:1 Accuracy | 74.2 | — | Unverified |
| Meta-Dataset | Prototypical Networks | Accuracy | 60.57 | — | Unverified |
| Meta-Dataset Rank | Prototypical Networks | Mean Rank | 8.5 | — | Unverified |
| Mini-Imagenet 10-way (1-shot) | Prototypical Networks | Accuracy | 32.9 | — | Unverified |
| Mini-Imagenet 10-way (1-shot) | Prototypical Networks (Higher Way) | Accuracy | 34.6 | — | Unverified |
| Mini-Imagenet 10-way (5-shot) | Prototypical Networks | Accuracy | 49.3 | — | Unverified |
| Mini-Imagenet 10-way (5-shot) | Prototypical Networks (Higher Way) | Accuracy | 50.1 | — | Unverified |
| Mini-Imagenet 5-way (10-shot) | Prototypical Networks | Accuracy | 74.3 | — | Unverified |
| Mini-Imagenet 5-way (1-shot) | Prototypical Networks | Accuracy | 49.42 | — | Unverified |
| Mini-Imagenet 5-way (5-shot) | Prototypical Networks | Accuracy | 68.2 | — | Unverified |
| Mini-ImageNet-CUB 5-way (1-shot) | ProtoNet (Snell et al., 2017) | Accuracy | 45.31 | — | Unverified |
| OMNIGLOT - 1-Shot, 20-way | Prototypical Networks | Accuracy | 96 | — | Unverified |
| OMNIGLOT - 1-Shot, 5-way | Prototypical Networks | Accuracy | 98.8 | — | Unverified |
| OMNIGLOT - 5-Shot, 20-way | Prototypical Networks | Accuracy | 98.9 | — | Unverified |
| OMNIGLOT - 5-Shot, 5-way | Prototypical Networks | Accuracy | 99.7 | — | Unverified |
| Stanford Cars 5-way (1-shot) | Prototypical Nets++ | Accuracy | 40.9 | — | Unverified |
| Stanford Cars 5-way (5-shot) | Prototypical Nets++ | Accuracy | 52.93 | — | Unverified |
| Stanford Dogs 5-way (5-shot) | Prototypical Nets++ | Accuracy | 48.19 | — | Unverified |
| Tiered ImageNet 10-way (1-shot) | Prototypical Networks (Higher Way) | Accuracy | 38.6 | — | Unverified |
| Tiered ImageNet 10-way (1-shot) | Prototypical Networks | Accuracy | 37.3 | — | Unverified |
| Tiered ImageNet 10-way (5-shot) | Prototypical Networks | Accuracy | 57.8 | — | Unverified |
| Tiered ImageNet 10-way (5-shot) | Prototypical Networks (Higher Way) | Accuracy | 58.3 | — | Unverified |