Fair Bayes-Optimal Classifiers Under Predictive Parity
Abstract
Increasing concerns about disparate effects of AI have motivated a great deal of work on fair machine learning.
Existing works mainly focus on independence and separation-based measures (e.g., demographic parity, equality of opportunity, equalized odds), while sufficiency-based measures such as predictive parity are much less studied.
This paper considers predictive parity, which requires the same probability of success given a positive prediction, among different protected groups.
We prove that, if the overall performances of different groups vary only moderately, all fair Bayes-optimal classifiers under predictive parity are group-wise thresholding rules.
Perhaps surprisingly, this may not hold if group performance levels vary widely; in which case we find that predictive parity among protected groups may lead to within-group unfairness.
We then propose an algorithm we call
FairBayes-DPP, aiming to ensure predictive parity when our condition is satisfied.
FairBayes-DPP is an adaptive thresholding algorithm that aims to achieve predictive parity, while also seeking to maximize test accuracy.
We provide supporting experiments conducted on synthetic and empirical data.
Introduction
Due to the increasing ability to handle massive data with extraordinary model accuracy, machine learning (ML) algorithms have achieved remarkable success in many applications, such as computer vision [44, 46, 23, 47] and natural language processing [45, 49, 12, 55].
However, empirical studies have also revealed that ML algorithms may incorporate bias from the training data into model predictions.
Due to historical biases, vulnerable groups are often under-represented in available data [27, 48].
Moreover, risk minimization may further inadvertently introduce biases that are not in the data [60, 24].
As a consequence, without fairness considerations, ML algorithms can be systematically biased against certain groups defined by protected attributes such as race and gender.
As algorithmic decision-making systems are now widely integrated in high-stakes decision- making processes, such as in healthcare [21] and criminal prediction [27], fair machine learning has grown rapidly over the last few years into a key area of trustworthy AI.
A main task in fair machine learning is to design efficient algorithms satisfying fairness constraints with a small sacrifice in model accuracy.
This field has made substantial progress in recent years, as many effective approaches have been proposed to mitigate algorithmic bias [57, 33, 3, 52, 4, 9, 35, 10, 25, 5, 58].
An important fundamental benchmark for fair classification is provided by fair Bayes-optimal classifiers, which maximize accuracy subject to fairness [36, 58].
A key class of classifiers is group-wise thresholding rules (GWTRs) over the feature-conditional probabilities of the target label, for each protected group (e.g., probability of repaying a loan given income).
Intuitively, being a GWTR is a minimal requirement for within-group fairness: the most qualified individuals are selected in every group.
[8, 36, 7, 1, 43, 58] have studied fair Bayes-optimal classifiers under various fairness constraints and proved that, for many fairness metrics, the optimal fair classifiers are GWTRs.
Moreover, the associated thresholds can be learned efficiently [36, 58].
Current literature on Bayes-optimality focuses mainly on the independence- and separation-based fairness measures (e.g., demographic parity, equality of opportunity, equalized odds; see Section 2.1 for definitions and a review).
However, the theoretical benchmark for some sufficiency-based measures such as predictive parity are not well understood, possibly due to the complexity of their constraints.
Liu et al.
[31] show that a particular sufficiency-based measure, group calibration, is implicitly favored by unconstrained optimization: calibration error is bounded by the excess risk over the unconstrained Bayes-optimal classifier.
Hebert-Johnson et al.
[24] proposed a multicalibration method that guarantees calibrated predictions for several subpopulations.
For selective classification,
Lee et al.
[30] find that sufficiency-based representation learning leads to fairness.
In this paper, we consider predictive parity, which requires that the positive predictive value (probability of a successful outcome given a positive prediction) be similar among protected groups.
In credit lending, for example, predictive parity requires that, for individuals who receive the loans, the repayment rates in different protected groups are the same.
Although predictive parity is often applied to assess an algorithm in recidivism prediction [19, 13, 6], little is known about (1) what are the optimal fair classifiers under predictive parity and (2) how to learn them effectively.
In this paper, we aim to answer these two questions.
We first study fair Bayes-optimal classifiers under predictive parity.
Perhaps surprisingly, our theoretical results reveal that the optimal fair classifiers may or may not be a GWTR, depending on the data distribution.
We identify a sufficient condition under which all fair Bayes-optimal classifier are GWTRs.
Without this condition, we show that fair Bayes-optimal classifiers may not be a GWTR when the minority group is more qualified than the majority group.
In these cases, predictive parity may have limitations as a fairness measure, as it can either lead to within-group unfairness for the minority group or results in accuracy loss.
Our findings are a reminder that the improper use of fairness measures may result in severe unintended consequences.
Careful analysis before applying fairness measures is necessary.
We then develop an algorithm, FairBayes-DPP, aiming for predictive parity.
Our method is a twostage plug-in method.
In the first step, we use standard learning algorithms to estimate group-wise conditional probabilities of the labels.
In the second step, we first check our sufficient condition, and then apply a plug-in method for estimating the optimal thresholds under fairness for each protected group.
We summarize our contributions as follows
• We show that Bayes-optimal classifiers satisfying predictive parity may or may not be group-wise thresholding rules (GWTRs), depending on the data distribution.
• We identify a sufficient condition under which all fair Bayes-optimal classifiers are GWTRs.
However, when the sufficient condition is not satisfied, the fair Bayes-optimal classifier may lead to within-group unfairness for the minority group.
• We propose the FairBayes-DPP algorithm for binary fair classification.
The proposed FairBayes-DPP is computationally efficient, showing a solid performance in our experiments.
Related Literature 2.1 Fairness Measures
Various fairness metrics have been proposed to measure aspects of disparity in ML.
Group fairness [2, 15, 22] targets statistical parity across protected groups, while individual fairness [26, 29, 41] aims to provide nondiscriminatory predictions for similar individuals.
In general, group fairness measures can be categorized into three categories.
The first group consists of independence-based measures, which require independence between predictions and protected attributes; this includes demographic parity [28, 57] and conditional statistical parity [8, 1].
In credit lending, independence means that the proportion of approved candidates is the same across different protected groups.
However, as discussed in [22], independencebased measures have limitations; and applying them often leads to a substantial loss of accuracy.
The second group consists of separation-based measures, which require conditional independence between predictions and protected attributes, given label information.
Typical examples in this group are equality of opportunity [22, 59] and equalized odds [22, 56].
In credit lending, separationbased measures require, that the individuals who will pay back (or default on) their loan have an equal probability of getting the loan, despite their race or gender.
Compared to independencebased measures, separation-based measures take label information into account, allowing for perfect predictions that equal the label.
However, these measures are hard to validate in certain applications as the label information is often unknown for some groups.
For example, the repayment status is missing for individuals whose loan application is declined.
As a result, measuring predictive bias is more widely applicable.
This leads to the third class, sufficiency-based measures [39, 6, 31], where the label is required to be conditionally independent of the protected attributes, given the prediction.
In credit lending, this requires that among the approved applications, the proportion of individuals who pay back the loan is equal across different groups.
Unlike independence- and separation-based measures that are well studied with solid theoretical benchmarks and efficient algorithms, some sufficiency-based measures, such as predictive parity, are less commonly investigated.
A possible reason is that conditioning on the prediction leads to a complex constraint, which is thus challenging to study and enforce algorithmically.
2.2 Algorithms Aimed at Fairness
Literature on algorithms for fairness has grown explosively over the past decade.
Existing algorithms for fairness can be categorized broadly into three categories.
The first category is pre-processing algorithms aiming to remove biases from the training data.
Examples include transformations [17, 34, 3, 25], fair representation learning [57, 33, 35, 10] and fair data generation [53, 42, 54, 40].
The second group is in-processing algorithms, which handle fairness constraints during the training process.
Two common strategies are penalized optimization [20, 38, 9, 5] and adversarial training [59, 50, 52, 4].
The former incorporates fairness measures as a regularization term into the optimization objective and the latter tries to minimize the predictive ability of the model with respect to the protected attribute.
The third group is post-processing algorithms, aiming to remove disparities from the model output.
The most common post-processing algorithm is the thresholding method [18, 36, 1, 43, 58], adjusting thresholds for every protected group to achieve fairness.
In this paper, we propose a post-processing algorithm, FairBayes-DPP, to estimate the fair Bayes-optimal classifier under predictive parity.
Problem Formulation and Notations
In this paper, we consider classification problems where two types of feature are observed: the usual feature X ∈ X , and the protected feature A ∈ A .
For example, in loan applications, X may refer to common features such as education level and income, and A may correspond to the race or gender of a candidate.
As multiclass protected attributes are often encountered in practice, we allow A to have any number |A| ≥ 1 of classes, and let A = { 1 , 2 , ..., |A|} .
We denote by Y the ground truth label.
In credit lending, Y may correspond to the status of repayment or defaulting on a loan.
The output ˆ Y of the classifier aims to predict Y based on observed features.
We consider randomized classifiers defined as follows:
Definition 3.1 (Randomized classifier) .
A randomized classifier is a measurable function 3 f :
X ×
A → [0 , 1] , indicating the probability of predicting (cid:98) Y = 1 when observing X = x and A = a .
We denote by ˆ Y f
= ˆ Y f ( x, a ) the prediction induced by the classifier f .
Group-wise thresholding rules [8, 58] (GWT rules/classifiers or GWTRs over conditional probabilities are of special importance.
Consider an appropriate dominating sigma-finite measure µ on X (such as the Lebesgue measure for measurable subsets of R d , d ≥ 1 , or the uniform measure for finite sets), and suppose that for all a ∈ A and y ∈ Y , the features X have a conditional distribution
P X | a,y given A = a, Y = y with a density dP X | a,y with respect to µ .
For all 4 x ∈ X and a ∈ A , let η a ( x ) =
P ( Y = 1 | X = x, A = a ) .
Definition 3.2 (GWT classifier) .
A classifier f is a GWTR if there are constants t a , a ∈ A , and functions τ a : X → [0 , 1] , a ∈ A , such that for all x ∈ X and a ∈
A
[Equation]
where I ( · ) is the indicator function.
Clearly, GWTRs choose individuals with the highest conditional probability in each group.
This property is a minimal requirement for within-group fairness.
For example, a GWT recruitment tool ensures that the most qualified candidates are approved in every protected group.
For many independence- and separation-based fairness metrics, the connection between Bayes-optimality and
GWTRs has been well-documented in the literature.
Corbett-Davies et al.
[8] proved that, under demographic parity and predictive equality, the fair Bayes-optimal classifiers are GWTRs with unspecified thresholds.
By linking demographic parity and equality of opportunity with cost-sensitive risks, Menon and Williamson [36] further derived the thresholds for fair Bayes optimal classifiers under these two fairness measures.
Under perfect demographic parity and equality of opportunity, exact forms of fair Bayes-optimal classifiers were derived in [7] and [43], respectively.
More recently, by leveraging the Neyman–Pearson argument from hypothesis testing, Zeng et al.
[58] proposed a general framework for deriving fair Bayes-optimal classifiers under independence-and separationbased fairness measures.
They have elucidated a direct dependence of the optimal fair thresholds on the level of disparity.
In this paper, we consider predictive parity, which aims to ensure the same positive predictive value among protected groups:
Definition 3.3 (Predictive Parity) .
A classifier f satisfies predictive parity if for all a ∈ A ,
P ( Y = 1 | (cid:98) Y f = 1 , A = a ) =
P ( Y = 1 | (cid:98)
Y f = 1) .
We follow [5, 58] to use the difference between positive predictive values to measure the degree of unfairness, defining the Difference in Predictive Parities (DPP) of a classifier f as
[Equation]
Fair Bayes-optimal Classifiers under Predictive Parity
Since predictive parity is commonly considered under the scenarios where false positives are particularly harmful [30], we study cost-sensitive classification.
For a cost parameter c ∈ [0 , 1] 5 , the cost-sensitive 0-1 risk of the classifier f is defined as
[Equation]
An unconstrained Bayes-optimal classifier for the cost-sensitive risk is any minimizer f
⋆ ∈ argmin f R c ( f ) .
A classical result is that all Bayes-optimal classifiers have the form f ⋆ ( x, a ) =
I ( η a ( x ) > c ) + τI ( η a ( x ) = c ) , where τ ∈ [0 , 1] is arbitrary [16, 36].
In the literature, Liu et al. [31] proved that group calibration can be achieved by unconstrained optimization.
In fact, the Bayes-optimal score function η a ( x ) is clearly calibrated with respect to any collection of groups.
As a result, when η a ( x ) is consistently estimated (which can be achieved by unconstrained optimization), the calibration error is well bounded by the excess risk.
However, when the training data is biased, we can have
[Equation]
, A
[Equation]
X
[Equation]
c, A = a ′ ) for a ̸ = a ′
In other words, even though the Bayes score η a satisfies perfect multicalibration, it does not satisfy predictive parity.
Taking DPP as a constraint, a fair Bayes-optimal classifier is any minimizer of the cost-sensitive risk among fair classifiers:
[Equation]
4.1 GWT Fair Bayes-Optimal Classifiers under Predictive Parity
We first identify a sufficient condition under which all fair Bayes-optimal classifier under predictive parity are GWTRs.
Condition 4.1 (Sufficient condition for Bayes-optimal classifiers to be GWTRs) .
[Equation]
The sufficient condition 4.1 requires that the minimal group-wise positive predictive value P ( Y = 1 | η a ( X ) ≥ c, A = a ) of the unconstrained Bayes-optimal classifier is lower bounded by the maximal proportion of positive labels P
( Y = 1 |
A = a ) among groups.
In other words, the performances of different groups vary only moderately: with respect to the unconstrained Bayes optimal classifier, the positive predictive value of the worst group—the proportion of x such that η a ( x ) ≥ c —should be greater than the overall performance P ( Y = 1 |
A = a ) of the best group.
Condition 4.1 holds if
P ( Y = 1 | A = a ) ≤ c for all a ∈ A , because P ( Y = 1 | η a ( X ) ≥ c, A = a ) ≥ c .
These conditions are applicable in settings where c is large, such as in credit lending where false positives are more harmful than false negatives, or if p Y | a , a ∈ A are small, such as in job recruitment or school admissions where the number of slots is much smaller than the number of applications.
Under this condition, we present our main result.
Theorem 4.2 (Main result) .
Consider the cost-sensitive 0 - 1 risk with cost parameter c .
If Condition 4.1 holds, then all fair Bayes-optimal classifiers under predictive parity are GWTRs.
Thus, for all f ⋆PPV from (2) , there are ( t ⋆a ) |A| a =1 ∈ [0 , 1] |A| and functions τ ⋆a ( x ) : X → [0 , 1] such that, for all x ∈ X and a ∈ A ,
[Equation]
Unlike for demographic parity or for equality of opportunity, where the fairness constraint is linear with respect to the probability predictions of the classifier f [36], the DPP constraint is non-linear with respect to f .
As a consequence, previously used theoretical tools such as the Neyman-Pearson argument from hypothesis testing [58] are no longer valid in this case.
Instead, we prove the result using a novel constructive argument.
When Condition 4.1 is satisfied, for any classifier satisfying predictive parity, which is not a GWTR, we construct a GWTR that satisfies predictive parity and achieves a smaller classification error.
As a result, under Condition 4.1, all fair Bayes-optimal classifiers are GWTRs.
Overall, the proof of Theorem 4.2 is quite involved, and requires a lot of careful casework and analysis.
4.2 Fair Bayes-optimal Classifiers under Predictive Parity do not Need to be Thresholding Rules
Next, we consider the case when the sufficient condition 4.1 does not hold.
For simplicity, we consider a binary protected attribute a ∈ { 0 , 1 } with
[Equation]
Our result shows that, under condition (3), there exist class probabilities p a , a ∈ A , such that
no
Bayes-optimal classifier under predictive parity is a GWTR.
Theorem 4.3.
Suppose that condition (3) holds.
Denote t 1 = inf { t : P ( Y = 1 | η 1 ( X ) ≥ t, A = 1) >
P ( Y = 1 | A = 0) } .
Suppose there exist δ 1 , δ 2 > 0 such that P ( c + δ 1 < η A ( X ) < t 1 |
A
= 1) =
δ 2 > 0 .
Then, for all p 1 > 2 2+ δ 1 δ 2 , no fair Bayes-optimal classifier under predictive parity is a
GWTR.
The condition involving the constants δ 1 , δ 2 > 0 ensures that η 1 ( X ) has positive probability to be strictly larger than c , which is a technical condition needed in the proof.
Theorem 4.3 shows that predictive parity may lead to within-group unfairness, whereby the most qualified individuals are predicted to be unqualified, for a better overall accuracy.
By definition, predictive parity requires that the qualifications of selected individuals are similar across the protected groups.
Suppose there exists a highly qualified minority group in which most individuals are qualified.
Selecting the most qualified individuals in this group leads to a very high standard.
As a result, many qualified individuals in other majority groups may be predicted to be unqualified using this standard, leading to accuracy loss.
Conversely, if we select less qualified individuals in the highly qualified group, the lower standard allows more qualified individuals from the other groups to be selected, and increases accuracy.
Input: Datasets ni
Cost parameter c ∈
Step 1 : Estimate η a ( x ) by ˆ η = f ˆ θ , with ˆ θ from (4)
Step 2 : Find the optimal thresholds..
Define, for all t ,
[Equation]
if min a (cid:100) PPV a ( c ) < max a ˆ P ( Y = 1 |
A = a ) then
Warning: Applying FairBayes-DPP may lead to accuracy loss.
else
Let t min = min { t : (cid:100) PPV 1 ( t ) ≥ max a ˆ P ( Y = 1 |
A = a ) } .
for t ∈ T
=
[ t min , max j ˆ η 1 ( x (1) j )] do for a ∈ A \ { 1 }
do
Find ˆ t a ( t ) such that (cid:100) PPV a (ˆ t a ( t ))
≈ (cid:100) PPV 1 ( t ) .
end for
Let ˆ f ( x, a, t ) =
˜ f
(cid:0) x, a ; ˆ t 1 ( t ) , ˆ t 2 ( t ) , ..., ˆ t |A| ( t ) (cid:1) =
I (cid:0)(cid:98)
η a ( x ) ≥ ˆ t a ( t ) (cid:1) .
Let R c ( t ) = 1 n (cid:80) n i =1 c (1 − y i ) (1 − c )
y i I
( y i ̸
= ˆ f ( end for end if
FairBayes-DPP: Adaptive Thresholding for Fair Bayes-optimality
In this section, we propose the FairBayes-DPP algorithm (Algorithm 1) for fair Bayes-optimal classification under predictive parity.
As mentioned, the DPP constraint is non-linear with respect to the classifier f , and is also highly non-convex with respect to the model parameters, even if both the classifier f and the risk function are convex with respect to these parameters.
In such cases, incorporating fairness constraints as a penalty in the training objective may be hard due to potential local minima.
Therefore, we consider a different approach, developing a new two-step plug-in method based on Theorem 4.2.
Suppose we observe data points ( x i , a i , y i ) ni
=1 drawn independently and identically from a distribution D over the domain X
×
A × Y .
Step 1.
In the first step, we apply standard machine learning algorithms to learn the feature- and group-conditional label probabilities η based on the whole dataset.
Consider a loss function L ( · , · ) and the function class F = { f θ : θ ∈ Θ } parametrized by θ .
The estimator of η is obtained by minimizing the empirical risk, ˆ η a ( x ) :
= f ˆ θ ( x, a ) , where
[Equation]
Here we use the cross-entropy loss, as minimizing the empirical 0-1 risk is generally not tractable.
At the population level, the minimizers of the risks induced by the 0-1 and cross-entropy losses are both the true conditional probability function [37].
Step 2.
In the second step, we first check the empirical version of Condition 4.1 for the classifier derived in the first step.
To be more specific, we divide the data into |A| parts, according to the value of A : for a ∈ A , S a
= { x ( a ) j , y ( a ) j } n a j =1 , where a ( a ) j = a .
Let, for all t for which it is defined,
[Equation]
PPV
[Equation]
and
[Equation]
We only divide by nonzero quantities here and below.
To ensure that the quantities we divide by are nonzero, we restrict to t a ∈ [0 , max j (ˆ η a ( x ( a ) j ))] when evaluating (cid:100) PPV a ( t a ) .
We check whether min
[Equation]
6 If this is not satisfied, we provide a warning message that applying FairBayes-DPP may lead to accuracy loss, see the discussion after Theorem 4.3.
If it is satisfied, we then adjust the thresholds of the classifier aiming for predictive parity.
Based on
Theorem 4.2, we consider the following deterministic classifiers:
[Equation]
where ˆ η is the estimate of η from the first step, and t a , a ∈ A , are parameters to learn.
We use the following strategy to estimate t a , a ∈ A : First, we fix the threshold for the group with a = 1 , say t .
The positive predictive value for this group can then be estimated by (cid:100) PPV 1 ( t ) .
To achieve predictive parity, we need to find thresholds for the other groups such that the positive group-wise predictive values are the same 7 , i.e., find t a , a = 2 , 3 , . .
. , |A| , such that
[Equation]
As stated in Lemma A.1, the positive predictive value for each group in the population is always non-decreasing with the thresholds t a increases.
As a consequence, we can search over t a , a = 2 , 3 , . . .
, |A| , efficiently via, for instance, the bisection method.
Correspondingly, we consider the following range of t : T =
[ t min , max j η 1 ( x
[Equation]
1) j )] with
[Equation]
We denote by ˆ t a ( t ) , a = 2 , 3 , . . .
, |A| , the estimated thresholds given by (6), writing ˆ t 1 ( t ) =
t for convenience.
We consider the classifier (5) with these thresholds:
[Equation]
Lastly, we find t that minimizes the cost-sensitive risk on the training data by searching over a grid
T n within T :
[Equation]
Our final estimator of the fair Bayes-optimal classifier is ˆ f PP =
ˆ f ˆ t .
The FairBayes-DPP algorithm is related to the algorithms proposed for other fairness measures in [58], where a binary protected attribute is considered and closed-form optimal thresholds are derived.
In contrast, FairBayes-DPP can handle multi-class protected attributes and does not rely on closed-form thresholds.
Similar to [58], our algorithm enforces fairness only in the fast second step, where no gradient-based technique is applied.
Thus, it is computationally efficient and the non-convexity of fairness constraint is no longer problematic.
Our experimental results demonstrate that our method removes disparities and preserves accuracy.
Experiments 6.1 Synthetic Data
We first study a synthetic dataset to compare our method with the true Bayes-optimal fair classifier derived analytically using the true data distribution.
Statistical model.
Let X =
( X 1 , X 2 ) ∈ R 2 be a generic feature, A ∈ { 0 , 1 } be the protected attribute and Y ∈ { 0 , 1 } be the label.
We generate A and Y according to the probabilities P ( A = 1) ,
P ( Y = 1 | A = 1) and P ( Y = 1 |
A = 0) , specified below.
Conditional on A = a and Y =
y , X is generated from a bivariate Gaussian distribution N
(2 a − 1 , 2 y − 1) ⊤ , 2 2 I 2 ) , where I p is the p -dimensional identity covariance matrix.
In this model, η a ( x ) has a closed form, and we use it to find the true fair Bayes-optimal classifier numerically under the Condition 4.1.
More details about this synthetic model can be found in Section C of Appendix.
[Table]
Experimental setting.
We randomly sample 50 , 000 training data points and 5 , 000 test data points.
In the Gaussian case, the Bayes-optimal classifier is linear in x and thus we employ logistic regression to learn η 1 ( · ) and η 0 ( · ) .
We then search over a grid with spacings equal to 0 .
001 over the range we identified in Section 5 for the empirically optimal thresholds under fairness.
We denote (cid:98) f and (cid:98) f PPV the estimators of the unconstrained and fair Bayes-optimal classifiers, respectively.
We first evaluate the FairBayes-DPP algorithm under the Condition 4.1.
We set the cost parameter c = 0 .
5 , while P ( A = 1) = 0 .
3 and P ( Y = 1 | A = 0)
= 0 .
It can be calculated that P ( Y = 1 | η 0 ( X ) > 0 .
5 , A = 0)
≈ 0 .
613 , using (23) in the Appendix.
To consider settings with varied levels of fairness in the population, we vary p
= P ( Y = 1 |
A = 1) from 0 .
2 to 0 .
6 , with the DPP of unconstrained Bayes-optimal classifier grows from 0 to 0 .
Table 1 presents the classification accuracy and DPP of the true fair Bayes-optimal classifier and
FairBayes-DPP trained via logistic regression over 100 simulations 9 .
Our first observation is that, under predictive parity, the accuracy of true unconstrained and fair Bayes-optimal classifiers is almost identical, indicating that predictive parity under Condition 4.1 requires a very small loss of accuracy.
Second, our FairBayes-DPP method closely tracks the behavior of the fair Bayes-optimal classifier, controlling the accuracy metric ACC and unfairness metric DPP on the test data effectively.
When | P ( Y = 1 | A = 1) − P ( Y = 1 |
A = 0) | is small, FairBayes-DPP performs similarly to the unconstrained classifier.
However, when the data is biased against protected groups and | P ( Y = 1 | A = 1) − P ( Y = 1 | A = 0) | is large, FairBayes-DPP mitigates the disparity of the unconstrained classifier effectively, while preserving model accuracy.
We further conduct extensive simulations to evaluate the FairBayes-DPP algorithm with different model and training setups, as shown in the Appendix.
In particular, we also consider the multi-class protected attribute case.
6.2 Empirical Data Analysis
Dataset.
We test FairBayes-DPP on two benchmark datasets for fair classification
: “Adult”
and “COMPAS”
For each dataset, we randomly sample (with replacement) 70%, 50% and 30% as the training, validation and test set, respectively.
To further test the performance of our algorithm on a large-scale dataset, we conduct experiments on the CelebFaces Attributes (CelebA) Dataset [32].
• Adult:
The target variable Y is whether the income of an individual is more than $50,000.
Age, marriage status, education level and other related variables are included in X , and the protected attribute A refers to gender.
• COMPAS:
In the COMPAS dataset, the target is to predict recidivism.
Here Y indicates whether or not a criminal will reoffend, while X includes prior criminal records, age and an indicator of misdemeanor.
The protected attribute A is the race of an individual, “white-vs-non-white”.
• CelebA: CelebA dataset is a large-scale dataset with more than 200,000 face images, each with 40 attributes (including protected attribute “gender” and other 39 different attributes for prediction tasks).
Our goal is to predict the face attributes Y based on the images X and remove bias with respect to gender A from the output.
Experimental setting.
As algorithms for predictive parity are rarely considered in the literature, we use unconstrained learning as a baseline for our experiments.
For the “Adult” and “COMPAS” datasets, we adopt the same training setting as in [5, 58].
The conditional probabilities are learned via a three-layer fully connected neural network architecture with 32 hidden neurons per layer.
For “CelebA”, we apply the training setting from [51].
We learn the conditional probabilities by training a
ResNet50 model [23], pretrained on ImageNet [11].
For all the datasets, Over the course of training the model on the training set, we select the one with best performance on the validation set.
In addition, we learn the optimal thresholds over the validation set to avoid overfitting.
All experiments use PyTorch.
We refer readers to the Appendix for more training details, including optimizer, learning rates, batch sizes and training epochs.
We repeat the experiment 100 times for the Adult and COMPAS datasets and 10 times for the CelebA dataset.
Figure 1 presents the average performances of FairBayes-DPP and unconstrained learning on the
Adult and COMPAS datasets.
Our method achieves almost the same accuracy as the unconstrained classifier, and has a smaller disparity.
To better compare our fair classifier with the unconstrained one, we use the paired t -test to compare the DPP of the proposed algorithm (DPP Fair ) and of unconstrained learning (DPP Base ).
We consider the following one sided test:
[Equation]
The p -values of the tests are 3 .
90 × 10 − 4 for the Adult dataset and 3 .
× 10 − 8 for the COMPAS dataset.
In both cases, these results provide evidence that our FairBayes-DPP achieves a smaller disparity than unconstrained learning.
Finally, we test FairBayes-DPP on the CelebA dataset, Here, we only consider 27 attributes 11 with 0 .
01 ≤ P ( Y = 1 | M ) , P ( Y = 1 | F ) ≤ 0 . 99 in the training, validation, and test sets
to ensure that the training, validation and test sample sizes are large enough for each subgroup.
We further identify one attribute, “Young”, that violates Condition 4.1.
We calculate the per-attribute accuracies and
DPPs on the test set.
Table 2 presents the results of the first six attributes; the remaining results are in the Appendix.
As we can see, even for the large-scale CelebA dataset with high dimensional image features, our algorithm mitigates the gender bias effectively, with almost no loss of accuracy.
[Table]
Summary and Discussion
In this paper
[Table]
we investigate fair Bayes-optimal classifiers under predictive parity.
We prove that when the overall performances of different protected groups vary only moderately, all fair Bayes-optimal classifiers under predictive parity are GWTRs.
We further propose a post-processing algorithm to estimate the optimal GWTR.
The derived post-processing algorithm removes the disparity in unconstrained classifiers effectively, while preserving a similar test accuracy.
However, when our sufficient condition is not satisfied, the fair Bayes-optimal classifier under predictive parity may lead to within-group unfairness for the minority group.
In the current literature, many algorithms directly apply penalized/constrained optimization to impose fairness.
Our negative finding, however, is an important reminder that careful analysis is required before employing a fairness measure.
The improper use of a measure may result in severe unintended consequences.
Acknowledgements
Xianli Zeng would like to acknowledge the supported from Shenzhen Research Institute of Big Data (SRIBD); Edgar Dobriban was supported in part by the NSF under award DMS 2046874 (CAREER) and the NSF-Simons Collaboration on the Mathematical and Scientific Foundations of Deep Learning (NSF 2031985); Guang Cheng was supported in part by ONR grant N00014-22-1-2680 and NSFSCALE MoDL (2134209).