Abstract
Supervised learning from training data with imbalanced class sizes, a commonly encountered scenario in real applications such as anomaly/fraud detection, has long been considered a significant challenge in machine learning. Motivated by recent progress in curriculum and self-paced learning, we propose to adopt a semi-supervised learning paradigm by training a deep neural network, referred to as SelectNet, to selectively add unlabelled data together with their predicted labels to the training dataset. Unlike existing techniques designed to tackle the difficulty in dealing with class imbalanced training data such as resampling, cost-sensitive learning, and margin-based learning, SelectNet provides an end-to-end approach for learning from important unlabelled data “in the wild” that most likely belong to the under-sampled classes in the training data, thus gradually mitigates the imbalance in the data used for training the classifier. We demonstrate the efficacy of SelectNet through extensive numerical experiments on standard datasets in computer vision.
Introduction
In real-world machine learning applications, data distributions are frequently skewed. In domains like fraud detection or medical diagnosis, the minority class—the "interesting" events—is often dwarfed by a massive majority class. Standard algorithms typically struggle in these scenarios, often defaulting to predicting the majority class to achieve high overall accuracy while failing to identify critical minority samples. This is known as the imbalanced data problem.
Traditional approaches to this problem include resampling (undersampling the majority or oversampling the minority) and cost-sensitive learning (assigning higher penalties to minority class errors). However, these methods are limited to the information present in the initial skewed dataset. The authors of SelectNet propose a different path: leveraging the abundance of unlabeled data "in the wild" to dynamically balance the training set.
Methodology: The SelectNet Framework
SelectNet introduces a dual-network architecture designed to operate in a semi-supervised manner. The framework consists of two primary components:
- The Classifier ($f_c$): The primary model being trained for the target task (e.g., a ResNet architecture).
- The Selector ($f_s$): A secondary, smaller network that acts as a "scout." Its role is to evaluate unlabeled samples and determine if they are likely to belong to a minority class and if the classifier's prediction is reliable.
The Training Workflow
The process follows an iterative cycle:
- Initialization: The classifier is pre-trained on the initial imbalanced labeled data using standard oversampling.
- Selection Phase: The model scans a large pool of unlabeled data. For each sample, the classifier generates a predicted label, and the Selector assigns a confidence score based on the classifier’s internal feature representations and loss.
- Context Data Integration: To sharpen decision boundaries, the authors identify "hard" samples from the labeled set—specifically, majority class samples that the model currently misclassifies as minority.
- Iterative Refinement: Selected unlabeled samples (with pseudo-labels) and context data are added to the training set. The model is then retrained, gradually mitigating the class imbalance.
Experimental Setup
The researchers evaluated SelectNet using standard computer vision benchmarks modified to simulate extreme imbalance:
- CIFAR-10: A version was created where four classes were reduced to 1% of their original labeled size, with the remainder moved to an unlabeled pool.
- CIFAR-100: Tests were conducted with 4 and 10 minority classes.
- Long-Tailed CIFAR: A dataset where class sizes follow a power-law distribution, reflecting natural data distributions.
Key Insights and Discussion
A central challenge in adding unlabeled data is the trade-off between precision and recall. While adding more minority-like samples generally improves Recall (the ability to find rare items), it often degrades Precision (the accuracy of those identifications) by introducing noise or mislabeled samples.
As shown in the figure above, naive addition of data can lead to low precision or low recall. SelectNet addresses this by learning a selection rule rather than using a fixed threshold. The inclusion of "Context Data" (misclassified labeled samples) acts as a critical stabilizer, allowing the model to reach an "Ideal" state where both precision and recall are maximized.
Results
SelectNet demonstrated significant improvements over baseline methods across various architectures:
- Accuracy Gains: On CIFAR-10 with 4 minority classes, SelectNet achieved 80.11% accuracy, outperforming standard oversampling (68.97%) and other context-based methods.
- Minority Class F1-Score: The most dramatic improvements were seen in minority class performance. In one instance, the F1-score for a rare class rose from 0.05 with oversampling to 0.74 with SelectNet.
- State-of-the-Art Performance: SelectNet outperformed the "Class-Balanced Loss" method on long-tailed datasets, showing its robustness in complex imbalance scenarios.
Conclusion
SelectNet provides a powerful end-to-end approach for tackling class imbalance by intelligently harvesting data from the "wild." By learning to select the most informative unlabeled samples and balancing them with hard labeled examples, it overcomes the limitations of traditional resampling. Future research may focus on the impact of unlabeled pool quality and the computational overhead of training dual-network architectures.
Reference: Liu, Y., Gao, T., & Yang, H. (2020). SelectNet: Learning to Sample from the Wild for Imbalanced Data Training. Proceedings of Machine Learning Research, 107:193–206.
Summary updated