Abstract: A learning classifier must outperform a trivial solution, in case of imbalanced data, this condition usually does not hold true. To overcome this problem, we propose a novel data level resampling method - Clustering Based Oversampling for improved learning from class imbalanced datasets. The essential idea behind the proposed method is to use the distance between a minority class sample and its respective cluster centroid to infer the number of new sample points to be generated for that minority class sample. The proposed algorithm has very less dependence on the technique used for finding cluster centroids and does not effect the majority class learning in any way. It also improves learning from imbalanced data by incorporating the distribution structure of minority class samples in generation of new data samples. The newly generated minority class data is handled in a way as to prevent outlier production and overfitting. Implementation analysis on different datasets using deep neural networks as the learning classifier shows the effectiveness of this method as compared to other synthetic data resampling techniques across several evaluation metrics.
Introduction
In machine learning, class imbalance occurs when the "minority class" of interest is significantly outnumbered by the "majority class." Standard classifiers often maximize overall accuracy by ignoring the minority class, which is problematic in critical domains like fraud detection or medical diagnosis. Traditional oversampling methods like SMOTE (Synthetic Minority Over-sampling Technique) attempt to balance datasets by interpolating between neighboring minority points. However, SMOTE often suffers from class overlapping—generating noisy data in majority class regions—and struggles with the curse of dimensionality in high-dimensional spaces.
Methodology: Clustering Based Oversampling (CBOS)
The proposed Clustering Based Oversampling (CBOS) algorithm addresses these limitations by using the global spatial structure of the minority class to guide data generation. The process involves several key steps:
- Clustering: The algorithm applies k-Means clustering to the minority class samples to identify representative centroids.
- Distance-Based Weighting: It calculates the Euclidean distance from each minority sample to its nearest centroid. A weight metric is assigned such that samples closer to the centroid are prioritized for synthetic generation.
- Synthetic Generation: New samples are created by adding a controlled "jitter" to original points. By generating more samples near the cluster centers, CBOS reinforces the most representative regions of the minority class distribution.
- Spatial Integrity and Outlier Prevention: To prevent overfitting and the creation of impossible data points, the algorithm clips attribute values of synthetic samples to ensure they remain within the original feature bounds. Crucially, CBOS operates independently of the majority class, ensuring its learning process remains undisturbed.
Experimental Results
The effectiveness of CBOS was evaluated using Deep Neural Networks (DNNs) across six binary classification datasets, including MNIST digit pairs with induced imbalance and high-dimensional psychometric and insurance fraud data. CBOS was compared against standard benchmarks: Imbalanced (no resampling), SMOTE, SMT-ENN, and ADASYN.
As shown in the results table, CBOS consistently outperformed other techniques across nearly all metrics, including Precision, Recall, F-score, and G-Mean. For instance, on Data-1, CBOS achieved a near-perfect G-Mean of 0.992. On the highly imbalanced Data-4, it reached an F-score of 0.943, significantly higher than SMOTE (0.933) and ADASYN (0.937). These results indicate that as imbalance becomes more severe, the performance gap between CBOS and traditional methods tends to widen.
Conclusion
CBOS offers a robust, mathematically grounded alternative for handling skewed datasets. By leveraging the internal distribution of the minority class through clustering, it avoids the noise generation typical of local interpolation methods. Future research may explore the integration of more complex clustering models, such as Gaussian Mixture Models, and the application of CBOS within ensemble learning frameworks to further enhance classification performance.
Summary updated