Abstract
Few-shot learning aims to recognize new categories using very few labeled samples. Although few-shot learning has witnessed promising development in recent years, most existing methods adopt an average operation to calculate prototypes, thus limited by the outlier samples. In this work, we propose a simple yet effective framework for few-shot classification, which can learn to generate preferable prototypes from few support data, with the help of an episodic prototype generator module. The generated prototype is meant to be close to a certain class-level prototype and is less influenced by outlier samples. Extensive experiments demonstrate the effectiveness of this module, and our approach gets a significant raise over baseline models, and get a competitive result compared to previous methods on miniImageNet, tieredImageNet, and cross-domain (miniImageNet $\rightarrow$ CUB-200-2011) datasets.
Introduction
In Few-shot Learning (FSL), models are tasked with recognizing novel categories from a minimal number of labeled examples, typically referred to as the support set. A cornerstone approach in this field is the Prototypical Network (ProtoNet), which represents each class by a "prototype" calculated as the arithmetic mean of its support samples' feature vectors.
However, this averaging strategy suffers from a significant drawback: Class-level Prototype Jitter. In low-data regimes (e.g., 1-shot or 5-shot), the arithmetic mean is highly sensitive to outliers. A single sample with an atypical background or pose can significantly shift the prototype away from the true class center, leading to misclassification of query images that might actually be closer to the true class center but are now further from the skewed prototype.
Methodology
To address prototype jitter, we propose a framework that leverages global class statistics to guide the generation of episodic prototypes. The architecture consists of three primary components designed to move episodic prototypes closer to their ideal global centers:
1. Class-level Prototype Generator
During the training phase on a large base dataset, the model computes the global mean feature for every class. These global means serve as "class-level prototypes," representing the ideal centers for each category.
2. Episodic Prototype Generator
The core innovation is a Transformer-based module utilizing multi-head self-attention. For each new task (episode), this module processes the support samples by considering their contextual relationships. Instead of simple averaging, it learns to refine these features into a robust episodic prototype that is less susceptible to noise.
3. Distance-based Supervision and Metric Module
The model is trained with an explicit supervision signal: a Euclidean distance loss that encourages the generated episodic prototype to be as close as possible to its corresponding global class-level prototype. For classification, we measure the Euclidean distance between the query image features and these refined prototypes.
Experiments and Results
We evaluated our framework on three standard benchmarks: miniImageNet, tieredImageNet, and a cross-domain setup (miniImageNet $\rightarrow$ CUB-200-2011) to test generalization across distinct data types.
Performance Benchmarks
Our method demonstrated superior performance over baseline models and competitive results against state-of-the-art techniques:
- miniImageNet: Achieved 66.68% accuracy for 1-shot and 82.22% for 5-shot tasks, a significant improvement over standard ProtoNet (~5-6%).
- tieredImageNet: Reached 71.78% (1-shot) and 85.91% (5-shot).
- Cross-Domain: The method proved robust when shifting from general objects (miniImageNet) to fine-grained bird species (CUB), outperforming specialized baselines like MatchingNet and MAML.
Ablation and Insights
Ablation studies confirmed that the episodic prototype generator is critical; its removal leads to a substantial performance drop. Furthermore, an experiment using ground-truth class-level prototypes for classification yielded ~89% accuracy, highlighting a significant "prototype gap" in existing FSL methods that our approach begins to bridge.
Conclusion
By introducing global guidance through class-level prototypes and utilizing a Transformer-based refinement module, our framework effectively mitigates the impact of outliers in few-shot learning. While a performance gap remains compared to using perfect class-level prototypes, this work provides a robust path forward for generating higher-quality class representations from minimal data.
Summary updated