# A Closer Look at Few-Shot Classification with Many Novel Classes
## 1 Introduction  
Few-shot learning (FSL) is a machine learning approach designed to enable models to quickly adapt to new tasks with very limited training data, often only a few examples per class. The \"open-world scenario\" refers to a dynamic and constantly changing environment where new, unseen classes can appear unexpectedly, and the learning model must be capable of recognizing and adapting to these novel classes efficiently [1]. The remarkable progress achieved by few-shot learning (FSL) [2] has endowed learning models with the capability to rapidly adapt to new visual concepts in an open world. Traditional FSL scenarios typically restrict the \"scale\" of this open world and the number of novel classes is often limited from 5 to 160 [3]. However, in a more realistic open-world setting, there can be a substantial amount of unseen knowledge, manifesting as thousands of novel classes, which far exceeds the range established by previous FSL protocols. Moreover, considering the number of novel classes is crucial for enhancing the practicality of FSL, given the impracticality of predicting the exact number of these classes in real-world applications (this paper is an extended version to our previous conference publication [4]). Recent studies by [PERSON] et al. [5] and [PERSON] et al. [6] emphasize that a genuine open-world learner for FSL should accommodate thousands of novel classes, such as those found in datasets like iNaturalist [6]. In response to these insights, we introduce a new problem setting named **few-shot learning with many novel classes (FSL-MNC)**. Our approach significantly expands the conventional FSL framework by addressing scenarios with over2000 novel classes, which represents more than a **10-fold** increase compared to traditional settings. Here, few-shot tasks are structured as \(N\)-way \(K\)-shot episodes, where \"way\" and \"shot\" refer to the number of novel classes and the number of annotated samples per novel class, respectively. Unlike traditional settings where the ratio of novel to base class sizes is typically less than 1, in FSL-MNC, this ratio exceeds 10. To elucidate this expansion, we explore the few-shot generalization capabilities of models pre-trained on ImageNet-1k [7] meta-testing on non-overlapping classes from ImageNet-21K [8] as a motivating example. In this example, we initially evaluate the efficiency and performance of established FSL algorithms such as ProtoNet and SimpleShot, illustrated in Figure 1. We observe that the computational overhead for meta-training escalates dramatically, from half an hour to over a hundred hours, as the number of ways increases. Concurrently, the performance of traditional FSL methods degrades substantially as the number of ways expands from the typical tens to the thousands, which is characteristic of our FSL-MNC paradigm. This underlines a significant research gap concerning the effectiveness of few-shot learning on a realistic scale. In addressing the inefficiencies and sub-optimal performances of traditional FSL methods under the FSL-MNC setting, we identify challenges posed by the episodic meta-learning (EML) [9] framework. EML demonstrates a linear increase in computational demand with an increasing number of ways [10], particularly evident in large-scale scenarios. Moreover, in the context of FSL-MNC, the performance deterioration is notably severe when faced with a vast expansion in a number of ways. This deterioration is partly attributed to the challenges of classifying numerous fine-grained classes within a nested semantic hierarchy, as demonstrated in studies on ImageNet-21K and recent computer vision  
Figure 1: Mean accuracy and computation overhead of ProtoNet and SimpleShot with different scales of novel class (5 shot, Vit-Small DINO pre-trained). Traditional few-shot learning methods exhibit a noticeable decline in average accuracy as the number of ways increases. Regarding computational costs, ProtoNet (represented by a red bar in our analysis) shows a substantial increase during the meta-training stage.