Abstract
In few-shot image classification, models are pre-trained on a "base" dataset to learn feature representations before being evaluated on novel classes with minimal examples. While research has historically focused on meta-learning algorithms and architectures, this study reveals that the design of the base training dataset is equally critical. By systematically varying class count, image density, and label granularity, the authors demonstrate that data curation can yield performance boosts—up to 18%—that often surpass gains from algorithmic complexity.
Introduction
Few-shot learning aims to bridge the gap between machine learning models and human-like generalization from few examples. The standard approach involves pre-training on a large base dataset followed by a few-shot evaluation phase. However, the properties of these base datasets—such as the number of classes, images per class, and semantic similarity to test sets—have remained largely unexamined. This paper addresses this gap, proving that the composition of the training data is a highly effective, yet under-explored, lever for improving model performance.
Methods and Pipeline
The authors utilize a standard few-shot pipeline: a feature extractor (e.g., Wide ResNet) is pre-trained on a base dataset, and a simple nearest-neighbor Cosine Classifier is used for the downstream few-shot task.
The core contribution lies in their experimental protocol. Using a massive pool of images, they sampled custom base datasets to test several hypotheses:
- Budget Trade-offs: Fixing the total annotation count while varying the ratio of classes to images-per-class.
- Similarity: Selecting base classes based on their semantic distance from test classes.
- Class Granularity: Artificially splitting or merging classes to change label counts without changing the underlying image pool.
- Diversity and Difficulty: Filtering classes based on feature variance and baseline classification accuracy.
Datasets
To facilitate controlled experiments, the authors introduced ImageNet-6K (and its downsampled version, MiniIN6K), consisting of the 6,000 largest classes from ImageNet-22K, excluding any classes from the standard ImageNet-1K to prevent data leakage. Evaluation was conducted on standard benchmarks including mini-ImageNet and CUB-200-2011.
Key Insights: The Power of Data Design
The study yielded several counter-intuitive insights regarding how we should curate training data for few-shot tasks.
- Prioritize Classes Over Examples: For a fixed budget, it is significantly better to annotate more classes with fewer images each than fewer classes with many images. The common practice of using 600 images per class (as in mini-ImageNet) is sub-optimal for feature learning.
- Label Granularity as a Tool: If the number of classes is limited, artificially splitting them into sub-classes (e.g., using PCA on features) forces the network to learn more discriminative features, improving downstream accuracy.
- The "Goldilocks" Diversity: Features are most robust when learned from classes with moderate visual diversity. Extreme homogeneity or excessive abstraction in base classes tends to degrade performance.
Key Results
- Scaling Gains: Training on the full MiniIN-6K dataset improved 5-shot accuracy on mini-ImageNet by ~18%, reaching 96.91%.
- Optimal Trade-offs: Shifting from 64 classes (600 images/class) to 384 classes (100 images/class) on a fixed budget resulted in a 5% performance boost.
- Similarity Impact: Selecting base classes semantically close to the test set outperformed distant classes by margins of 15-20%.
Conclusion and Future Work
This research highlights a significant "benchmark bias," where current state-of-the-art results often rely on hidden similarities between base and test datasets. While some techniques currently rely on "oracle" features for data selection, the authors demonstrate that self-supervised features (like MoCo) can serve as viable substitutes. Future work should focus on automated methods to dynamically adapt base training data and label granularity to specific target tasks, ensuring that few-shot evaluations explicitly account for base data distributions.
Summary updated