Introduction
Class imbalance is a pervasive challenge in machine learning, particularly in high-stakes domains like fraud detection and medical diagnosis. Standard classifiers often struggle when one class significantly outnumbers another, frequently defaulting to a "majority-rule" bias that ignores critical minority samples. This paper introduces simultaneous two-sample learning (s2sL), a novel data representation technique that rethinks the classification task by training models on pairs of samples rather than individual instances.
The Imbalance Problem
Existing solutions to class imbalance typically fall into two categories: sampling (undersampling or oversampling) and cost-sensitive learning. While effective in some contexts, these methods often lead to information loss, overfitting, or require extensive hyperparameter tuning. Crucially, they do not explicitly encourage the model to learn the underlying relational dependencies between classes. The s2sL approach addresses this gap by transforming the learning problem into a relational one.
Simultaneous Two-Sample Learning (s2sL)
Training: The Power of Pairs
The core of s2sL is the simultaneous two-sample (s2s) representation. Instead of feeding a single feature vector into a Multi-Layer Perceptron (MLP), the model is trained on concatenated pairs of samples $[x_i, x_k]$ to predict their respective labels $[y_i, y_k]$ simultaneously.
This architecture forces the network to learn not just the features of individual classes, but the relationships—similarities and differences—between arbitrary pairs. To manage the combinatorial explosion of $N^2$ possible pairs and prevent majority-class dominance, the authors employ a majority-constraint. This balances the relational dataset by limiting majority-majority pairs to match the count of minority samples.
Inference: Single-Model Voting
At inference time, s2sL leverages a unique majority-voting scheme using only a single trained model. To classify a test sample $t$, it is paired with $R$ different "reference samples" from the training set.
The model generates $R$ predictions for $t$, and the final label is determined by a majority vote. This provides the robustness of an ensemble method without the overhead of training multiple independent models.
Experimental Evaluation
The authors evaluated s2sL across 10 benchmark datasets with varying Imbalance Ratios (IR), from low (IR 1.5) to extreme (IR 128.87). The method was compared against nine state-of-the-art methods, including SMOTE and RUSBoost.
Key Results
- Superior Performance: s2sL consistently outperformed state-of-the-art methods in $F_1$ and $F_2$ scores across all tested datasets.
- Extreme Imbalance: On the Abalone19 dataset (IR ~129), where standard models often fail completely, s2sL maintained a significant performance lead.
- Efficiency through Convergence: The s2s-MLP converges remarkably faster than standard MLPs. For instance, on the Yeast6 dataset, it reached minimum loss in 23 epochs compared to 132 for a standard MLP.
Conclusion
By shifting the focus from individual feature learning to relational pair learning, s2sL offers a powerful and efficient alternative for imbalanced classification. Its ability to achieve high accuracy on both majority and minority classes simultaneously, combined with its fast convergence and pseudo-ensemble inference, makes it a compelling choice for real-world imbalanced scenarios.
Summary updated