Individually Fair Gradient Boosting

1 INTRODUCTION . In light of the ubiquity of machine learning ( ML ) methods in high-stakes decision-making and support roles , there is concern about ML models reproducing or even exacerbating the historical biases against certain groups of users . These concerns are valid : there are recent incidents in which algorithmic bias has led to dire consequences . For example , Amazon recently discovered its ML-based resume screening system discriminates against women applying for technical positions ( Dastin , 2018 ) . In response , the ML community has proposed a myriad of formal definitions of algorithmic fairness . Broadly speaking , there are two types of fairness definitions : group fairness and individual fairness ( Chouldechova & Roth , 2018 ) . In this paper , we focus on enforcing individual fairness . At a highlevel , the idea of individual fairness is the requirement that a fair algorithm should treat similar individuals similarly . For a while , individual fairness was overlooked in favor of group fairness because there is often no consensus on which users are similar for many ML tasks . Fortunately , there is a flurry of recent work that addresses this issue ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ; Mukherjee et al. , 2020a ) . In this paper , we assume there is a fair metric for the ML task at hand and consider the task of individually fair gradient boosting . Gradient boosting , especially gradient boosted decision trees ( GBDT ) , is a popular method for tabular data problems ( Chen & Guestrin , 2016 ) . Unfortunately , existing approaches to enforcing individual fairness are either not suitable for training non-smooth ML models ( Yurochkin et al. , 2020 ) or perform poorly with flexible non-parametric ML models . We aim to fill this gap in the literature . Our main contributions are : 1 . We develop a method to enforce individual fairness in gradient boosting . Unlike other methods for enforcing individually fairness , our approach handles non-smooth ML models such as ( boosted ) decision trees . 2 . We show that the method converges globally and leads to ML models that are individually fair . We also show that it is possible to certify the individual fairness of the models a posteriori . 3 . We show empirically that our method preserves the accuracy of gradient boosting while improving widely used group and individual fairness metrics . 2 ENFORCING INDIVIDUAL FAIRNESS IN GRADIENT BOOSTING . Consider a supervised learning problem . Let X ⊂ Rd be the input space and Y be the output space . To keep things simple , we assume Y = { 0 , 1 } , but our method readily extends to multi-class classification problems . Define Z = X × { 0 , 1 } . We equip X with a fair metric dx that measures the similarity between inputs . The fair metric is application specific , and we refer to the literature on fair metric learning ( Ilvento , 2019 ; Wang et al. , 2019 ; Yurochkin et al. , 2020 ) for ways of picking the fair metric . Our goal is to learn an ML model f : X → { 0 , 1 } that is individually fair . Formally , we enforce distributionally robust fairness ( Yurochkin et al. , 2020 ) , which asserts that an ML model has similar accuracy/performance ( measured by the loss function ) on similar samples ( see Definition 2.1 ) . One way to accomplish this is adversarial training ( Yurochkin et al. , 2020 ; Yurochkin & Sun , 2020 ) . Unfortunately , adversarial training relies on the smoothness of the model ( with respect to the inputs ) , so it can not handle non-smooth ML models ( e.g . decision trees ) . We address this issue by considering a restricted adversarial cost function that only searches over the training examples ( instead of the entire input space ) for similar examples that reveal violations of individual fairness . As we shall see , this restricted adversarial cost function is amenable to functional gradient descent , which allows us to develop a gradient boosting algorithm . 2.1 ENFORCING INDIVIDUAL FAIRNESS WITH A RESTRICTED ADVERSARIAL COST FUNCTION . We first review how to train individually fair ML models with adversarial training ( see Yurochkin et al . ( 2020 ) for more details ) to set up notation and provide intuition on how adversarial training leads to individual fairness . Let F be a set of ML models , let ` : Y × Y → R be a smooth loss function ( see Section 3 for concrete assumptions on ` ) that measures the performance of an ML model , and let D = { ( xi , yi ) } ni=1 be a set of training data . Define the transport cost function c ( ( x1 , y1 ) , ( x2 , y2 ) ) , d 2 x ( x1 , x2 ) +∞ · 1 { y1 6=y2 } . ( 2.1 ) We see that c ( ( x1 , y1 ) , ( x2 , y2 ) ) is small iff x1 and x2 are similar ( in the fair metric dx ) and y1 = y2 . In other words , c is small iff two similar examples are assigned the same output . Define the optimal transport distance W ( with transport cost c ) on probability distributions on Z : W ( P1 , P2 ) , infΠ∈C ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C ( P1 , P2 ) is the set of couplings between P1 and P2 ( distributions on Z ×Z whose marginals are P1 and P2 ) . This optimal transport distance lifts the fair metric on ( points in ) the sample space to distributions on the sample space . Two distributions are close in this optimal transport distance iff they assign mass to similar areas of the sample space Z . Finally , define the adversarial risk function Lr ( f ) , supP : W ( P , P∗ ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.2 ) where P∗ is the data generating distribution and > 0 is a small tolerance parameter . The adversarial risk function looks for distributions on the sample space that ( i ) are similar to the data generating distribution and ( ii ) increases the risk of the ML model f . This reveals differential performance of the ML model on similar samples . This search for differential performance is captured by the notion of distributionally robust fairness : Definition 2.1 ( distributionally robust fairness ( DRF ) ( Yurochkin et al. , 2020 ) ) . An ML model h : X → Y is ( , δ ) -distributionally robustly fair ( DRF ) WRT the fair metric dx iff supP : W ( P , Pn ) ≤ ∫ Z ` ( z , h ) dP ( z ) ≤ δ . ( 2.3 ) In light of the preceding developments , a natural cost function for training individually fair ML models is the adversarial cost function : Le ( f ) , supP : W ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.4 ) where Pn is the empirical distribution of the training data . This is the empirical counterpart of ( 2.2 ) , and it works well for training smooth ML models ( Yurochkin et al. , 2020 ) . Unfortunately , ( 2.4 ) is hard to evaluate for non-smooth ML models : it is defined as the optimal value of an optimization problem , but the gradient ∂x ` ( f ( x ) , y ) is not available because the ML model f is non-smooth . To circumvent this issue , we augment the support of the training set and restrict the supremum in ( 2.4 ) to the augmented support . Define the augmented support set D0 , { ( xi , yi ) , ( xi , 1− yi ) } ni=1 and the restricted optimal transport distance WD between distributions supported on D0 : WD ( P1 , P2 ) , infΠ∈C0 ( P1 , P2 ) ∫ Z×Z c ( z1 , z2 ) dΠ ( z1 , z2 ) , where C0 ( P1 , P2 ) is the set of distributions supported on D0 ×D0 whose marginals are P1 and P2 . We consider the restricted adversarial cost function L ( f ) , supP : WD ( P , Pn ) ≤ EP [ ` ( f ( X ) , Y ) ] , ( 2.5 ) where > 0 is a small tolerance parameter . The interpretation of ( 2.5 ) is identical to that of ( 2.4 ) : it searches for perturbations to the training examples that reveal differential performance in the ML model . On the other hand , compared to ( 2.4 ) , the supremum in ( 2.5 ) is restricted to distributions supported on D0 . This allows us to evaluate ( 2.5 ) by solving a ( finite-dimensional ) linear program ( LP ) . As we shall see , this LP depends only on the loss values ` ( f ( xi ) , yi ) and ` ( f ( xi ) , 1− yi ) , so it is possible to solve the LP efficiently even if the ML model f is non-smooth . This is the key idea in this paper . Before delving into the details , we note that the main drawback of restricting the search to distributions supported on D0 is reduced power to detect differential performance . If the ML model exhibits differential performance between two ( similar ) areas of the input space but only one area is represented in the training set , then ( 2.4 ) will detect differential performance but ( 2.5 ) will not . Augmenting the support set with the points { ( xi , 1 − yi ) } ni=1 partially alleviates this issue ( but the power remains reduced compared to ( 2.4 ) ) . This is the price we pay for the broader applicability of ( 2.5 ) . 2.2 FUNCTIONAL GRADIENT DESCENT ON THE RESTRICTED ADVERSARIAL COST FUNCTION . Gradient boosting is functional gradient descent ( Friedman , 2001 ) , so a key step in gradient boosting is evaluating ∂L∂ŷ , where the components of ŷ ∈ R n are ŷi , f ( xi ) . By Danskin ’ s theorem , we have ∂L ∂ŷi = ∂∂f ( xi ) [ supP : WD ( P , Pn ) ≤ EP [ ` ( f ( xi ) , yi ) ] ] = ∑ y∈Y ∂ ∂f ( xi ) [ ` ( f ( xi ) , y ) ) ] P ∗ ( xi , y ) , ( 2.6 ) where P ∗ is a distribution that attains the supremum in ( 2.5 ) . We note that there is no need to differentiate through the ML model f in ( 2.6 ) , so it is possible to evaluate the functional gradient for non-smooth ML models . It remains to find P ∗ . We devise a way of finding P ∗ by solving a linear program . We start with a simplifying observation : if c ( zi , zj ) = ∞ for any zi ∈ D0 and zj ∈ D , then any weight at zj can not be transported to zi . Thus , we will only focus on the pairs ( zi , zj ) ∈ D0×D with c ( zi , zj ) < ∞ . Let C ∈ Rn×n be the matrix with entries given by Ci , j = c ( ( xi , yj ) , ( xj , yj ) ) = d2x ( xi , xj ) . We also define the class indicator vectors y 1 , y0 ∈ { 0 , 1 } n by y1j = { 1 : yj = 1 0 : yj = 0 and y0 = 1n − y1 . ( 2.7 ) For any distribution P on D0 , let Pi , k = P ( { ( xi , k ) } ) for k ∈ { 0 , 1 } . Then , the condition that WD ( P , Pn ) ≤ is implied by the existence of a matrix Π such that 1 . Π ∈ Γ with Γ = { Π|Π ∈ Rn×n+ , 〈C , Π〉 ≤ , ΠT · 1n = 1n1n } . 2 . Π · y1 = ( P1,1 , . . . , Pn,1 ) , and Π · y0 = ( P1,0 , . . . , Pn,0 ) . Further define the matrix R ∈ Rn×n by Rij = ` ( f ( xi ) , yj ) - this is the loss incurred if point j with label yj is transported to point i . With this setup , given the current predictor f , we can obtain a solution Π∗ to the optimization as the solution to the linear program ( in n2 variables ) Π∗ ∈ arg max Π∈Γ 〈R , Π〉 . ( 2.8 ) Then the optimal distribution P ∗ on D0 is given by P ∗ ( { ( xi , k ) } ) = ( Π∗ · yk ) i . An outline of the full gradient boosting procedure is provided in Algorithm 1 . It is important to note that we have made no assumptions about the class of candidate predictors F in finding the optimal transport map Π∗ in ( 2.8 ) . In particular , F can contain discontinuous functions - for example , decision trees or sums of decision trees . This allows us to apply this fair gradient boosting algorithm to any class F of base classifiers . Algorithm 1 Fair gradient boosting 1 : Input : Labeled training data { ( xi , yi ) } ni=1 ; class of weak learnersH ; initial predictor f0 ; search radius ; number of steps T ; sequence of step sizes α ( t ) ; fair metric dx on X 2 : Define the matrix C by Ci , j ← d2x ( xi , xj ) . 3 : for t = 0 , 1 , . . . , T − 1 do 4 : Define the matrix Rt by ( Rt ) ij = ` ( ft ( xi ) , yj ) 5 : Find Π∗t ∈ arg maxΠ∈Γ 〈Rt , Π〉 ; and set Pt+1 ( xi , k ) ← ( Π∗t · yk ) i 6 : Fit a base learner ht ∈ H to the set of pseudo-residuals { ∂L∂ft ( xi ) } n i=1 ( see ( 2.6 ) ) . 7 : Let ft+1 = ft + αtht . 8 : end for 9 : return fT

Summary: This paper proposes a non-smooth method to enforce individual fairness in gradient boosting. To deal with the non-smoothness of the model, it restricts the optimal transport distance to that defined on an augmented training support set and thus reduces the search of a worst-case distribution to solving an LP problem, where an approximate solution can be found efficiently by SGD on the dual space. The authors provide convergence and generalization properties of the algorithm, and demonstrate its improvement of group and individual fairness metrics in several numerical experiments.