Title: DECOUPLING REPRESENTATION AND CLASSIFIER FOR LONG-TAILED RECOGNITION

Abstract: The long-tail distribution of the visual world poses great challenges for deep learning based classification models on how to handle the class imbalance problem. Existing solutions usually involve class-balancing strategies, e.g. by loss re-weighting, data re-sampling, or transfer learning from head-to tail-classes, but most of them adhere to the scheme of jointly learning representations and classifiers. In this work, we decouple the learning procedure into representation learning and classification, and systematically explore how different balancing strategies affect them for long-tailed recognition. The findings are surprising: (1) data imbalance might not be an issue in learning high-quality representations; (2) with representations learned with the simplest instance-balanced (natural) sampling, it is also possible to achieve strong long-tailed recognition ability by adjusting only the classifier. We conduct extensive experiments and set new state-of-the-art performance on common long-tailed benchmarks like ImageNet-LT, Places-LT and iNaturalist, showing that it is possible to outperform carefully designed losses, sampling strategies, even complex modules with memory, by using a straightforward approach that decouples representation and classification. Our code is available at https://github.com/facebookresearch/classifier-balancing.

1. INTRODUCTION:

Visual recognition research has made rapid advances during the past years, driven primarily by the use of deep convolutional neural networks (CNNs) and large image datasets, most importantly the ImageNet Challenge (Russakovsky et al., 2015) . Such datasets are usually artificially balanced with respect to the number of instances for each object/class in the training set. Visual phenomena, however, follow a long-tailed distribution that many standard approaches fail to properly model, leading to a significant drop in accuracy. Motivated by this, a number of works have recently emerged that try to study long-tailed recognition, i.e., recognition in a setting where the number of instances in each class highly varies and follows a long-tailed distribution.

When learning with long-tailed data, a common challenge is that instance-rich (or head) classes dominate the training procedure. The learned classification model tends to perform better on these classes, while performance is significantly worse for instance-scarce (or tail) classes. To address this issue and to improve performance across all classes, one can re-sample the data or design specific loss functions that better facilitate learning with imbalanced data (Chawla et al., 2002; Cui et al., 2019; Cao et al., 2019) . Another direction is to enhance recognition performance of the tail classes by transferring knowledge from the head classes (Wang et al., 2017; 2018; Zhong et al., 2019; Liu et al., 2019) . Nevertheless, the common belief behind existing approaches is that designing proper sampling strategies, losses, or even more complex models, is useful for learning high-quality representations for long-tailed recognition.

Most aforementioned approaches thus learn the classifiers used for recognition jointly with the data representations. However, such a joint learning scheme makes it unclear how the long-tailed recognition ability is achieved-is it from learning a better representation or by handling the data imbalance better via shifting classifier decision boundaries? To answer this question, we take one step back and decouple long-tail recognition into representation learning and classification. For learning rep-resentations, the model is exposed to the training instances and trained through different sampling strategies or losses. For classification, upon the learned representations, the model recognizes the long-tailed classes through various classifiers. We evaluate the performance of various sampling and classifier training strategies for long-tailed recognition under both joint and decoupled learning schemes.

Specifically, we first train models to learn representations with different sampling strategies, including the standard instance-based sampling, class-balanced sampling and a mixture of them. Next, we study three different basic approaches to obtain a classifier with balanced decision boundaries, on top of the learned representations. They are 1) re-training the parametric linear classifier in a class-balancing manner (i.e., re-sampling); 2) non-parametric nearest class mean classifier, which classifies the data based on their closest class-specific mean representations from the training set; and 3) normalizing the classifier weights, which adjusts the weight magnitude directly to be more balanced, adding a temperature to modulate the normalization procedure.

We conduct extensive experiments to compare the aforementioned instantiations of the decoupled learning scheme with the conventional scheme that jointly trains the classifier and the representations. We also compare to recent, carefully designed and more complex models, including approaches using memory (e.g., OLTR (Liu et al., 2019) ) as well as more sophisticated losses (Cui et al., 2019) . From our extensive study across three long-tail datasets, ImageNet-LT, Places-LT and iNaturalist, we make the following intriguing observations:

• We find that decoupling representation learning and classification has surprising results that challenge common beliefs for long-tailed recognition: instance-balanced sampling learns the best and most generalizable representations.

• It is advantageous in long-tailed recognition to re-adjust the decision boundaries specified by the jointly learned classifier during representation learning: Our experiments show that this can either be achieved by retraining the classifier with class-balanced sampling or by a simple, yet effective, classifier weight normalization which has only a single hyperparameter controlling the "temperature" and which does not require additional training.

• By applying the decoupled learning scheme to standard networks (e.g., ResNeXt), we achieve significantly higher accuracy than well established state-of-the-art methods (different sampling strategies, new loss designs and other complex modules) on multiple longtailed recognition benchmark datasets, including ImageNet-LT, Places-LT, and iNaturalist.

2. RELATED WORK:

Long-tailed recognition has attracted increasing attention due to the prevalence of imbalanced data in real-world applications (Wang et al., 2017; Zhou et al., 2017; Mahajan et al., 2018; Zhong et al., 2019; Gupta et al., 2019) . Recent studies have mainly pursued the following three directions:

Data distribution re-balancing. Along this direction, researchers have proposed to re-sample the dataset to achieve a more balanced data distribution. These methods include over-sampling (Chawla et al., 2002; Han et al., 2005) for the minority classes (by adding copies of data), undersampling (Drummond et al., 2003) for the majority classes (by removing data), and class-balanced sampling (Shen et al., 2016; Mahajan et al., 2018) based on the number of samples for each class.

Class-balanced Losses. Various methods are proposed to assign different losses to different training samples for each class. The loss can vary at class-level for matching a given data distribution and improving the generalization of tail classes (Cui et al., 2019; Khan et al., 2017; Cao et al., 2019; Khan et al., 2019; Huang et al., 2019) . A more fine-grained control of the loss can also be achieved at sample level, e.g. with Focal loss (Lin et al., 2017) , Meta-Weight-Net (Shu et al., 2019) , re-weighted training (Ren et al., 2018) , or based on Bayesian uncertainty (Khan et al., 2019) . Recently, Hayat et al. (2019) proposed to balance the classification regions of head and tail classes using an affinity measure to enforce cluster centers of classes to be uniformly spaced and equidistant.

Transfer learning from head-to tail classes. Transfer-learning based methods address the issue of imbalanced training data by transferring features learned from head classes with abundant training instances to under-represented tail classes. Recent work includes transferring the intra-class variance (Yin et al., 2019) and transferring semantic deep features (Liu et al., 2019) . However it is usually a non-trivial task to design specific modules (e.g. external memory) for feature transfer.

A benchmark for low-shot recognition was proposed by Hariharan & Girshick (2017) and consists of a representation learning phase without access to the low-shot classes and a subsequent low-shot learning phase. In contrast, the setup for long-tail recognition assumes access to both head and tail classes and a more continuous decrease in in class labels. Recently, Liu et al. (2019) and Cao et al. (2019) adopt re-balancing schedules that learn representation and classifier jointly within a two-stage training scheme. OLTR (Liu et al., 2019) uses instance-balanced sampling to first learn representations that are fine-tuned in a second stage with class-balanced sampling together with a memory module. LDAM (Cao et al., 2019) introduces a label-distribution-aware margin loss that expands the decision boundaries of few-shot classes. In Section 5 we exhaustively compare to OLTR and LDAM, since they report state-of-the-art results for the ImageNet-LT, Places-LT and iNaturalist datasets. In our work, we argue for decoupling representation and classification. We demonstrate that in a long-tailed scenario, this separation allows straightforward approaches to achieve high recognition performance, without the need for designing sampling strategies, balance-aware losses or adding memory modules.

3. LEARNING REPRESENTATIONS FOR LONG-TAILED RECOGNITION:

For long-tailed recognition, the training set follows a long-tailed distribution over the classes. As we have less data about infrequent classes during training, the models trained using imbalanced datasets tend to exhibit under-fitting on the few-shot classes. But in practice we are interested in obtaining the model capable of recognizing all classes well. Various re-sampling strategies (Chawla et al., 2002; Shen et al., 2016; Cao et al., 2019) , loss reweighting and margin regularization over few-shot classes are thus proposed. However, it remains unclear how they achieve performance improvement, if any, for long-tailed recognition. Here we systematically investigate their effectiveness by disentangling representation learning from classifier learning, in order to identify what indeed matters for longtailed recognition.

Notation. We define the notation used through the paper. Let X = {x i , y i }, i ∈ {1, . . . , n} be a training set, where y i is the label for data point x i . Let n j denote the number of training sample for class j, and let n = C j=1 n j be the total number of training samples. Without loss of generality, we assume that the classes are sorted by cardinality in decreasing order, i.e., if i < j, then n i ≥ n j . Additionally, since we are in a long-tail setting, n 1 n C . Finally, we denote with f (x; θ) = z the representation for x, where f (x; θ) is implemented by a deep CNN model with parameter θ. The final class prediction ỹ is given by a classifier function g, such that ỹ = arg max g(z). For the common case, g is a linear classifier, i.e., g(z) = W z + b, where W denotes the classifier weight matrix, and b is the bias. We present other instantiations of g in Section 4.

Sampling strategies. In this section we present a number of sampling strategies that aim at rebalancing the data distribution for representation and classifier learning. For most sampling strategies presented below, the probability p j of sampling a data point from class j is given by:

EQUATION

where q ∈ [0, 1] and C is the number of training classes. Different sampling strategies arise for different values of q and below we present strategies that correspond to q = 1, q = 0, and q = 1/2.

Instance-balanced sampling. This is the most common way of sampling data, where each training example has equal probability of being selected. For instance-balanced sampling, the probability p IB j is given by Equation 1 with q = 1, i.e., a data point from class j will be sampled proportionally to the cardinality n j of the class in the training set.

Class-balanced sampling. For imbalanced datasets, instance-balanced sampling has been shown to be sub-optimal (Huang et al., 2016; Wang et al., 2017) as the model under-fits for few-shot classes leading to lower accuracy, especially for balanced test sets. Class-balanced sampling has been used to alleviate this discrepancy, as, in this case, each class has an equal probability of being selected. The probability p CB j is given by Eq. ( 1) with q = 0, i.e., p CB j = 1/C. One can see this as a two-stage sampling strategy, where first a class is selected uniformly from the set of classes, and then an instance from that class is subsequently uniformly sampled.

Square-root sampling. A number of variants of the previous sampling strategies have been explored.

A commonly used variant is square-root sampling (Mikolov et al., 2013; Mahajan et al., 2018) , where q is set to 1/2 in Eq. ( 1) above.

Progressively-balanced sampling. Recent approaches (Cui et al., 2018; Cao et al., 2019) utilized mixed ways of sampling, i.e., combinations of the sampling strategies presented above. In practice this involves first using instance-balanced sampling for a number of epochs, and then class-balanced sampling for the last epochs. These mixed sampling approaches require setting the number of epochs before switching the sampling strategy as an explicit hyper-parameter. Here, we experiment with a softer version, progressively-balanced sampling, that progressively "interpolates" between instancebalanced and class-balanced sampling as learning progresses. Its sampling probability/weight p j for class j is now a function of the epoch t,

EQUATION

)

where T is the total number of epochs. Figure 3 in appendix depicts the sampling probabilities.

Loss re-weighting strategies. Loss re-weighting functions for imbalanced data have been extensively studied, and it is beyond the scope of this paper to examine all related approaches. What is more, we found that some of the most recent approaches reporting high performance were hard to train and reproduce and in many cases require extensive, dataset-specific hyper-parameter tuning. In Section A of the Appendix we summarize the latest, best performing methods from this area. In Section 5 we show that, without bells and whistles, baseline methods equipped with a properly balanced classifier can perform equally well, if not better, than the latest loss re-weighting approaches.

4. CLASSIFICATION FOR LONG-TAILED RECOGNITION:

When learning a classification model on balanced datasets, the classifier weights W and b are usually trained jointly with the model parameters θ for extracting the representation f (x i ; θ) by minimizing the cross-entropy loss between the ground truth y i and prediction W f (x i ; θ)+b. This is also a typical baseline for long-tailed recognition. Though various approaches of re-sampling, reweighting and transferring representations from head to tail classes have been proposed, the general scheme remains the same: classifiers are either learned jointly with the representations either endto-end, or via a two-stage approach where the classifier and the representation are jointly fine-tuned with variants of class-balanced sampling as a second stage (Cui et al., 2018; Cao et al., 2019) .

In this section, we consider decoupling the representation from the classification in long-tailed recognition. We present ways of learning classifiers aiming at rectifying the decision boundaries on head-and tail-classes via fine-tuning with different sampling strategies or other non-parametric ways such as nearest class mean classifiers. We also consider an approach to rebalance the classifier weights that exhibits a high long-tailed recognition accuracy without any additional retraining.

Classifier Re-training (cRT).:

A straightforward approach is to re-train the classifier with classbalanced sampling. That is, keeping the representations fixed, we randomly re-initialize and optimize the classifier weights W and b for a small number of epochs using class-balanced sampling.

A similar methodology was also recently used in (Zhang et al., 2019) for action recognition on a long-tail video dataset.

Nearest Class Mean classifier (NCM). Another commonly used approach is to first compute the mean feature representation for each class on the training set and then perform nearest neighbor search either using cosine similarity or the Euclidean distance computed on L 2 normalized mean features (Snell et al., 2017; Guerriero et al., 2018; Rebuffi et al., 2017) . Despite its simplicity, this is a strong baseline (cf . the experimental evaluation in Section 5); the cosine similarity alleviates the weight imbalance problem via its inherent normalization (see also Figure 4 ).

τ -normalized classifier (τ -normalized). We investigate an efficient approach to re-balance the decision boundaries of classifiers, inspired by an empirical observation: after joint training with instance-balanced sampling, the norms of the weights w j are correlated with the cardinality of the classes n j , while, after fine-tuning the classifiers using class-balanced sampling, the norms of the classifier weights tend to be more similar (cf . Figure 2 -left).

Inspired by the above observations, we consider rectifying imbalance of decision boundaries by adjusting the classifier weight norms directly through the following τ -normalization procedure. Formally, let W = {w j } ∈ R d×C , where w j ∈ R d are the classifier weights corresponding to class j.

We scale the weights of W to get W = { w j } by:

EQUATION

)

where τ is a hyper-parameter controlling the "temperature" of the normalization, and || • || denotes the L 2 norm. When τ = 1, it reduces to standard L 2 -normalization. When τ = 0, no scaling is imposed. We empirically choose τ ∈ (0, 1) such that the weights can be rectified smoothly. After τ -normalization, the classification logits are given by ŷ = W f (x; θ). Note that we discard the bias term b here due to its negligible effect on the logits and final predictions.

Learnable weight scaling (LWS). Another way of interpreting τ -normalization would be to think of it as a re-scaling of the magnitude for each classifier w i keeping the direction unchanged. This could be written as

EQUATION

)

Although for τ -normalized in general τ is chosen through cross-validation, we further investigate learning f i on the training set, using class-balanced sampling (like cRT). In this case, we keep both the representations and classifier weights fixed and only learn the scaling factors f i . We denote this variant as Learnable Weight Scaling (LWS) in our experiments.

5. EXPERIMENTS:



5.1. EXPERIMENTAL SETUP:

Datasets. We perform extensive experiments on three large-scale long-tailed datasets, including Places-LT (Liu et al., 2019) , ImageNet-LT (Liu et al., 2019 ), and iNaturalist 2018 (iNatrualist, 2018) . Places-LT and ImageNet-LT are artificially truncated from their balanced versions (Places-2 (Zhou et al., 2017) and ImageNet-2012 (Deng et al., 2009) ) so that the labels of the training set follow a long-tailed distribution. Places-LT contains images from 365 categories and the number of images per class ranges from 4980 to 5. ImageNet-LT has 1000 classes and the number of images per class ranges from 1280 to 5 images. iNaturalist 2018 is a real-world, naturally long-tailed dataset, consisting of samples from 8,142 species.

Evaluation Protocol. After training on the long-tailed datasets, we evaluate the models on the corresponding balanced test/validation datasets and report the commonly used top-1 accuracy over all classes, denoted as All. To better examine performance variations across classes with different number of examples seen during training, we follow Liu et al. ( 2019) and further report accuracy on three splits of the set of classes: Many-shot (more than 100 images), Medium-shot (20∼100 images) and Few-shot (less than 20 images). Accuracy is reported as a percentage.

Implementation. We use the PyTorch (Paszke et al., 2017) framework for all experiments 1 . For Places-LT, we choose ResNet-152 as the backbone network and pretrain it on the full ImageNet-2012 dataset, following Liu et al. (2019) . On ImageNet-LT, we report results with ResNet-{10,50,101,152} (He et al., 2016) and ResNeXt-{50,101,152}(32x4d) (Xie et al., 2017) but mainly use ResNeXt-50 for analysis. Similarly, ResNet-{50,101,152} is also used for iNaturalist 2018. For all experiements, if not specified, we use SGD optimizer with momentum 0.9, batch size 512, cosine learning rate schedule (Loshchilov & Hutter, 2016) gradually decaying from 0.2 to 0 and image resolution 224 × 224. In the first representation learning stage, the backbone network is usually trained for 90 epochs. In the second stage, i.e., for retraining a classifier (cRT), we restart the learning rate and train it for 10 epochs while keeping the backbone network fixed. Colored markers denote the sampling strategies used to learn the representations.

5.2. SAMPLING STRATEGIES AND DECOUPLED LEARNING:

In Figure 1 , we compare different sampling strategies for the conventional joint training scheme to a number of variations of the decoupled learning scheme on the ImageNet-LT dataset. For the joint training scheme (Joint), the linear classifier and backbone for representation learning are jointly trained for 90 epochs using a standard cross-entropy loss and different sampling strategies, i.e., Instance-balanced, Class-balanced, Square-root, and Progressively-balanced. For the decoupled learning schemes, we present results when learning the classifier in all the ways presented in Section 4, i.e., re-initialize and re-train (cRT), Nearest Class Mean (NCM) as well as τ -normalized classifier. Below, we discuss a number of key observations.

Sampling matters when training jointly. From the Joint results in Figure 1 across sampling methods and splits, we see consistent gains in performance when using better sampling strategies (see also Table 5 ). The trends are consistent for the overall performance as well as the medium-and fewshot classes, with progressively-balanced sampling giving the best results. As expected, instancebalanced sampling gives the highest performance for the many-shot classes. This is well expected since the resulted model is highly skewed to the many-shot classes. Our results for different sampling strategies on joint training validate related works that try to design better data sampling methods. Joint or decoupled learning? For most cases presented in Figure 1 , performance using decoupled methods is significantly better in terms of overall performance, as well as all splits apart from the many-shot case. Even the nonparametric NCM approach is highly competitive in most cases, while cRT and τ -normalized outperform the jointly trained baseline by a large margin (i.e. 5% higher than the jointly learned classifier), and even achieving 2% higher overall accuracy than the best jointly trained setup with progressively-balanced sampling. The gains are even higher for mediumand few-shot classes at 5% and 11%, respectively.

To further justify our claim that it is beneficial to decouple representation and classifier, we experiment with fine-tuning the backbone network (ResNeXt-50) jointly with the linear classifier. In Table 1 , we present results when fine-tuning the whole network with standard or smaller (0.1×) learning rate, fine-tuning only the last block in the backbone, or only retraining the linear classifier and fixing the representation. Fine-tuning the whole network yields the worst performance (46.3% and 48.8%), while keeping the representation frozen performs best (49.5%). The trend is even more evident for the medium/few-shot classes. This result suggests that decoupling representation and classifier is desirable for long-tailed recognition. Instance-balanced sampling gives the most generalizable representations. Among all decoupled methods, when it comes to overall performance and all splits apart from the many-shot classes, we see that Instance-balanced sampling gives the best results. This is particularly interesting, as it implies that data imbalance might not be an issue learning high-quality representations.

Class Index:



Many Medium Few:



Weight norm visualization:



5.3. HOW TO BALANCE YOUR CLASSIFIER?:

Among the ways of balancing the classifier explored in Figure 1 , the non-parametric NCM seems to perform slightly worse than cRT and τ -normalization. Those two methods are consistently better in most cases apart from the few-shot case, where NCM performs comparably. The biggest drop for the NCM approach comes from the many-shot case. It is yet still somehow surprising that both the NCM and τ -normalized cases give competitive performance even though they are free of additional training and involve no additional sampling procedure. As discussed in Section 4, their strong performance may stem from their ability to adaptively adjust the decision boundaries for many-, medium-and few-shot classes (see also Figure 4 ).

In Figure 2 (left) we empirically show the L 2 norms of the weight vectors for all classifiers, as well as the training data distribution sorted in a descending manner with respect to the number of instances in the training set. We can observe that the weight norm of the joint classifier (blue line) is positively correlated with the number of training instances of the corresponding class. More-shot classes tend to learn a classifier with larger magnitudes. As illustrated in Figure 4 , this yields a wider classification boundary in feature space, allowing the classifier to have much higher accuracy on data-rich classes, but hurting data-scarce classes. τ -normalized classifiers (gold line) alleviate this issue to some extent by providing more balanced classifier weight magnitudes. For retraining (green line), the weights are almost balanced except that few-shot classes have slightly larger classifier weight norms. Note that the NCM approach would give a horizontal line in the figure as the mean vectors are L 2 -normalized before nearest neighbor search.

In Figure 2 (right), we further investigate how the performance changes as the temperature parameter τ for the τ -normalized classifier varies. The figure shows that as τ increases from 0, many-shot accuracy decays dramatically while few-shot accuracy increases dramatically.

5.4. COMPARISON WITH THE STATE-OF-THE-ART ON LONG-TAILED DATASETS:

In this section, we compare the performance of the decoupled schemes to other recent works that report state-of-the-art results on on three common long-tailed benchmarks: ImageNet-LT, iNaturalist and Places-LT. Results are presented in Tables 2, 3 and 4, respectively. (Lin et al., 2017) 30.5 --Range Loss † (Zhang et al., 2017) 30.7 --Lifted Loss † (Oh Song et al., 2016) 30.8 --OLTR † (Liu et al., 2019) 35 Liu et al., 2019) , we found that using bigger backbone architectures increases performance significantly on this dataset. We therefore present results for three backbones: ResNet-10, ResNeXt-50 and the larger ResNeXt-152. For the state-of-the-art OLTR method of Liu et al. (2019) we adopt results reported in the paper, as well as results we reproduced using the authors' opensourced codebase2 with two training settings: the one suggested in the codebase and the one using our training setting for the representation learning. From the table we see that the non-parametric decoupled NCM method performs on par with the state-of-the-art for most architectures. We also see that when re-balancing the classifier properly, either by re-training or τ -normalizing, we get results that, without bells and whistles outperform the current state-of-the-art for all backbone architectures. We further experimented with adding the memory mechanism of Liu et al. (2019) on top of our decoupled cRT setup, but the memory mechanism didn't seem to further boost performance (see Appendix B.4).

iNaturalist 2018. We further evaluate our decoupled methods on the iNaturalist 2018 dataset.

We present results after 90 and 200 epochs, as we found that 90 epochs were not enough for the representation learning stage to converge; this is different from Cao et al. (2019) where they train for 90 epochs. From Table 3 we see that results are consistent with the ImageNet-LT case: re-balancing the classifier gives results that outperform CB-Focal (Cui et al., 2019) . Our performance, when training only for 90 epochs, is slightly lower than the very recently proposed LDAM+DRW (Cao et al., 2019) (Lin et al., 2017) , Range Loss (Zhang et al., 2017) , FSLwF (Gidaris & Komodakis, 2018) and OLTR (Liu et al., 2019) . Once again, the τ -normalized classifier give the top performance, with impressive gains for the medium-and few-shot classes. 

6. CONCLUSIONS:

In this work, we explore a number of learning schemes for long-tailed recognition and compare jointly learning the representation and classifier to a number of straightforward decoupled methods.

Through an extensive study we find that although sampling strategies matter when jointly learning representation and classifiers, instance-balanced sampling gives more generalizable representations that can achieve state-of-the-art performance after properly re-balancing the classifiers and without need of carefully designed losses or memory units. We set new state-of-the-art performance for three long-tailed benchmarks and believe that our findings not only contribute to a deeper understanding of the long-tailed recognition task, but can offer inspiration for future work. 

w i w j C i C j C i C j ⌧ ! 0 w i w j C i C j ⌧ ! 1 Cosine m i m j m k L 2 m j m i

Figure 4 : Illustrations on different classifiers and their corresponding decision boundaries, where w i and w j denote the classification weight for class i and j respectively, C i is the classification cone belongs to class i in the feature space, m i is the feature mean for class i. From left to right: τ -normalized classifiers with τ → 0: the classifier with larger weights have wider decision boundaries; τ -normalized classifiers with τ → 1: the decision boundaries are more balanced for different classes; NCM with cosine-similarity whose decision boundary is independent of the classifier weights; NCM with Euclidean-similarity whose decision boundaries partition the feature space into Voronoi cells.

B.3 CLASSIFIER LEARNING COMPARISON TABLE:

Table 6 presents some comparative analysis for the four different ways of learning the classifier that are presented in Section 4.

B.4 VARYING THE BACKBONE ARCHITECTURE SIZE:

ImageNet-LT. In Figure 5 we compare the performance of different backbone architecture sizes (model capacity) under different methods, including of different methods 1) OLTR (Liu et al., 2019) using the authors' codebase settings (OLTR*); 2) OLTR using the representation learning stage detailed in Section 5 (OLTR**); 3) cRT with the memory module from Liu et al. (2019) while training the classifier; 4) cRT; and 5) τ -normalized. we see that a) the authors' implementation of OLTR over-fits for larger models, b) overfitting can be alleviated with our training setup (different training and LR schedules) c) adding the memory unit when re-training the classifier doesn't increase performance. Additional results of Table 2 are given in Table 7 .

iNaturalist 2018. In Table 8 we present an extended version of the results of Table 3 . We show results per split as well as results with a ResNet-101 backbone. As we see from the table and mentioned in Section 5, training only for 90 epochs gives sub-optimal representations, while both large models and longer training result in much higher accuracy on this challenging, large-scale task. What is even more interesting, we see performance across the many-, medium-and few-shot splits being approximately equal after re-balancing the classifier, with only a small advantage for the many-shot classes. 

:

We will open-source our codebase and models.

https://github.com/zhmiao/OpenLongTailRecognition-OLTR

Figures and Tables:

Figure 1: The performance of different classifiers for each split on ImageNet-LT with ResNeXt-50. Colored markers denote the sampling strategies used to learn the representations.

Figure 2: Left: Classifier weight norms for ImageNet-LT validation set when classes are sorted by descending values of n j . Blue line: classifier weights learned with instance-balanced sampling. Green line: weights after fine-tuning with class-balanced sampling. Gold line: after τ normalization. Brown line: weights by learnable weight scaling. Right: Accuracy with different values of the normalization parameter τ .

Joint NCM cRT τ -normalized LWS Decoupled from repr. No extra training No extra hyper-parameters PerformanceTable 6: Comparative analysis for different ways of learning the classifier for long-tail recognition.



Table content: <table><tr><td colspan="5">: Retraining/finetuning different parts of</td></tr><tr><td colspan="5">a ResNeXt-50 model on ImageNet-LT. B: back-</td></tr><tr><td colspan="3">bone; C: classifier; LB: last block.</td><td/></tr><tr><td>Re-train</td><td colspan="3">Many Medium Few</td><td>All</td></tr><tr><td>B+C</td><td>55.4</td><td>45.3</td><td colspan="2">24.5 46.3</td></tr><tr><td>B+C(0.1×lr)</td><td>61.9</td><td>45.6</td><td colspan="2">22.8 48.8</td></tr><tr><td>LB+C</td><td>61.4</td><td>45.8</td><td colspan="2">24.5 48.9</td></tr><tr><td>C</td><td>61.5</td><td>46.2</td><td colspan="2">27.0 49.5</td></tr></table>

Long-tail recognition accuracy on ImageNet-LT for different backbone architectures. † denotes results directly copied fromLiu et al. (2019). * denotes results reproduced with the authors' code. ** denotes OLTR with our representation learning stage.

Table content: <table><tr><td>Method</td><td colspan="3">ResNet-10 ResNeXt-50 ResNeXt-152</td></tr><tr><td>FSLwF † (Gidaris &amp; Komodakis, 2018)</td><td>28.4</td><td>-</td><td>-</td></tr><tr><td>Focal Loss †</td><td/><td/><td/></tr></table>

Table 2 presents results for ImageNet-LT. Although related works present results with ResNet-10 (

Table content: <table><tr><td/><td>.6</td><td>-</td><td>-</td></tr><tr><td>OLTR*</td><td>34.1</td><td>37.7</td><td>24.8</td></tr><tr><td>OLTR**</td><td>37.3</td><td>46.3</td><td>50.3</td></tr><tr><td>Joint</td><td>34.8</td><td>44.4</td><td>47.8</td></tr><tr><td>NCM</td><td>35.5</td><td>47.3</td><td>51.3</td></tr><tr><td>cRT</td><td>41.8</td><td>49.5</td><td>52.4</td></tr><tr><td>τ -normalized</td><td>40.6</td><td>49.4</td><td>52.8</td></tr><tr><td>LWS</td><td>41.4</td><td>49.9</td><td>53.3</td></tr><tr><td>ImageNet-LT.</td><td/><td/><td/></tr></table>

. However, with 200 training epochs and classifier normalization, we achieve a new state-of-the-art of 69.3 with ResNet-50 that can be further improved to 72.5 for ResNet-152. It is further worth noting that we cannot reproduce the numbers reported inCao et al. (2019). We find that the τ -normalized classifier performs best and gives a new state-of-the-art for the dataset, while surprisingly achieving similar accuracy (69%/72% for ResNet-50/ResNet-152) across all many-, medium-and few-shot class splits, a highly desired result for long-tailed recognition. Complete results, i.e., for all splits and more backbone architectures can be found in Table8of the Appendix.Places-LT.For Places-LT we follow the protocol ofLiu et al. (2019) and start from a ResNet-152 backbone pre-trained on the full ImageNet dataset. Similar toLiu et al. (2019), we then fine-tune the backbone with Instance-balanced sampling for representation learning. Classification follows with fixed representations for our decoupled methods. As we see in Table4, all three decoupled methods outperform the state-of-the-art approaches, including Lifted Loss (OhSong et al., 2016), Focal Loss

Table content: <table/>

Overall accuracy on iNaturalist 2018. Rows with † denote results directly copied fromCao et al. (2019). We present results when training for 90/200 epochs.

Table content: <table><tr><td>Method</td><td colspan="2">ResNet-50 ResNet-152</td></tr><tr><td>CB-Focal †</td><td>61.1</td><td>-</td></tr><tr><td>LDAM †</td><td>64.6</td><td>-</td></tr><tr><td>LDAM+DRW †</td><td>68.0</td><td>-</td></tr><tr><td>Joint</td><td>61.7/65.8</td><td>65.0/69.0</td></tr><tr><td>NCM</td><td>58.2/63.1</td><td>61.9/67.3</td></tr><tr><td>cRT</td><td>65.2/67.6</td><td>68.5/71.2</td></tr><tr><td>τ -normalized</td><td>65.6/69.3</td><td>68.8/72.5</td></tr><tr><td>LWS</td><td>65.9/69.5</td><td>69.1/72.1</td></tr></table>

Results on Places-LT, starting from an ImageNet pre-trained ResNet152. † denotes results directly copied fromLiu et al. (2019).

Table content: <table><tr><td>Method</td><td colspan="3">Many Medium Few</td><td>All</td></tr><tr><td>Lifted Loss †</td><td>41.1</td><td>35.4</td><td colspan="2">24.0 35.2</td></tr><tr><td>Focal Loss †</td><td>41.1</td><td>34.8</td><td colspan="2">22.4 34.6</td></tr><tr><td>Range Loss †</td><td>41.1</td><td>35.4</td><td colspan="2">23.2 35.1</td></tr><tr><td>FSLwF †</td><td>43.9</td><td>29.9</td><td colspan="2">29.5 34.9</td></tr><tr><td>OLTR †</td><td>44.7</td><td>37.0</td><td colspan="2">25.3 35.9</td></tr><tr><td>Joint</td><td>45.7</td><td>27.3</td><td>8.2</td><td>30.2</td></tr><tr><td>NCM</td><td>40.4</td><td>37.1</td><td colspan="2">27.3 36.4</td></tr><tr><td>cRT</td><td>42.0</td><td>37.6</td><td colspan="2">24.9 36.7</td></tr><tr><td>τ -normalized</td><td>37.8</td><td>40.7</td><td colspan="2">31.8 37.9</td></tr><tr><td>LWS</td><td>40.6</td><td>39.1</td><td colspan="2">28.6 37.6</td></tr></table>

Accuracy on ImageNet-LT when jointly learning the representation and classifier using different sampling strategies. Results in this Table are a subset of the results presented in Figure1.

Table content: <table><tr><td>Sampling</td><td colspan="3">Many Medium Few</td><td>All</td></tr><tr><td>Instance-balanced</td><td>65.9</td><td>37.5</td><td>7.7</td><td>44.4</td></tr><tr><td>Class-balanced</td><td>61.8</td><td>40.1</td><td colspan="2">15.5 45.1</td></tr><tr><td>Square-root</td><td>64.3</td><td>41.2</td><td colspan="2">17.0 46.8</td></tr><tr><td>Progressively-balanced</td><td>61.9</td><td>43.2</td><td colspan="2">19.4 47.2</td></tr></table>

Peer review (iclr2020):
This paper proposes to tackle long-tailed classification by treating separately the representation learning and the creation of a classifier for test time. They evaluate their method on several standard long-tailed classification datasets like ImageNet-LT or Places-LT. Pros: * Very well presented and clear * Thorough experiments with baselines and comparisons with competitors * Novel and efficient approach of redesigning the classifier as a post-processing step after the representation training Cons: * I did not find any single value of the *temperature* coefficient that you use for the different datasets! According to Fig 2, it should be around 0.7 for ImageNet-LT but you should clearly specify the used values for all the datasets. For reproducibility. It is also important to know it as it has an impact on how useful is this approach in practice. Because if the coefficients are very different for all the datasets, then the method requires a validation set to find this hyperparameter. * As middle point between NCM and cRT, you could also train a cosine classifier as done in the paper that you cite *Dynamic few-shot visual learning without forgetting* by Gidaris et al. There is pytorch code for it online. I am leaning towards acceptance as the method is clear, easy to implement, well studied through the experiments and has good results on standard benchmarks. The paper also provides interesting insights about long-tailed recognition in general like the effect of the different samplings with the proposed method.