F AIR GBM: G RADIENT B OOSTING WITH F AIRNESS C ONSTRAINTS
Anonymous authors
Paper under double-blind review
A BSTRACT
Tabular data is prevalent in many high stakes domains, such as financial services or public policy.
Gradient boosted decision trees (GBDT) are popular in these settings due to performance guarantees and low cost.
However, in consequential decision-making fairness is a foremost concern.
Despite GBDT’s popularity, existing in-processing Fair ML methods are either inapplicable to GBDT, or incur in significant train time overhead, or are inadequate for problems with high class imbalance – a typical issue in these domains.
We present FairGBM, a dual ascent learning framework for training GBDT under fairness constraints, with little to no impact on predictive performance when compared to unconstrained GBDT.
Since observational fairness metrics are non-differentiable, we have to employ a “proxy-Lagrangian” formulation using smooth convex error rate proxies to enable gradient-based optimization.
Our implementation 1 shows an order of magnitude speedup in training time when compared with related work, a pivotal aspect to foster the widespread adoption of FairGBM by real-world practitioners.
I NTRODUCTION
The use of Machine Learning (ML) algorithms to inform consequential decision-making has become ubiquitous in a multitude of high-stakes mission critical applications, from financial services to criminal justice or healthcare (Bartlett et al., 2019; Brennan et al., 2009; Tomar & Agarwal, 2013).
At the same time, this widespread adoption of ML was followed by reports surfacing the risk of bias and discriminatory decision-making affecting people based on ethnicity, gender, age, and other sensitive attributes (Angwin et al., 2016; Bolukbasi et al., 2016; Buolamwini & Gebru, 2018).
This awareness led to the rise of Fair ML, a research area focused on discussing, measuring and mitigating the risk of bias and unfairness in ML systems.
Despite the rapid pace of research in Fair ML (Hardt et al., 2016;
Zafar et al., 2017; Agarwal et al., 2018; Narasimhan et al., 2019; Celis et al., 2021) and the release of several open-source software packages (Saleiro et al., 2018; Bellamy et al., 2018; Agarwal et al., 2018; Cotter et al., 2019b), there is still no clear winning method that “just works” regardless of data format and bias conditions.
Fair ML methods are usually divided into three families: pre-processing, in-processing and postprocessing.
Pre-processing methods aim to learn an unbiased representation of the training data but may not guarantee fairness in the end classifier (Zemel et al., 2013; Edwards & Storkey, 2016); while post-processing methods inevitably require test-time access to sensitive attributes and may not always generalize (Hardt et al., 2016;
Woodworth et al., 2017).
Most in-processing Fair ML methods rely on fairness constraints to impede the model from disproportionately hurting protected groups (Zafar et al., 2017; Agarwal et al., 2018; Cotter et al., 2019b).
Using constrained optimization, we can optimize for the predictive performance of fair models.
In principle, in-processing methods have the potential to introduce fairness with no training-time overhead and a minimal predictive performance cost – an ideal outcome for most mission critical applications, such as financial fraud detection or medical diagnosis.
Sacrificing a few percentage points of predictive performance in a mission critical application may result in catastrophic outcomes, from safety hazards to substantial monetary losses.
Therefore, the use of Fair ML in mission critical systems is particularly challenging, as fairness must be achieved with minimal performance drops.
Tabular data is a common data format in a variety of mission critical ML applications (e.g., financial services).
While deep learning is the dominant paradigm for unstructured data, gradient boosted decision trees (GBDT) algorithms are pervasive in tabular data due their state-of-the art performance and the availability of fast, scalable, ready-to-use implementations (e.g., LightGBM (Ke et al., 2017),
XGBoost (Chen & Guestrin, 2016)).
Unfortunately, Fair ML research still lacks suitable fairnessconstrained frameworks for GBDT, making it challenging to satisfy stringent fairness requirements.
As a case in point, Google’s TensorFlow Constrained Optimization (TFCO) (Cotter et al., 2019b), a well-known in-processing bias mitigation technique, is only compatible with neural network models.
Conversely, Microsoft’s ready-to-use fairlearn EG framework (Agarwal et al., 2018) supports GBDT models, but carries a substantial training overhead, and can only output binary scores instead of a continuous scoring function, making it inapplicable to a variety of use cases.
Particularly, the production of binary scores is incompatible with deployment settings with a fixed budget for positive predictions ( e.g. , resource constraint problems (Ackermann et al., 2018)) or settings targeting a specific point in the ROC curve ( e.g. , fixed false positive rate), such as in fraud detection.
To address this gap in Fair ML, we present FairGBM, a framework for fairness constrained optimization tailored for GBDT.
Our method incorporates the classical method of Lagrange multipliers within gradient-boosting, requiring only the gradient of the constraint w.r.t.
(with relation to) the model’s output ˆ Y .
Lagrange duality enables us to perform this optimization process efficiently as a two-player game: one player minimizes the loss w.r.t.
ˆ Y , while the other player maximizes the loss w.r.t.
the Lagrange multipliers.
As fairness metrics are non-differentiable, we employ differentiable proxy constraints.
Our method is inspired by the theoretical ground-work of Cotter et al.
(2019b), which introduce a new “proxy-Lagrangian” formulation, and prove that a stochastic equilibrium solution does exist even when employing proxy constraints.
Contrary to related work, our approach does not require training extra models, nor keeping the training iterates in memory.
We apply our method to a large-scale account opening fraud case study, as well as to the benchmark
ACSIncome dataset (Ding et al., 2021).
Moreover, we enable fairness constraint fulfillment at a specific ROC point, finding fair models that fulfill business restrictions on the number of allowed false positives.
This feature is a must for problems with high class imbalance, as the prevailing approach of using a decision threshold of 0 .
5 is only optimal when maximizing accuracy.
When compared with state-of-the-art in-processing fairness interventions, our method consistently achieves improved predictive performance for the same value of fairness.
In summary, this work’s main contributions are:
• A novel constrained optimization framework for gradient-boosting, dubbed FairGBM.
• Differentiable proxy functions for popular fairness metrics based on the cross-entropy loss.
• An open-source high-performance implementation of our algorithm.
• Validation on a large public dataset and a real-world case-study.
F AIR GBM F RAMEWORK
We propose a fairness-aware variant of the gradient-boosting training framework, dubbed FairGBM.
Our method minimizes predictive loss while enforcing group-wise parity on one or more error rates.
We focus on the GBDT algorithm, which uses regression trees as the base weak learners (Breiman, 1984).
Moreover, the current widespread use of GBDT is arguably due to two highly scalable variants of this algorithm:
XGBoost (Chen & Guestrin, 2016) and LightGBM (Ke et al., 2017).
In this work we provide a fairness-aware implementation of LightGBM.
Our work is, however, generalizable to any gradient-boosting algorithm, and to any set of differentiable constraints (not limited to fairness constraints). We refer the reader to Appendix G for notation disambiguation.
2. O PTIMIZATION UNDER F AIRNESS C ONSTRAINTS
Constrained optimization (CO) approaches aim to find the set of parameters θ ∈ Θ that minimize the standard predictive loss L of a model f
θ given a set of m fairness constraints c
i , i ∈ { 1 , ..., m } :
[Equation]
This problem is often re-formulated using the Lagrangian function,
[Equation]
where λ ∈ R m + is the vector of Lagrange multipliers.
The problem stated in Equation 1 is then, under reasonable conditions, equivalent to:
[Equation]
which can be viewed as a zero-sum two-player game, where one player (the model player) minimizes the Lagrangian w.r.t.
the model parameters θ , while the other player (the constraint player) maximizes it w.r.t.
the Lagrange multipliers λ
(Neumann, 1928).
A pure equilibrium to this game will not exist in general for a given CO problem.
Sufficient conditions for there to be one are, for example, that the original problem is a convex optimization problem satisfying an appropriate constraint qualification condition (Boyd et al., 2004).
Consequently, two main issues arise when using classic CO methods with fairness metrics: the loss functions of state-of-the-art ML algorithms are non-convex (as is the case of neural networks), and standard fairness metrics are non-convex and non-differentiable.
2. D IFFERENTIABLE P ROXIES FOR F AIRNESS M ETRICS
As a fundamentally subjective concept, there is no “one-size-fits-all” definition of fairness.
Nonetheless, popular fairness notions can be defined as equalizing rate metrics across sensitive attributes (Saleiro et al., 2018; Barocas et al., 2019).
For example, equality of opportunity (Hardt et al., 2016) is defined as equalizing expected recall across members of specific protected groups ( e.g. , different genders or ethnicities).
We will focus on fairness metrics for classification tasks, as the discontinuities between class membership pose a distinct challenge (non-differentiability of the stepwise function).
Extension to the regression setting is fairly straightforward, as these discontinuities are no longer present and common fairness metrics are already differentiable (Agarwal et al., 2019).
In the general case, a model f is deemed fair w.r.t.
the sensitive attribute S and some rate metric L if the expected value of L is independent of the value of s ∈ S :
[Equation]
Equation 4 can be naturally viewed as an equality constraint in the model’s training process after replacing expectations under the data distribution by their sample averages.
However, as discussed in Section 2.1, common fairness notions ( i.e. , common choices of L ) are non-convex and nondifferentiable.
Therefore, in order to find a solution to this CO problem, we must use some proxy metric ˜ L that is indeed differentiable (or at least sub-differentiable) (Cotter et al., 2019b).
Figure 1 shows examples of convex and sub-differentiable surrogates for the False Positive Rate (FPR).
Equalizing FPR among sensitive attributes is also known as predictive equality (Corbett-Davies [Table] et al., 2017).
As any function of the confusion matrix, the FPR takes in predictions binarized using a step-wise function.
As no useful gradient signal can be extracted from the step-wise function, we instead use a cross-entropy-based proxy metric that upper-bounds the step-wise function.
Ideally, for some fairness constraint c , we can guarantee its fulfillment by solving the CO problem using a proxy upper-bound ˜ c , such that c ( θ ) ≤ ˜ c ( θ ) ≤ 0 .
Note that, while Cotter et al.
(2019b) use a hinge-based proxy, which has a discontinuous derivative, we opt for a cross-entropy-based proxy, which has a continuous derivative, leading to a smoother optimization process.
Table 1 shows instance-wise rate metrics commonly used to compose fairness metrics and the proposed proxy counterparts.
In practice, the fairness constraint in Equation 4 is implemented using the set of m = |S| inequalities in Equation 5, i.e. , we have, for every b ∈ S :
[Equation]
where ϵ ∈ R + ∪ { 0 } is the allowed constraint violation, and
[Equation]
is the proxy loss measured over the dataset D ( S = s ) ⊆ D of samples with sensitive attribute S = s .
Original (non-proxy) counterpart functions, c b and L ( S = s ) , are obtained by substituting the proxy instance-wise metric ˜ l with its original (potentially non-differentiable) counterpart l .
2. F AIRNESS -A WARE GBDT
If our objective function and constraints were convex, we could find the pure Nash equilibrium of the zero sum, two-player game corresponding to the saddle point of the Lagrangian, L .
This equilibrium could be found by iterative and interleaved steps of gradient descent over our model function, f , and ascent over the Lagrange multipliers, λ .
Importantly, this setting is relevant for GBDT models but not for Neural Networks, as the first have a convex objective and the latter do not.
See Appendix B for a discussion on the limitations of our method.
However, as discussed in Section 2.2, fairness constraints are not differentiable, and we must employ differentiable proxies to use gradient-based optimization.
Instead of using the Lagrangian L , we instead use a proxy-Lagrangian ˜ L , [Equation]
[Equation]
where L is a predictive loss function, and ˜ c i is a proxy inequality constraints given by Equation 5.
On the other hand, simply using ˜ L for both descent and ascent optimization steps would now be enforcing our proxy-constraints and not necessarily the original ones.
Thus, following Cotter et al.
(2019b), we adopt a non-zero sum two-player game formulation where the descent step for the model player uses the proxy-Lagrangian ˜ L and the ascent step for the λ -player uses the Lagrangian L with the original constraints.
The FairGBM training process (Algorithm 1) is as follows:
Descent step.
The FairGBM descent step consists in minimizing the loss ˜
L over the function space
H (Equation 7).
That is, fitting a regression tree on the pseudo-residuals r t,i = − g t,i , where g is the
Input: T ∈ N , number of boosting rounds
L , ˜ L : F × R m + → R , Lagrangian and proxy-Lagrangian η f , η λ ∈ R + , learning rates 1: Let h 0 =
arg min
γ ∈ R ˜
L ( γ, 0)
▷ Initial constant “guess” 2: Initialize f ← h3: Initialize λ ←4: for t ∈ { 1 , . .
, T } do 5:
Let g i =
∂
˜ L ( f ( x i ) ,λ ) ∂f ( x i )
▷ Gradient of proxy-Lagrangian w.r.t.
model 6:
Let ∆ =
∂ L ( f ( x i ) ,λ )
∂λ ▷ Gradient of Lagrangian w.r.t.
multipliers 7:
Let h t = arg min h t ∈H (cid:80) Ni
=1 ( − g i − h t ( x i ))
▷ Fit base learner 8:
Update f ← f + η f h t ▷ Gradient descent 9:
Update λ ← ( λ + η λ ∆)
+ ▷ Projected gradient ascent 10: return h 0 , . .
, h T gradient of the proxy-Lagrangian, g t,i = ∂
˜ L ( f,λ ) ∂f ( x i ) , g t [Equation] i =
[Equation] if [Equation] where f ( x i )
=
f t − 1 ( x i ) , and j = arg max s ∈S ˜ L ( S = s ) ( f ) is the group with maximal proxy loss.
Ascent step.
The FairGBM ascent step consists in maximizing the (original) Lagrangian L over the multipliers λ ∈ Λ (Equation 2).
Thus, each multiplier is updated by a simple gradient ascent step:
[Equation]
where i ∈ { 1 , . . .
, m } , m is the total number of inequality constraints, and η λ ∈ R + is the Lagrange multipliers’ learning rate.
2.3. R ANDOMIZED CLASSIFIER
The aforementioned FairGBM training process (Algorithm 1) converges to an approximately feasible and approximately optimal solution with known bounds to the original CO problem, dubbed a “coarsecorrelated equilibrium” (Cotter et al., 2019b).
This solution corresponds to a mixed strategy for the model player, defined as a distribution over all f t iterates, t ∈ [1 , T ] .
That is, for each input x , we first randomly sample t ∈ [1 , T ] , and then use f t to make the prediction for x , where f t =
(cid:80) tm =
η m h m .
In practice, using solely the last iterate f T will result in a deterministic classifier that often achieves similar metrics as the randomized classifier (Narasimhan et al., 2019), although it does not benefit from the same theoretical guarantees (Appendix D goes into further detail on this comparison).
There are also several methods in the literature for reducing a randomized classifier to an approximate deterministic one (Cotter et al., 2019a).
In the general case, using this randomized classifier implies training T separate models (as performed by the EG method (Agarwal et al., 2018)), severely increasing training time.
When using an iterative training process (such as gradient descent), it only implies training a single model, but maintaining all T iterates (as performed by the TFCO method (Cotter et al., 2019b)), severely increasing memory consumption.
Crucially, when using gradient boosting, each iterate contains all previous iterates.
Therefore, a GBDT randomized classifier can be fully defined by maintaining solely the last iterate, carrying no extra memory consumption nor significant extra training time when compared with the vanilla GBDT classifier.
To summarize, FairGBM is the result of employing the proxy Lagrangian CO method with crossentropy-based proxies of fairness constraints, resulting in a randomized classifier with known optimality and feasibility bounds.
E XPERIMENTS
We implemented FairGBM 1 as a fork from the open-source Microsoft LightGBM implementation.
The LightGBM algorithm (Ke et al., 2017) is a widely popular high performance GBDT implementation in C++, with a high-level Python interface for ease-of-use.
This algorithm in particular builds on top of the standard GBDT framework by introducing gradient-based one-side sampling (GOSS) and exclusive feature bundling , both aimed at decreasing training and inference time.
Although the
FairGBM framework (Algorithm 1) could be applied to any gradient boosting algorithm, we choose to implement it on top of LightGBM due to its excellent scalability.
We validate our method on a public benchmark dataset from the fairness literature and on a realworld financial services case-study.
The first scenario aims to be an easily reproducible comparison under common literature objectives and constraints, while the second scenario poses a distinct set of challenges that are seldom discussed in the fairness literature, from highly imbalanced data to tight budget constraints on the number of positive predictions.
We compare FairGBM with a set of constrained optimization baselines from the Fair ML literature.
Fairlearn EG (Agarwal et al., 2018) is a state-of-the-art method based on the reduction of CO to a cost-sensitive learning problem (discussed in Section 2.1).
It produces a randomized binary classifier, composed of several base classifiers.
Fairlearn GS (Agarwal et al., 2018) is a similar method that instead uses a grid search over the constraint multipliers λ , and outputs a single (deterministic) classifier that achieves the best fairness-performance trade-off.
RS Reweighing is a variation of GS that instead casts the choice of multipliers λ as another model hyperparameter, which will be selected via Random Search (RS).
Both EG, GS and RS are trained using LightGBM as the base algorithm, and both are implemented in the popular open-source fairlearn package (Bird et al., 2020).
Finally, we also show results for the standard unconstrained LightGBM algorithm.
It is well-known that the choice of hyperparameters affects both performance and fairness of trained models (Cruz et al., 2021).
To control for the variability of results when selecting different hyperparameters, we randomly sample 100 hyperparameter configurations of each algorithm.
We follow the reproducibility check-list put forth by Dodge et al.
(further details in Appendix H).
In the case of EG and GS, both algorithms already fit n base estimators as part of a single training procedure.
Hence, we run 10 trials of EG and GS, each with a budget of 10 iterations, for a total budget ofmodels trained (leading to an equal budget for all algorithms).
To calculate the statistical mean and variance of each algorithm, we perform bootstrapping over the trained models (Efron & Tibshirani, 1994).
Each bootstrap trial consists of k = 20 random draws from the pool of n = 100 trained models (randomly select 20% of the trained models). The best performing model (the maximizer of [ α · performance + (1 − α ) · fairness ] ) of each trial is then separately selected. This process was repeated for 1000 trials to obtain both variance (Tables 2–4) and confidence intervals (Figures 4–6).
3. ACSI NCOME D ATASET
The ACSIncome dataset (Ding et al., 2021) is a recently introduced 1.6M rows dataset based on the American Community Survey (ACS) public use microdata sample from 2018.
It consists of high-quality data made available to the public by the US Census Bureau.
It is essentially a modernday version of the popular 1994 UCI-Adult dataset (Dua & Graff, 2017)
(50K rows), which has been widely used in ML research papers over the years.
The dataset is split 60%/20%/20% in train/validation/test data, with random sampling stratified by US state (authors’ directions).
Each row contains a set of demographic features, such as age, marital status, education, occupation, working hours, place of birth, race, and gender.
The target label corresponds to whether US working adults’ yearly income is above $50K. In this experiment, the goal is to maximize global accuracy, while equalizing group false negative rate (FNR), also known as equality of opportunity (Hardt et al., 2016), over different binary gender groups. [Table] fairness ] measured in validation and report results on both validation and test data. See related Tables 3 and 4.
3.1. R ESULTS
Figure 2a shows a scatter plot of the fairness-accuracy results in the validation set for trained models on the ACSIncome dataset, as well as the performance and fairness distribution for each algorithm.
Note that the x axis spans a small accuracy range, as all models consistently achieve high performance on this task.
Moreover, the standard fairness-blind LightGBM algorithm already achieves above 0 .
7 equal opportunity on this task, while naturally achieving the highest performance among all algorithms.
These results further motivate our focus on a real-world setting, as it poses a much more challenging environment (compare Figures 2a and 2b).
Tables 2, 3, and 4 show results for different fairness-performance trade-offs (different choices of α for model selection).
All CO algorithms were trained with an FNR parity constraint on the ACSIncome dataset, and an FPR parity constraint on the AOF dataset. Among all tested algorithms, FairGBM has the lowest average constraint violation for all three values of α on the ACSIncome dataset ( p < 0 .for
all pair-wise comparisons), while achieving better or similar values on the performance metric.
The EG algorithm follows, also achieving high performance and high fairness, although significantly behind FairGBM on the latter ( p < 0 . 01 ).
At the same time, the GS and RS Reweighing algorithms achieve a surprisingly low fairness, signalling that their randomized counterpart (the EG algorithm) seems better fitted for this setting.
Importantly, the total time taken to train all FairGBM models is under a tenth of the time taken to train all EG models.
As expected, fairness for the LightGBM algorithm is considerably lower than that of FairGBM or EG.
3. R EAL - WORLD A CCOUNT O PENING F RAUD D ATASET
Each real-world environment has a set of requirements, constraints, and goals, which vary wildly depending on the context.
Nonetheless, the requirements we discuss in this section ( e.g. , alert rate, scalability) are arguably commonplace in production ML systems, and could be generalized to a wide variety of settings.
Specifically, we consider a real-world setting of fraud detection in bank account opening requests for a large bank.
These requests are made via an online application form.
Fraudsters will attempt to open a new bank account using a synthetic identity, or to impersonate a real person using stolen credentials (or a mixture of both).
The Account Opening Fraud (AOF) dataset spans an 8-month data stream with over 500K instances.
Data is split using 6 months for training, 1 month for validation, and 1 month for test, such that we train on the oldest data and test on the most recent.
As fraudsters are in the minority relative to legitimate applications, our data is highly imbalanced, with only 1% fraud prevalence. Further details on this dataset are provided in Appendix F. [Figure]
3.2. E VALUATION S ETUP
Fraud detection is a punitive ML setting: a positive prediction leads to a negative outcome for the individual (application denied).
For an ML system to be deemed fair, the likelihood of a legitimate individual to be wrongly denied access to her/his bank account (a false positive) should be independent of them belonging to a specific protected group.
This is defined as equal group-wise FPR, also known as predictive equality (Corbett-Davies et al., 2017).
In our setting, we target FPR parity among individuals of different age-groups (preventing ageism). The performance goal in this setting is to maximize fraud recall at 5% false positive rate (FPR).
This entails a budget on the number of false positives we can commit.
See Appendix C for details on how we operate FairGBM at arbitrary ROC points.
Requirements on the ROC operating point are commonplace in real-world settings, but are seldom considered in fairness benchmarks and fairness-aware algorithms.
It is common practice to implicitly use a decision threshold of 0 . 50 , which is optimal when maximizing accuracy for calibrated classifiers, but is arguably inapplicable to imbalanced data.
As a case in point, we could trivially achieve 99% accuracy by predicting all inputs as negative, or 100% recall by predicting all inputs as positive.
Consequently, the EG algorithm is not compatible with this real-world setting, as it outputs a binary randomized classifier, providing no confidence score for its predictions (using the implicit 0 .
50 decision threshold).
As this would not make for a fair comparison, we omit this method for the AOF dataset.
Moreover, the EG method also requires keeping tens of models in memory (the package default is n = 50 ), straining the scalability of the production environment.
3.2. R ESULTS
Figure 2b shows a scatter plot of all trained models on the AOF dataset, together with metric distributions for each algorithm on the margin.
Note that, while most models achieve high performance on the ACSIncome dataset, on AOF we see a significantly wider range of performance values (compare x axis scale between the two plots).
Moreover, the unconstrained LightGBM algorithm in this setting shows significant average unfairness .
Although FairGBM achieves a wider spread over both metrics, it significantly extends the Pareto frontier of attainable trade-offs.
Indeed, FairGBM dominates LightGBM on both fairness and performance for the α = 0 .
5 and α = 0 .
75 trade-offs, while achieving superior fairness with statistically insignificant performance differences on the α = 0 .
95 trade-off (AOF test results).
Although the GS method consistently achieves very high fairness, surpassing FairGBM on fairness for all three values of α , it does so at a dramatic performance cost.
R ELATED W ORK
Prior work on algorithmic fairness can be broadly divided into three categories: pre-processing, in-processing, and post-processing; depending on whether it acts on the training data, the training process, or the model’s predictions, respectively.
Pre-processing methods aim to modify the input data such that any model trained on it would no longer exhibit biases.
This is typically achieved either by (1) creating a new representation U of the features X that does not exhibit correlations with the protected attribute S (Zemel et al., 2013; Edwards & Storkey, 2016), or (2) by altering the label distribution Y according to some heuristic (Fish et al., 2016; Kamiran & Calders, 2009)
( e.g. , equalizing prevalence across sub-groups of the population).
Although compatible with any downstream task, by acting on the beginning of the
ML pipeline these methods may not be able to guarantee fairness on the end model.
Moreover, recent empirical comparisons have shown that pre-processing methods often lag behind in-processing and post-processing methods (Ding et al., 2021).
In-processing methods alter the learning process itself in order to train models that make fairer predictions.
There are a wide variety of approaches under this class of methods: training under fairness constraints (Zafar et al., 2017; Agarwal et al., 2018; Cotter et al., 2019b), using a loss function that penalizes unfairness (Fish et al., 2016; Iosifidis & Ntoutsi, 2019; Ravichandran et al., 2020), or training with an adversary that tries to predict protected-group membership (Grari et al., 2019).
The main shortcoming of in-processing methods lies in their selective compatibility with particular algorithms or families of algorithms.
As a case in point, there is currently no constrained optimization method tailored for the GBDT algorithm, besides the one present in this work.
However, the state-of-the-art results for numerous tabular data tasks are currently held by boosting-based models (Shwartz-Ziv & Armon, 2021).
AdaFair (Iosifidis & Ntoutsi, 2019) is a bias mitigation method for the AdaBoost algorithm (Freund & Schapire, 1996), a similar method to GBDT.
However, we did not consider it as a direct baseline in this work as it is only compatible with the equal odds fairness metric (Hardt et al., 2016), and not with equal opportunity or predictive equality (used in our experiments).
Moreover, this method lacks any theoretical guarantees, employing a series of heuristics used to change the weights of samples from underprivileged groups.
Post-processing methods alter the model’s predictions to fulfill some statistical measure of fairness.
In practice, this is done by (1) shifting the decision boundary for specific sub-groups (Hardt et al., 2016; Fish et al., 2016), or by (2) randomly classifying a portion of individuals of the underprivileged group (Kamiran et al., 2012; Pleiss et al., 2017).
Methods based on shifting the decision-boundary have the clear advantage of achieving 100% fairness in the data where they are calibrated (training or validation data), while also being compatible with any score-based classifier.
However, postprocessing methods can be highly sub-optimal (Woodworth et al., 2017), as they act on the model after it was learned.
Moreover, they can lead to higher performance degradation when compared to in-processing methods (Ding et al., 2021).
C ONCLUSION
We presented FairGBM, a dual ascent learning framework under fairness constraints specifically tailored for gradient boosting.
To enable gradient-based optimization we propose differentiable proxies for popular fairness metrics that are able to attain state-of-the-art fairness-performance trade-offs on tabular data.
When compared with general-purpose constrained optimization methods,
FairGBM is more consistent across datasets, and achieves higher fairness for the same level of performance.
Crucially, FairGBM does not require significant extra computational resources, while related CO algorithms considerably increase training time (EG, GS) or memory consumption (TFCO).
Finally, we enable fairness constraint fulfillment at a specified ROC point or with a fixed budget for positive predictions, a common requirement in real-world high-stakes settings.
A B ACKGROUND ON G RADIENT B OOSTED D ECISION T REES
A gradient boosting algorithm estimates a mapping f : X
(cid:55)→ y that minimizes a loss function,
[Equation]
[Equation]
where f is constrained to be a sum of base (weak) learners h t ∈ H .
In the case of GBDT, these can be shallow decision trees with fixed depth or fixed number of nodes:
[Equation]
(11) where η t is a step size parameter.
Typically, h 0 would be a constant function that minimizes L and η 0 = 1 .
Gradient boosting can then be understood as performing gradient descent on the space of functions f .
Each subsequent step, h t , being essentially a projection onto H of the negative gradient of the loss L w.r.t.
f .
In other words, the base learner whose predictions are as close as possible, in the l 2 sense, to the negative gradient 2 :
[Equation]
(12) where g t,i are the gradients evaluated at the current iterate f t − {+
+} = (cid:80) t − 1 m {+=
+}
η m h m :
[Equation]
Note that Equation 12 is equivalent to:
[Equation]
XGBoost (Chen & Guestrin, 2016) and LightGBM (Ke et al., 2017) replace the approximation above with a local quadratic one thus implementing the following second order step:
[Equation]
where H i,t is the hessian of l w.r.t.
f computed at the current iterate and Ω is a regularization term penalizing complex base learners.
B D ISCUSSION ON THE L IMITATIONS OF F AIR GBM
In this section, we discuss expected limitations of the proposed approach.
When compared with vanilla LightGBM, FairGBM requires approximately double the training time (see Table 2).
This compute overhead of FairGBM can be attributed to (1) the computation of the proxy gradients relative to the constraint loss, and (2) the addition of an extra optimization step per iteration – the ascent step.
From an application standpoint, FairGBM is specifically tailored for gradient boosting methods.
This contrasts with other bias mitigation methods in the literature such as EG (Agarwal et al., 2018), which, despite having considerably slower runtime, are applicable to a wider range of classifier types (all binary classifiers in the case of EG).
Despite discussing several choices for differentiable proxies for the Type 1 and Type 2 errors in
Section 2.2, our experiments only concern one of these proxies.
As future work, we would like to perform a more thorough study on the impact of different choices of differentiable proxies for the step-wise function ( e.g. , sigmoid, hinge, or squared loss).
Moreover, FairGBM as it is devised in this work is limited to group-wise fairness metrics, and incompatible with metrics from the individual fairness literature.
In fact, individual fairness algorithms tailored for GBM have been developed in related work Vargo et al.
The BuDRO method proposed by Vargo et al .
is based on optimal transport optimization with Wasserstein distances, while our proposal fully relies on gradient-based optimization with the dual ascent method.
A possible extension of our method to a wider range of constraints that enables individual fairness is a topic we aim to explore in future work.
Without fairness constraints, meeting a specific ROC operating point can be achieved by appropriately thresholding the output of a classifier that learns to approximate the class probabilities: p ( y = 1 | x ) (Tong, 2013).
That is the case of a classifier that is trained to minimize a proper scoring rule such as binary cross-entropy.
However, when optimizing for the Lagrangian (Equation 7), we are no longer optimizing for a classifier that approximates the true class probabilities.
This is a key point that is often overlooked in the constrained optimization literature.
Namely, both L and ˜ L have an implicit threshold when evaluating constraint fulfillment:
the 0 .
5 decision threshold, or 0 .
when considering the log-odds (see Figure 1).
In practice, FairGBM will be optimized to fulfill the constraints at this pre-defined threshold, but constraint fulfillment may not (and likely will not) generalize to all thresholds.
Indeed, we could use any decision threshold during training, but it is impossible to know which threshold would meet our ROC requirements beforehand.
We propose to solve this by introducing our ROC requirement as another in-training constraint.
In the AOF setting, this is achieved by introducing an additional constraint of global FPR ≤ 0 .
In practice, instead of shifting the threshold to meet our target ROC operating point, we are shifting the score distribution such that the 0 .
5 decision threshold corresponds to our target ROC point, enabling constraint fulfillment at any attainable ROC point [Figure]
D R ANDOMIZED CLASSIFIER vs LAST ITERATE
[Figure] Figure 3 shows a comparison between using the randomized classifier predictions or solely the last iterate predictions on the ACSIncome dataset.
As mentioned in Section 2, the first approach benefits from theoretical convergence guarantees, while the latter benefits from being a deterministic classifier (which may be a requirement in some real-world settings).
In practice, using the last iterate version of FairGBM (which always uses all trees of the GBM ensemble) achieves similar results to the randomized classifier version (which randomly picks the number of trees it will use for each prediction).
The same trend is clear on the AOF dataset, and concurs with related work on randomized classifiers by Cotter et al. (2019b). E F AIRNESS -P ERFORMANCE T RADE -O FF
To better understand the trade-offs between fairness and performance, we present two groups of plots. The first group of plots in Figures 4a and 4b have each method evaluated over the possible values of α (x-axis). The metric of evaluation is the fairness-performance composed metric, weighted by α (y-axis). Higher values of this metric represent better results.
For this plot, with a step of 0.01 in α , we bootstraped 20 random models of each method and selected the one that optimized the α metric. This process was repeated 1000 times, in order to obtain the average value and the confidence interval estimations. We observe that for these two datasets, the FairGBM method represents a better trade-off in the composed metric, being only beated in a pure performance scenario ( α = 1 ) by LightGBM and a pure fairness scenario ( α = 0 ) by Fairlearn and RS Reweighting, this latter only being observed in the AOF dataset. This shows that FairGBM is a sensible choice for scenarios where both Fairness and Performance play an important role in model selection.
Additionally, this method also has low variance in the observed metrics.
This means that for these datasets, it is possible to obtain a model that is close to the best attainable performance and fairness, with 20 randomly sampled models of
FairGBM, whereas other methods have a higher chance of obtaining either underperforming or biased models.
In figures 5 and
[Table]
instead of using an α weighted metric
[Table]
we separate performance and fairness.
In these plots
[Table]
we observe that FairGBM presents the best results all-around.
For the ACS Adult dataset,
FairGBM obtains models that reach the best values of performance with a nearly perfect fairness result, independently of the selected α .
Other algorithms have mainly lower fairness results.
The
EG method obtains comparable results.
Regarding the AOF dataset, FairGBM presents a similar performance value to LightGBM with overall better fairness results.
Other algorithms fail to generate good predictions, with recall values rounding 20% to 40%.
[Table]
[Table]
[Table]
[Figure]
[Figure]
[Figure]
F A CCOUNT O PENING F RAUD D ATASET
The Account Opening Fraud (AOF) dataset is an in-house dataset that comprises 8 months of data from a real-world fraud detection task.
Specifically, on the detection of fraudulent online bank account opening applications in a large European consumer bank.
In this setting, fraudsters attempt to either impersonate someone via identity theft, or create a fictional individual in order to be approved for a new bank account.
After being granted access to a new bank account, the fraudster quickly maxes out the line of credit, or uses the account to receive illicit payments.
All costs are sustained by the bank.
Each instance (row) of the dataset represents an individual application.
All of the applications were made on an online platform, where explicit consent to store and process the gathered data was granted by the applicant.
Each instance is labeled after a few months of activity, as by then it is apparent whether the account owner is fraudulent (positive label) or legitimate (negative label).
A total offeatures are stored for each applicant, 6 being categorical, 19 binary, and 42 numerical.
Most features represent aggregations over the original information and context of the application ( e.g. , count of the number of applications in the last hour).
The prevalence of fraud varies between 0 . 85% and 1 . 5% during the eight month period (see Figure 7a).
We observe that these values are higher for the later months, which were used as validation (the 7 th , or second-to-last month) and test (the 8 th , or last month) data.
Additionally, the distribution of applications also changes from month to month, ranging from 9 .
5% on the lower end to 15% on the higher end.
The extremely high class imbalance (approximately 1 positive label for each 99 negative labels), the gradual change in fraud prevalence, together with naturally shifting consumer patterns along 8 months of real-world data are examples of common real-world challenges that are not often present in datasets from the fairness literature.
Due to the low fraud rate in the data, measuring accuracy of the models would lead to misleading results.
A trivial classifier that constantly outputs legitimate predictions would achieve an accuracy close to 99% .
To address this, a commonly used performance metric in the fraud detection industry is the true positive rate (TPR, or Recall), as it reflects the percentage of fraud that was caught by the ML model.
Moreover, in order to keep attrition on legitimate customers low, a requirement of at most 5% false positive rate (FPR) is used, i.e. , at most 5% of legitimate (label negative) customers are wrongly blocked from opening a bank account.
Additionally, due to the punitive nature of the classification setting (a false positive negates financial services to a legitimate applicant), we aim to balance false positive rates between the different groups in the dataset.
As a protected attribute for this dataset, we selected the applicant’s age.
Specifically, we divide applicants into two groups: under 50 years old, and at or above 50 years old.
There is a surprising but clear relation between fraudulent applications and reported age, so we expect that fairness w.r.t.
the age group will make for a challenging setting.
Figure 7b shows a plot of the age distribution, as well as the variation of fraud rate over age values.
[Figure] G N OTATION L the Lagrangian function, which uses the original constraints c ; see Equation 2.
˜
L the proxy-Lagrangian function, which uses the proxy constraints ˜ c ; see Equation 7.
c an inequality constraint function; it is deemed fulfilled if c ( θ ) ≤ 0 ; this function may be non-differentiable; examples include a constraint on TPR parity or parity of any other metric of the confusion matrix.
˜ c a proxy inequality constraint that serves as sub-differentiable proxy for the corresponding constraint c ; see Equation 5.
l an instance-wise loss function, i.e., l : Y × ˆ Y (cid:55)→ R + , where Y is the set of possible labels and
ˆ Y is the set of possible predictions; see green line in Figure 1.
˜ l a sub-differentiable proxy for an instance-wise loss function; see blue and purple lines in Figure 1.
D a dataset of samples ( x, y, s ) ∈ D , where x ∈ X ⊆ R n is the features, y ∈ Y ⊆ N 0 is the
label, and s ∈ S ⊆ N 0 is the sensitive attribute
L [Table]
a predictive loss function measured over data samples with sensitive attribute value S = a , { ( x, y, s ) : s = a, ( x, y, s ) ∈ D } ; the subscript is omitted when measuring loss over the whole dataset D examples include the false-negative rate or the squared error loss.
[Table] L [Table] a sub-
differentiable
proxy for a
predictive
loss
function
measured over data samples with sensitive attribute value S
=
a x, y, s ) s
= a, ( x, y, s ) ∈ D } the subscript is omitted when measuring loss over the whole dataset
D λ i a Lagrange multiplier associated with constraint c i and proxy constraint
˜ c
i .
F the space of strong learners.
H the space of weak learners.
f a strong learner.
h a weak learner.
S
the range of random variable S ; the letter S specifically is used for the sensitive attribute, and S for the different values the sensitive attribute can take.
H R EPRODUCIBILITY C HECKLIST
This section provides further details regarding implementation and hardware used for our experiments.
We follow the reproducibility checklist put forth by Dodge et al.
(Dodge et al., 2019).
Regarding reported experimental results:
✓□ Description of computing infrastructure.
• i7-8650U CPU, 32GB RAM.
✓□ Average run-time for each approach. • Folder runtimes of the supp.
materials 3 .
✓□ Details of train/validation/test splits.
• See Section 3, and data notebooks in folder notebooks of the supp.
materials 3 .
✓□ Corresponding validation performance for each reported test result. • Folder results of the supp.
materials 3 .
✓□ A link to implemented code 1 .
Regarding
hyperparameter search:
✓□ Bounds for each hyperparameter. • Folder hyperparameters of the supp.
materials 3 .
✓□ Hyperparameter configurations for best-performing models.
• Folder hyperparameters of the supp.
materials 3 .
✓□ Number of hyperparameter search trials.
• 100 trials.
✓□ The method of choosing hyperparameter values.
• Random uniform sampling.
✓□ Expected validation performance.
• Folder others of the supp.
materials 3 .