Abstract
In order to mimic the human few-shot learning (FSL) ability better and to make FSL closer to real-world applications, this paper proposes a practical FSL (pFSL) setting. pFSL is based on unsupervised pre-trained models (analogous to human prior knowledge) and recognizes many novel classes simultaneously. Compared to traditional FSL, pFSL is simpler in its formulation, easier to evaluate, more challenging and more practical. To cope with the rarity of training examples, this paper proposes IbM2, an instance-based max-margin method not only for the new pFSL setting, but also works well in traditional FSL scenarios. Based on the Gaussian Annulus Theorem, IbM2 converts random noise applied to the instances into a mechanism to achieve maximum margin in the many-way pFSL (or traditional FSL) recognition task. Experiments with various self-supervised pre-training methods and diverse many- or few-way FSL tasks show that IbM2 almost always leads to improvements compared to its respective baseline methods, and in most cases the improvements are significant. With both the new pFSL setting and novel IbM2 method, this paper shows that practical few-shot learning is both viable and promising.
Introduction
Traditional Few-Shot Learning (FSL) often operates in a highly controlled environment that limits its real-world utility. Typically, these models rely on a "base set" of labeled data that is semantically similar to the "novel" classes they are intended to learn. For instance, a model might be trained on 100 bird species to learn five new ones. However, human prior knowledge is broader and largely unsupervised. Furthermore, real-world applications often require distinguishing between hundreds of categories simultaneously, rather than the narrow 5-way classification common in benchmarks.
Moreover, classic max-margin classifiers like Support Vector Machines (SVMs) struggle when data is scarce. In high-dimensional spaces with few samples, the "support vectors" identified by an SVM are frequently noisy, leading to unstable decision boundaries that fail to generalize to unseen data. This paper addresses these gaps by introducing a more realistic benchmark setting and a novel algorithm designed for low-data regimes.
The Practical Few-Shot Learning (pFSL) Setting
The authors propose practical Few-Shot Learning (pFSL) to move FSL toward actual deployment needs. Unlike traditional FSL, pFSL utilizes backbones pretrained via Self-Supervised Learning (SSL) on large-scale datasets like ImageNet-1K. This mimics the broad, unsupervised prior knowledge humans possess.
In the pFSL setting, the model is tasked with many-way classification (e.g., 200-way or 1000-way) using only 1 to 16 examples per class. This approach is not only more representative of real-world challenges but also offers better evaluation stability. Traditional 5-way FSL requires thousands of episodes to achieve a stable mean accuracy due to high variance; in contrast, the many-way nature of pFSL allows for reliable performance estimates with as few as 3–5 episodes.
IbM2 Methodology
To excel in the pFSL environment, the authors introduce IbM2 (Instance-based Max-margin). Rather than attempting to find a margin between poorly defined class distributions, IbM2 focuses on creating a "safety bubble" (a hypersphere) around every individual training instance.
Virtual Sampling and Ellipsoidal Noise
IbM2 generates $R$ virtual examples around each training point. Instead of using simple spherical noise, it employs ellipsoidal noise, scaling the noise based on the standard deviation of each feature across the training set. This ensures that the "bubble" accounts for the varying importance and variance of different features.
Geometric Insight: The Gaussian Annulus Theorem
Leveraging the Gaussian Annulus Theorem, the authors observe that in high-dimensional spaces, these virtual points do not fill the volume of the sphere. Instead, they concentrate on a thin "shell" or annulus. This geometric property allows the algorithm to effectively define the limits of the version space—the set of all classifiers that can correctly categorize these expanded training points.
Binary Search for $\epsilon$
The algorithm employs a binary search to identify the largest possible radius ($\epsilon$) such that a linear classifier can still correctly categorize the virtual samples. This process effectively "stretches" the decision boundary to be as far from the training instances as possible, maximizing the margin and improving robustness against outliers.
Experiments and Results
The researchers evaluated IbM2 across several benchmarks, including ImageNet-1K (1000-way) and CUB-200-2011 (200-way fine-grained birds) for pFSL, as well as mini-ImageNet and CIFAR-FS for traditional FSL. They tested various backbones, including Vision Transformers (ViT-S, B, L) and ResNet50, pretrained with SSL methods such as DINO, MoCov3, and MSN.
Key Findings
- Consistent Performance Gains: IbM2 improved top-1 accuracy across nearly every configuration. In pFSL tasks, it typically provided a boost of 0.5% to 2.0% over standard linear baselines.
- Superiority over SVMs: In head-to-head comparisons on ImageNet-1K, IbM2 outperformed the best-tuned SVMs by up to 4% in 1-shot scenarios, validating that instance-based margins are more effective than class-based margins when data is extremely limited.
- Robustness: IbM2 significantly improved "worst-case" performance in traditional FSL episodes, a critical metric for reliable AI deployment.
- Efficiency: Since the backbone remains frozen, IbM2 only requires training a single linear layer, making it computationally efficient and practical for real-time applications.
Conclusion
By introducing the pFSL setting and the IbM2 algorithm, this paper provides a roadmap for making few-shot learning more viable for real-world use. IbM2’s ability to maximize margins around individual instances provides a robust solution to the instability of low-data classification. Future work may explore fine-tuning the backbone to further enhance performance in 1-shot scenarios while maintaining the generalization benefits of unsupervised pretraining.
Summary updated