A systematic study of the class imbalance problem in convolutional neural networks
Mateusz BudaAtsuto MakiMaciej A. Mazurowski
Demonstrates that complete oversampling consistently outperforms undersampling and thresholding for class-imbalanced convolutional neural networks across standard vision benchmarks without causing the overfitting typical in classical machine learning.
Class imbalance in training data for convolutional neural networks is a widespread issue in applications such as medical imaging, fraud detection, and object recognition, where one class may appear hundreds or thousands of times more often than another. Prior work had shown that imbalance harms classical machine learning models, yet no large-scale, controlled study existed for modern deep networks.
This paper set out to measure how different degrees and forms of imbalance affect CNN performance and to compare the main practical remedies in a consistent way across tasks of increasing difficulty.
The authors created controlled imbalanced versions of three standard benchmarks—MNIST, CIFAR-10, and ImageNet—using two representative imbalance patterns and trained thousands of networks with LeNet, All-CNN, and ResNet architectures. They evaluated random oversampling, random undersampling, two-phase training, and simple thresholding, using multi-class ROC AUC as the primary metric because overall accuracy can be misleading under imbalance.
The experiments produced five main results. First, imbalance caused clear, substantial drops in performance, and the harm grew markedly with task complexity. Second, oversampling consistently ranked highest across nearly all conditions and never produced the overfitting previously observed in classical models. Third, full oversampling to equal class sizes was optimal, whereas the best undersampling level depended on the fraction of minority classes. Fourth, thresholding improved the raw count of correct predictions when applied after oversampling or on the original data, but it did not change discrimination ability. Fifth, the performance loss could not be explained merely by fewer total examples; the uneven distribution itself mattered.
These findings indicate that practitioners facing typical imbalance can improve results reliably and at modest cost by applying oversampling, while reserving undersampling for cases where training speed is critical and using thresholding when the goal is to maximize the absolute number of correct decisions.
The main limitations are that the largest ImageNet experiments showed run-to-run variability and that extreme imbalance on very large tasks may require further tuning of training schedules. Within the scope examined, however, the ranking of methods is stable and the evidence for oversampling is strong.
- Paper: SMOTE: Synthetic Minority Over-sampling Technique, N. Chawla et al. (2002). Reading this foundational paper on SMOTE provides the key classical data-synthesis concepts that the source paper evaluates and contrasts with deep learning methods.
- Paper: The foundations of cost-sensitive learning, Charles Elkan (2001). This paper establishes the theoretical foundations of cost-sensitive learning and probability threshold adjustments, directly informing the thresholding techniques evaluated in the source.
- Paper: Class-Balanced Loss Based on Effective Number of Samples, Yin Cui et al. (2019). This work extends the source study by developing a sophisticated class-balanced loss based on the effective number of samples rather than standard oversampling or undersampling.
- Paper: Focal Loss for Dense Object Detection, Tsung-Yi Lin et al. (2017). This paper builds directly upon the class imbalance problem investigated in the source by introducing the Focal Loss to address extreme foreground-background imbalance in object detection.
