[Paper Review] FairXGBoost: Fairness-aware Classification in XGBoost
This paper introduces FairXGBoost, a fairness-aware extension of XGBoost that integrates a regularization-based bias mitigation technique directly into the tree-building process with minimal code changes. It achieves state-of-the-art fairness performance—matching or exceeding existing methods—while preserving XGBoost’s scalability, transparency, and high predictive accuracy on benchmark datasets.
Highly regulated domains such as finance have long favoured the use of machine learning algorithms that are scalable, transparent, robust and yield better performance. One of the most prominent examples of such an algorithm is XGBoost. Meanwhile, there is also a growing interest in building fair and unbiased models in these regulated domains and numerous bias-mitigation algorithms have been proposed to this end. However, most of these bias-mitigation methods are restricted to specific model families such as logistic regression or support vector machine models, thus leaving modelers with a difficult decision of choosing between fairness from the bias-mitigation algorithms and scalability, transparency, performance from algorithms such as XGBoost. We aim to leverage the best of both worlds by proposing a fair variant of XGBoost that enjoys all the advantages of XGBoost, while also matching the levels of fairness from the state-of-the-art bias-mitigation algorithms. Furthermore, the proposed solution requires very little in terms of changes to the original XGBoost library, thus making it easy for adoption. We provide an empirical analysis of our proposed method on standard benchmark datasets used in the fairness community.
Motivation & Objective
- Address the gap between fairness-aware machine learning and scalable, interpretable models like XGBoost in regulated industries.
- Develop a bias-mitigation framework compatible with XGBoost’s greedy tree-building algorithm, which is incompatible with most existing fairness methods.
- Maintain high model performance while achieving strong fairness metrics (e.g., Disparate Impact ≥ 80%) without relying on complex adversarial training.
- Enable practical adoption in finance and healthcare by combining XGBoost’s strengths with fairness guarantees through minimal modifications.
- Provide a plug-and-play solution that allows modelers to control fairness-accuracy trade-offs via a single hyperparameter (μ) without retraining from scratch.
Proposed method
- Introduce a fairness regularizer into XGBoost’s objective function that penalizes model predictions based on disparities in outcomes across sensitive groups.
- Derive modified gradient and Hessian values for the regularized objective to maintain compatibility with XGBoost’s second-order gradient boosting framework.
- Integrate the fairness regularizer directly into the split evaluation process during tree construction, ensuring in-process fairness optimization.
- Use a differentiable, continuous regularizer that allows end-to-end optimization within XGBoost’s existing training pipeline.
- Control the trade-off between fairness and accuracy via a hyperparameter μ, which scales the strength of the fairness penalty.
- Leverage XGBoost’s native support for evaluation metrics to monitor fairness-accuracy trade-offs during training.
Experimental results
Research questions
- RQ1Can a fairness-aware regularization technique be effectively integrated into XGBoost’s tree-building process without breaking its core optimization framework?
- RQ2How does the proposed FairXGBoost method compare to state-of-the-art fairness methods in terms of fairness (e.g., Disparate Impact) and predictive accuracy?
- RQ3To what extent can FairXGBoost maintain high model performance while achieving acceptable fairness levels (e.g., DI ≥ 80%) across diverse benchmark datasets?
- RQ4How does the choice of fairness hyperparameter μ affect the balance between fairness and accuracy in practice?
- RQ5Can the method be applied to datasets where the vanilla XGBoost model already exhibits low bias, and how does it perform in such cases?
Key findings
- FairXGBoost outperforms (Grari et al., 2019), (Zhang et al., 2018), and (Kamishima et al., 2012) in terms of accuracy drop while achieving comparable or better fairness on all datasets except Adult.
- On the Adult dataset, where the vanilla XGBoost model already had low fairness, FairXGBoost required μ ∈ [0.6, 0.7] to reach DI ≥ 0.8, indicating a higher trade-off cost.
- On the COMPAS dataset, FairXGBoost achieved acceptable fairness (DI ≥ 0.8) at a lower μ value (μ ∈ [0.2, 0.5]), suggesting better efficiency on this dataset.
- The Bank and Default datasets showed that the vanilla XGBoost model already met the DI ≥ 0.8 threshold, and FairXGBoost maintained this without degradation.
- The method enables fine-grained control over fairness via μ, with maximum-accuracy models selected at each μ value, showing a practical trade-off curve for modelers.
- The framework is compatible with XGBoost’s native evaluation tracking, enabling real-time monitoring of fairness-accuracy trade-offs during training.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.