Abstract
Few-shot learning methods offer pre-training techniques optimized for easier later adaptation of the model to new classes (unseen during training) using one or a few examples. This adaptivity to unseen classes is especially important for many practical applications where the pre-trained label space cannot remain fixed for effective use and the model needs to be "specialized" to support new categories on the fly. One particularly interesting scenario, essentially overlooked by the few-shot literature, is Coarse-to-Fine Few-Shot (C2FS), where the training classes (e.g. animals) are of much 'coarser granularity' than the target (test) classes (e.g. breeds). A very practical example of C2FS is when the target classes are sub-classes of the training classes. Intuitively, it is especially challenging as (both regular and few-shot) supervised pre-training tends to learn to ignore intra-class variability which is essential for separating sub-classes. In this paper, we introduce a novel 'Angular normalization' module that allows to effectively combine supervised and self-supervised contrastive pre-training to approach the proposed C2FS task, demonstrating significant gains in a broad study over multiple baselines and datasets. We hope that this work will help to pave the way for future research on this new, challenging, and very practical topic of C2FS classification.
The Coarse-to-Fine Few-Shot (C2FS) Challenge
In many real-world scenarios, data is labeled at a "coarse" level because detailed annotation is prohibitively expensive. For instance, a dataset might contain thousands of images labeled simply as "dog," but a downstream application requires identifying specific breeds like "Beagle" or "Collie" with only a handful of examples. This is the Coarse-to-Fine Few-Shot (C2FS) task.
Standard machine learning approaches struggle with C2FS for two primary reasons:
- Supervised Learning on coarse labels explicitly teaches the model to ignore intra-class variability—the very differences needed to distinguish sub-classes—in favor of grouping everything under a broad label.
- Self-Supervised Learning is adept at capturing fine details but lacks the structural guidance of category labels, often resulting in a sub-optimal feature space for classification.
Methodology: ANCOR
To address this, we propose ANCOR (Angular Normalized COntrastive Regularization). ANCOR integrates supervised and self-supervised learning objectives without allowing them to conflict.
The Angular Normalization Module
The core innovation is the Angular Normalization module. In a typical setup, supervised loss pulls all samples of a coarse class toward a single point, while contrastive loss pushes them apart. ANCOR resolves this by projecting contrastive forces onto an "angular orbit" around the coarse class weight. Instead of pushing samples away from the class center, it pushes them around it. This allows the model to organize sub-classes into distinct "wedges" within the broader category's feature space.
Per-Class Queues
To further refine the feature space, ANCOR employs per-class queues for contrastive learning. This ensures that a sample (e.g., a "Beagle") is primarily compared against other samples within the same coarse category ("Dogs"), forcing the model to identify the most relevant distinguishing features for that specific group.
Key Insights and Results
Our evaluation across benchmarks like BREEDS, CIFAR-100, and tieredImageNet revealed several critical insights:
- Synergistic Geometry: By separating supervised and self-supervised influences into radial and angular components, the two objectives become synergistic rather than competitive.
- Restoring "Vision": Standard supervised training can act as a "blindfold" to fine-grained details. ANCOR acts as a corrective lens, preserving the features necessary for downstream specialization.
- Superior Performance: ANCOR consistently outperformed baselines. On the Living17 dataset, it achieved 89.23% accuracy in 5-way few-shot tasks, significantly surpassing the coarse-only baseline (85.12%). Remarkably, ANCOR sometimes performed better than models trained on actual fine labels, suggesting superior pre-training regularization.
- Emergent Attention: Visualizations indicate that ANCOR naturally learns to focus on salient objects (e.g., a bird's body) while ignoring irrelevant backgrounds, despite receiving no explicit localization data.
Limitations and Future Directions
While ANCOR demonstrates significant gains, it shares the computational demands of contrastive learning, benefiting from long training cycles and large memory queues. Future work could explore scaling this angular approach to deeper taxonomies beyond two-level hierarchies and applying it to non-visual domains like Natural Language Processing where hierarchical structures are prevalent.
Summary updated