## 4 Experiments
### Implementation  
The algorithms for this study were implemented using Python 3.8 and PyTorch 1.12 on NVIDIA RTX 4090 GPUs. For the CIFAR-10 and SVHN datasets, we employed ResNet18 as the backbone architecture, while ImageNet utilized ResNet50. Mini-batch sizes were set to 512 on two GPUs for CIFAR-10 and SVHN, and 128 on four GPUs for ImageNet. Outputs were L2-normalized, and the temperature parameter \(\tau\) was set at 0.1. The memory bank size \(K\) was set at 65,536 with a momentum of 0.999. Data augmentation followed standard protocols including resizing, cropping, color jittering, and grayscale conversion as needed [58]. Optimization was conducted using Stochastic Gradient Descent (SGD) with momentum set at 0.9 and a weight decay of 0.0004. A cosine learning rate adjustment strategy was applied starting at a learning rate of 0.001, with significant reductions at specified epochs during the 200-epoch training period. For oversampling, we used the imbalanced-learn package from the scikit-learn library [9]. Evaluation involved a Multilayer Perceptron (MLP) acting as the classifier, configured with various layers and neurons using the ReLU activation function. The MLP was trained using a balanced sampling approach over 100 epochs with a cosine learning rate schedule that gradually reduced the rate to zero. The final output layer was set to 128 dimensions. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Class** & **Train** & **Test** & **IR** \\ \hline CIFAR-10-STEP & 10 & 50 K & 10 K & 10, 50, 100 \\ CIFAR-10-LT & 10 & 50 K & 10 K & 10, 50, 100 \\ SVHN-STEP & 10 & 73.257 K & 26.032 K & 10, 50, 100 \\ SVHN-LT & 10 & 73.257 K & 26.032 K & 10, 50, 100 \\ ImageNet-LT & 1000 & 115.8 K & 50 K & 256 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental dataset details. Figure 5: Metrics results for evaluating. (**a**) F1 Score on CIFAR-10 dataset, (**b**) G-mean Score on CIFAR-10 dataset, (**c**) F1 Score on SVHN dataset, (**d**) G-mean Score on SVHN dataset. Figure 6: Confusion matrix obtained with IR = 50. (**a**) Benchmark in CIFAR-10-LT, (**b**) CL-SR in CIFAR-10-LT, (**c**) Benchmark in SVHN-LT, (**d**) CL-SR in SVHN-LT.  
Figure 7: Cont. Figure 7: Comparison ROC curves obtained with IR = 50. (**a**) Benchmark in CIFAR-10-LT, (**b**) CL-SR in CIFAR-10-LT, (**c**) Benchmark in SVHN-LT, (**d**) CL-SR in SVHN-LT. The analysis in Figure 5 highlights that CL-SR outperforms both the Benchmark and MoCo methods across all tested imbalance ratios. Specifically, as illustrated in Figure 5a,b, the FM and GM scores for CL-SR are approximately 20% higher than those for the benchmark in the case of CIFAR-10 with step imbalance. Under long-tailed imbalance conditions, these scores increase by nearly 35%. For the SVHN dataset, as shown in Figure 5c,d, CL-SR consistently surpasses the Benchmark by 10% to 15% margins. Additionally, CL-SR's FM and GM scores on CIFAR-10 are 4% higher than those achieved by MoCo, and on the SVHN dataset, CL-SR shows a 1% advantage. Figure 6 contains four confusion matrix comparing the classification results on the benchmark with applying the CL-SMOTE. The rows are genuine classes and the columns are anticipated classes. Each cell value displays the quantity of instances from the predicted true class, which is the class that the column represents. Color depth represents the number of predictions, ranging from light to dark. Figure 6b shows improved classification accuracy with fewer off-diagonal entries, indicating fewer misclassifications compared to Figure 6a. Similar to Figure 6c, Figure 6d has strong diagonal entries indicative of high accuracy. The multi-class ROC curve is shown in Figure 7. The lines in Figure 7b,d are closer to the left and top edges of the plot than they are in Figure 7a,c, indicating higher true positive rates and lower false positive rates. This shows that CL-SR is better than the benchmark in the multi-class ROC AUC metric.