Abstract
Few-shot learning (FSL) aims to recognize novel categories from a limited number of labeled examples. While metric-based meta-learning has shown promise by learning discriminative embedding spaces, these models often struggle with fine-grained classification. This paper introduces View-Learnable Contrastive Learning (VLCL), a framework that replaces random augmentations with an adaptive "Auto-view" module to enhance few-shot performance. By integrating supervised meta-learning with self-supervised contrastive learning, VLCL learns to discover fine-grained structures within data, significantly improving accuracy on standard and fine-grained benchmarks.
Introduction
Few-shot learning is a challenging task where models must generalize to new classes using only a handful of examples. Most state-of-the-art methods rely on learning an embedding space where similar images are clustered together. However, these models often fail at fine-grained discrimination. For instance, a model trained on general labels may fail to distinguish between subtle sub-categories, such as different breeds of dogs, because the training signal lacks the necessary granularity.
Contrastive Learning (CL) can help discover latent structures without explicit labels, but it traditionally relies on random data augmentations like cropping or flipping. In data-scarce FSL scenarios, these random transformations can be noisy or destructive to the fine-grained features essential for classification. VLCL addresses this by learning to generate optimal image views that preserve and highlight discriminative features.
Methodology: The VLCL Framework
The proposed VLCL framework utilizes a dual-path architecture that integrates supervised meta-learning with self-supervised contrastive learning.
Dual-Path Learning
- Meta-Learning Path: Employs a Prototypical Network (PN) to map images into an embedding space where classification is performed by identifying the nearest class prototype (mean vector).
- Contrastive Path: Uses a Momentum Contrast (MoCo) approach to ensure that different views of the same image are clustered together while views of different images are separated.
The Auto-View Module
The core innovation is the Auto-view module, which uses a Spatial Transformer Network (STN) to generate optimal image views. Unlike static random cropping, the STN parameters are learned through a bilevel optimization strategy. In the first stage, the image encoder is updated to minimize both classification and contrastive losses. In the second stage, the STN parameters are optimized based on how well the updated encoder performs on the classification task. This ensures that the generated views (e.g., specific zooms or crops) are specifically tailored to improve discriminative accuracy.
Experimental Results
The VLCL method was evaluated on several benchmarks, including miniImageNet and fine-grained datasets like CUB-200-2011, Stanford Dogs, and Stanford Cars.
Quantitative Performance
VLCL consistently outperformed the baseline Prototypical Network and other competitive FSL methods. On miniImageNet, it achieved 61.75% (1-shot) and 76.32% (5-shot) accuracy, a significant jump over the baseline PN. The gains were even more pronounced in fine-grained tasks; for example, on the Cars dataset, VLCL showed a 14.83% improvement in 1-shot accuracy over the baseline.
Qualitative Analysis
As shown in the t-SNE visualizations in Figure 4, VLCL produces significantly tighter and more separable clusters for fine-grained sub-categories compared to standard methods. This suggests that the contrastive path, guided by the Auto-view module, effectively regularizes the model to capture subtle semantic differences that coarse labels might overlook.
Conclusion
VLCL demonstrates that learning to generate optimal views is superior to relying on random augmentations for few-shot classification. By combining meta-learning with view-learnable contrastive learning, the framework successfully discovers fine-grained structures in data. While the bilevel optimization introduces some computational overhead, the significant accuracy improvements—especially in fine-grained domains—make it a powerful tool for data-efficient representation learning.
Summary updated