Introduction
In modern data environments, such as smart city sensor networks or financial transaction monitoring, data is rarely static. These environments generate continuous data streams characterized by two significant challenges: nonstationarity (concept drift) and class imbalance. Concept drift occurs when the underlying statistical properties of the data change over time, rendering historical models obsolete. Class imbalance occurs when the events of interest—such as equipment failures or fraudulent transactions—are significantly rarer than normal operations.
Traditional machine learning approaches typically address these issues in isolation. Active methods focus on detecting sudden changes to trigger model retraining, while passive methods continuously update models to adapt to gradual shifts. This paper introduces HAREBA (Hybrid-Adaptive REBAlancing), a framework that integrates both strategies to maintain high classification performance in the presence of severe imbalance and abrupt concept drift.
The Dual Challenge: Drift and Imbalance
Most classification algorithms are designed to maximize overall accuracy, which often leads them to ignore the minority class in imbalanced datasets. In a stream with a 1% minority ratio, a model can achieve 99% accuracy by simply predicting the majority class every time, despite failing to identify any critical events.
When concept drift is introduced, the problem compounds. A "concept swap" might occur where the previously rare class becomes the majority, or the decision boundary shifts such that the model's learned features no longer apply. To handle this, a model must not only rebalance its internal representation of the classes but also recognize when its current knowledge base is fundamentally flawed.
The HAREBA Framework
HAREBA builds upon the AREBA (Adaptive REBAlancing) algorithm, evolving it from a purely passive learner into a hybrid system. The architecture consists of two primary components working in tandem:
1. Passive Memory-Based Rebalancing
HAREBA maintains two distinct memory queues: one for minority class examples and one for majority class examples. By dynamically resizing these queues, the framework ensures that the training data used to update the model remains balanced. This incremental learning happens at every time step, allowing the model to adapt to gradual changes without requiring explicit triggers.
2. Active Drift Detection
To handle sudden, catastrophic changes, HAREBA monitors model performance using a Binomial distribution model. It tracks error rates against three specific thresholds:
- Warning Threshold: If performance begins to degrade, the system enters a warning state and starts buffering incoming data into a dedicated "drift queue."
- Drift Threshold: If performance falls below a critical level, the current model is discarded. A new model is then "warm-started" using the accumulated data in the drift queue, allowing for a much faster recovery than starting from scratch.
- Improvement Threshold: If the model's performance recovers during the warning phase (due to the passive component's incremental updates), the warning is canceled, preventing unnecessary resets.
Experimental Evaluation
The authors evaluated HAREBA using three synthetic benchmarks—Circle, Sine, and Sea—which allowed for precise control over the timing of drifts and the severity of imbalance. The experiments simulated "concept swaps" at two imbalance levels: mild (10%) and severe (1%).
HAREBA was compared against several state-of-the-art baselines, including cost-sensitive online gradient descent (CSOGD) and online oversampling bagging (OOB). The primary metric used was the G-mean, which calculates the geometric mean of the accuracies of both classes, providing a more reliable measure of performance on imbalanced data than standard accuracy.
Key Findings
- Synergistic Adaptation: The integration of active and passive strategies proved superior to using either in isolation. The active component provided the speed necessary to recover from sudden swaps, while the passive component provided the stability needed to handle extreme imbalance.
- Rapid Recovery: In the "Sea" and "Sine" datasets, HAREBA demonstrated near-instantaneous recovery following a concept swap. In contrast, purely passive methods often required thousands of additional samples to regain their previous performance levels.
- Resilience to Severe Imbalance: Even at a 1% imbalance ratio, HAREBA maintained high G-mean scores. Many traditional methods saw their performance collapse to near zero following a drift under these conditions, as they failed to capture enough minority samples to rebuild the decision boundary.
- The Value of the Warning Buffer: The use of a drift queue during the warning phase was identified as a critical innovation. By pre-collecting relevant data before a formal drift is declared, the system ensures the replacement model has immediate context.
Conclusion and Future Work
HAREBA demonstrates that a hybrid approach is essential for the robust classification of complex data streams. By combining memory-based rebalancing with statistical drift detection, the framework achieves high accuracy and fast adaptation even under severe class imbalance.
While the current results on synthetic data are promising, future research should focus on validating HAREBA against real-world datasets characterized by noisy features and non-binary drifts. Additionally, exploring more sophisticated statistical tests for the active trigger, such as the Kolmogorov-Smirnov test, may further refine the system's sensitivity to subtle environmental changes.
Summary updated