Scalable and Stable Surrogates for Flexible Classifiers with Fairness Constraints

1 Introduction . A growing body of research has explored the ethical and societal implications of increasingly automated decision-making . One critical concern is whether particular machine learning algorithms perform differently on average for members of marginalized groups . In addition to being an ethical question , this is a legal one : Attributes such as race and gender are legally-protected categories , and an employer whose decision-making process disproportionately hurts one group can be litigated for committing adverse or disparate impact . One quantitative notion of fairness is called demographic parity , which states that a decision maker should accept ( or classify as positive ) a roughly equal proportion of each group [ 8 ] . An employer who hires many male applicants , but few female applicants , violates demographic parity by disproportionately allocating resources to one sensitive group . Machine learning is also increasingly used by law enforcement , where ethical questions become civil rights questions . Facial recognition and risk assessment algorithms have been shown to have disparities in accuracy between black and white defendants [ 2 , 7 ] , which may lead to the arrest of an innocent person [ 29 ] . The equalized odds [ 27 ] fairness criterion requires a decision maker to have the same false negative rates , as well as the same false positive rates , for each sensitive group . Equality of opportunity requires only one of those two equalities to hold , whichever is considered more ethically important ( e.g. , in law enforcement , we may ensure that innocent individuals have similar treatment ) . Other notions of fairness include predictive parity [ 16 ] , which matches classifier precision across groups , or the minimization of mutual information [ 34 ] between predictions and sensitive attributes . Except in degenerate cases , some pairs of criteria can not be achieved simultaneously [ 3 ] , meaning a domain expert must make a moral decision about which fairness constraint they aim to satisfy . We formalize the problem of fair classification as learning the highest-accuracy model that satisfies a constraint on some fairness criterion ( either demographic parity or equality of opportunity ) . This constrained optimization problem is mathematically difficult to solve , which has lead to the creation of a variety of fair classification algorithms , many involving relaxations of constraints like those analyzed in this paper . Prior work has mostly limited experiments to small tabular data sets like COMPAS [ 2 ] , obscuring the fact that many previous methods are either heuristic , or have guarantees that are limited to linear classifiers with convex losses . ∗Department of Computer Science , University of California Irvine School of Information and Computer Science , Irvine , CA , USA 35th Conference on Neural Information Processing Systems ( NeurIPS 2021 ) . We compare fairness relaxations via an optimization framework that explores entire trajectories of fairness-accuracy trade-offs , illuminating advantages and weaknesses of each method . We are the first to show ( theoretically and empirically ) what conditions may lead relaxation methods to fail or converge to degenerate solutions . We further show that this problem grows worse for non-convex classifiers like deep neural networks . To address this weakness , we promote three new fairness surrogates with promising theoretical properties : the log-sigmoid difference , log-sigmoid sum , and sigmoid relaxations . These surrogates are more stable and efficient to optimize than prior work . The log-sigmoid sum and sigmoid bounds have provable fairness guarantees ; the log-sigmoid difference has weaker guarantees , but excellent empirical performance . We are the first to empirically compare relaxation methods on deep neural network models for largescale image and text classification . To enable these experiments , we show how our fairness surrogates may be optimized via stochastic gradient descent , and applied to data where the sensitive attribute is not always observed . Our methods are comparable to the state-of-the-art on small tabular datasets , and show clear improvements for deep learning of flexible ( but fair ) image and text classifiers . 2 Background : Fair Classification . Let D = { ( x , s , y ) } N be a set of N training examples with predictive features x ∈ Rp , target class y ∈ { 0 , 1 } , and sensitive attribute s ∈ { a , b } encoding protected group membership . A parameterized classifier fθ ( x ) , like logistic regression or a neural network , then predicts y = 1 when fθ ( x ) > 0 . In this work , we focus on the fairness metrics demographic parity ( DP ) and equality of opportunity ( EO ) . We define the difference in demographic parity ( DDP ) to equal DDP ( θ ) = P ( fθ ( X ) > 0 | S = a ) − P ( fθ ( X ) > 0 | S = b ) . ( 1 ) If DDP ( θ ) 0 , group a receives an unfair share of positive outcomes ; if DDP ( θ ) 0 , group b is favored . We seek models where DDP ( θ ) ≈ 0 . The difference in equality of opportunity ( DEO ) is DEO ( θ ) = P ( fθ ( X ) > 0 | S = a , Y = 0 ) − P ( fθ ( X ) > 0 | S = b , Y = 0 ) , ( 2 ) where fair classifiers have DEO ( θ ) ≈ 0 . If false negative rates are of more concern than false positives , DEO ( θ ) may be modified to condition on Y = 1 instead of Y = 0 . We seek the best classifier whose empirical fairness disparity ∆ ( θ ) has magnitude smaller than some tolerance > 0 : min θ 1 N ∑ ( x , s , y ) ∈D L ( fθ ( x ) , y ) , such that |∆ ( θ ) | ≤ . ( 3 ) Our experiments and theorems focus on the case where fθ ( x ) = wTΦ ( x ) with ( possibly learned ) data representation Φ ( x ) , output layer weights w , and overall parameters θ = w ∪ θΦ . We let L ( . ) be the negative log-likelihood ( or cross-entropy ) loss , L ( fθ ( x ) , y ) = −y log ( σ ( fθ ( x ) ) ) − ( 1− y ) log ( σ ( −fθ ( x ) ) ) , with σ ( z ) = 1/ ( 1 + e−z ) . This model family includes logistic regression and many neural networks . We set ∆ ( θ ) = D̂DP ( θ ) for demographic parity , ∆ ( θ ) = D̂EO ( θ ) for equality of opportunity , where D̂DP ( θ ) = 1 Na . ∑ ( x , s , y ) ∈D s=a 1 { fθ ( x ) > 0 } − 1 Nb . ∑ ( x , s , y ) ∈D s=b 1 { fθ ( x ) > 0 } , ( 4 ) D̂EO ( θ ) = 1 Na0 ∑ ( x , s , y ) ∈D s=a , y=0 1 { fθ ( x ) > 0 } − 1 Nb0 ∑ ( x , s , y ) ∈D s=b , y=0 1 { fθ ( x ) > 0 } . ( 5 ) There are Nsy data with sensitive group s and predictive label y , Ns . data with group s and any label , and N.y data with label y and any group . For later use , we also define psy = Nsy N , ps . = Ns . N , and p.y = N.y N as the proportions of data with each group and label . To achieve equalized odds , we may enforce two constraints as in Eq . ( 5 ) , one for false positives and one for false negatives . In addition to selecting the fairness metric , a user must specify an unfairness tolerance > 0 . Although we might wish to bring unfairness to exactly zero , this may not be possible except in trivial cases [ 22 , 49 ] , or might come at a huge accuracy cost [ 27 ] with no guarantee of generalized fairness on test data [ 32 ] . Moreover , positive tolerances often have legal justifications : adverse impact hiring laws dictate that the ratio of hiring rates for two sensitive groups should be at least 4/5 [ 21 ] . 2.1 Surrogates for Tractable Optimization . The constrained optimization problem of Eq . ( 3 ) is typically intractable due to the discontinuous constraints ∆ ( θ ) , which make gradient-based algorithms for constrained optimization inapplicable or ineffective . We overcome this intractability by replacing constraints with smooth surrogates . Linear relaxations . The widely-used family of linear relaxations [ 52 ] seeks to improve demographic parity by replacing the intractable difference in acceptance rates with the covariance between the sensitive attribute and model output . Letting z = 1 if s = a and z = 0 if s = b , we then have Cov ( z , fθ ( x ) ) ≈ 1 N N∑ i=1 ( zi − z̄ ) fθ ( xi ) ∝ E [ fθ ( x ) |Z = 1 ] − E [ fθ ( x ) |Z = 0 ] . ( 6 ) Because the sensitive attribute is binary , this covariance equals a difference in expectations . Bringing this first moment relaxation [ 49 ] to zero is equivalent to forcing the output distributions for the two sensitive groups to have equal means . By modifying the expectations in Eq . ( 6 ) to also condition on Y = 0 , others have applied equivalent relaxations ( up to constants ) to equality of opportunity [ 4 , 17 ] . However , matching the mean response across groups is insufficient to ensure fairness : Classifiers often still differ in higher moments , causing disparities on how groups are treated [ 40 ] . Non-linear relaxations . Zafar et al . [ 53 , 51 ] also propose a relaxation for equality of opportunity , the covariance between the sensitive attribute and the model response for only misclassified points : Cov ( z , g ( fθ ( x ) ) | Y = 0 ) ∝ E [ g ( fθ ( x ) ) | Z = 1 , Y = 0 ] − E [ g ( fθ ( x ) ) | Z = 0 , Y = 0 ] , ( 7 ) where g ( fθ ( x ) ) = max ( fθ ( x ) , 0 ) . This constraint is non-convex , but for classifiers like SVMs with convex loss functions , convex-concave programming [ 45 ] may be used to find a local optimum . However , the gap between the relaxation and the true target persists : even when this covariance equals 0 , we have no guarantees about the difference in false positive rates between the two groups . 2.2 Other Related Work . Post-Processing of Unfair Classifiers . Post-processing methods learn a model via an unconstrained loss with no regard to fairness , and then enforce fairness as a post-processing step [ 27 ] by setting group-specific decision boundaries to equalize false positive rates ( or acceptance rates ) . However , this requires the sensitive attribute at test time . Besides being impractical in some applications , such classifiers may make different decisions for individuals with identical features x . Such disparate treatment constitutes a different form of unfairness and can be illegal in some domains [ 19 ] . Wei et al . [ 48 ] avoid requiring sensitive attributes by training a separate classifier to estimate p ( S | X ) . Morally , this is not much different than disparate treatment ; instead of treating individuals differently based on their sensitive attributes , the model treats them differently based on its estimate of their sensitive attribute . The authors also acknowledge that while their method is effective at small reductions in unfairness , it often fails to achieve large reductions . Without knowledge of true sensitive attributes , post-processing algorithms may lack the maneuverability to dramatically reduce unfairness . Fairness by Density Estimation . Celis et al . [ 9 ] optimize classifiers with a constraint on the true fairness discrepancy of the data-generating distribution . This requires an explicit density estimate for the training data , for which they use a Gaussian Naive Bayes model that would poorly capture high-dimensional images or text . Generative modeling of such data is a challenging research problem . Data Set Stability . Huang & Vishnoi [ 31 ] examine the stability of fair classifiers under data perturbations , and propose a regularizer that can be added to other fairness algorithms , including ours . We instead analyze and improve fairness surrogates for complex , non-convex classifiers . Fair Mixup . Instead of penalizing a surrogate to the fairness discrepancy , Chuang & Mroueh [ 11 ] penalize the gradient of fθ ( X ) along interpolated paths between data with opposite attributes . This approach is less interpretable , and does not guarantee demographic parity nor equality of opportunity . Fairness in Computer Vision . Large-scale image data sets are often unannotated and thus lack guarantees that they are balanced along sensitive attributes such as race or gender [ 10 ] . Dataset balance has become a focus of conversation in fair computer vision [ 29 ] , but it is insufficient to guarantee fairness [ 47 ] . Other work in fair computer vision has explored issues of bias amplification [ 28 , 55 ] , counterfactual fairness [ 14 ] , and transfer learning [ 18 , 35 ] . Whereas relaxation methods explore fairness-accuracy trade-offs , many vision papers use fairness as a vehicle to boost accuracy [ 44 , 38 , 46 ] . By improving classifier performance on under-represented sub-populations , overall accuracy can be increased , but groups may still receive disparate impact from the model ’ s decisions . Fairness in Natural Language Processing . Much of the previous work on fair language models has focused on domain-specific examples of bias , such as word embeddings [ 5 , 57 , 25 , 6 , 58 ] or coreference resolution [ 43 , 56 ] . In contrast , we are not concerned with latent bias in the language model ’ s word representation ; we want to ensure that predictive models do not discriminate against authors based on their identity . It has been shown that gender expression can be predicted from writing [ 37 ] , so models could discriminate against authors of one gender if fairness is not mandated .

Summary: The paper discusses several relaxations for the hard-indicator based fairness measures and compares their fairness-accuracy tradeoffs.   Detailed discussion on the necessary conditions for the failure case of certain relaxations (like linear or hinge) is provided. When the said conditions are satisfied, it is shown that the method converges to degenerate solutions where improving the fairness measure results in very high loss values of the prediction function.   Three surrogates are proposed, namely, the logistic sum, the logistic difference, and the sigmoid relaxation. They are shown to be more stable than the linear and hinge relaxations especially in non-convex models.   Experimental results are provided on tabular, vision and NLP datasets.