L ONG - TAILED R ECOGNITION BY R OUTING D IVERSE D ISTRIBUTION -A WARE E XPERTS
A BSTRACT
Natural data are often long-tail distributed over semantic classes.
Existing recognition methods tackle this imbalanced classiﬁcation by placing more emphasis on the tail data, through class re-balancing/re-weighting or ensembling over different data groups, resulting in increased tail accuracies but reduced head accuracies.
We take a dynamic view of the training data and provide a principled model bias and variance analysis as the training data ﬂuctuates: Existing long-tail classiﬁers invariably increase the model variance and the head-tail model bias gap remains large, due to more and larger confusion with hard negatives for the tail. We propose a new long-tailed classiﬁer called RoutIng Diverse Experts (RIDE). It reduces the model variance with multiple experts, reduces the model bias with a distribution-aware diversity loss, reduces the computational cost with a dynamic expert routing module.
RIDE outperforms the state-of-the-art by 5% to 7% on CIFAR100-LT, ImageNet-LT and iNaturalist 2018 benchmarks.
It is also a universal framework that is applicable to various backbone networks, long-tailed algorithms and training mechanisms for consistent performance gains.
Our code is available at: https://github.com/frank-xwang/RIDE-LongTailRecognition.
I NTRODUCTION
Real-world data are often long-tail distributed over semantic classes: A few classes contain many instances, whereas most classes contain only a few instances.
Long-tailed recognition is challenging, as it needs to handle not only a multitude of small-data learning problems on the tail classes, but also extreme imbalanced classiﬁcation over all the classes.
There are two ways to prevent the many head instances from overwhelming the few tail instances in the classiﬁer training objective: 1) class re-balancing/re-weighting which gives more importance to tail instances (Cao et al., 2019; Kang et al., 2020; Liu et al., 2019), 2) ensembling over different data distributions which re-organizes long-tailed data into groups, trains a model per group, and then combines individual models in a multi-expert framework (Zhou et al., 2020; Xiang et al., 2020). We compare three state-of-the-art (SOTA) long-tail classiﬁers against the standard cross-entropy (CE) classiﬁer: cRT and τ -norm (Kang et al., 2020) which adopt a two-stage optimization, ﬁrst representation learning and then classiﬁcation learning, and LDAM (Cao et al., 2019), which is trained end-to-end with a marginal loss.
In terms of the classiﬁcation accuracy, a common metric for model selection on a ﬁxed training set, Fig.
1a shows that, all these existing long-tail methods increase the overall, medium- and few-shot accuracies over CE, but decrease the many-shot accuracy . These intuitive solutions and their experimental results seem to suggest that there is a head-tail performance trade-off in long-tailed recognition.
We need a principled performance analysis approach that could shed light on such a limitation if it exists and provide guidance on how to overcome it.
Our insight comes from a dynamic view of the training set: It is merely a sample set of some underlying data distribution. Instead of evaluating how a long-tailed classiﬁer performs on the ﬁxed training set, we evaluate how it performs as the training set ﬂuctuates according to the data distribution.
[Table]
L ONG - TAILED R ECOGNITION BY R OUTING D IVERSE D ISTRIBUTION -A WARE E XPERTS
Anonymous authors Paper under double-blind review
A BSTRACT
Natural data are often long-tail distributed over semantic classes.
Existing recog- nition methods tend to focus on tail performance gain, often at the expense of head performance loss from increased classiﬁer variance.
The low tail perfor- mance manifests itself in large between-class confusion and high classiﬁer variance.
We aim to reduce both the bias and the variance of a long-tailed classiﬁer by RoutIng Diverse Experts (RIDE).
It has three components: 1) a shared architecture for multiple classiﬁers (experts); 2) a distribution-aware diversity loss that encourages more diverse decisions for classes with fewer training instances; and 3) an expert routing module that dynamically assigns more ambiguous instances to additional experts.
With on-par computational complexity, RIDE signiﬁcantly outperforms the state-of-the-art methods by 5% to 7% on all the benchmarks in-
cluding CIFAR100-LT, ImageNet-LT and iNaturalist.
RIDE is also a universal framework that can be applied to different backbone networks and integrated into various re-balancing or re-weighting methods for consistent performance gains.
I NTRODUCTION
The natural data we encounter in practice often has a long tail distribution: A few classes contain many instances, while most classes contain only a few instances.
Learning discrimination among them is challenging, as the few tail instances can be easily overwhelmed by many head instances.
Long-tailed recognition is usually handled either by class re-balancing/re-weighting strategies giving more importance to tail instances (Cao et al., 2019; Kang et al., 2020; Liu et al., 2019), or by multiexpert methods, where long-tailed data are separated into parts by their frequencies and models focusing on individual parts are combined (Zhou et al., 2020; Xiang & Ding, 2020).
However, all these methods generally gain on tail classes at the cost of performance loss on head classes.
The state-of-the-art (SOTA) methods on iNaturalist (Van Horn et al., 2018) are cRT and ⌧ -norm (Kang et al., 2020) and BBN (Zhou et al., 2020).
The former belongs to the re-balancing type with a two-stage optimization for learning a good representation and classiﬁer, whereas the latter belongs to the multi-expert type with two experts focusing on head and tail classes.
We analyze the performance of a long-tail classiﬁer in terms of bias and variance with respect to ﬂuctuations in the training set: We randomly sample CIFAR100 (Krizhevsky, 2009) according to a long-tailed distribution a few times, train a model each time, and then estimate the per-class bias and variance of the classiﬁer.
These metrics are evaluated over 20 independently trained models, each on a random sampled set of
CIFAR100 with an imbalance ratio of 100 and 300 samples for class 0. Compared to the standard
CE classiﬁer, existing SOTA methods almost always increase the variance and some reduce the tail bias at the cost of increasing the head bias. b) The metrics are evaluated over CIFAR100-LT Liu et al. LDAM is more likely to confuse the tail (rather than head) classes with the hardest negative class, with an average score of 0.59. RIDE with LDAM can greatly reduce the confusion with the nearest negative class, especially for samples from the few-shot categories.
Consider the training data D as a random variable.
The prediction error of model h on instance x with output Y varies with the realization of D .
The expected variance with respect to variable D has a well-known bias-variance decomposition: [Equation] For the above L2 loss on regression h ( x ) → Y , the model bias measures the accuracy of the prediction with respect to the true value, the variance measures the stability of the prediction, and the irreducible error measures the precision of the prediction and is irrelevant to the model h .
Empirically, for n random sample sets of data, D (1) , . . , D ( n ) , the k -th model trained on D ( k ) predicts y ( k ) on instance x , and collectively they have a mean prediction y m . For the L2 regression loss, the model bias is simply the L2 loss between y m and ground-truth t = E [ Y ] , whereas the model variance is the variance of y ( k ) with respect to their mean y m :
L2 regression loss: [Equation]
mean prediction: [Equation] model bias:
[Equation] model variance: [Equation] As shown on the above right, these concepts can be expressed entirely in terms of L2 loss L .
We can thus extended them to classiﬁcation (Domingos, 2000) by replacing L with L 0-1 for classiﬁcation: [Equation] classiﬁcation
[Equation] [Equation] otherwise [Equation]
[Equation] The mean prediction y m minimizes (cid:80) nk
=1 L 0-1 (cid:0) y
( k ) ; y m (cid:1) and becomes the most often or main prediction. The bias and variance terms become L 0-1 ( y m ; t ) and 1 n (cid:80) nk
=1 L 0-1 ( y ( k ) ; y m ) respectively. We apply such bias and variance analysis to the CE and long-tail classiﬁers.
We sample CIFAR (Krizhevsky, 2009) according to a long-tail distribution multiple times.
For each method, we train a model per long-tail sampled dataset and then estimate the per-class bias and variance over these multiple models on the balanced test set of CIFAR100-LT Liu et al.
Fig.
1a shows that: On the model bias : The head bias is signiﬁcantly smaller than the tail bias, at 0 . 3 vs. 0 .
9 for CE.
All the existing long-tail methods reduce the overall bias by primarily reducing the tail bias.
However, the head-tail bias gap remains large at 0 .
3 vs. 0 .
On the model variance : All the existing long-tail methods increase the model variance across all class splits, with a slight reduction in the medium-shot variance for cRT.
That
is,
existing long-tail methods reduce the model bias for the tail at the cost of increased model variance for all the classes
and the head-tail model bias gap remains large
We conduct further statistical analysis to understand the head-tail model bias gap.
We examine the largest softmax score in the other classes of { c : c (cid:54) =
t } , where t is the ground-truth class of an instance.
The smaller this hardest negative score is, the less the confusion, and the lower the model bias.
Fig.
1b shows that there is increasingly more and larger confusion from the head to the tail.
Guided by our model bias/variance and confusion pattern analysis, we propose a new long-tail classiﬁer with four distinctive features: 1) It reduces the model variance for all the classes with multiple experts.
It reduces the model bias for the tail with an additional distribution-aware diversity loss.
3) It reduces the computational complexity that comes with multiple experts with a dynamic expert routing module which deploys another trained distinctive expert for a second (or third, ...) opinion only when it is called for. 4)
The routing module and a shared architecture for experts of reduced complexity effectively cut down the computational cost of our multi-expert model, to a level that could be even lower than the commonly adopted baseline with the same backbone.
Our so-called RoutIng Diverse Experts (RIDE) not only reduces the model variance for all the classes, but also signiﬁcantly reduces the model bias for the tail classes and increases the mean accuracies for all class splits, all of which existing long-tail methods fail to accomplish.
RIDE delivers 5% ∼ 7% higher accuracies than the current SOTA methods on CIFAR100-LT,
ImageNet-LT (Liu et al., 2019) and iNaturalist (Van Horn et al., 2018).
RIDE is also a universal framework that can be applied to different backbone networks for improving existing long-tail algorithms such as focal loss (Lin et al., 2017), LDAM (Cao et al., 2019), τ -norm (Kang et al., 2020).
RELATED WORKS
Few-shot learning . To generalize from small training data, meta-learning (Bertinetto et al., 2016; Ravi & Larochelle, 2017; Santoro et al., 2016; Finn et al., 2017; Yang et al., 2018) and data augmentation/generation are two most studied approaches (Chen et al., 2019; Schwartz et al., 2018;
Zhang et al., 2019; Liu et al., 2018). Matching Network (Vinyals et al., 2016) and Prototypical Network (Snell et al., 2017) learn discriminative features that can be transferred to new classes through meta-learners without big training data. Hariharan & Girshick (2017), Wang et al. (2018) and Liu et al.
(2018) utilize samples from a generative model to augment the training data.
However, fewshot learning relies on balanced training data, whereas long-tail recognition has to deal with highly imbalanced training data, e.g., from hundreds in the head to a few instances in the tail. Re-balancing/re-weighting . A direct approach to achieve sample balance is to under- or oversample training instances according to their class sizes (He & Garcia, 2009). Another option is data augmentation, where additional samples are generated to supplement tail classes, sometimes directly in the feature space (Liu et al., 2020;
Chu et al., 2020;
Kim et al., 2020).
Re-weighting modiﬁes the loss function and puts larger weights on tail classes (Lin et al., 2017; Cui et al., 2019; Cao et al., 2019; Wu et al., 2020) or randomly ignoring gradients from head classes (Tan et al., 2020).
However, both sample-wise and loss-wise balancing focus on tail classes, resulting in more sensitivity to ﬂuctuations in the small tail classes and thus much increased model variances (Fig. 1a).
Knowledge transfer .
OLTR (Liu et al., 2019) and inﬂated memory (Zhu & Yang, 2020) use memory banks to store and transfer mid- and high-level features from head to tail classes, enhancing feature generalization for the tail.
However, this line of work (Liu et al., 2019; Zhu & Yang, 2020; Kang et al., 2020; Jamal et al., 2020; Wang et al., 2017) usually does not have effective control over the knowledge transfer process, often resulting in head performance loss.
Ensembling and grouping .
One way to counter imbalance is to separate training instances into different groups based their class sizes. Models trained on individual groups are ensembled together in a multi-expert framework.
BBN (Zhou et al., 2020) adaptively fuses two-branches that each focus on the head and the tail respectively.
LFME (Xiang et al., 2020) distills multiple teacher models into a uniﬁed model, each teacher focusing on a relatively balanced group such as many-shot classes, medium-shot classes, and few-shot classes.
BBN and LFME still lose head performance and overall generalizability, as no expert has a balanced access to the entire dataset.
Our RIDE is a non-traditional ensemble method . Its experts have shared earlier layers and reduced later channels, less prone to small tail overﬁtting.
Its experts are jointly optimized. It deploys experts on an as-needed basis for individual instances with a dynamic expert assignment module.
4) It reaches higher accuracies with a smaller model complexity and computational cost.
RIDE: R OUTING D IVERSE D ISTRIBUTION -A WARE E XPERTS
We propose a novel multi-expert model (Fig. 2) with shared earlier layers f θ and n independent channel-reduced later layers Ψ = { ψ θ 1 , ..., ψ θ n } .
They are jointly optimized at Stage 1 and dynamically deployed with a learned expert assignment module at Stage 2. At the inference time, all the m active experts are averaged together in their logits for ﬁnal ensemble softmax classiﬁcation: [Equation] Softmax of the average logits is equivalent to the product of individual classiﬁcation probabilities, which approximates their joint probability if individual experts makes independent decisions.
Experts with a shared early backbone and reduced later channels . Consider n independent experts of the same convolutional neural network (CNN) architecture. Since early layers of a CNN tend to encode generic low-level features, we adopt the common practice in transfer learning and have all the n experts share the same backbone f θ .
Each expert retains independent later layers ψ θ i , i = 1 ,. . . ,n .
To reduce overﬁtting to small training data in the tail classes, we reduce the number of ﬁlter channels in ψ θ i , e.g., by 1/4.
All these n experts are trained together on long-tailed data distribution-aware diversity loss L D-Diversify and classiﬁcation loss L Classify , such as CE and LDAM.
Individual expert classiﬁcation loss . One way to combine multiple experts is to apply the classiﬁcation loss to the aggregated logits of individual experts.
While this idea works for several recently proposed multi-expert models (Zhou et al., 2020; Xiang et al., 2020), it does not work for our shared experts: Its performance is on-par with an equal-sized single-expert model.
Let L denote the classi-
[Figure]
train a router that dynamically assigns ambiguous samples to additional experts on an as-needed basis. The distribution of instances seen by each expert shows that head instances need fewer experts and the imbalance between classes gets reduced for later experts.
At the test time, we collect the logits of assigned experts to make a ﬁnal decision
) RIDE outperforms SOTA methods (i.e. LFME (Xiang et al., 2020) for CIFAR100-LT, LWS (Kang ﬁcation loss (e.g. CE) over instance x and its label y . We call such an aggregation loss collaborative :
[Equation]
as it leads to correlated instead of complementary experts.
To discourage correlation, we require each expert to do the job well by itself. Such an aggregation loss is essentially an individual loss, and it contributes a large portion of our performance gain in most of our experiments:
[Equation]
Distribution-aware diversity loss . The individual classiﬁcation loss and random initialization lead to diversiﬁed experts with a shared backbone.
For long-tailed data, we add a regularization term to encourage complementary decisions from multiple experts. That is, we maximize the KL-divergence between different experts’ classiﬁcation probabilities on instance x in class y over a total of c classes: diversity loss:
[Equation]
KL divergence: [Equation] classiﬁcation by θ i : [Equation]
[Equation]
We vary the temperature T (or concentration ) (Hadsell et al., 2006; Wu et al., 2018) according to the class y that x belongs to: For class k with n k instances, the smaller the n k , the lower the temperature, the more sensitive the classiﬁcation probability p is to a change in the feature ψ .
Speciﬁcally, class-wise temperature:
[Equation]
normalized class size: [Equation] T scales linearly with the class size, ensuring β k = 1 , T ( x ) = α for a balanced set.
This simple adaptation allows us to ﬁnd classiﬁers of enough complexity for the head and enough robustness for the tail: On one hand, we need strong classiﬁers to handle large sample variations within head classes; on the other hand, such classiﬁers are prone to overﬁt small training data within tail classes.
We adapt the temperature only after the CNN network is trained for several epochs and the feature is stabilized, similar to the training scheme for deferred reweighting (Cao et al., 2019).
Joint expert optimization. For our n experts θ 1 , . . . , θ n with a shared backbone θ , we optimize their individual classiﬁcation losses ( L Classify = L , any classiﬁcation loss such as CE, LDAM, and focal loss) and their mutual distribution-aware divergency losses, weighted by hyperparameter λ :
[Equation]
Since these loss terms are completely symmetrical with respect to each other, the n experts learned at Stage 1 are equally good and distinctive from each other.
Routing diversiﬁed experts .
To cut down the test-time computational cost that comes with multiple experts, we train a router at Stage 2 to deploy these (arbitrarily ordered) experts sequentially on an as-needed basis.
Assume that the ﬁrst k experts have been deployed for instance x . The router takes in the image feature and the logits of the k -th expert, and makes a binary decision y on on whether to deploy the k + 1 -th expert.
If the k -th expert wrongly classiﬁes x , but one of the rest n − k experts correctly classiﬁes x , ideally the router should switch on, i.e., output y on =1 , and otherwise y on =0 . We construct a simple binary CNN classiﬁer to learn such a router that can be applied for any k .
That is, all n − 1 routers for n experts are shared and trained as one. Speciﬁcally, we normalize the image feature f θ ( x ) (for training stability), reduce the feature dimension (to e.g. 16 in our experiments) by a fully connected layer W 1 , followed by ReLU and ﬂattening, concatenate with the top- s ranked logits of the k -th expert ψ θ k ( f θ ( x )) , project it to a scalar by W 2 , and ﬁnally apply Sigmoid function S ( x )
{+= 1 
+}
+ e − x to get a continuous activation value in [0,1]: [Equation]
activation: [Equation] The router has a negligible size and compute, where s ranges from 10 for CIFAR100 to 50 for iNaturalist (8,142 classes).
It is optimized with a weighted variant of binary CE loss:
[Equation]
where ω on controls the easiness to switch on the router.
We ﬁnd ω on = 100 to be a good trade-off between classiﬁcation accuracy and computational cost for all our experiments.
At the test time, we simply threshold the activation with 0.5:
If r ( x ) < 0 . 5 , the classiﬁer makes the ﬁnal decision with the current collective logits, otherwise it proceeds to the next expert.
Optional self-distillation .
While existing long-tail classiﬁers such as BBN Zhou et al. (2020) and
LFME Xiang et al. (2020) have a ﬁxed number of experts, our method could have an arbitrary number of experts to balance classiﬁcation accuracy and computation cost.
We can optionally apply self-distillation from a model with more (6 in our setting) experts to the same model with fewer experts for further performance gain (0.4% ∼ 0.8% for most experiments).
We choose knowledge distillation (Hinton et al., 2015) by default.
Implementation details and comparisons with various distillation algorithms such as CRD (Tian et al., 2019) are investigated in Appendix Section A.2.
E XPERIMENTS
We experiment on major long-tailed recognition benchmarks and various backbone networks.
CIFAR100-LT (Cao et al., 2019): CIFAR100 is sampled by class per an exponential decay across classes.
We choose imbalance factor 100 and ResNet-32 (He et al., 2016) backbone.
ImageNet-LT (Liu et al., 2019): Multiple backbone networks are experimented on ImageNetLT, including ResNet-10, ResNet-50 and ResNeXt-50 (Xie et al., 2017).
All backbone networks are trained with a batch size of 256 on 8 RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs.
See more details and results on other backbones in Appendix. 3.
iNaturalist 2018 (Van Horn et al., 2018):
It is a naturally imbalanced ﬁne-grained dataset with 8,142 categories.
We use ResNet-50 as the backbone and apply the same training recipe as for ImageNet-LT except batch size 512, as in (Kang et al., 2020).
CIFAR100-LT Results .
Table 1 shows that RIDE outperforms SOTA by a large margin on
CIFAR100-LT
The average computational cost is even about 10% less than baseline models with two experts as in BBN.
RIDE surpasses multi-expert methods, LFME (Xiang et al., 2020) and BBN (Zhou et al., 2020), by more than 5.3% and 6.5% respectively
We choose LDAM as the default end-to-end training method for simplicity, unless otherwise noted.
F o c a l l o s s
C E
L D A M c R T - n o r m
C
o s i n e
Mechanisms
[Figure] [Figure] [Figure] [Figure]
[Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure] [Figure] [Figure] [Figure]
[Table] [Table]
RIDE as a framework .
Fig.
3 shows that RIDE consistently beneﬁts from better loss functions and training processes.
By applying RIDE to different training mechanisms, either methods that are end-to-end (e.g. CE and LDAM) or require another stage of process (e.g. cRT and τ -norm), we observes consistent top-1 accuracy improvements.
Cosine classiﬁer is a baseline that we constructed in which we normalize the weights of the classiﬁer and apply re-sampling at the classiﬁer re-training stage, similar to cRT.
Since two-stage methods require an additional training stage, we use LDAM as our default choice.
ImageNet-LT Results .
Table 2 shows that RIDE outperforms SOTA, LWS and cRT, by more than 7.7% with ResNet-50.
ResNeXt-50 is based on group convolution (Xie et al., 2017), which divides all ﬁlters into several groups and aggregates information from multiple groups.
ResNeXtgenerally performs better than ResNet-50 on multiple tasks.
It provides 6.9% gain on ImageNet-LT.
iNaturalist 2018 Results .
Table 3 shows that RIDE outperforms current SOTA by 6.3%.
Surprisingly, RIDE obtains very similar results on many-shots, medium-shots and few-shots, ideal for long tailed recognition.
Current SOTA method BBN also uses multiple experts; however, it signiﬁcantly [Table] [Figure]
decreases the Comparing with SOTAs on iNaturalist and ImageNet-LT . As illustrated in Fig. [Figure]
our approach provides a comprehensive treatment to all the many-shot, medium-shot and few-shot classes, achieving substantial improvements to current state-of-the-art on all aspects.
Compared with cRT which reduces the performance on the many-shot classes, RIDE can achieves signiﬁcantly better performance on the few-shot classes without impairing the many-shot classes.
Similar observations can be obtained in the comparison with the state-of-the-art method BBN (Zhou et al., 2020) on iNaturalist.
Contribution of each component of RIDE.
RIDE is jointly trained with L D-Diversify and L Classify , we use LDAM for L Classify by default.
Table 4 shows that the architectural change from the original
ResNet-32 to the RIDE variant with 2 ∼ 4 experts contributes 2.7% ∼ 4.3% gain.
Applying the individual classiﬁcation loss instead of the collaborative loss brings 1.5% gain.
Adding the diversity loss further improves about 0.9%.
The computational cost is greatly reduced by adding the dynamic expert router.
Knowledge distillation from RIDE with 6 experts obtains another 0.6% gain.
All these components deliver 7.1% gain over baseline LDAM.
Impact of the number of experts.
Fig.
5 shows that whether in terms of relative or absolute gains, few-shots beneﬁt more with more experts. For example, the relative gain is 16% vs. 3.8% for few-shots and many-shots respectively.
No distillation is applied in this comparison. [Table] [Figure] [Figure]
For RIDE with 3 or 4 experts, more than half of many-shot instances only require one expert.
On the contrary, more than 76% samples of few-shot classes require opinions from additional experts.
The number of experts allocated to each split.
Fig.
6 shows that instances in few-shots need more experts whereas most instances in many-shots just need the ﬁrst expert.
That is, low conﬁdence in tail instances often requires the model to seek a second (or a third, ...) opinion.
S UMMARY
We take a dynamic view of training data and study long-tailed recognition with model bias and variance analysis.
Existing long-tail classiﬁers do not reduce head-tail model bias gap enough while increasing model variance across all the classes.
We propose a novel multi-expert model called
RIDE to reduce model biases and variances throughout.
It trains partially shared diverse distributionaware experts and routes an instance to additional experts when necessary, with computational costs comparable to a single expert.
RIDE outperforms SOTA by a large margin.
It is also a universal framework that works with various backbones and training schemes for consistent gains. Acknowledgments.
This work was supported, in part, by Berkeley Deep Drive, US Government fund through Etegent Technologies on Low-Shot Detection and Semi-supervised Detection, and
NTU NAP and A*STAR via Industry Alignment Fund: Industry Collaboration Projects Grant.
A A PPENDIX A. D ATASETS AND I MPLEMENTATIONS
We conduct experiments on three major long-tailed recognition benchmarks and different backbone networks to prove the effectiveness and universality of RIDE:
CIFAR100-LT (Krizhevsky, 2009; Cao et al., 2019):
The original version of CIFAR-100 contains 50,000 images on training set and 10,000 images on validation set with 100 categories.
The long-tailed version of CIFAR-100 follows an exponential decay in sample sizes across different categories.
We conduct experiment on CIFAR100-LT with an imbalance factor of 100,
i
e. the ratio between the most frequent class and the least frequent class.
To make fair comparison with previous works, we follow the training recipe of (Cao et al., 2019) on
CIFAR100-LT.
We train the ResNet-32 (He et al., 2016) backbone network by SGD optimizer with a momentum of 0.9.
CIFAR100-LT is trained for 200 epochs with standard data augmentations (He et al., 2016)
and a
batch size of 128 on one RTX 2080Ti
GPU.
The learning rate is initialized as
and decayed by 0.01 at epoch 120 and 160 respectively.
ImageNet-LT (Deng et al., 2009; Liu et al., 2019): ImageNet-LT is constructed by sampling a subset of ImageNet-2012 following the Pareto distribution with the power value α = 6 (Liu et al., 2019).
ImageNet-LT consists of 115.8k images from 1,000 categories, with the largest and smallest categories containing 1,280 and 5 images, respectively.
Multiple backbone networks are experimented on ImageNet-LT, including ResNet-10, ResNetand ResNeXt-50 (Xie et al., 2017).
All backbone networks are trained with a batch size of 256 on
RTX 2080Ti GPUs for 100 epochs using SGD with an initial learning rate of 0.1 decayed by 0.1 at 60 epochs and 80 epochs.
We utilize standard data augmentations as in (He et al., 2016)
iNaturalist (Van Horn et al., 2018):
The iNaturalist-2018 dataset is an imbalanced datasets with 437,513 training images from 8,142 classes with a balanced test set of 24,426 images.
We use ResNet-50 as the backbone network and apply the same training recipe as ImageNet-LT, except that we use a batch size of 512.
A. A DDITIONAL E XPERIMENTS
Ablation study on distillation methods.
Self-distillation step is optional but recommended if further improvements (0.4% ∼ 0.8% for most experiments) are desired.
We apply distillation from a more powerful model with more experts into a model with fewer experts.
A simple way to transfer knowledge is knowledge distillation (KD)
(Hinton et al., 2015), which applies KD loss ( L KD =
T 2 D KL ( (cid:126)l teacher /T,(cid:126)l expert i /T ) ) to match the distribution of logits of a teacher and a student.
We found that for teacher model with more experts using smaller distillation loss factor gives better performance.
We hypothesize that since we distill from the same teachers, giving large distillation factor prevents the branches from becoming as diversiﬁed as it is able to.
We also explored other distillation methods, such as CRD (Tian et al., 2019), PKT (Passalis & Tefas, 2018), and SP (Tung & Mori, 2019), and compared the differences in Table 5.
Although adding other methods along with
KD may boost performance, the difference is small.
Therefore, we opt for simplicity and use KD only unless otherwise noticed.
Detailed results for ImageNet-LT experiments .
We list details of our ResNet-50 experiments in
ImageNet-LT on Table 7.
With 2 experts, we are able to achieve about 7% gain in accuracy with computational cost about 10% less than baseline.
In contrast to previous methods that sacriﬁce many-shot accuracy to get few-shot accuracy, we improve on all three splits on ImageNet-LT.
From 3 experts to 4 experts, we keep the same many-shot accuracy while increasing the few-shot accuracy, indicating that we are using the additional computational power to improve on the hardest part of the data rather than uniformly applying to all samples.
We also list our ResNet-10 and ResNeXt-50 experiments on Table 6 and 8, respectively, to compare against other works evaluated on these backbones.
Our method also achieves lower computational cost and higher performance when compared to other methods.
Comparison with ensemble method.
Since our method requires the joint decision from several experts, which raw ensembles also do, we also compare against ensembles of LDAM in Fig.7 on [Table] [Figure] [Table]
[Figure] [Table] [Figure] [Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
LDAM) to 7 ensembles, and RIDE starts from 2 experts to 4 experts. Our method achieves higher accuracy with substantially less computational cost compared to ensemble method.
CIFAR100-LT.
In the ﬁgure, even our method with 4 experts has less computational cost than the minimum computational cost for the ensemble of 2 LDAM models.
This indicates that our model is much more efﬁcient and powerful in terms of computational cost and accuracy than ensemble on long-tailed datasets. [Figure]
t-SNE visualization .
We also provide the t-SNE visualization of embedding space on CIFAR100LT as in Fig. 8.
Compared with the baseline method LDAM, the feature embedding of RIDE is more compact for both the head and tail classes and better separated from the neighboring classes.
This greatly reduces the difﬁculty for the classiﬁer to distinguish the tail category.
What if we apply RIDE to balanced datasets?
We also conducted experiments on CIFAR to check if our method can achieve similar performance gains on balanced datasets.
However, we only obtained an improvement of about 1%, which is much smaller than the improvements observed on the CIFAR100-LT.
Compared with balanced datasets, long-tailed datasets can get more beneﬁts from RIDE.
[Table]
[Table] [Table]