Imbalanced Big Data Oversampling: Taxonomy, Algorithms, Software, Guidelines and Future Directions

William C. Sleeman Iv, Bartosz KrawczykarXiv 2021 · DOI · OpenReview

TL;DR

This paper tackles the challenge of imbalanced data in big data machine learning by adapting and evaluating 14 oversampling algorithms on Apache Spark. They introduce a comprehensive taxonomy, a new Spark library, and provide crucial guidelines for designing future scalable oversampling methods, highlighting the importance of local instance-level information.

What Problem Does This Paper Address?

Machine learning models often struggle with imbalanced datasets, where one class significantly outnumbers others. This bias is exacerbated in the "big data" era, where massive datasets require distributed computing frameworks like Apache Spark. Existing oversampling techniques, designed for smaller datasets, don't readily translate to Spark's distributed architecture, leading to performance issues and scalability challenges. The authors aim to bridge this gap by providing a holistic approach to oversampling for imbalanced big data, including a taxonomy, practical implementations, and empirical analysis.

Methods

The core contribution is the adaptation and evaluation of 14 state-of-the-art oversampling algorithms for Apache Spark. This involved:

  • Taxonomy: Developing a structured classification of oversampling algorithms based on their instance generation mechanisms and how they utilize class information.
  • Spark Implementation: Creating a Scala library (spark-class-balancing) that implements these algorithms within the Spark framework, using a fit/transform pattern similar to Spark MLlib. Multi-class support was added using a one-vs-all approach.
  • Experimental Study: Conducting extensive experiments on 26 diverse binary and multi-class datasets to evaluate the performance, accuracy-time trade-offs, and scalability of the implemented algorithms across different classifiers (Random Forest, SVM, Naive Bayes).
  • Guidelines: Deriving design principles for future oversampling algorithms in big data contexts, based on the insights gained from component analysis and experimental results.

Datasets

The authors used 26 datasets for their experiments, categorized as:

  • Two-class datasets with binary features.
  • Two-class datasets with continuous features.
  • Multi-class datasets with continuous features.

These datasets were selected to provide a wide range of feature counts and class imbalance ratios. For computational feasibility, a sub-section of 100,000 examples was used from each dataset.

Key Insights and Ideas

  • Local Information is King: For big data oversampling on Spark, local instance-level information (e.g., neighborhood characteristics) is significantly more useful than global or modality-based information. This is attributed to Spark's data partitioning, which can disrupt global spatial relationships.
  • Not All Information is Equal: While informed oversampling is generally expected to outperform standard methods, the results show that not all information about instances is equally important. Some complex, globally-aware methods performed poorly.
  • Hybrid Approaches Show Promise: While undersampling alone might be insufficient, combining it with oversampling (e.g., data cleaning by translating majority observations, as in CCR) can enhance performance.
  • Simplicity Can Be Scalable: Algorithms with fewer parameters or those that can adapt automatically (self-tuning) are more feasible for hyperparameter tuning in big data scenarios, reducing computational burden.
  • Random Oversampling's Resilience: Surprisingly, Random Oversampling, despite using no instance-level information, often performed competitively, especially with Random Forest, highlighting its scalability and robustness in certain contexts.

Key Results

  • Performance: Guided oversampling methods like Borderline SMOTE, Safe-level SMOTE, ADASYN, and CCR consistently performed well, especially on binary datasets. For multi-class problems, Cluster SMOTE showed improvement, but local methods still led.
  • Scalability: Algorithms with complex components like k-NN searches (especially those needing radius-based searches), dependent loops, and probabilistic sampling struggled with scalability on Spark. ANS, MWMOTE, and RBO were found to be significantly slower than SMOTE.
  • Trade-offs: No single algorithm was universally the best. Random Oversampling offered good accuracy-time trade-offs for certain datasets and classifiers, but not others. Borderline SMOTE, Cluster SMOTE, Gaussian SMOTE, and NRAS showed good trade-offs in specific scenarios.
  • Classifier Impact: Random Forest could utilize Random Oversampling more efficiently due to its ensemble nature. SVM and Naive Bayes benefited more significantly from guided oversampling.

Limitations and Future Work

  • Efficiency Limitations: Some implementations, while faithful to original designs, have efficiency limitations in Spark.
  • Scalability Issues: ANS, MWMOTE, and RBO were too slow for full experimental inclusion, indicating scalability challenges.
  • Future Work:
    • Updating the library to newer Spark versions and integrating with a custom spark-knn fork.
  • Extending the library to include undersampling, hybrid methods, and ensemble techniques.
  • Developing self-tuning oversampling algorithms to reduce hyperparameter tuning complexity.
  • Further exploring hybrid oversampling strategies that leverage undersampling/data cleaning.
  • Focusing on low-complexity local data analysis for scalable oversampling.

Summary updated

Abstract

Learning from imbalanced data is among the most challenging areas in contemporary machine learning. This becomes even more difficult when considered the context of big data that calls for dedicated architectures capable of high-performance processing. Apache Spark is a highly efficient and popular architecture, but it poses specific challenges for algorithms to be implemented for it. While oversampling algorithms are an effective way for handling class imbalance, they have not been designed for distributed environments. In this paper, we propose a holistic look on oversampling algorithms for imbalanced big data. We discuss the taxonomy of oversampling algorithms and their mechanisms used to handle skewed class distributions. We introduce a Spark library with 14 state-of-the-art oversampling algorithms implemented and evaluate their efficacy via extensive experimental study. Using binary and multi-class massive data sets, we analyze the effectiveness of oversampling algorithms and their relationships with different types of classifiers. We evaluate the trade-off between accuracy and time complexity of oversampling algorithms, as well as their scalability when increasing the size of data. This allows us to gain insight into the usefulness of specific components of oversampling algorithms for big data, as well as formulate guidelines and recommendations for designing future resampling approaches for massive imbalanced data. Our library can be downloaded from https://github.com/fsleeman/spark-class-balancing.git.
BibTeX
@misc{iv2021imbalanced,
  author = {William C. Sleeman IV and Bartosz Krawczyk},
  title = {{Imbalanced Big Data Oversampling: Taxonomy, Algorithms, Software, Guidelines and Future Directions}},
  year = {2021},
  eprint = {2107.11508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.11508},
}
Figure