Abstract
Few-Shot Learning (FSL) aims to recognize novel categories from extremely limited data. A persistent challenge in this field is the "periphery sample" problem, where sparse support images fail to represent a category's core features due to occlusion or unusual perspectives. We propose SemFew, a framework that leverages Large Language Models (LLMs) to generate high-quality semantic descriptions, which are then aligned with visual features via a simple two-layer Multi-Layer Perceptron (MLP). Our results demonstrate that rich semantic information is more critical than model complexity; SemFew achieves new state-of-the-art performance across six major FSL benchmarks, including a nearly 10% improvement in challenging cross-domain tasks.
Introduction
The core difficulty in Few-Shot Learning (FSL) lies in generalizing from just one or five examples. When a support image is a "periphery sample"—such as an extreme close-up or an occluded view—visual-only models struggle to identify the class's defining characteristics. While previous research has attempted to use textual semantics to bridge this gap, these methods often relied on ambiguous class names or labor-intensive manual attribute lists.
The SemFew Framework
The SemFew framework consists of two primary components designed to automate and simplify the integration of semantic knowledge.
Semantic Evolution (SemEvo)
SemEvo is an automated pipeline that transforms simple class labels into rich, descriptive text. It retrieves standard definitions from WordNet and utilizes an LLM (GPT-3.5-turbo) to expand these into detailed, scientifically accurate paragraphs. For instance, the label "Robin" is evolved into a description highlighting its "rust-red breast" and "grayish-blue upper body," providing a "ground truth" blueprint that visual encoders might miss in poor-quality support images.
Semantic Alignment Network (SemAlign)
Departing from the trend of complex multi-modal transformers, SemFew employs a basic two-layer MLP for feature alignment.
- Training: The network concatenates features from frozen vision (e.g., ResNet-12) and text (e.g., CLIP) encoders, learning to map them to the average feature vector (class prototype) of the training set.
- Inference: During testing, the model generates a "reconstructed prototype" from the new class's evolved text and available images. This is fused with the visual mean of the support set to create a robust anchor for classification.
Evaluation and Results
SemFew was evaluated on six established FSL benchmarks: MiniImageNet, TieredImageNet, CIFAR-FS, FC100, and cross-domain tasks like CUB (birds) and Places (scenes).
- State-of-the-Art Performance: SemFew outperformed all existing methods. On MiniImageNet (1-shot), it achieved 77.63% accuracy, significantly surpassing previous semantic-based methods like SP-CLIP (~72%).
- Cross-Domain Generalization: In the transition from general imagery to specific bird species (CUB), SemFew improved 1-shot accuracy by nearly 10%, proving that rich semantics effectively bridge domain gaps.
- Backbone Flexibility: Performance increased to 78.94% on MiniImageNet when using a Swin-Transformer backbone, demonstrating the method's robustness across different visual architectures.
Discussion: Quality Over Complexity
A key insight from this work is that a simple two-layer MLP, when provided with high-quality semantic input, can outperform intricate, multi-modal architectures. This suggests that the FSL field may be over-engineering models to compensate for insufficient input data. Visual features provide instance-specific details, while semantics provide the essential "blueprint" of the category, making them highly complementary.
Conclusion
SemFew demonstrates the power of LLM-generated semantics in FSL. By focusing on the quality of auxiliary information rather than model depth, the framework provides a more efficient and effective path toward human-like generalization. Future work will explore automating the fusion factor that balances visual and reconstructed prototypes and investigating the impact of specialized LLMs on the semantic evolution process.
Summary updated