Fair Mixup: Fairness via Interpolation

1 INTRODUCTION . Fairness has increasingly received attention in machine learning , with the aim of mitigating unjustified bias in learned models . Various statistical metrics were proposed to measure the disparities of model outputs and performance when conditioned on sensitive attributes such as gender or race . Equipped with these metrics , one can formulate constrained optimization problems to impose fairness as a constraint . Nevertheless , these constraints do not necessarily generalize since they are data-dependent , i.e they are estimated from finite samples . In particular , models that minimize the disparities on training sets do not necessarily achieve the same fairness metric on testing sets ( Cotter et al. , 2019 ) . Conventionally , regularization is required to improve the generalization ability of a model ( Zhang et al. , 2016 ) . On one hand , explicit regularization such as weight decay and dropout constrain the model capacity . On the other hand , implicit regularization such as data augmentation enlarge the support of the training distribution via prior knowledge ( Hernández-Garcı́a & König , 2018 ) . In this work , we propose a data augmentation strategy for optimizing group fairness constraints such as demographic parity ( DP ) and equalized odds ( EO ) ( Barocas et al. , 2019 ) . Given two sensitive groups such as male and female , instead of directly restricting the disparity , we propose to regularize the model on interpolated distributions between them . Those augmented distributions form a path connecting the two sensitive groups . Figure 1 provides an illustrative example of the idea . The path simulates how the distribution transitions from one group to another via interpolation . Ideally , if the model is invariant to the sensitive attribute , the expected prediction of the model along the path should have a smooth behavior . Therefore , we propose a regularization that favors smooth transitions along the path , which provides a stronger prior on the model class . We adopt mixup ( Zhang et al. , 2018b ) , a powerful data augmentation strategy , to construct the interpolated samples . Owing to mixup ’ s simple form , the smoothness regularization we introduce has a closed form expression that can be easily optimized . One disadvantage of mixup is that the interpolated samples might not lie on the natural data manifold . Verma et al . ( 2019 ) propose Manifold Mixup , which generate the mixup samples in a latent space . Previous works ( Bojanowski et al. , 2018 ; Berthelot et al. , 2018 ) have shown that interpolations between a pair of latent features correspond to semantically meaningful , smooth interpolation in the input space . By constructing the path in the latent space , we can better capture the semantic changes while traveling between the sensitive groups and hence result in a better fairness regularizer that we coin fair mixup . Empirically , fair ∗Work done during an internship at IBM Research AI mixup improves the generalizability for both DP and EO on tabular , computer- vision , and natural language benchmarks . Theoretically , we prove for a particular case that fair mixup corresponds to a Mahalanobis metric in the feature space in which we perform the classification . This metric ensures group fairness of the model , and involves the Jacobian of the feature map as we travel along the path . In short , this work makes the following contributions : • We develop fair mixup , a data augmentation strategy that improves the generalization of group fairness metrics ; • We provide a theoretical analysis to deepen our understanding of the proposed method ; • We evaluate our approach via experiments on tabular , vision , and language benchmarks ; 2 RELATED WORK . Machine Learning Fairness To mitigate unjustified bias in machine learning systems , various fairness definitions have been proposed . The definitions can usually be classified into individual fairness or group fairness . A system that is individually fair will treat similar users similarly , where the similarity between individuals can be obtained via prior knowledge or metric learning ( Dwork et al. , 2012 ; Yurochkin et al. , 2019 ) . Group fairness metrics measure the statistical parity between subgroups defined by the sensitive attributes such as gender or race ( Zemel et al. , 2013 ; Louizos et al. , 2015 ; Hardt et al. , 2016 ) . While fairness can be achieved via pre- or post-processing , optimizing fair metrics at training time can lead to the highest utility ( Barocas et al. , 2019 ) . For instance , Woodworth et al . ( 2017 ) impose independence via regularizing the covariance between predictions and sensitive attributes . Zafar et al . ( 2017 ) regularize decision boundaries of convex margin-based classifier to minimize the disparaty between groups . Zhang et al . ( 2018a ) mitigate the bias via minimizing an adversary ’ s ability to predict sensitive attributes from predictions . Nevertheless , these constraints are data-dependent , even though the constraints are satisfied during training , the model may behave differently at evaluation time . Agarwal et al . ( 2018 ) analyze the generalization error of fair classifiers obtained via two-player games . To improve the generalizability , Cotter et al . ( 2019 ) inherit the two-player setting while training each player on two separated datasets . In spite of the analytical solutions and theoretical guarantees , game-theoretic approaches could be hard to scale for complex model classes . In contrast , our proposed fair mixup , is a general data augmentation strategy for optimizing the fairness constraints , which is easily compatible with any dataset modality or model class . Data Augmentation and Regularization Data augmentation expands the training data with examples generated via prior knowledge , which can be seen as an implicit regularization ( Zhang et al. , 2016 ; Hernández-Garcı́a & König , 2018 ) where the prior is specified as virtual examples . Zhang et al . ( 2018b ) proposes mixup , which generate augmented samples via convex combinations of pairs of examples . In particular , given two examples zi , zj ∈ Rd where z could include both input and label , mixup constructs virtual samples as tzi + ( 1 − t ) zj for t ∈ [ 0 , 1 ] . State-of-the-art results are obtained via training on mixup samples in different modalities . Verma et al . ( 2019 ) introduces manifold mixup and shows that performing mixup in a latent space further improves the generalization . While previous works focus on general learning scenarios , we show that regularizing models on mixup samples can lead to group fairness and improve generalization . 3 GROUP FAIRNESS . Without loss of generality , we consider the standard fair binary classification setup where we obtain inputs X ∈ X ⊂ Rd , labels Y ∈ Y = { 0 , 1 } , sensitive attribute A ∈ { 0 , 1 } , and prediction score Ŷ ∈ [ 0 , 1 ] from model f : Rd → [ 0 , 1 ] . We will focus on demographic parity ( DP ) and equalized odds ( EO ) in this work , while our approach also encompasses other fairness metrics ( detailed discussion in section 5 ) . DP requires the predictions Ŷ to be independent of the sensitive attribute A , that is , P ( Ŷ |A = 0 ) = P ( Ŷ |A = 1 ) . However , DP ignores the possible correlations between Y and A and could rule out the perfect predictor if Y 6⊥⊥ A. EO overcomes the limit of DP by conditioning on the label Y . In particular , EO requires Ŷ and A to be conditionally independent with respect to Y , that is , P ( Ŷ |A = 1 , Y = y ) = P ( Ŷ |A = 0 , Y = y ) for y ∈ { 0 , 1 } . Given the difficulty of optimizing the independency constraints , Madras et al . ( 2018 ) propose the following relaxed metrics : ∆DP ( f ) = |Ex∼P0f ( x ) − Ex∼P1f ( x ) | ∆EO ( f ) = ∑ y∈ { 0,1 } ∣∣∣Ex∼Py0 f ( x ) − Ex∼Py1 f ( x ) ∣∣∣ where we define Pa = P ( ·|A = a ) and P ya = P ( ·|A = a , Y = y ) , a , y ∈ { 0 , 1 } . We denote the joint distribution of X and Y by P . Similar metrics have also been used in Agarwal et al . ( 2018 ) , Wei et al . ( 2019 ) , and Taskesen et al . ( 2020 ) . One can formulate a penalized optimization problem to regularize the fairness measurement , for instance , ( Gap Regularization ) : min f E ( x , y ) ∼P [ ` ( f ( x ) , y ) ] + λ∆DP ( f ) , ( 1 ) where ` is the classification loss . In spite of its simplicity , our experiments show that small training values of ∆DP ( f ) do not necessarily generalize well at evaluation time ( See section 6 ) . To improve the generalizability , we introduce a data augmentation strategy via a dynamic form of group fairness metrics . 4 DYNAMIC FORMULATION OF FAIRNESS : PATHS BETWEEN GROUPS . For simplicity , we will first consider ∆DP as the fairness metric , and extend our development to ∆EO in section 5 . ∆DP provides a static measurement by quantifying the expected difference at P0 and P1 . In contrast , one can consider a dynamic metric that measures the change of Ŷ while transitioning gradually from P0 to P1 . To convert from the static to the dynamic formulations , we start with a simple Lemma that bridges two groups with an interpolator T ( x0 , x1 , t ) , which generates interpolated samples between x0 and x1 based on step t. Lemma 1 . Let T : X 2 × [ 0 , 1 ] → X be a function continuously differentiable w.r.t . t such that T ( x0 , x1 , 0 ) = x0 and T ( x0 , x1 , 1 ) = x1 . For any differentiable function f , we have ∆DP ( f ) = ∣∣∣∣∣∣∣ ∫ 1 0 d dt ∫ f ( T ( x0 , x1 , t ) ︸ ︷︷ ︸ interpolation ) dP0 ( x0 ) dP1 ( x1 ) dt ∣∣∣∣∣∣∣ = : ∣∣∣∣∫ 1 0 d dt µf ( t ) dt ∣∣∣∣ , ( 2 ) where we define µf ( t ) = Ex0∼P0 , x1∼P1f ( T ( x0 , x1 , t ) ) , the expected output of f with respect to T ( x0 , x1 , t ) . Figure 2 provides an illustrative example of the idea . Lemma 1 relaxes the binary sensitive attribute into a continuous variable t ∈ [ 0 , 1 ] , where µf captures the behavior of f while traveling from group 0 to group 1 along the path constructed with the interpolator T . In particular , given two examples x0 and x1 drawn from each group , T generates interpolated samples that change smoothly with respect to t. For instance , given two racial backgrounds in the dataset , µf simulates how the prediction of f changes while the data of one group smoothly transforms to another . We can then detect whether there are “ unfair ” changes in µf along the path . The dynamic formulation allows us to measure the sensitivity of f with respect to a relaxed continuous sensitive attribute t via the derivative ddtµf ( t ) . Ideally , if f is invariant to the sensitive attribute , ddtµf ( t ) should be small along the path from t = 0 to 1 . Importantly , a small ∆DP does not imply | ddtµf ( t ) | is small for t ∈ [ 0 , 1 ] since the derivative could fluctuate as it can be seen in Figure 2 .

Summary: This paper introduces a method to improve fairness generalization.  The authors utilize a modified version of mixup where they regularize in favor of invariance of classifier prediction for interpolations between sensitive groups.  The idea is that we expect changes to sensitive attributes not to affect classification decisions.  They introduce a number of regularization terms for both demographic parity and equal opportunity.  Because the mixup interpolations are initially taken as linear interpolations between data --- and thus may not be naturally occurring --- they also introduce a version where samples are taken from a latent space.  They perform assessments on a number of datasets and modalities including Adult, CelebA, and  Jigsaw toxic comments.  They find their methods improve fairness generalization compared to a few baselines, including directly regularizing the model for fairness.