FARF: A Fair and Adaptive Random Forests Classifier

Wenbin Zhang, Albert Bifet, Xiangliang Zhang, Jeremy C. Weiss, Wolfgang Nejdl

Abstract

Algorithmic fairness is traditionally studied in static, offline environments where data distributions are fixed. However, real-world applications such as credit scoring and insurance pricing increasingly rely on continuous data streams where both the underlying data distribution (concept drift) and the fairness relationships (fairness drift) evolve over time. This paper introduces FARF (Fair and Adaptive Random Forests), a novel ensemble learning framework designed to maintain high predictive accuracy while mitigating bias in dynamic environments. By integrating fairness-aware splitting criteria, a strategic under-sampling approach, and automated drift detection, FARF provides a robust solution for fair online decision-making.

Introduction

As machine learning models are increasingly deployed in high-stakes domains, ensuring their decisions are equitable has become a primary concern. Most existing fairness-aware algorithms assume an offline setting, but streaming data presents unique challenges. In an online environment, a model that is fair at deployment may become discriminatory as the population distribution shifts—a phenomenon known as fairness drift. Furthermore, practitioners often struggle with the inherent trade-off between accuracy and fairness, which typically requires tuning complex, non-intuitive hyperparameters. FARF addresses these issues by providing an adaptive ensemble model that balances these competing objectives through a single, controllable parameter.

The FARF Framework

FARF extends the traditional Random Forest architecture for the streaming context by introducing three core innovations:

1. Fair Information Gain (FIG)

Standard decision trees use Information Gain (IG) to maximize predictive accuracy at each split. FARF replaces this with Fair Information Gain (FIG). This metric incorporates a fairness penalty into the splitting criterion, discouraging splits that would lead to a significant increase in statistical disparity between protected and unprotected groups. This ensures that fairness is considered at the foundational level of the model's growth.

2. Fairness-aware Under-sampling

To address class and group imbalances, many algorithms utilize over-sampling of the minority group. However, in a streaming context, this can lead to overfitting on a limited set of minority instances. FARF adopts a counter-intuitive but effective alternative: under-sampling the unprotected positive group. By strategically reducing the representation of the privileged group receiving positive outcomes, FARF effectively "shrinks" the decision region for the privileged class, forcing the model to learn a more equitable decision boundary without over-specializing on the minority group.

3. Adaptive Drift Detection with ADWIN

To handle the dynamic nature of data streams, FARF utilizes the ADWIN (Adaptive Windowing) algorithm. ADWIN monitors both the accuracy and the fairness metrics of each tree in the ensemble in real-time. If a significant drift is detected—indicating that a tree's performance or fairness has degraded due to changes in the data distribution—the algorithm triggers the creation of a "standby tree" to replace the underperforming component. This allows the ensemble to remain current and fair as the environment evolves.

Experimental Evaluation

The authors evaluated FARF using two benchmark datasets: the Adult and Census datasets. To simulate a streaming environment with drift, the data was ordered by the "race" attribute. In these experiments, "gender" served as the sensitive attribute, and the goal was to predict income levels.

Key Results

FARF demonstrated superior performance compared to standard streaming baselines like Hoeffding Trees (HT) and Adaptive Random Forests (ARF):

  • Bias Mitigation: On the Adult dataset, FARF reduced discrimination from approximately 24% (in standard HT) to 8.89%. On the larger Census dataset, it achieved a near-perfect discrimination score of 0.07%, a significant improvement over the 6.6% baseline.
  • Performance Retention: FARF maintained high accuracy despite its fairness constraints. On the Census dataset, it achieved 94.83% accuracy, slightly outperforming the standard ARF (94.18%) while providing much higher fairness.
  • Tunable Control (The $\alpha$ Parameter): The algorithm introduces a parameter, $\alpha$, which controls the under-sampling ratio. Experiments confirmed that $\alpha$ acts as a reliable "knob": increasing $\alpha$ monotonically increases accuracy while also increasing discrimination, allowing practitioners to precisely select the desired balance for their specific application.

Discussion and Limitations

FARF's primary contribution is the demonstration that under-sampling the privileged group is often more effective for online fairness than over-sampling the deprived group, as it prevents the model from becoming too specialized. Furthermore, by treating fairness as a dynamic metric subject to drift, FARF ensures long-term equitable performance.

However, the framework currently has limitations. It focuses primarily on statistical parity, and while this is a common legal standard, it does not explicitly address other fairness definitions like equal opportunity. Additionally, the current implementation is optimized for binary sensitive attributes and binary classification. While the inclusion of standby trees and FIG calculations introduces some computational overhead, the trade-off is justified by the model's adaptability and fairness.

Conclusion

FARF represents a significant step forward in making fair machine learning practical for real-world, streaming applications. By simplifying the accuracy-fairness trade-off into a single parameter and providing robust mechanisms for drift adaptation, FARF enables the deployment of models that are not only accurate but also consistently equitable over time.

Summary updated

BibTeX
@inproceedings{zhang2021farf,
  author = {Wenbin Zhang and Albert Bifet and Xiangliang Zhang and Jeremy C. Weiss and Wolfgang Nejdl},
  title = {{FARF: A Fair and Adaptive Random Forests Classifier}},
  booktitle = {PAKDD},
  year = {2021},
  doi = {10.1007/978-3-030-75765-6\_20},
}
Figure