Abstract
In the evolving landscape of real-time machine learning, data streams present a dual challenge: severe class imbalance and inherent algorithmic bias. While existing methods address these issues in isolation, they often exacerbate one while solving the other. This paper introduces Continuous Fair SMOTE (CFSMOTE), a pre-processing algorithm designed to mitigate discrimination and class imbalance simultaneously in non-stationary data environments. By integrating window-based oversampling with individual fairness filtering via situation testing, CFSMOTE ensures that minority groups are adequately represented and treated equitably as data distributions evolve.
Introduction
Machine learning models deployed in dynamic environments—such as credit scoring, fraud detection, or social media filtering—must process data streams where underlying patterns change over time, a phenomenon known as concept drift. Two critical hurdles frequently emerge in these settings: Class Imbalance, where rare events (e.g., fraudulent transactions) are difficult to learn, and Algorithmic Bias, where models inadvertently discriminate against protected groups based on attributes like gender or race.
Standard stream-sampling techniques, such as C-SMOTE, effectively address imbalance but often inadvertently increase bias. Conversely, many "fair" stream learners focus exclusively on group-level statistics, neglecting individual fairness—the principle that similar individuals should receive similar outcomes. CFSMOTE addresses these gaps by providing a fairness-aware evolution of synthetic oversampling.
Methodology
CFSMOTE operates as a pre-processing layer, refining the data stream before it reaches the classifier. The framework consists of four primary components:
1. Four-Way Windowing
Rather than a binary classification of "Positive" vs. "Negative," CFSMOTE partitions incoming data into four distinct buckets based on the intersection of the class label and the sensitive attribute (e.g., Privileged-Positive, Unprivileged-Positive, Privileged-Negative, and Unprivileged-Negative). This allows for granular control over representation.
2. Dynamic Drift Detection
The algorithm utilizes ADWIN (Adaptive Windowing) to monitor the stream. When ADWIN detects a shift in the distribution of classes or sensitive attributes, the window size resets. This ensures the model adapts to concept drift and does not rely on stale, potentially biased historical data.
3. Fair Oversampling
To combat class imbalance, CFSMOTE identifies underrepresented groups within the current window and generates synthetic examples using SMOTE logic. This balances the training set across both class labels and sensitive attributes.
4. Situation Testing (The Fairness Filter)
This component serves as the "secret sauce" for individual fairness. Before any sample (real or synthetic) is passed to the classifier, it undergoes a proxy test. The algorithm "flips" the sensitive attribute of the sample (e.g., changing 'Male' to 'Female') and observes if a proxy model's prediction changes. If the outcome is inconsistent, the sample is flagged as a source of individual unfairness and discarded, preventing the model from learning discriminatory patterns.
Experimental Evaluation
The researchers evaluated CFSMOTE using two benchmark datasets adapted for streaming contexts: the Adult Dataset (predicting income based on census data) and the KDD Census (a larger, more imbalanced version). To simulate a continuous data arrival, these static datasets were "streamified" through random permutation.
Key Insights
- C-SMOTE as a Bias Multiplier: The study confirms that while standard C-SMOTE improves predictive performance on imbalanced data, it significantly increases discrimination scores. Addressing imbalance without a fairness constraint creates more biased models than using raw data.
- Individual Fairness Drives Group Fairness: By enforcing individual fairness through situation testing, the model naturally improves group-level metrics such as Statistical Parity and Equal Opportunity.
- The Accuracy-Fairness Synergy: On the KDD Census dataset, CFSMOTE actually outperformed the biased C-SMOTE in terms of balanced accuracy (80.10% vs. 78.83%). This suggests that in highly imbalanced streams, fairness-aware sampling can help the model better understand the nuances of the minority class.
Results
CFSMOTE was compared against vanilla C-SMOTE and other fair learners like FABBOO and FAHT. Key findings include:
- Fairness Gains: On the Adult dataset, CFSMOTE reduced Equal Opportunity disparity by 75% compared to C-SMOTE.
- Predictive Power: CFSMOTE achieved superior balanced accuracy on the KDD dataset while simultaneously slashing discrimination metrics.
- Individual Fairness: The algorithm consistently achieved the best scores for individual fairness, validating the effectiveness of the situation testing filter.
Conclusion and Future Work
CFSMOTE demonstrates that it is possible to tackle class imbalance and algorithmic bias in tandem within data streams. However, a primary limitation remains the lack of true non-stationary fairness benchmarks that feature "real" concept drift where the relationship between features and fairness evolves over time. Future research will focus on developing more complex benchmarks and exploring intersectional fairness—ensuring equity across multiple overlapping protected attributes such as race and gender simultaneously.
Summary updated