\section{Introduction}



Due to the rapid development of deep convolutional neural networks (CNN)~\cite{simonyan2014very,he2016deep}, substantial progress is achieved in image recognition. 
However, they usually assume that the training and testing data is balanced. 
In practice, training or testing data appears to be long-tailed, e.g., there exist few samples for rare diseases in medical diagnosis~\cite{zhang2020exploring,zhang2021cross,zhao2021deep,zhao2021contralaterally,pan2022computer,zhang2021automatic} or endangered animals in species classification~\cite{zhang2022generalized,zhang2022onfocus,cheng2022compound}. 
As mentioned by~\cite{zhang2021weakly}, the case becomes even worse in weakly and semi-supervised learning scenarios~\cite{zhang2018spftn,zhang2019leveraging,zhang2020weakly,zhao2021weakly,huang2021scribble,pan2022learning,zhao2022cross,wang2022double,zhang2022generalized}.
The conventional training process of CNNs is dominated by frequent classes while rare classes are neglected. 
A large number of methods focus on rebalancing the training data through biasing the training process towards rare classes~\cite{cao2019learning,hong2021disentangling}.
However, they usually assume the testing data is balanced, while the distribution of real testing data is unknown and arbitrary. The performance of existing algorithms for learning with long-tailed distribution (LLTD) remains to be validated under such circumstance. 
This paper revisits existing evaluation strategies for long-tailed image classification and provides a new strategy to evaluate LLTD algorithms on testing data with unknown distribution.

\label{sec:intro}
\begin{figure}[t]
    \centering
    \includegraphics[width=1.0\linewidth]{pics/adapt.pdf
    \caption{In real-world tasks for learning with long-tailed distribution, the distribution of testing data is unknown and may be different from that of training data.}
    \label{fig:motivation}
\end{figure}

\begin{table*}[t]
    \fontsize{7.5}{9} \selectfont
    \centering
    \caption{Evaluation strategies for long-tailed image classification, including: 1) testing algorithms on balanced subset~\cite{zhou2020bbn,park2021influence}; 2) testing algorithms on subsets having uniform distribution and forward/backward-trend distribution~\cite{zhang2021test}; 3) testing algorithms on a series of subsets with dynamic evolving distributions. 
    \setlength{\tabcolsep}{1mm}{
    \begin{tabular}{r|l|l|r}
    \toprule
    \toprule
    \multicolumn{1}{l|}{\textbf{Test Data}} & \multicolumn{1}{l}{\textbf{Metrics}} & \textbf{Descriptions} & \multicolumn{1}{l}{\textbf{Evaluation Properties}} \\
    \midrule
    \midrule
          & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{all}$ & \cellcolor[rgb]{ .949,  .949,  .949}Accuracy of all classes & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}1. Only reflect the classification performance under a} \\
    \multicolumn{1}{l|}{Balanced} & ACC$_{many}$ & Accuracy of many-shot classes & \multicolumn{1}{l}{specific testing distribution.} \\
    \multicolumn{1}{l|}{Distribution} & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{mid}$ & \cellcolor[rgb]{ .949,  .949,  .949}Accuracy of medium-shot classes & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}2. Not able to reflect the stability and upper/lower} \\
          & ACC$_{few}$ & Accuracy of few-shot classes & \multicolumn{1}{l}{bound of algorithms on real-world testing data.} \\
    \midrule
    \midrule
    \multicolumn{1}{l|}{Multiple} & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{forw}$ & \cellcolor[rgb]{ .949,  .949,  .949}Accuracy under forward-trend test distribution & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}1. Reflect the classification performance under several} \\
    \multicolumn{1}{l|}{Independent} & ACC$_{uni}$ & Accuracy under uniform test distribution & \multicolumn{1}{l}{dependent imbalanced testing distributions.} \\
    \multicolumn{1}{l|}{Distributions} & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{back}$ & \cellcolor[rgb]{ .949,  .949,  .949}Accuracy under backward-trend test distribution & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}2. Coarsely reflect stability and upper/lower bound.} \\
    \midrule
    \midrule
          & AUC   & Area under accuracy curve &  \\
    \multicolumn{1}{l|}{Dynamic} & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{avg}$ & \cellcolor[rgb]{ .949,  .949,  .949}Average accuracy & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}1. Reflect the classification performance under real} \\
    \multicolumn{1}{l|}{Evolving} & ACC$_{std}$ & Standard deviation of accuracy & \multicolumn{1}{l}{testing data more comprehensively.} \\
    \multicolumn{1}{l|}{Distributions} & \cellcolor[rgb]{ .949,  .949,  .949}ACC$_{max}$ & \cellcolor[rgb]{ .949,  .949,  .949}Maximum accuracy & \multicolumn{1}{l}{\cellcolor[rgb]{ .949,  .949,  .949}2. Evaluate stability and upper/lower bound more finely.} \\
          & ACC$_{min}$ & Minimum accuracy &  \\
          & DR    & Drop ratio of accuracy &  \\
    \bottomrule
    \bottomrule
    \end{tabular}%
    }
   
    
    \label{tab:comp-eval}
\end{table*}

Recently, learning models with long-tailed training data attracts lots of research interest. 
Existing methods concentrate on different procedures including data preparation, feature representation learning, objective function design, and class prediction to tackle this task.
According to the focused procedures, they can be categorized into four types, i.e., data balancing~\cite{chawla2002smote,drummond2003c4}, feature balancing~\cite{cui2021parametric}, loss balancing~\cite{lin2017focal,park2021influence,ren2020balanced}, and prediction balancing~\cite{wang2020long,zhang2021test,li2022trustworthy}.
Most of them train models with imbalanced subsets of existing datasets, such as CIFAR-10/100~\cite{krizhevsky2009learning}, ImageNetLT~\cite{liu2019large}, and iNaturalist~\cite{van2018inaturalist}. Then, they evaluate the classification performance on a balanced testing set with accuracy values of all classes and partial classes (e.g., many/middle/few-shot classes). 
This evaluation process differs from the real-world situation where the testing data distribution is unknown. 
Hence, it may not reflect the actual classification performance objectively.
Moreover, those metrics can not indicate the stability and performance bounds of algorithms on testing data which may have arbitrary distributions.
\cite{zhang2021test} attempts to estimate LLTD algorithms on testing data with multiple distributions: 1) Testing data has an imbalanced distribution sharing the forward trend as the training data; 2) Testing data has uniform sample sizes across classes, namely the distribution is balanced; 3) Testing data has imbalanced distributions with the backward trend of the training data. However, this manner is still limited in comprehensively evaluating LLTD algorithms on unknown testing data. It can only coarsely reflect algorithmic stability and bounds.


To address the above issues, we devise new evaluation metrics based on testing data with dynamic evolving distributions. For covering possible test distributions as fully as possible, we simulate a series of testing sets by shifting the frequent classes according to the class index. Then, each case of testing data is used to calculate the accuracy of LLTD algorithms. A corpus of evaluation metrics are estimated from the accuracy on all testing sets: 1) The area under the curve formed by those accuracy values and the average accuracy can be used for evaluating the performance on universal testing data; 2) The standard deviation and the accuracy drop ratio reflect the stability against the variation of test data distributions; 3) The maximum and minimum accuracy values can approximate the upper and lower bound, respectively. The comparison between our evaluation strategy and existing strategies is provided in Table~\ref{tab:comp-eval}.

Based on the new evaluation metrics, we provide an elaborated analysis about the classification accuracy, robustness, and bounds for existing LLTD algorithms on two benchmarks in which the testing data has same or different imbalance ratio with the training data.
This can guide the selection of data rebalancing techniques.
We observe that a few methods such as the contrastive representation learning algorithm in~\cite{cui2021parametric},  ensembling models learned with different distributions~\cite{zhang2021test}, logit rebalancing strategies~\cite{ren2020balanced,li2022long}, and data distribution disentangling~\cite{hong2021disentangling} have distinguished performance on addressing the long-tailed learning problem.
However, there still exists large space for improving the classification of tail classes under large distribution shift or large-scale number of classes. Meanwhile, middle classes also need attentions during training.


Main contributions of this paper are as follows.

\begin{itemize}
\item[1)] We provide a simple survey for existing long-tailed learning algorithms and classify them into four types according to the key procedures during the pipeline for tackling the long-tailed learning, i.e., data rebalancing, loss design, feature representation learning, and category prediction.
\item[2)] We design a corpus of new evaluation metrics for analyzing the classification accuracy, stability, and bounds of LLTD algorithms on testing data with dynamic evolving distributions more comprehensively.
\item[3)] Based on the new evaluation metrics, two benchmarks where training data and testing data have same or different imbalance ratios are set up to evaluate existing LLTD algorithms.
\end{itemize}

\begin{figure*}[thbp]
    \centering
    \includegraphics[width=1\linewidth]{pics/long-tail-categorization-v4.pdf}
    \put(-482,278){\cite{chawla2002smote}}
    \put(-491,256){\cite{drummond2003c4}}
    \put(-479,233){\cite{zhang2017mixup}}
    \put(-310,278){\cite{wang2020long}}
    \put(-232,256){\cite{tang2022invariant}}
    \put(-307,233){\cite{zhang2021test}}
    \put(-207,278){\cite{cai2021ace}}
    \put(-200,233){\cite{li2022trustworthy}}
    \put(-473,156){\cite{kang2019decoupling}}
    \put(-452,133){\cite{zhou2020bbn}}
    \put(-492,111){\cite{tang2020long}}
    \put(-457,78){\cite{cui2021parametric}}
    \put(-480,55){\cite{li2022targeted}}
    \put(-475,32){\cite{alshammari2022long}}
    \put(-51,172){\cite{lin2017focal}}
    \put(-34,146){\cite{park2021influence}}
    \put(-30,119){\cite{cao2019learning}}
    \put(-68,97){\cite{ren2020balanced}}
    \put(-34,77){\cite{hong2021disentangling}}
    \put(-72,55){\cite{menon2020long}}
    \put(-38,34){\cite{li2022long}}
    \put(-38,11){\cite{zhao2022adaptive}}
    \vspace{-5pt}
    \caption{Categorization of existing long-tailed image classification works. Based on four primary procedures, existing works can be categorized into four groups: balanced data, balanced feature representation, balanced loss, and balanced prediction.}
    \label{figCate}
\end{figure*}

\section{Survey of Long-tailed Learning}
\label{sec:related}
\subsection{Problem Definition}
\label{sec:prob_def}
Real-world data often has a long-tailed distribution.
Suppose the training data be $\mathbb D^{trn}=\{(x_n, y_n)\}_{n=1}^{N^{trn}}$. $x_n$ and $y_n$ denote the $n$-th training image and its class label, respectively; $N^{trn}$ represents the number of training samples. 
Let the number of training samples belonging the $c$-th class be $N^{trn}_c$. The imbalance ratio of the training data is denoted as $\rho^{trn}=\max_c N^{trn}_c / \min_c N^{trn}_c$.
Suppose there exist $C$ target classes, i.e., $y_n\in[1,C]$. 
We define the testing dataset as  $\mathbb D^{tst}=\{(x_n, y_n)\}_{n=1}^{N^{tst}}$.
$N^{tst}$ denotes the number of testing samples. The number of testing samples belonging the $c$-th class is $N^{tst}_c$. The imbalance ratio of the testing data is denoted as $\rho^{tst}=\max_c N^{tst}_c/\min_c N^{tst}_c$.

We define the distribution shift between training and testing data with the JS divergence, 
\begin{equation}
\delta(\mathbb D^{trn}, \mathbb D^{tst})=-\sum_{c=1}^C [q_c^{trn} \ln(\frac{q_c^{trn}}{q_c^{tst}})+q_c^{tst} \ln(\frac{q_c^{tst}}{q_c^{trn}})],
\end{equation}
where $q_c^{trn}=\frac{N_c^{trn}}{N^{trn}}$ and $q_c^{tst}=\frac{N_c^{tst}}{N^{tst}}$.

Given the training data $\mathbb D^{trn}$, the goal is to learning a CNN model which can well adapt to the testing data $\mathbb D^{tst}$. We define the inference process of the CNN model as $f(\cdot)$. Namely, given an image $x$, the CNN model can generate a classification probability vector $\mathbf p\in \mathbb R^C$. The inferred label is denoted as $\hat{y}=\arg\max_c p[c]$. Here, $p[c]$ indicates the $c$-th class's probability value.


\subsection{A Survey of Prior Works}
Under long-tailed distribution, head classes are prone to dominate the learning process, thus impairing the accuracy of tail classes. The core factor to address this problem is balancing the learning process. As shown in Figure~\ref{figCate}, we categorize existing works into four groups: balanced data, balanced feature representation, balanced loss, and balanced prediction.

\subsubsection{Balanced Data}
A straightforward method to address the data imbalance problem is to construct balanced data distribution, i.e., re-sampling the training data. However, excessively sampling tail classes~\cite{chawla2002smote} induces the over-fitting issue, while under-sampling head classes~\cite{drummond2003c4} hampers the representation learning and weakens the accuracy of head classes. Based on the effectiveness of mixup-based methods \cite{zhang2017mixup, yun2019cutmix}, combining samples from different classes can alleviate the long-tailed challenge. However, a naive implementation is prone to generate more head-head pairs. To this end, Xu \etal \cite{Xu2021TowardsCM} propose a balance-oriented mixup algorithm by biasing the mixing factor towards tail classes and increasing the occurrence of head-tail pairs.

\subsubsection{Balanced Feature Representation}
Designing algorithms to learn balanced feature representations is the other promising direction for addressing the long-tailed learning problem. cRT~\cite{kang2019decoupling} finds that data imbalancement does not impair the representation ability. Hence, cRT~\cite{kang2019decoupling} learns the feature extraction backbone with the conventional training strategy and then employ the data re-balancing algorithms to train the classifier. Similarly, BBN~\cite{zhou2020bbn} unifies the traditional and re-balanced data sampling strategies, and gradually shifts focus from the former to the latter. Aiming to jointly acquire representative features and discriminative classification scores, Tang \etal \cite{tang2020long} use the moving average of momentum to measure the misleading effect of head classes during training, and build a causal inference algorithm to remove the misleading effect during inference.

Another feature balancing approach is to enhance the representation ability for each class, \eg by contrastive learning. 
Cui \etal \cite{cui2021parametric} propose to explicitly learn a feature center for each class, which is used to increase the inter-class separability. 
Li \etal \cite{li2022targeted} reveal that the imbalanced sample distribution leads to close feature centers for tail classes. Thus, they propose to constrain feature centers to be uniformly distributed. 
Alshammari \etal \cite{alshammari2022long} tackle the long-tailed challenge from the perspective of weight balancing, and apply the weight decay strategy to penalize large weights.


\subsubsection{Balanced Loss}
Another reasonable approach to the imbalance challenge is assigning relatively higher attention to tail classes during the network optimization process. For example, Focal loss~\cite{lin2017focal} assigns larger weights to samples with lower prediction confidences, \ie, the so-called hard samples. However, if the dataset exhibits severe imbalance, excessively emphasizing tail classes would lead to an over-fitting dilemma. To alleviate this challenge, Park \etal \cite{park2021influence} propose to re-weight samples according to the reverse of their influences on decision boundaries. LDAM~\cite{cao2019learning} tackles the data imbalance challenge by increasing margins of tail classes' decision boundaries, considering decision boundaries of head classes are more reliable than those of tail classes.

The other line of works focus on balancing gradients for head and tail classes by adjusting the \textit{Softmax} function. Ren \etal \cite{ren2020balanced} make an early attempt to balance the \textit{Softmax} function and develop the meta-sampling strategy to dynamically adjust the data distribution in the training process. LADE~\cite{hong2021disentangling} proposes the post-compensated \textit{Softmax} strategy to disentangle the source data distribution from network predictions. In addition, Menon \etal~\cite{menon2020long} introduce the logit adjustment strategy. If testing samples obey the independent and identical distribution of training samples, the logit adjustment strategy can generate accurate predictions. However, it is impractical to guarantee the independent and identical distribution between training and testing samples. Moreover, the underlying distribution of testing samples is usually unknown. To cope with this problem, GCL~\cite{li2022long} introduces Gaussian clouds into the logit adjustment process, and adaptively sets the cloud size according to the sample size of each class. Recently, Zhao \etal~\cite{zhao2022adaptive} reveal that previous logit adjustment techniques primarily focus on the sample quantity of each class, while ignoring the difficulty of samples. Thus, Zhao \etal \cite{zhao2022adaptive} propose to prevent the over-optimization on easy  samples of tail classes, while highlighting the training on difficult samples of head classes.

\subsubsection{Balanced Prediction}
Another type of methods try to tackle the long-tailed challenge by improving the inference process. 
Aiming to balance the accuracy of head and tail classes, Wang \etal~\cite{wang2020long} learn multiple experts simultaneously and ensemble their predictions to reduce the bias of single models. A dynamic routing module is developed to control the computational costs. 
ACE~\cite{cai2021ace} attempts to learn multiple complementary expert models. Specifically, each expert model is responsible for distinguishing a specific set of classes while its responses to non-assigned classes are suppressed. 
Considering the real-world testing data may exhibit a distinct distribution compared to the training data, Zhang \etal \cite{zhang2021test} learn multiple models under different distributions and combines them with weights generated via testing-time adaptation. 
For decreasing the computational cost, Li \etal~\cite{li2022trustworthy} propose to measure the uncertainty of each expert, and assign experts to each sample dynamically. 
Tang \etal~\cite{tang2022invariant} utilize uniform intra-class data sampling and confidence-aware data sampling strategies to construct different training environments for learning features invariant to diversified attributes.


\section{The New Evaluation Metrics}
\label{sec:data}

\input{tables/cmp-cifar-same-01}

In real-world applications, limited training data can not reflect the actual data distribution. To evaluate LLTD algorithms more comprehensively, we set up testing datasets which have dynamic evolving distributions. 
The percent of the $c$-th class's samples namely $q_c^{tst}$ is determined according to the following formulation,
\begin{equation}
q_c^{tst}(\alpha) = \frac{({\rho^{tst}})^{-\frac{|c-\alpha|}{C-1}}}{\sum_{c=1}^C ({\rho^{tst}})^{-\frac{|c-\alpha|}{C-1}}},
\end{equation}
where $\alpha$ is a variable controlling the peak of the testing data distribution. Varying $\alpha$ can derive testing data with diversified distributions. 

Suppose the maximum class sample size be $N_{max}^{tst}$. We choose the the total number of samples namely $N^{tst}$ as below,
\begin{equation}
N^{tst} = \sum_{c=1}^C N_{max}^{tst} ({\rho^{tst}})^{-\frac{|c-1|}{C-1}}.
\end{equation}

Then, the sample size of the $c$-th class in testing data can be obtained as, $N_c^{tst}=N^{tst} q_c^{tst}(\alpha)$. Finally, new testing samples can be randomly drawn out from the original dataset.

\input{tables/cmp-cifar-same-05}

Accuracy is the basic metric for evaluating performance of image classification models. 
Intrinsically, it records the percent of correctly predicted testing samples as in the following equation,
\begin{equation}
V^{acc} = \frac{\sum_{n=1}^{N^{tst}} (\hat y_n = y_n) }{N^{tst}}.
\end{equation} 

We synthesize a series of testing sets by varying $\alpha$ in $\{\frac{(t-1)C}{T}+1\}_{t=1}^T$, where $T$ denotes the times of data synthesization. 
For each times of synthesization, we implement five replaceable samplings.
The overall performance on this testing set synthesization can be evaluated by averaging the five samplings' accuracy, which is defined as $V^{acc}_{t}$.
The distribution shift between the training set and the $t$-th synthesized testing set is estimated as,
\begin{equation}
    \delta_t = -\sum_{c=1}^C [q_c^{trn} \ln(\frac{q_c^{trn}}{q_c^{tst}(\alpha_t) })+q_c^{tst}(\alpha_t) \ln(\frac{q_c^{tst}(\alpha_t)}{q_c^{trn}})],
\end{equation}
where $\alpha_t=\frac{(t-1)C}{T}+1$.

One simple manner to unify the results of $T$ synthesizations is directly averaging them:
\begin{equation}
V^{avg} = \frac{1}{T}\sum_{t=1}^T V^{acc}_{t},
\end{equation}
where $V^{avg}$ denotes the averaged accuracy. We can also evaluate the sensitivity to distribution variation with the accuracy drop ratio $V^{dr}$ and the standard deviation $V^{std}$:
\begin{align}
V^{dr}  & = \frac{\max_{t} V^{acc}_{t} - \min_{t} V^{acc}_{t}}{\max_{t} V^{acc}_{t}}, \\
V^{std} & = \sqrt{\sum_{t=1}^T (V^{acc}_{t} - V^{avg})^2/T}.
\end{align}

\input{tables/cmp-cifar-same-1}


The other manner for combining the accuracy values is calculating the area under the curve of $T$ synthesizations' results. All testing sets are ranked with respect to the distribution shifts between training and testing sets in the ascending order. Denote the ranked set indices as $\{t_k\}_{k=1}^T$. This metric is calculated as below:
\begin{equation}
V^{auc} = \frac{\sum_{k=1}^{T-1} (V^{acc}_{t_k} + V^{acc}_{t_{k+1}})(\delta_{t_{k+1}} - \delta_{t_{k}})/2}{ \delta_{t_{T}} - \delta_{t_{1}} }.
\end{equation}


\section{Benchmarks}
\label{sec:exper}


\subsection{Experimental settings.}
We use two datasets for training and testing, including CIFAR10 and CIFAR100~\cite{krizhevsky2009learning}. 
Both CIFAR10 and CIFAR100 contain 60,000 images with size of 32$\times$32. 
The number of classes of CIFAR10 and CIFAR100 is 10 and 100, respectively. 
The original datasets are split into 50,000 images for training and 10,000 images for testing.
We follow~\cite{kang2019decoupling,zhou2020bbn} to synthesize imbalanced training set with the imbalance ratio $\rho^{trn}\in\{0.01,0.05,0.1\}$. 
$N_c^{trn}$ is set as 5,000 and 500 for CIFAR10 and CIFAR100, respectively.
During training, 10\% images of each class are used for validation.
When generating testing data, we choose $\rho^{tst}$ from $\{ 0.01, 0.05, 0.1\}$ and set $N_{max}^{tst}$ as 1,000 and 100 for CIFAR10 and CIFA100, respectively.

\subsection{Benchmark 1: Testing Data having Same Imbalance Ratio as Training Data} \label{sec:exper-same}
In this subsection, we re-evaluate the performance of existing methods, including Focal~\cite{lin2017focal}, LDAM~\cite{cao2019learning}, cRT~\cite{kang2019decoupling}, BBN~\cite{zhou2020bbn}, MetaS~\cite{ren2020balanced}, DecTDE~\cite{tang2020long}, RIDE~\cite{wang2020long}, IBLoss~\cite{park2021influence}, TADE~\cite{zhang2021test}, LADE~\cite{hong2021disentangling}, Prior-LT~\cite{Xu2021TowardsCM}, PCL~\cite{cui2021parametric}, and GCLLoss~\cite{li2022long}. 
The baseline method (CE) is implemented using the conventional uniform data sampling and standard cross-entropy loss function.
For all methods, we use ResNet32~\cite{he2016deep} as the classification backbone model.
Here, we use the same imbalance ratio for training and testing data.

\begin{figure*}[t]
    \centering
    \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth, trim=10 10 5 5, clip]{pics/acc_curves/CIFAR10_0.01_0.01.pdf}
        \caption{$\rho^{trn}=\rho^{tst}=0.01$}
       
    \end{subfigure}
  \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth,trim=10 10 5 5, clip]{pics/acc_curves/CIFAR10_0.05_0.05.pdf}
    \caption{$\rho^{trn}=\rho^{tst}=0.05$}
       
    \end{subfigure}
  \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth, trim=10 10 5 5, clip]{pics/acc_curves/CIFAR10_0.1_0.1.pdf}
        \caption{$\rho^{trn}=\rho^{tst}=0.1$}
       
    \end{subfigure}
   
\caption{Accuracy curves of existing methods on CIFAR10 against the JS divergence. (a) The decay coefficients $\rho^{trn}$ and $\rho^{tst}$ are set to 0.01; (b) $\rho^{trn}$ and $\rho^{tst}$ are set to 0.05; (c) $\rho^{trn}$ and $\rho^{tst}$ are set to 0.1.
\label{fig:acc-curve-cifar10}
\end{figure*}


\begin{figure*}[t]
    \centering
    \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth, trim=10 10 5 5, clip]{pics/acc_curves/CIFAR100_0.01_0.01.pdf}
        \caption{$\rho^{trn}=\rho^{tst}=0.01$}
       
    \end{subfigure}
  \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth,trim=10 10 5 5, clip]{pics/acc_curves/CIFAR100_0.05_0.05.pdf}
        \caption{$\rho^{trn}=\rho^{tst}=0.05$}
       
    \end{subfigure}
  \begin{subfigure}{0.328\linewidth}
        \centering
        \includegraphics[width=1\linewidth, trim=10 10 5 5, clip]{pics/acc_curves/CIFAR100_0.1_0.1.pdf}
        \caption{$\rho^{trn}=\rho^{tst}=0.1$}
       
    \end{subfigure}
   
\caption{Accuracy curves of existing methods on CIFAR100 against the JS divergence.
\label{fig:acc-curve-cifar100}
\end{figure*}

\input{tables/cmp-cifar-smaller}
We report the experimental results on re-distributed versions of CIFAR10 and CIFAR100 which have the same imbalance ratios for training and testing data in Table~\ref{tab:CIFAR-01} ($\rho^{trn}=\rho^{tst}=0.01$), Table~\ref{tab:CIFAR-05} ($\rho^{trn}=\rho^{tst}=0.05$), and Table~\ref{tab:CIFAR-1} ($\rho^{trn}=\rho^{tst}=0.1$). The accuracy curves with respect to the JS divergence are illustrated in Fig.~\ref{fig:acc-curve-cifar10} and Fig.~\ref{fig:acc-curve-cifar100}.

\input{tables/cmp-cifar-larger}

We can observe that, the parametric contrastive learning~\cite{cui2021parametric} is very good at coping with the data imbalance problem. 
It achieves the highest classification accuracy overall, and showcases high stability across different testing distributions. 
This means that learning good representations is a very effective strategy for relieving the influence of data imbalance, due to the improvement in feature generalization ability and the prevention of overfitting with tail classes.
TADE~\cite{zhang2021test} also has very promising ability in tackling the data imbalance problem, due to the combination of multiple expert models learned with different simulated training distributions.
Another effective direction is adjusting the classification logits according to classes' sample sizes like GCLoss~\cite{li2022long} and MetaS~\cite{ren2020balanced}, which can help to enlarge the embedding space of tail classes. 
LADE~\cite{zhang2021test} is targeted at disentangling the label distribution of the training data from the model prediction. It also has fine effect in adapting to arbitrary testing distributions. For example, it produces the second best AUC and average ACC metrics on CIFAR10 with $\rho^{trn}=\rho^{tst}=0.01$.

From the metric values on standard deviation (STD) and drop ratio (DR), most methods with relatively better classification performance such as PCL, TADE, and GCLoss are robust against the variance of testing data distribution. Prior-LT~\cite{Xu2021TowardsCM} which uses class-balanced mixup to construct training samples and prior-compensated Softmax for probability prediction have relatively more stable performance than other methods on CIFA100. 

The upper bound of LLTD algorithms on testing data with unknown distribution can be approximated by the maximum accuracy (ACC-MAX) metric. Most of algorithms are unable to improve this metric. On CIFA100, a few algorithms such as cRT, BBN, IBLoss and Prior-LT  even achieve severely decreased ACC-MAX value compared to the baseline. The reason may be that those methods excessively bias the training process towards tail classes. Several methods are capable of improving the ACC-MAX metric, such as Meta-Softmax, PCL, LADE, focal loss, etc.

The minimum accuracy (ACC-MIN) can approximate the lower bound of LLTD algorithms. This metric is usually obtained when there exists large or moderate shift between training and testing distributions.  We can see that most methods are capable of improving this metric, since they have specific designs for enhancing the significance of tail classes during training. The most three effective methods in boosting ACC-MIN are PCL, TADE, and LADE.

\subsection{Benchmark 2: Testing Data with Imbalance Ratios Different to Training Data} \label{sec:larger}
We report the experimental results on re-distributed versions of CIFAR10 and CIFAR100 where the imbalance ratios of the training data are different with that of the testing data in Table~\ref{tab:CIFAR-05-01} ($\rho^{trn}=0.05$, $\rho^{tst}=0.01$) and Table~\ref{tab:CIFAR-05-1} ($\rho^{trn}=0.05$, $\rho^{tst}=0.1$).
We can see that existing methods have similar performance rankings with the situation where the imbalance ratios of training and testing distributions are same.

\section{Discussions and Conclusions}
\label{sec:conclu}

\textbf{Discussions}. Based on the experimental results, we recommend the following directions to improve algorithms for learning with long-tailed distribution.
\begin{itemize}
  \item The minimum accuracy of most methods is not high under severe data imbalance or large number of classes (e.g., CIFAR100). This indicates that there still exists huge space for improving the performance on tail classes. 
  \item From Fig.~\ref{fig:acc-curve-cifar10}, on CIFAR10, a few methods, such as  PCL, GCLoss, and LADE, are capable of achieving high accuracy on small and large JS divergence. However, the accuracy on middle JS divergence is relatively low. This means that they are able to achieve good performance on head and tail classes but the middle classes lack attention during training.
\end{itemize}

\textbf{Conclusions}. In this paper, we set up new Benchmarks to analyze the performance of methods for learning with long-tailed distribution. Based on a series of testing sets with evolving data distribution, we devise new metrics to analyze the accuracy, stability, and upper/lower bound of existing methods comprehensively. Extensive experiments on CIFAR10 and CIFAR100 are conducted to evaluate existing methods. We also summarize existing methods into data, feature, loss, and prediction balancing types according to the focused stage in the working pipeline.

{\small
\input{main.bbl}
}

\end{document}





