Abstract
Few-shot learning (FSL) aims to recognize novel categories from extremely limited data, a task often hindered by severe overfitting and poor generalization. We introduce Model-Agnostic Boundary-Adversarial Sampling (MABAS), a novel test-time enhancement strategy. MABAS generates adversarial samples in the embedding space near classification boundaries and utilizes them to fine-tune the feature extractor. This process effectively maximizes classification margins and improves robustness to unseen classes without requiring auxiliary datasets or complex generative models. Evaluations on miniImageNet, CIFAR-FS, and FC100 demonstrate that MABAS consistently improves performance across various base architectures, achieving gains of up to 8.34%p.
Introduction
The core challenge in few-shot learning is the "data deficiency" problem. With only 1 to 5 labeled examples per class, models struggle to capture the underlying distribution, leading to decision boundaries that fail to generalize to query (test) images. Traditional approaches to mitigate this include data hallucination—generating synthetic training samples. However, these methods often suffer from a domain gap, as generators trained on base classes may not produce relevant samples for novel test-time categories. Furthermore, many FSL methods keep the feature extractor fixed during inference, preventing the model from adapting to the specific geometry of the new task.
The MABAS Framework
Model-Agnostic Boundary-Adversarial Sampling (MABAS) addresses these issues by performing optimization directly at test time. Unlike image-space augmentation, MABAS operates in the high-dimensional embedding space, making it computationally efficient and model-agnostic.
The MABAS procedure consists of two alternating steps:
- Adversarial Sample Generation: For each support sample, MABAS identifies the most informative directions for perturbation by pushing the embedding toward the decision boundaries of competing classes. These "boundary-adversarial" samples represent the most challenging regions for the current classifier.
- Embedding Fine-Tuning: The feature extractor is fine-tuned using these generated samples. By minimizing a loss function that incorporates both original support data and adversarial samples, the model learns to push decision boundaries further away from the data clusters, effectively increasing the classification margin.
This approach ensures that the embedding space becomes denser around the labeled samples, making the model more resilient to the natural variance found in query images.
Experimental Evaluation
MABAS was evaluated on three standard benchmarks: miniImageNet, CIFAR-FS, and FC100. To demonstrate its universality, the researchers integrated MABAS into three distinct base models:
- MetaOptNet: A meta-learning framework using SVMs for classification.
- Few-Shot without Forgetting (FSwF): A method based on cosine similarity.
- Standard Transfer Learning (STL): A baseline approach using standard supervised pre-training.
Results and Analysis
The experimental results confirm that MABAS provides a significant and consistent performance boost. On average, accuracy improved by approximately 2.80%p across all settings. Notably, when applied to the FSwF model on 5-way 5-shot miniImageNet, MABAS yielded a substantial improvement of 8.34%p.
When paired with MetaOptNet, MABAS achieved state-of-the-art (SOTA) or near-SOTA results, often outperforming models with significantly higher parameter counts (such as those using WRN-28-10 backbones). Qualitative analysis using t-SNE visualizations further revealed that MABAS fine-tuning leads to more condensed and well-separated class clusters, directly translating to better query classification.
Conclusion and Future Work
MABAS represents a "pure" test-time solution for FSL that avoids the domain gap issues of traditional data augmentation. While the method introduces some computational overhead due to the 150 fine-tuning steps required per task, its model-agnostic nature makes it a versatile tool for enhancing existing and future FSL architectures. Future work may focus on reducing the latency of the fine-tuning process to enable real-time applications.
Summary updated