A Large-Class Few-Shot Learning Method Based on High-Dimensional Features

Jiawei Dang, Yu Zhou, Ruirui Zheng, Jianjun HeApplied Sciences 2023

TL;DR

This paper introduces HF-FSL, a novel method for large-class few-shot learning that leverages high-dimensional feature spaces. By projecting features onto a hypersphere and enforcing orthogonality between classes, HF-FSL significantly improves recognition accuracy in scenarios with a vast number of categories, a challenge traditional few-shot methods struggle with.

What Problem Does This Paper Address?

Few-shot learning (FSL) aims to train models that can recognize new classes with only a handful of examples. While significant progress has been made for "fewer-class" scenarios (e.g., 5-20 classes), real-world applications often involve "large-class" problems with hundreds or thousands of categories. Existing FSL methods, when scaled to these large-class problems, experience a dramatic drop in performance. This paper tackles this critical gap, aiming to develop an FSL method that remains effective even when faced with a massive number of potential classes.

Methods

The core of HF-FSL lies in its approach to feature representation and learning. Inspired by theoretical work suggesting that compactness within classes and dispersion between classes in high-dimensional space leads to better generalization, the authors propose:

  • High-Dimensional Feature Extraction: A deep convolutional neural network (CNN) is used to extract rich, high-dimensional features from input images.
  • Hypersphere Projection: These extracted features are then normalized to unit length, effectively projecting them onto a hypersphere. This normalization helps to standardize feature magnitudes and focus on directional relationships.
  • Global Orthogonal Regularization (GOR): This is a key novel component. GOR is applied to encourage samples from different classes to be as orthogonal as possible on the hypersphere. This geometric constraint directly enforces the desired property of class dispersion.
  • AM-Softmax Loss: To effectively model the relationships between samples on the hypersphere, the authors adopt AM-Softmax Loss. This loss function is designed for angular distance metrics, making it suitable for features residing on a sphere, and further promotes class separation.

The training strategy follows a three-stage process: pretraining on an auxiliary dataset, imprinting using the support set, and fine-tuning on the novel classes.

Datasets

The proposed HF-FSL method was evaluated on three large-class few-shot learning datasets:

  • Omniglot: A dataset of handwritten characters. For this study, it was augmented by rotations to create a large-class scenario with 3856 base classes and 2636 novel classes.
  • Fungi: A fine-grained fungal image dataset. The authors used 632 classes for base training and 674 for novel classes.
  • ImageNet: A widely used large-scale image dataset. A downsampled version (ImageNet64x64) was utilized, with 522 classes as base and 410 as novel classes.

Key Insights and Ideas

  • High-Dimensional Space is Key for Large-Class FSL: The paper strongly advocates for leveraging high-dimensional feature spaces, supported by theoretical underpinnings, as a crucial pathway to solving large-class FSL problems.
  • Geometric Constraints for Separation: The idea of enforcing orthogonality between class representations on a hypersphere is a powerful geometric approach to achieve the desired class dispersion, which is vital for distinguishing between a large number of classes.
  • Hypersphere as a Natural Embedding Space: Projecting features onto a hypersphere provides a structured and normalized space where angular relationships become more meaningful for classification, especially when combined with angle-based loss functions.
  • AM-Softmax for Spherical Features: The choice of AM-Softmax Loss is a well-motivated decision, as it's specifically designed to work with angular distances, making it a natural fit for features normalized onto a hypersphere.

Key Results

The HF-FSL method demonstrated significant improvements in recognition accuracy across all three large-class datasets compared to several baseline FSL methods:

  • Omniglot: HF-FSL achieved 82.39% Top-1 accuracy in a 2636-way 5-shot setting, outperforming methods like PN w/CL (73.21%) and R2D2 w/CL (74.72%).
  • Fungi: The method reached 21.75% accuracy, a substantial leap from baselines like R2D2 w/CL (8.04%).
  • ImageNet: HF-FSL achieved 9.36% accuracy, again surpassing baselines such as R2D2 w/CL (8.46%).

Ablation studies confirmed the effectiveness of both the AM-Softmax Loss and the Global Orthogonal Regularization (GOR) module, showing substantial accuracy gains over a baseline cross-entropy loss. The method also showed robustness to hyperparameter tuning.

Limitations and Future Work

  • Computational Cost: While not explicitly detailed as a limitation, working with high-dimensional features and large numbers of classes can inherently lead to higher computational demands.
  • Hyperparameter Sensitivity: Although the paper suggests the method is robust, the parameter sensitivity analysis indicates that careful selection of hyperparameters like $A_{pre}$ and $A_{ft}$ is still important for optimal performance.
  • Future Work: The authors' work opens avenues for further exploration in large-class FSL. Future research could investigate more sophisticated feature extraction techniques, explore different regularization strategies, or adapt this approach to other domains beyond image recognition that involve large numbers of classes. The paper also hints at the potential for applying this method to few-shot continual learning scenarios.

Summary updated

BibTeX
@inproceedings{dang2023large,
  author = {Jiawei Dang and Yu Zhou and Ruirui Zheng and Jianjun He},
  title = {{A Large-Class Few-Shot Learning Method Based on High-Dimensional Features}},
  booktitle = {Applied Sciences},
  year = {2023},
  doi = {10.3390/app132312843},
}
Figure