Few-shot Classification via Ensemble Learning with Multi-Order Statistics
Abstract
Transfer learning has been widely adopted for few-shot classification. Recent studies reveal that obtaining good generalization representation of images on novel classes is the key to improving the few-shot classification accuracy. To address this need, we prove theoretically that leveraging ensemble learning on the base classes can correspondingly reduce the true error in the novel classes. Following this principle, a novel method named Ensemble Learning with Multi-Order Statistics (ELMOS) is proposed in this paper. In this method, after the backbone network, we use multiple branches to create the individual learners in the ensemble learning, with the goal to reduce the storage cost. We then introduce different order statistics pooling in each branch to increase the diversity of the individual learners. The learners are optimized with supervised losses during the pre-training phase. After pre-training, features from different branches are concatenated for classifier evaluation. Extensive experiments demonstrate that each branch can complement the others and our method can produce a state-of-the-art performance on multiple few-shot classification benchmark datasets.
1 Introduction

Few-shot Classification (FSC) is a promising direction in alleviating the labeling cost and bridging the gap between human intelligence and machine models. It aims to accurately differentiate novel classes with only a few labeled training samples. Due to limited supervision from novel classes, an extra base set with abundant labeled samples is often used to improve the classification performance. According to the adopted training paradigms, FSC methods can be roughly divided into meta-learning-based Finn et al. (2017); Snell et al. (2017) and transfer-learning-based Chen et al. (2019); Liu et al. (2020); Afrasiyabi et al. (2020). The first type takes the form of episodic training, in which subsets of data are sampled from the base set to imitate the meta-test setting. Since sampling does not cover all combinations, this paradigm cannot fully utilize the information provided by the base set. In contrast, the transfer-learning takes the base set as a whole, so it avoids the drawback of meta-learning and achieves better performance. Many effective regularization techniques have been exploited in transfer-learning, for example, manifold mixup Mangla et al. (2020), self-distillation Tian et al. (2020), and self-supervised learning Zhang et al. (2020b), which leads to significant improvement on the generalization of image representations and the FSC performance.
Ensemble learning combines multiple learners to solve the same problem and exhibits better generalization performance than any individual learners Yang et al. (2013). When combining ensemble learning with deep Convolutional Neural Networks (CNN), the new paradigm usually requires large-scale training data for classification tasks Horváth et al. (2021); Agarwal et al. (2021), making it challenging to be adopted for FSC. Recently, two notable studies Dvornik et al. (2019); Bendou et al. (2022) employed an ensemble of deep neural networks for FSC tasks under either a meta-learning or a transfer-learning setting. They demonstrated that ensemble learning is also applicable to FSC. Yet, these works are still preliminary and lack a theoretical analysis to explain the underlying reason behind the promising performance. To address this challenge, we provide an FSC ensemble learning theorem for the transfer-learning regime. Its core idea is a tighter expected error bound on the novel classes, in which the expected error on the novel classes can be reduced by implementing ensemble learning on the base classes, given the base classes-novel classes domain divergence.
The generalization ability of ensemble learning is strongly dependent on generating diverse individuals. As shown in Figure 1 (a), traditional methods often use different backbone networks as individuals, which significantly increases the computation and storage costs. Our work finds that different-order statistics of the CNN features are complementary to each other, and integrating them can better model the whole feature distribution. Based on this observation, we develop a parameter-free ensemble method, which takes the same backbone and equips different branches with multi-order statistics as learning individuals. We name this method Ensemble Learning with Multi-Order Statistics (ELMOS), as shown in Figure 1 (b). The main contributions of this paper are summarized as follows:
-
•
To our knowledge, this is the first theoretical analysis to guide ensemble learning in FSC. The derived theorem proves a tighter expected error bound is available on novel classes.
-
•
We propose an ensemble learning method by adding multiple branches at the end of the backbone networks, which can significantly reduce the computation time of the training stage for FSC.
-
•
This is the first time that multi-order statistics is introduced to generate different individuals in ensemble learning.
-
•
We conduct extensive experiments to validate the effectiveness of our method on multiple FSC benchmarks.
2 Related Work
In this section, we review the related work to the proposed method.
2.1 Few-shot Classification
According to how the base set is used, FSC methods can be roughly categorized into two groups, meta-learning-based Zhang et al. (2020a) and transfer-learning-based Chen et al. (2019); Liu et al. (2020). Meta-learning creates a set of episodes to simulate the real FSC test scenarios and simultaneously accumulate meta-knowledge for fast adaptation. Typical meta-knowledge includes optimization factors such as initialization parameters Finn et al. (2017) and task-agnostic comparing ingredients of feature embedding and metric Snell et al. (2017); Wertheimer et al. (2021). Recent literature on transfer learning Tian et al. (2020); Chen et al. (2019) questioned the efficiency of the episodic training in meta-learning, and alternatively used all base samples to learn an off-the-shelf feature extractor and rebuilt a classifier for novel classes. Feature representations play an important role in this regime Tian et al. (2020). To this end, regularization techniques such as negative-margin softmax loss and manifold mixup Liu et al. (2020); Mangla et al. (2020) have been adopted to enhance the generalization ability of cross-entropy loss. Moreover, self-supervised Zhang et al. (2020b); Rajasegaran et al. (2020) and self-distillation Ma et al. (2019); Zhou et al. (2021) methods have also shown promising performance in transfer-learning. To this end, supervised learning tasks can be assisted by several self-supervised proxy tasks such as rotation prediction and instance discrimination Zhang et al. (2020b), or by adding an auxiliary task of generating features during the pre-training Xu et al. (2021b). When knowledge distillation is adopted, a high-quality backbone network can be evolved through multiple generations by a born-again strategy Rajasegaran et al. (2020). All these methods suggest the importance of obtaining generalization representations, and we will leverage ensemble learning to achieve this goal.
2.2 Ensemble Learning
Ensemble learning builds several different individual learners based on the same training data and then combines them to improve the generalization ability of the learning system over any single learner. This learning scheme has shown promising performance on traditional classification tasks with deep learning on large-scale labeled datasets. Recently, ensemble learning for FSC methods has been presented. For example, Dvornik et al. (2019) combined an ensemble of prototypical networks through deep mutual learning under a meta-learning setting. Bendou et al. (2022) reduced the capacity of each backbone in the ensemble and pre-trained them one by one with the same routine. However, the size of the ensemble learner increased for inference in the former work, while the latter required extra time to pre-train many learning individuals. Therefore, it still lacks efficient designs for learning individuals in FSC ensemble learning. Moreover, these works did not involve any theoretical analysis of the underlying mechanism of ensemble learning in FSC. In this paper, we investigate why ensemble learning works well in FSC under the transfer-learning setting. Based on the analysis, we propose an efficient learning method using a shared backbone network with multiple branches to generate learning individuals.
2.3 Pooling
Convolutional neural network models progressively learn high-level features through multiple convolution layers. A pooling layer is often added at the end of the network to output the final feature representation. To this end, Global Average Pooling (GAP) is the most popular option, however, it cannot fully exploit the merits of convolutional features because it only calculates the -order feature statistics. Global Covariance Pooling (GCP) such as DeepP explores the -order statistic by normalizing the covariance matrix of the convolutional features, which has achieved impressive performance gains over the classical GAP in various computer vision tasks. Further research shows that using richer statistics may lead to further possible improvement. For example, Kernel Pooling Cui et al. (2017) generates high-order feature representations in a compact form. However, a certain order statistic can only describe partial characteristics of the feature vector from the view of the characteristic function of random variables. For example, the first- and second-order statistics can completely represent their statistical characteristic only for the Gaussian distribution. Therefore, higher-order statistics are still needed for the non-Gaussian distributions, which are more ubiquitous in many real-world applications. This motivates us to calculate multi-order statistics to retain more information on features.
3 The Proposed Method
Here we present the proposed method. We start with a formal definition of FSC, and then present a theorem on FSC ensemble learning. This theorem leads to the development of an ensemble learning approach with multi-order statistics.
3.1 Theory Foundation
Under the standard setting of few-shot classification, three sets of data with disjoint labels are available, i.e., the base set , the validation set and the novel set . In the context of transfer-learning, is used for pre-training a model to well classify the novel classes in , with the hyper-parameters tuned on . Let denotes the source domain with labelled samples and denotes the target domain labelled with samples in each episode, where . Let the label function of and be and , respectively. During the pre-training, a learner is obtained to approximate the optimal mapping function based on all training samples in from all possible hypotheses . When ensemble learning is introduced into the pre-training, several learners denoted as can be obtained. With the ensemble technique of weighted averaging, the final learner is produced as:
(1) |
where is the weight parameter. There is a domain shift between the base and novel classes Tseng et al. (2020), and we use the distance Kifer et al. (2004) to measure the domain divergence between and :
(2) |
where and is the density functions of and respectively.
Theorem 1 (FSC Ensemble Learning)
Let be a hypothesis space, for any is learned from , and , the expected error on respectively with and holds the following relationship:
where is a constant, is the expected error on with , is the expected error on with , is the expected error on with .
The proof is provided in the Supplementary Material.
Remark 1
The core idea of Theorem 1 is to define a tighter expected error bound on the novel classes with the learned mapping function in the form of ensemble learning during the pre-training. Theorem 1 tells that the true error on the novel classes can be reduced by implementing ensemble learning on the base classes, given the domain divergence between the novel class and base class. This can well explain the effectiveness of ensemble learning in few-shot classification, in which multiple learners are assembled to enhance the generalization on the base set, resulting in better performance in novel classes.
3.2 FSC via Ensemble Learning with Multi-order Statistics
3.2.1 Overview
Our method employs the transfer-learning paradigm in a two-phase manner. In the first phase, a good feature extractor is pre-trained on the base set. In the second phase, FSC evaluation is done on the novel set with the pre-trained feature extractor. Following Theorem 1, we introduce ensemble learning in the first phase to improve the FSC performance. The key to this phase is to effectively train multiple diverse individuals. Different from the previous works Dvornik et al. (2019); Bendou et al. (2022) that use many different networks as individuals, we add multiple branches after the backbone network to create individuals for reducing training costs. Each branch calculates different-order statistics for pooling to highlight the discrepancy between the individuals. This step is optimized by supervised losses. After pre-training, features from different branches are concatenated for FSC evaluation. We name this method as Ensemble Learning with multi-Order Statistics (ELMOS) for FSC. An overview of ELMOS is shown in Figure 2, and a flow description of ELMOS is given in Algorithm 1.

3.2.2 Pre-training via Multi-order Statistics
The proposed model architecture mainly consists of the following four components: an image processing module, the backbone network, a multi-order statistics module, and a supervised classifier module. The image processing module is denoted as , which performs transformation of multi-scale rotation to augment the original base set and their label space. The backbone network is denoted as and parameterized by , which converts each image into a tensor of size . The multi-order statistics module module is denoted as , which maps the tensor from the backbone into multiple feature representations to generate individual learners for ensemble learning. The supervised classifier module is composed of softmax classifiers and the projectors with parameter matrices and , respectively, which are used to build the supervised losses for pre-training.
Given samples be randomly sampled from with classes, in which an image and its corresponding label are denoted as , . scales the images with the aspect-ratio of 2:3 and rotates the images with under both the new and the original scales, resulting in eight times expansion of training samples. Feed into to produce a tensor feature of . Next, we reshape the tensor into the matrix , and view each row vector in the matrix as an observation of the random variable of . When , the first characteristic function of variable in the Laplace operator is given by:
(3) |
where and are the density function and distribution function of , respectively. Let be the second characteristic function of the random variable .
Theorem 2 (The Inversion Formula for Distributions)
Let be a random variable with distribution function and characteristic function . For and ,
Corollary 1 (Uniqueness)
If two distributions of and are identical, then the corresponding characteristic functions and are identical.
See proof of Theorem 2 and Corollary 1 in Shiryaev (2016). From Theorem 2 and Corollary 1, we can see that there is a one-to-one correspondence between the characteristic function and the probability density function such that the characteristic function can completely describe a random variable.
The -order cumulant of the random variable is defined as the derivative of function at the origin, which is:
(4) |
Then the Taylor series expansion of function at the origin with respect to yields:
(5) |
where is the remainder term. It can be seen from Equation (5) that the -order cumulant of is the coefficient of the term in Equation (5).
Proposition 1
Consider a Gaussion distribution with mean and variance for the random variable , its second characteristic function is:
Consequently, the cumulant of the random variable are:
The proof is provided in the Supplementary Material.
Remark 2
Proposition 1 implies that for Gaussian signals only, the cumulants are identically zero when the order is greater than 2. Please note this conclusion can be naturally extended to the scenario of multivariate variables when . For the random variables with Gaussian distribution, the first and second-order statistics can completely represent their statistical characteristics. However, the non-Gaussian signals are more common in real-world applications. In this case, higher-order statistics also contain a lot of useful information. Therefore, we propose a multi-order statistics module consisting of multiple branches, each equipped with different order statistics of the tensor feature .
In particular, we employ three branches in the multi-order statistics module, which respectively calculate three orders cumulants of the variable with the observations in . The specific formulation of the -order, -order and -order cumulants of are expressed as:
(6) |
As and are matrices, we flatten them into -dimensional vectors and finally get the feature representations of , and . We use these three features as individuals in ensemble learning, which respectively pass through their corresponding softmax classifier and projectors . So the -th () outputs are:
(7) |
where is the -th softmax classifier with the parameter matrix of , is the -th component of . is the -th projector with the parameter matrix . is the -th component of the output probability from the -th softmax classifier. is the output vector from the -th projector. We simultaneously employ Classification-Based (CB) loss of cross-entropy and Similarity-Based (SB) loss of supervised contrastive in supervised learning for each individual Scott et al. (2021). These two losses are formulated as:
(8) | ||||
where is the -th component of label , is a scalar temperature parameter. is the positive sample set, in which each sample has the same label as . is the -th sample in . Then the learning objective function for the -th individual is:
(9) |
The overall loss function with ensemble learning is:
(10) |
where is a weight controlling the contribution of each individual in the ensemble learning. The pre-training adopts the gradient descent method to optimize the above loss function.
3.2.3 Few-shot Evaluation
The phase of few-shot evaluation still needs to construct a set of -way -shot FSC tasks, with a support set and a query set in each task. The support set randomly selects samples from each of the classes that are sampled from , which is denoted as , where is the -th images and its corresponding label. The query set consists of the remaining images in these classes, which is denoted as with any image of . After pre-training, we get rid of the softmax classifier and projectors and fix the backbone network and the multi-order statistics module module . The support set is input into and to produce the output features:
(11) |
where is the stack operator. The features are concatenated into a final expression of :
(12) |
where is the concatenated operator. A logistic regression classifier parameterized by is then trained with and its corresponding label . The query image is finally classified as:
(13) |
where is the inference label value of .
Method | Backbone | miniImageNet | CIFAR-FS | CUB | |||
---|---|---|---|---|---|---|---|
1-shot | 5-shot | 1-shot | 5-shot | 1-shot | 5-shot | ||
B_1 | ResNet12 | 69.060.44 | 83.610.29 | 77.090.46 | 88.460.34 | 81.460.39 | 92.550.18 |
B_2 | ResNet12 | 66.420.42 | 85.760.26 | 71.530.48 | 88.83 0.27 | 77.790.39 | 94.440.17 |
B_3 | ResNet12 | 67.680.43 | 82.810.29 | 72.830.46 | 86.340.34 | 83.890.38 | 91.200.17 |
ELMOS | ResNet12 | 70.300.45 | 86.170.26 | 78.180.41 | 89.870.31 | 85.210.38 | 95.020.16 |


Method | CUB | |
---|---|---|
1-shot | 5-shot | |
Meta-learning | ||
Relational Sung et al. (2018) | 55.001.00 | 69.300.80 |
DeepEMD Zhang et al. (2020a) | 75.650.83 | 88.690.50 |
BML Zhou et al. (2021) | 76.210.63 | 90.450.36 |
RENet Kang et al. (2021) | 79.490.44 | 91.11 0.24 |
FPNWertheimer et al. (2021) | 83.550.19 | 92.920.10 |
IEPT Zhang et al. (2020b) | 69.970.49 | 84.330.33 |
APP2S Ma et al. (2022) | 77.640.19 | 90.430.18 |
MFS Afrasiyabi et al. (2022) | 79.600.80 | 90.480.44 |
DeepBDC Xie et al. (2022) | 84.010.42 | 94.020.24 |
HGNN Yu et al. (2022) | 78.580.20 | 90.020.12 |
INSTARongkai Ma (2022) | 75.26 ± 0.31 | 88.12 ± 0.54 |
Transfer-learning | ||
Baseline++ Chen et al. (2019) | 60.530.83 | 79.340.61 |
Neg-Cosine Liu et al. (2020) | 72.660.85 | 89.400.43 |
S2M2 Mangla et al. (2020) | 80.680.81 | 90.850.44 |
DC-LRYang et al. (2021) | 79.560.87 | 90.670.35 |
CCF Xu et al. (2021b) | 81.850.42 | 91.580.32 |
ELMOS (ours) | 85.210.38 | 95.020.16 |
4 Experiments
4.1 Datasets
miniImageNet contains 600 images over 100 classes, which are divided into 64, 16 and 20 respectively for base, validation and novel sets. tiredImageNet consists of 779, 165 images belonging to 608 classes, which are further grouped into 34 higher-level categories with 10 to 30 classes per category. These categories are partitioned into 20 categories (351 classes), 6 categories (97 classes) and 8 categories (160 classes) respectively for base, validation and novel sets. CIFAR-FS is derived from CIFAR100 and consists of 100 classes with 600 images per class. The total classes are split into 64, 16 and 20 for base, validation and novel sets. Caltech-UCSD Bird-200-2011(CUB) has a total number of 11,788 images over 200 bird species. These species are divided into 100, 50, and 50 for the base, validation and novel sets, respectively.
4.2 Implementation Details
In the experiments, we primarily used ResNet12 architecture with 4 residual blocks. Each block had 3 convolutional layers with 3×3 kernels. The number of kernels for the 4 blocks was 64, 160, 320, and 640, respectively. A max-pooling layer was added at the end of the first three blocks. The last block was branched with three pooling layers, which respectively modeled different statistical representations of the images. We opted for the SGD optimizer with a momentum of 0.9 and a weight decay of 5e-4. The learning rate was initialized to be 0.025. We trained the network for 130 epochs with a batch size of 32 in all the experiments. For miniImageNet, tiredImageNet and CIFAR-FS, the learning rate was reduced by a factor of 0.2 at the 70- and 100- epoch. For CUB, the learning rate was reduced by a factor of 0.2 for every 15 epochs after the 75- epoch. We randomly sampled 2,000 episodes from with 15 query samples per class for both 5-way 1-shot and 5-shot evaluations, to produce the mean classification accuracy as well as the 95% confidence interval.
Method | Backbone | Venue | miniImageNet | tiredImageNet | CIFAR-FS | |||
---|---|---|---|---|---|---|---|---|
1-shot | 5-shot | 1-shot | 5-shot | 1-shot | 5-shot | |||
Meta-learning | ||||||||
DeepEMD Zhang et al. (2020a) | ResNet12 | CVPR’20 | 65.910.82 | 82.41 0.56 | 71.160.87 | 86.030.58 | - | - |
CC+rot Gidaris et al. (2019) | ResNet12 | CVPR’20 | 62.930.45 | 79.870.33 | 70.530.51 | 84.98 | 76.090.30 | 87.830.21 |
BML Zhou et al. (2021) | ResNet12 | ICCV’21 | 67.040.63 | 83.630.29 | 68.990.50 | 85.490.34 | 73.450.47 | 88.040.33 |
RENet Kang et al. (2021) | ResNet12 | ICCV’21 | 67.600.44 | 82.580.30 | 71.610.51 | 85.280.35 | 74.510.46 | 86.600.32 |
MeTALBaik et al. (2021) | ResNet12 | CVPR’21 | 66.610.28 | 81.430.25 | 70.290.40 | 86.170.35 | - | - |
DAN Xu et al. (2021a) | ResNet12 | CVPR’21 | 67.760.46 | 82.710.31 | 71.890.52 | 85.960.35 | - | - |
IEPT Zhang et al. (2020b) | ResNet12 | ICLR’21 | 67.050.44 | 82.900.30 | 72.240.50 | 86.730.34 | - | - |
APP2S Ma et al. (2022) | ResNet12 | AAAI’22 | 66.250.20 | 83.420.15 | 72.000.22 | 86.230.15 | 73.12 0.22 | 85.690.16 |
DeepBDC Xie et al. (2022) | ResNet12 | CVPR’22 | 67.340.43 | 84.460.28 | 72.340.49 | 87.310.32 | - | - |
MFS Afrasiyabi et al. (2022) | ResNet12 | CVPR’22 | 68.320.62 | 82.710.46 | 73.630.88 | 87.590.57 | - | - |
TPMNWu et al. (2021) | ResNet12 | CVPR’22 | 67.640.63 | 83.440.43 | 72.24 0.70 | 86.55 0.63 | - | - |
HGNN Yu et al. (2022) | ResNet12 | AAAI’22 | 67.020.20 | 83.000.13 | 72.050.23 | 86.490.15 | - | - |
DSFNZhang and Huang (2022) | ResNet12 | ECCV’22 | 61.270.71 | 80.130.17 | 65.46 0.70 | 82.410.53 | - | - |
MTRBouniot et al. (2022) | ResNet12 | ECCV’22 | 62.69 0.20 | 80.950.14 | 68.44 0.23 | 84.20 0.16 | - | - |
Transfer-learning | ||||||||
Baseline++ Chen et al. (2019) | ResNet12 | ICLR’19 | 48.240.75 | 66.430.63 | - | – | - | |
Neg-Cosine Liu et al. (2020) | WRN28 | ECCV’20 | 61.720.81 | 81.790.55 | - | – | - | |
RFS Tian et al. (2020) | WRN28 | ECCV’20 | 64.820.60 | 82.140.43 | 71.520.69 | 86.030.49 | - | - |
CBM Wang et al. (2020) | ResNet12 | MM’20 | 64.770.46 | 80.500.33 | 71.270.50 | 85.810.34 | - | - |
SKD Rajasegaran et al. (2020) | ResNet12 | Arxiv’21 | 67.040.85 | 83.540.54 | 72.030.91 | 86.500.58 | 76.90.9 | 88.90.6 |
IESung et al. (2021) | ResNet12 | CVPR’21 | 67.280.80 | 84.780.33 | 72.210.90 | 87.080.58 | 77.870.85 | 89.740.57 |
PAL Ma et al. (2019) | ResNet12 | ICCV’21 | 69.370.64 | 84.400.44 | 72.250.72 | 86.950.47 | 77.10.7 | 88.00.5 |
CCFXu et al. (2021b) | ResNet12 | CVPR’22 | 68.880.43 | 84.590.30 | - | - | - | - |
ELMOS (ours) | ResNet12 | - | 70.300.45 | 86.170.26 | 73.840.49 | 87.980.31 | 78.180.41 | 89.870.31 |
Method | CIFAR-FS | CUB | ||
---|---|---|---|---|
1-shot | 5-shot | 1-shot | 5-shot | |
EASY | 75.240.20 | 88.380.14 | 77.970.20 | 91.590.10 |
ELMOS | 78.180.41 | 89.870.31 | 85.210.38 | 95.020.16 |
4.3 Ablation Studies
The effectiveness of our method is attributed to the ensemble of different branches equipped with multi-order statistics. In this section, we conducted ablation studies to analyze the effect of the -order, -order and, -order statistical pooling and their combination on the miniImageNet, CIFAR-FS and CUB datasets. Above methods are respectively denoted as B_1, B_2, B_3,and ELMOS. Their accuracies under 5-way 1-shot and 5-shot tasks on three datasets are shown in Table 1. From the results, we can see that: (1) On all three datasets, the test accuracy of and is higher than under the 1-shot task, but the test accuracy of is higher than and under the 5-shot task. The above phenomenon shows that different order statistics provide different information about the images. (2) The test accuracy of ELMOS is higher than , and under both 1-shot and 5-shot tasks, which illustrates that different order statistics complement each other. Combing them can bring more useful information for classification, resulting in higher classification performance.
For each individual in the ensemble learning, the optimization is cooperatively accomplished by the Classification-Based (CB) loss and Similarity-Based (SB) loss Scott et al. (2021). Hence, we conducted ablation experiments to analyze the contribution of each loss on three benchmark datasets: miniImageNet, CIFAR-FS and CUB. Subsequently, we pre-trained the model respectively with CB and SB loss alone and their combination, resulting in three methods denoted as CB, SB and CB&SB. The test accuracies under different methods are shown in Figure 3. The test results show that the accuracy of CB&SB is higher than CB and SB, which implies that both classification-based and similarity-based losses play important roles in our method.
4.4 Comparison with the Most Related Method
Our method is most related to EASY Bendou et al. (2022), which is also a FSC ensemble learning method in context of transfer learning. The comparison of results between them on CIFAR-FS and CUB datasets is shown in Table 4. From the results, we can see that our method beats EASY by a very large margin under both 1-shot and 5-shot tasks. Please note that our method is more efficient that EASY, because EASY needs to pre-train multiple individual networks, which spends much more pre-training time than our method.
4.5 Comparison with State-of-the-Art Methods
We compare the performance of our method with several state-of-the-art methods. These methods are either meta-learning based or transfer-learning based. The comparison of results is shown in Table 2 and Table 3. From Table 2, we can see the performance of our method ranks at the top under both 1-shot and 5-shot tasks on CUB. Specifically, our method exceeds the second-best model DeepBDC by 1.2% and 1.0% respectively in 1-shot and 5-shot settings. From Table 3, we can see that our method beats state-of-the-art methods under both 5-way 1-shot and 5-way 5-shot tasks on the dataset of miniImageNet, tiredImagegNet, and CIFAR-FS. Specifically, on miniImageNet, PAL and IE behave the second best respectively in 1-shot and 5-shot settings. Our method beats them by 0.93% and 1.39%. On tiredImageNet, our method outperforms the second-best MFS by 0.21% and 0.39% respectively in 1-shot and 5-shot settings. On CIFAR-FS, our method achieves 0.31% and 0.13% improvement over IE for 1-shot and 5-shot respectively. In brief, our method consistently outperforms the state-of-the-art FSC methods under both 1-shot and 5-shot tasks on multiple datasets. The promising results are achieved because of the generalization representation obtained by ensemble learning with multi-order on the base set.
5 Conclusion
This paper analyzes the underlying work mechanism of ensemble learning in few-shot classification. A theorem is provided to illustrate that the true error on the novel classes can be reduced with ensemble learning on the base set, given the domain divergence between the base and the novel classes. Multi-order statistics on image features are further introduced to produce learning individuals to get an effective ensemble learning design. Comprehensive experiments on multiple benchmarks have illustrated that different-order statistics can generate diverse learning individuals due to their complementarity. The promising FSC performance with ensemble learning on the base set has validated the proposed theorem.
References
- Afrasiyabi et al. [2020] Arman Afrasiyabi, Jean-François Lalonde, and Christian Gagné. Associative alignment for few-shot image classification. In Proceedings of European Conference on Computer Vision, pages 18–35, Glasgow, UK, November 2020. Springer.
- Afrasiyabi et al. [2022] Arman Afrasiyabi, Hugo Larochelle, Jean-François Lalonde, and Christian Gagné. Matching feature sets for few-shot image classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9014–9024, New Orleans, USA, June 2022. IEEE.
- Agarwal et al. [2021] Rishabh Agarwal, Levi Melnick, Nicholas Frosst, Xuezhou Zhang, , Rich Caruana, and Geoffrey E Hinton. Neural additive models: Interpretable machine learning with neural nets. In Proceedings of 34th Annual Conference on Neural Information Processing Systems, pages 4078–4088, 4699–4711, December 2021. Neural Information Processing Systems Foundation.
- Baik et al. [2021] Sungyong Baik, Janghoon Choi, Heewon Kim, Dohee Cho, Jaesik Min, and Kyoung Mu Lee. Meta-learning with task-adaptive loss function for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9465–9474, Nashville, USA, June 2021. IEEE.
- Bendou et al. [2022] Yassir Bendou, Yuqing Hu, Raphael Lafargue, Giulia Lioi, Stéphane Pateux, and Vincent Gripon. Easy—ensemble augmented-shot-y-shaped learning: State-of-the-art few-shot classification with simple components. Journal of Imaging, 8(7):179, 2022.
- Bertinetto et al. [2019] Luca Bertinetto, Joao F Henriques, Philip HS Torr, and Andrea Vedaldi. Meta-learning with differentiable closed-form solvers. In Proceedings of 7th International Conference on Learning Representations, New Orleans, USA, May 2019. International Conference on Learning Representations.
- Bouniot et al. [2022] Quentin Bouniot, Ievgen Redko, Romaric Audigier, Angélique Loesch, and Amaury Habrard. Improving few-shot learning through multi-task representation learning theory. In Proceedings of European Conference on Computer Vision, pages 435–452, Tel Aviv, Israel, October 2022. Springer.
- Chen et al. [2019] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Frank Wang, and Jia-Bin Huang. A closer look at few-shot classification. In Proceedings of 7th International Conference on Learning Representations, New Orleans, USA, May 2019. International Conference on Learning Representations.
- Cui et al. [2017] Yin Cui, Feng Zhou, Jiang Wang, Xiao Liu, Yuanqing Lin, and Serge Belongie. Kernel pooling for convolutional neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 2921–2930, Venice, Italy, February 2017. IEEE.
- Dvornik et al. [2019] Nikita Dvornik, Cordelia Schmid, and Julien Mairal. Diversity with cooperation: Ensemble methods for few-shot classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3723–3731, Seoul, Korea, February 2019. IEEE.
- Finn et al. [2017] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of International Conference on Machine Learning, pages 1126–1135, Sydney,Australia, July 2017.
- Gidaris et al. [2019] Spyros Gidaris, Andrei Bursuc, Patrick Pérez, and Matthieu Cord. Boosting few-shot visual learning with self-supervision. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8059–8068, Seoul, Korea, February 2019. IEEE.
- Horváth et al. [2021] Miklós Z Horváth, Mark Niklas Müller, Marc Fischer, and Martin Vechev. Boosting randomized smoothing with variance reduced classifiers. arXiv preprint arXiv:2106.06946, 2021.
- Kang et al. [2021] Dahyun Kang, Heeseung Kwon, Juhong Min, and Minsu Cho. Relational embedding for few-shot classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8822–8833, Nashville, USA, June 2021. IEEE.
- Kifer et al. [2004] Daniel Kifer, Shai Ben-David, and Johannes Gehrke. Detecting change in data streams. In Proceedings of the 31st International Conference on Very Large Databases, pages 180–191, Toronto, Canada;, September 2004. Morgan Kaufmann.
- Liu et al. [2020] Bin Liu, Yue Cao, Yutong Lin, , Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. In Proceedings of European Conference on Computer Vision, pages 438–455, Glasgow, UK, November 2020. Springer.
- Ma et al. [2019] Jiawei Ma, Hanchen Xie, Guangxing Han, Shih-Fu Chang, Aram Galstyan, and Wael Abd-Almageed. Partner-assisted learning for few-shot image classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10573–10582, Seoul, Korea, February 2019. IEEE.
- Ma et al. [2022] Rongkai Ma, Pengfei Fang, Tom Drummond, and Mehrtash Harandi. Adaptive poincaré point to set distance for few-shot classification. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 1926–1934, Austin, Texas, August 2022. AAAI.
- Mangla et al. [2020] Puneet Mangla, Nupur Kumari, Abhishek Sinha, Mayank Singh, , and Vineeth N Balasubramanian. Charting the right manifold: Manifold mixup for few-shot learning. In Proceedings of IEEE Winter Conference on Applications of Computer Vision (WACV), pages 2218–2227, Snowmass, USA, March 2020. IEEE.
- Rajasegaran et al. [2020] Jathushan Rajasegaran, Salman Khan, , Fahad Shahbaz Khan, and Mubarak Shah. Self-supervised knowledge distillation for few-shot learning. arXiv preprint arXiv:2006.09785, 2020.
- Rongkai Ma [2022] Gil Avraham Yan Zuo Rongkai Ma, Pengfei Fang. Learning instance and task-aware dynamic kernels for few-shot learning. arXiv preprint arXiv:2112.03494, 2022.
- Scott et al. [2021] Tyler R Scott, Andrew C Gallagher, and Michael C Mozer. von mises-fisher loss: An exploration of embedding geometries for supervised learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10612–10622, Nashville, USA, June 2021. IEEE.
- Shiryaev [2016] Albert N Shiryaev. Probability-1, volume 95. Springer, 2016.
- Snell et al. [2017] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Proceedings of 31st Annual Conference on Neural Information Processing Systems, pages 4078–4088, Long Beach, USA, December 2017. Neural Information Processing Systems Foundation.
- Sung et al. [2018] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: relation network for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 1199–1208, Salt Lake City, USA, June 2018. IEEE.
- Sung et al. [2021] Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Exploring complementary strengths of invariant and equivariant representations for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10836–10846, Nashville, USA, June 2021. IEEE.
- Tian et al. [2020] Yonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenenbaum, and Phillip Isola. Rethinking few-shot image classification: a good embedding is all you need? In Proceedings of European Conference on Computer Vision, pages 266–282, Glasgow, UK, November 2020. Springer.
- Tseng et al. [2020] Hung-Yu Tseng, Hsin-Ying Lee, Jia-Bin Huang, and Ming-Hsuan Yang. Cross-domain few-shot classification via learned feature-wise transformation. arXiv preprint arXiv:2001.08735, 2020.
- Wang et al. [2019] Yan Wang, Wei-Lun Chao, Kilian Q Weinberger, and Laurens van der Maaten. Simpleshot: Revisiting nearest-neighbor classification for few-shot learning. arXiv preprint arXiv:1911.04623, 2019.
- Wang et al. [2020] Zeyuan Wang, Yifan Zhao, Jia Li, and Yonghong Tian. Cooperative bi-path metric for few-shot learning. In Proceedings of the 29th ACM International Conference on Multimedia, pages 1524–1532, Seattle, USA, October 2020. ACM.
- Wertheimer et al. [2021] Davis Wertheimer, Luming Tang, and Bharath Hariharan. Few-shot classification with feature map reconstruction networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8012–8021, Nashville, USA, 2021.
- Wu et al. [2021] Jiamin Wu, Tianzhu Zhang, Yongdong Zhang, and Feng Wu. Task-aware part mining network for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8433–8442, Nashville, USA, June 2021. IEEE.
- Xie et al. [2022] Jiangtao Xie, Fei Long, Jiaming Lv, Qilong Wang, and Peihua Li. Joint distribution matters: deep brownian distance covariance for few-shot classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7962–7971, New Orleans, USA, June 2022. IEEE.
- Xu et al. [2021a] Chengming Xu, Yanwei Fu, Chen Liu, Chengjie Wang, Jilin Li, Feiyue Huang, Li Zhang, and Xiangyang Xue. Learning dynamic alignment via meta-filter for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5182–5191, Nashville, USA, June 2021. IEEE.
- Xu et al. [2021b] Jing Xu, Xinglin Pan, Xu Luo, Wenjie Pei, and Zenglin Xu. Exploring category-correlated feature for few-shot image classification. arXiv preprint arXiv:2112.07224, 2021.
- Yang et al. [2013] Jing Yang, Xiaoqin Zeng, Shuiming Zhong, and Shengli Wu. Effective neural network ensemble approach for improving generalization performance. IEEE transactions on neural networks and learning systems, 24(6):878–887, 2013.
- Yang et al. [2021] Shuo Yang, Lu Liu, and Min Xu. Free lunch for few-shot learning: distribution calibration. In Proceedings of 9th International Conference on Learning Representations, New Orleans, USA, May 2021. International Conference on Learning Representations.
- Yu et al. [2022] Tianyuan Yu, Sen He, Yi-Zhe Song, and Tao Xiang. Hybrid graph neural networks for few-shot learning. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 3179–3187, Austin, Texas, 2022.
- Zhang and Huang [2022] Tao Zhang and Wu Huang. Kernel relative-prototype spectral filtering for few-shot learning. In Proceedings of European Conference on Computer Vision, pages 541–557, Tel Aviv, Israel, October 2022.
- Zhang et al. [2020a] Chi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: few-shot image classification with differentiable earth mover’s distance and structured classifiers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 12203–12213, Seattle, USA, June 2020. IEEE.
- Zhang et al. [2020b] Manli Zhang, Jianhong Zhang, , and Songfang Huang. Iept: Instance-level and episode-level pretext tasks for few-shot learning. In Proceedings of 7th International Conference on Learning Representations, Addis Ababa, Ethiopian Empire, May 2020. International Conference on Learning Representations.
- Zhou et al. [2021] Ziqi Zhou, Xi Qiu, Jiangtao Xie, Jianan Wu, and Chi Zhang. Binocular mutual learning for improving few-shot classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 8402–8411, Seoul, Korea, February 2021. IEEE.
6 Supplementary Material
6.1 Proof of Theorem 1
Proof 1
The expected error with on and are:
(14) | ||||
Then, we will get the following formula:
(15) | ||||
The expected error on with any learner of ensemble learning is calculated as:
(16) |
where is the density functions of , The average error on with the learners of ensemble learning is:
(17) |
Recall that , then the expected error on with is calculated as:
(18) | ||||
6.2 Proof of Proposition 1
Proof 2
The Gaussian distribution of the random variable is expressed as:
(19) |
According to the definition in Equation (3), the first characteristic function of random variable is calculated as:
(20) | ||||
The common Gaussian integral formula is expressed as:
(21) |
In the right side of Equation (21), let , , , the Euqation (20) becomes:
(22) |
The second characteristic function of is formulated as:
(23) |
Compare Equation (23) with Equation (5), the following coefficients of the term can be obtained in Equation (5):
(24) |
6.3 More Experiments







Method | miniImageNet CUB | |
---|---|---|
1-shot | 5-shot | |
Prototypical Snell et al. [2017]† | 36.610.53 | 55.230.83 |
Relational Sung et al. [2018]† | 44.070.77 | 59.460.71 |
MetaOptNet Bertinetto et al. [2019]†† | 44.790.75 | 64.980.68 |
IEPT Zhang et al. [2020b] | 52.680.56 | 72.98 0.40 |
FPN Wertheimer et al. [2021] | 51.600.21 | 72.970.18 |
BML Zhou et al. [2021] | - | 72.420.54 |
Baseline++ Chen et al. [2019] | - | 62.040.76 |
SimpleShot Wang et al. [2019]†† | 48.56 | 65.63 |
S2M2 Mangla et al. [2020] | 48.240.84 | 70.440.75 |
Neg-Cosine Liu et al. [2020] | - | 67.030.76 |
GNN+FT Tseng et al. [2020] | 47.470.75 | 66.980.68 |
ELMOS(ours) | 53.730.47 | 74.370.37 |
6.3.1 Parameter Analysis
The effect of each branch is controlled by the parameters , and in Equation (10). Since the first branch modeling the -order statistic is the main branch, we set its corresponding parameter to 1. Subsequently, we first fixed the value of to be 1, and varied the value of between [0, 1] with an interval of 0.1. The test accuracy under different values is shown in Figure 4. When is 1, the highest performance on miniImageNet under both 1-shot and 5-shot tasks can be achieved. When is 0.3, we get the highest performance on CUB and CIFAR-FS under both 1-shot and 5-shot tasks. Next, we fixed the value of to be 1 on miniImageNet, 0.3 on CIFAR-FS and CUB, and varied the value of between [0, 1] with an interval of 0.1. The test accuracy under different values is shown in Figure 5. When is 1, we get the highest performance on all three datasets under both 1-shot and 5-shot tasks.
6.3.2 Image Reconstruction of Features
The effectiveness of our method is mainly attributed to the diversity of -order, -order, and -order statistic features. We used the technique of deep image prior to respectively invert different-order statistic features after the pre-training into RGB images. The reconstruction results are shown in Figure 6. From the results, we notice that as the order of statistic feature becomes higher, the reconstructed images become more smooth. The above phenomenon illustrates that -order and -order statistic features are more robust to the singularity variation such as the noise point than the -order statistic feature. By comparison, the -order statistic feature has stronger ability of capturing the details of the images than -order and -order statistic features. The above analysis has shown that -order, -order, and -order statistic features are complementary.
6.3.3 t-SNE Visualization of Features
To show the performance of our method, we visualize the features of the novel class samples in comparison with the Baseline. Herein, the Baseline pre-trained the backbone network only with the global average pooling. We randomly selected 5 classes and 200 samples per class from CIFAR-FS and visualize the features of the samples using t-SNE. The visualization results are shown in Figure 7. From the results, we can see that five classes can well separate from each other in our feature space compared to with the Baseline, which illustrates that our method can extract better features for unseen novel classes compared with the Baseline.
6.3.4 Comparison of Cross-domain Performance
As stated in our Theorem 1, there exists a domain shift between the base and novel classes. In the former test, the base and novel classes are in the same domain, which has a smaller domain divergence than the ones in the different domains. Now, we large the domain divergence to evaluate our method by doing cross-domain FSC. Following the protocol in Chen et al. [2019], the model was trained on miniImageNet and then evaluated on the novel classes in CUB. The comparison of results is shown in Table 5. From the results, we can see that our method is better than all the compared methods under 1-shot and 5-shot tasks. Specifically, our method outperforms the best method of IEPT with the improvement of 1.05% and 1.39% respectively. Our method does not concern the domain divergence, but we can also get good cross-domain performance by implementing ensemble learning to decrease the generalization error on base classes, because it is also an important term for the true error on novel classes.