Probably Approximately Metric-Fair Learning

Guy N. Rothblum, Gal Yona

Introduction

Machine learning is increasingly used to make consequential classification decisions about individuals. Examples range from predicting whether a user will enjoy a particular article, to estimating a felon’s recidivism risk, to determining whether a patient is a good candidate for a medical treatment. Automated classification comes with great benefits, but it also raises substantial societal concerns (cf. [O’N16] for a recent perspective). One prominent concern is that these algorithms might discriminate against individuals or groups in a way that violates laws or social and ethical norms. This might happen due to biases in the training data or due to biases introduced by the algorithm. To address these concerns, and to truly unleash the full potential of automated classification, there is a growing need for frameworks and tools to mitigate the risks of algorithmic discrimination. A growing literature attempts to tackle these challenges by exploring different fairness criteria.

Discrimination can take many guises. It can be difficult to spot and difficult to define. Imagine a protected minority population PP (defined by race, gender identity, political affiliation, etc). A natural approach for protecting the members of PP from discrimination is to make sure that they are not mistreated on average. For example, that on average members of PP and individuals outside of PP are classified in any particular way with roughly the same probability. This is a “group-level” notion of fairness, sometimes referred to as statistical parity.

Pointing out several weakness of group-level notions of fairness, the seminal work of [DHP+12] introduced a notion of individual fairness. Their notion relies on a task-specific similarity metric that specifies, for every two individuals, how similar they are with respect to the specific classification task at hand. Given such a metric, similar individuals should be treated similarly, i.e. assigned similar classification distributions (their focus was on probabilistic classifiers, as will be ours). In this work, we refer to their fairness notion as perfect metric-fairness.

Given a good metric, perfect metric-fairness provides powerful protections from discrimination. Furthermore, the metric provides a vehicle for specifying social norms, cultural awareness, and task-specific knowledge. While coming up with a good metric can be challenging, metrics arise naturally in prominent existing examples (such as credit scores and insurance risk scores), and in natural scenarios (a metric specified by an external regulator). Dwork et al. studied the goal of finding a (probabilistic) classifier that minimizes utility loss (or maximizes accuracy), subject to satisfying the perfect metric-fairness constraint. They showed how to phrase and solve this optimization problem for a given collection of individuals.

Building on these foundations, we study metric-fair machine learning. Consider a learner that is given a similarity metric and a training set of labeled examples, drawn from an underlying population distribution. The learner should output a fair classifier that (to the extent possible) accurately classifies the underlying population.

This goal departs from the scenario studied in [DHP+12], where the focus was on guaranteeing metric-fairness and utility for the dataset at hand. Generalization of the fairness guarantee is a key difference: we focus on guaranteeing fairness not just for the (training) data set at hand, but also for the underlying population from which it was drawn. We note that perfect metric-fairness does not, as a rule, generalize from a training set to the underlying population. This presents computational difficulties for constructing learning algorithms that are perfectly metric-fair for the underlying population. Indeed, we exhibit a simple learning task that, while easy to learn without fairness constraints, becomes computationally infeasible under the perfect metric-fairness constraint (given a particular metric).We remark that perfect metric-fairness can always be obtained trivially by outputting a constant classifier that treats all individuals identically, the challenge is achieving metric-fairness together with non-trivial accuracy. See below and in Section 1.6 for further details.

We develop a relaxed approximate metric-fairness framework for machine learning, where fairness does generalize from the training set to the underlying population, and present polynomial-time fair learning algorithms in this framework. We proceed to describe our setting and contributions.

A metric-fair learning problem is defined by a domain X{\cal X} and a similarity metric dd. A metric-fair learning algorithm gets as input the metric dd and a sample of labeled examples, drawn i.i.d. from a distribution D{\cal D} over labeled examples from (X×±1)({\cal X}\times\pm 1), and outputs a classifier hh. To accommodate fairness, we focus on probabilistic classifiers h:X→h:{\cal X}\rightarrow, where we interpret h(x)h(x) as the probability of label 1 (the probability of −1-1 is thus (1−h(x))(1-h(x))). We refer to these probabilistic classifiers as predictors.

Taking inspiration from Valiant’s celebrated PAC learning model [Val84], we allow a small fairness error, which opens the door to generalization. We require that for two individuals sampled from the underlying population, with all but a small probability, if they are similar then they should be treated similarly. Similarity is measured by the statistical distance between the classification distributions given to the two individuals (we also allow a small additive slack in the similarity measure). We refer to this condition as approximate metric-fairness (MF). Similarly to PAC learning, we also allow a small probability of a complete fairness failure.

Given a well-designed metric, approximate metric-fairness guarantees that almost every individual gets fair treatment compared to almost every other individual. In particular, it provides discrimination-protections to every group PP that is not too small. However, this guarantee also has limitations: particular individuals and even small groups might encounter bias and discrimination. There are certainly settings in which this is problematic, but in other settings protecting all groups that are not too small is an appealing guarantee. The relaxation is well-motivated because approximate fairness opens the door to fairness-generalization bounds, as well as efficient learning algorithms for a rich collection of problems (see below). We elaborate on these choices and their consequences in Section 1.2.

Turning our attention to the accuracy objective, we follow [DHP+12] in considering fairness to be a hard constraint (e.g. imposed by a regulator). Given the fairness constraint, what is a reasonable accuracy objective? Ideally, we would like the predictor’s accuracy to approach (as the sample size grows) that of the most accurate approximately MF predictor. This is analogous to the accuracy guarantee pioneered in [DHP+12]. A probably approximately correct and fair (PACF) learning algorithm guarantees both approximate MF and “best-possible” accuracy. A more relaxed accuracy benchmark is approaching the accuracy of the best classifier that is approximately MF for a tighter (more restrictive) fairness-error. We refer this as a relaxed PACF learning algorithm (looking ahead, our efficient algorithms achieve this relaxed accuracy guarantee). We note that even relaxed PACF guarantees that the classifier is (at the very least) competitive with the best perfectly metric-fair classifier. We elaborate in Section 1.3.

A key issue in learning theory is that of generalization: to what extent is a classifier that is accurate on a finite sample S∼DmS\sim{\cal D}^{m} also guaranteed to be accurate w.r.t the underlying distribution? We develop strong generalization bounds for approximate metric-fairness, showing that for any class of predictors with bounded Rademacher complexity, approximate MF on the sample SS implies approximate MF on the underlying distribution (w.h.p. over the choice of sample SS). The use of Rademacher complexity guarantees fairness-generalization for finite classes and also for many infinite classes. Proving that approximate metric-fairness generalizes well is a crucial component in our analysis: it opens the door to polynomial-time algorithms that can focus on guaranteeing fairness (and accuracy) on the sample. Generalization also implies information-theoretic sample-complexity bounds for PACF learning that are similar to those known for PAC learning (without any fairness constraints). We elaborate in Section 1.4.

We construct polynomial-time (relaxed) PACF algorithms for linear and logistic regression. Recall that (for fairness) we focus on regression problems: learning predictors that assign a probability in $toeachexample.Forlinearpredictors,theprobabilityisalinearfunctionofanexample’sdistancefromahyperplane.Logisticpredictorscomposealinearfunctionwithasigmoidaltransferfunction.Thisallowslogisticpredictorstoexhibitsharpertransitionsfromlowpredictionstohighpredictions.Inparticular,alogisticpredictorcanbetterapproximateaclassifierthatlabelsexamplesthatarebelowahyperplanebyto each example. For linear predictors, the probability is a linear function of an example’s distance from a hyperplane. Logistic predictors compose a linear function with a sigmoidal transfer function. This allows logistic predictors to exhibit sharper transitions from low predictions to high predictions. In particular, a logistic predictor can better approximate a classifier that labels examples that are below a hyperplane by-1$, and examples that are above the hyperplane by 1. Linear and logistic predictors can be more powerful than they first seem: by embedding a learning problem into a higher-dimensional space, linear functions (over the expanded space) can capture the power of many of the function classes that are known to be PAC learnable [HS07]. We overview these results in Section 1.5. We note that a key challenge in efficient metric-fair learning is that the fairness constraints are neither Lipschitz nor convex (even when the predictor is linear). This is also a challenge for proving generalization and sample complexity bounds. Berk et al. [BHJ+17] also study fair regression and formulate a measure of individual fairness loss, albeit in a different setting without a metric (see Section 1.7).

Under mild cryptographic assumptions, we exhibit a learning problem and a similarity metric where: (i)(i) there exists a perfectly fair and perfectly accurate simple (linear) predictor, but (ii)(ii) any polynomial-time perfectly metric-fair learner can only find a trivial predictor, whose error approaches 1/2. In contrast, (iii)(iii) there does exist a polynomial-time (relaxed) PACF learning algorithm for this task. This is an important motivation for our study of approximate metric-fairness. We elaborate in Section 1.6.

In the remainder of this section we provide an overview of our contributions. Section 1.2 details and discusses the definition of approximate metric-fairness and its relationship to related works. Accurate and fair (PACF) learning is discussed in Section 1.3. We state and prove fairness-generalization bounds in Section 1.4. Our polynomial-time PACF learning algorithms for linear and logistic regression are in Section 1.5. Section 1.6 elaborates on the hardness of perfectly metric-fair learning. Further related work is discussed in Section 1.7.

Full and formal details are in Sections 2 through 6. Conclusions and a discussion of future directions are in Section 7.

2 Approximate Metric-Fairness

We require that metric-fairness holds for all but a small α\alpha fraction of pairs of individuals. That is, with all but α\alpha probability over a choice of two individuals from the underlying distribution, if the two individuals are similar then they get similar classification distributions. We think of α∈[0,1)\alpha\in[0,1) as a small constant, and note that setting α=0\alpha=0 recovers the definition of perfect metric-fairness (thus, setting α\alpha to be a small constant larger than 0 is indeed a relaxation). Similarity is measured by the statistical distance between the classification distributions given to the two individuals, where we also allow a small additive slack γ\gamma in the similarity measure. The larger γ\gamma is, the more “differently” similar individuals might be treated. We think of γ\gamma as a small constant, close to 0.

A predictor hh is (α,γ(\alpha,\gamma) approximately metric-fair (MF) with respect to a similarity metric dd and a data distribution D{\cal D} if:

Similarly to the PAC learning model, we also allow a small δ\delta probability of failure. This probability is taken over the choice of the training set and over the learner’s coins. For example, δ\delta bounds the probability that the randomly sampled training set is not representative of the underlying population. We think of δ\delta as very small or even negligible. A learning algorithm is probably approximately metric-fair if with all but δ\delta probability over the sample (and the learner’s coins), it outputs a classifier that is (α,γ)(\alpha,\gamma)-approximately MF. Further details are in Section 2.

Given a well-designed metric, approximate metric-fairness (for sufficiently small α,γ\alpha,\gamma) guarantees that almost every individual gets fair treatment compared to almost every other individual (see Section 2.3 for a quantitative discussion). Every protected group PP of fractional size significantly larger than α\alpha is protected in the sense that, on average, members of PP are treated similarly to similar individuals outside of PP. We note, however, that this guarantee does not protect single individuals or small groups (see the discussion in Section 1.1).

Recent works [HJKRR17, KNRW17] study fairness notions that aim to protect large collections of sufficiently-large groups. Similarly to our work, these can be viewed as falling between individual and group notions of fairness. A distinction from these works is that approximate metric-fairness protects every sufficiently-large group, rather than a large collection of groups that is fixed a priori. Recent works [GJKR18, KRR18] extend the study of metric fairness to settings where the metric is not known (whereas we focus on a setting where the metric is fixed and known in its entirety), and consider relaxed fairness notions that allow individual fairness to be violated.

3 Accurate and Fair Learning

Our goal is to obtain learning algorithms that are probably approximately metric-fair, and that simultaneously guarantee non-trivial accuracy. Recall that fairness, on its own, can always be obtained by outputting a constant predictor that ignores its input and treats all individuals identically (indeed, such a classifier is perfectly metric-fair). It is the combination of the fairness and the accuracy objectives that makes for an interesting task. As discussed above, we follow [DHP+12] in focusing on finding a predictor that maximizes accuracy, subject to the approximate metric-fairness constraint. This is a natural formulation, as we think of fairness as a hard requirement (imposed, for example, by a regulator), and thus fairness cannot be traded off for better accuracy.

As discussed above, the goal in metric-fair and accurate learning is optimizing the predictor’s accuracy subject to the fairness constraint. Ideally, we aim to approach (as the sample size grows) the error rate of the most accurate classifier that satisfies the fairness constraints. A more relaxed benchmark is guaranteeing (α,γ)(\alpha,\gamma)-approximate metric-fairness, while approaching the accuracy of the best classifier that is (α′,γ′)(\alpha^{\prime},\gamma^{\prime})-approximately metric-fair, for α′∈[0,α]\alpha^{\prime}\in[0,\alpha] and γ′∈[0,γ]\gamma^{\prime}\in[0,\gamma]. Our efficient learning algorithms will achieve this more relaxed accuracy goal (see below). We note that even relaxed competitiveness means that the classifier is (at the very least) competitive with the best perfectly metric-fair classifier.

These goals are captured in the following definition of probably approximately correct and fair (PACF) learning. Crucially, both fairness and accuracy goals are stated with respect to the (unknown) underlying distribution.

A learning algorithm A{\cal A} PACF-learns a hypothesis class H\mathcal{H} if for every metric dd and population distribution D{\cal D}, every required fairness parameters α,γ∈[0,1)\alpha,\gamma\in[0,1), every failure probability δ∈(0,1)\delta\in(0,1), and every error parameters ϵ,ϵα,ϵγ∈(0,1)\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}\in(0,1) the following holds:

There exists a sample complexity m=poly(log⁡∣X∣⋅log⁡(1/δ)α⋅γ⋅ϵ⋅ϵα⋅ϵγ)m={\rm poly}\left({\frac{\log|{\cal X}|\cdot\log(1/\delta)}{\alpha\cdot\gamma\cdot\epsilon_{\cdot}\epsilon_{\alpha}\cdot\epsilon_{\gamma}}}\right) and constants α′,γ′∈[0,1)\alpha^{\prime},\gamma^{\prime}\in[0,1) (specified below), such that with all but δ\delta probability over an i.i.d. sample of size mm and A{\cal A}’s coin tosses, the output predictor hh satisfies the following two conditions:

Fairness: hh is (α,γ)(\alpha,\gamma)-approximately metric-fair w.r.t. the metric dd and the distribution D{\cal D}.

Accuracy: Let HF′\mathcal{H}_{F}^{\prime} denote the subclass of hypotheses in H\mathcal{H} that are (α′−ϵα,γ′−ϵγ)(\alpha^{\prime}-\epsilon_{\alpha},\gamma^{\prime}-\epsilon_{\gamma})-approximately metric-fair, then:

We say that A{\cal A} is efficient if it runs in time poly(m){\rm poly}(m). If accuracy holds for α′=α\alpha^{\prime}=\alpha and γ′=γ\gamma^{\prime}=\gamma, then we stay that A{\cal A} is a strong PACF learning algorithm. Otherwise, we say that A{\cal A} is a relaxed PACF learning algorithm.

See Section 3 and Definitions 3.2 and 3.3 for a full treatment. Note that the accuracy guarantee is agnostic: we make no assumptions about the way the training labels are generated. Agnostic learning is particularly well suited to our metric-fairness setting: since we make no assumptions about the metric dd, even if the labels are generated by h∈Hh\in{\cal H}, it might be the case that dd does not allow for accurate predictions, in which case a fair learner cannot compete with hh’s accuracy.

4 Generalization

Generalization is a key issue in learning theory. We develop strong generalization bounds for approximate metric-fairness, showing that with high probability, guaranteeing empirical approximate MF on a training set also guarantees approximate MF on the underlying distribution (w.h.p. over the choice of sample SS). This generalization bound opens the door to polynomial-time algorithms that can focus on guaranteeing fairness (and accuracy) on the sample and effectively rules out the possibility of creating a “false facade” of fairness (i.e, a classifier that appears fair on a random sample, but is not fair w.r.t new individuals).

Towards proving generalization, we define the empirical fairness loss on a sample SS (a training set). Fixing a fairness parameter γ\gamma, a predictor hh and a pair of individuals x,x′x,x^{\prime} in the training set, consider the MF loss on the “edge” between xx and x′x^{\prime} (recall that the MF loss is 1 if the “internal” inequality of Equation (1) holds, and 0 otherwise). Observe that the losses on the (∣S∣2)\binom{|S|}{2} edges are not independent random variables (over the choice of SS), because each individual x∈Sx\in S affects many edges. Thus, rather than count the empirical MF loss over all edges, we restrict ourselves to a “matching” M(S)M(S) in the complete graph whose vertices are SS: a collection of edges, where each individual is involved in exactly one edge. The empirical MF loss of hh on SS is defined as the average MF loss over edges in M(S)M(S).The choice of which matching is used does not affect any of the results. Note that we could also choose to average over all the edges in the graph induced by SS. Generalization bounds still follow, but the rate of convergence is not faster than restricting our attention to a matching. Note that, since we restricted our attention to a matching, the MF losses on these edges are now independent random variables (over the choice of SS). A classifier is empirically (α,γ)(\alpha,\gamma)-approximately MF if its empirical MF loss is at most α\alpha. We are now ready to state our generalization bound:

Let H\mathcal{H} be a hypothesis class with Rademacher complexity Rm(H)=(r/m)R_{m}(\mathcal{H})=(r/\sqrt{m}). For every δ∈(0,1)\delta\in(0,1) and every ϵα,ϵγ∈(0,1)\epsilon_{\alpha},\epsilon_{\gamma}\in(0,1), there exists a sample complexity m=O(r2⋅ln⁡(1/δ)ϵα2⋅ϵγ2)m=O\left(\frac{r^{2}\cdot\ln(1/\delta)}{\epsilon^{2}_{\alpha}\cdot\epsilon^{2}_{\gamma}}\right), such that the following holds:

With probability at least 1−δ1-\delta over an i.i.d sample S∼DmS\sim{\cal D}^{m}, simultaneously for every h∈Hh\in\mathcal{H}: if hh is (α,γ)(\alpha,\gamma)-approximately metric-fair on the sample SS, then hh is also (α+ϵα,γ+ϵγ)(\alpha+\epsilon_{\alpha},\gamma+\epsilon_{\gamma})-approximately metric-fair on the underlying distribution D{\cal D}.

See Section 2.5 and Theorem 2.12 for a full statement and discussion (and see Definition 2.11 for a definition of Rademacher complexity). Rademacher complexity differs from the celebrated VC-dimension in several respects: first, it is defined for any class of real-valued functions (making it suitable for our setting of learning probabilistic classifiers); second, it is data-dependent and can be measured from finite samples (indeed, Theorem 1.3 can be stated w.r.t. the empirical Rademacher complexity on a given sample); third, it often results in tighter uniform convergence bounds (see, e.g, [KP02]). We note that for every finite hypothesis class H\mathcal{H} whose range is $,theRademachercomplexityisboundedby, the Rademacher complexity is bounded byO(\sqrt{\log|\mathcal{H}|/m})$.

4.1 Information-Theoretic Sample Complexity

The fairness-generalization result of Theorem 1.3 implies that, from a sample-complexity perspective, any hypothesis class is strongly PACF learnable, with sample complexity comparable to that of standard PAC learning. An exponential-time PACF learning algorithm simply finds the predictor in H{\cal H} that minimizes the empirical error, while also satisfying empirical approximate metric-fairness.

Let H\mathcal{H} be a hypothesis class with Rademacher complexity Rm(H)=(r/m)R_{m}(\mathcal{H})=(r/\sqrt{m}). Then H\mathcal{H} is information-theoretically strongly PACF learnable with sample complexity m=O(r2ln⁡(1/δ)(ϵ′)2)m=O\left(\frac{r^{2}\ln(1/\delta)}{\left(\epsilon^{\prime}\right)^{2}}\right), for ϵ′=min⁡{ϵ,ϵα,ϵγ}\epsilon^{\prime}=\min\left\{\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}\right\} .

5 Efficient Fair Learning

One of our primary contributions is the construction of polynomial-time relaxed-PACF learning algorithms for expressive hypothesis classes. We focus on linear classification tasks, where the labels are determined by a separating hyperplane. Learning linear classifiers, also referred to as halfspaces or linear threshold functions, is a central tool in machine learning. By embedding a learning problem into a higher-dimensional space, linear classifiers (over the expanded space) can capture surprisingly strong classes, such as polynomial threshold functions (see, for example, the discussion in [HS07]). The “kernel trick” (see, e.g, [SSBD14]) can allow for efficient solutions even over very high (or infinite) dimensional embeddings. Many of the known (distribution-free) PAC learning algorithms can be derived by learning linear threshold functions [HS07].

Recall that in metric-fair learning, we aim to learn a probabilistic classifier, or a predictor, that outputs a real value in $.Weinterprettheoutputastheprobabilityofassigningthelabel. We interpret the output as the probability of assigning the label1$. We are thus in the setting of regression. We show polynomial-time relaxed-PACF learning algorithms for linear regression and for logistic regression. See Section 5 for full and formal details.

Linear regression, the task of learning linear predictors, is an important and well-studied problem in the machine learning literature. In terms of accuracy, this is an appealing class when we expect a linear relationship between the probability of the label being 11 and the distance from a hyperplane. Taking the domain X{\cal X} to be the unit ball, we define the class of linear predictors as:

We restrict ww to the unit ball to guarantee that ⟨w,x⟩∈\left\langle\mathbf{w},\mathbf{x}\right\rangle\in. We then invoke a linear transformation so that the final prediction is in ,asrequired.Restrictingthepredictor’soutputtotherange, as required. Restricting the predictor’s output to the range is important. In particular, it means that a linear predictor must be (1/2)(1/2)-Lipschitz, which might not be appropriate for certain classification tasks (see the discussion of logistic regression below).

We show a relaxed PACF learning algorithm for HlinH_{\mathit{lin}}:

HlinH_{\mathit{lin}} is relaxed PACF learnable with sample and time complexities of poly(1ϵγ,1ϵα,1ϵ,log⁡1δ)poly(\frac{1}{\epsilon_{\gamma}},\frac{1}{\epsilon_{\alpha}},\frac{1}{\epsilon},\log\frac{1}{\delta}). For every γ′∈[0,1)\gamma^{\prime}\in[0,1) and α′=(α⋅γ−γ′)\alpha^{\prime}=(\alpha\cdot\gamma-\gamma^{\prime}), the accuracy of the learned predictor approaches (or beats) the most accurate (α′,γ′)(\alpha^{\prime},\gamma^{\prime})-approximately MF predictor.

Since the Rademacher complexity of (bounded) linear functions is small [KST09], Theorem 1.3 implies that empirical approximate metric-fairness on the training set generalizes to the underlying population. Thus, given the metric and a training set, our task is to find a linear predictor that is as accurate as possible, conditioned on the empirical fairness constraint. We use H=HlinH=H_{\mathit{lin}} to denote the class of linear predictors defined above. Fixing desired fairness parameters α,γ∈(0,1)\alpha,\gamma\in(0,1), let H^α,γ⊆H\widehat{H}^{\alpha,\gamma}\subseteq H be the subset of linear functions that are also (α,γ)(\alpha,\gamma)-approximately MF on the training set. Given a training set SS of mm labeled examples, we would like to solve the following optimization problem:

Thus, by picking τ=α⋅γ\tau=\alpha\cdot\gamma we guarantee (empirical) (α,γ)(\alpha,\gamma)-approximate metric-fairness. Moreover, for any choice of σ\sigma, the set over which we optimize contains all of the predictors that are ((αγ−σ),σ)((\alpha\gamma-\sigma),\sigma)-approximately MF. Thus, our (empirical) accuracy is competitive with all such predictors, and we obtain a relaxed PACF algorithm. The empirical fairness and accuracy guarantees generalize beyond the training set by Theorem 1.3 (fairness-generalization) and a standard uniform convergence argument for accuracy.

5.2 Logistic Regression

The sigmoidal transfer function gives the predictor the power to exhibit sharper transitions from low predictions to high predictions around a certain distance (or decision) threshold. For example, suppose a distance from the hyperplane provides a quality score for candidates with respect to a certain task. Suppose also that an employer wants to hire candidates whose quality scores are above some threshold η∈[−1,+1]\eta\in[-1,+1]. The class Hϕ,LH_{\phi,L} can give probabilities close to 0 to candidates whose quality scores are under η−1/L\eta-1/L, and probabilities close to 1 to candidates whose quality scores are over η+1/L\eta+1/L. Linear predictors, on the other hand, need to be (1/2)(1/2)-Lipschitz (since we restrict their output to be in $,seeSection1.5.1).Thismight,atfirstglance,seemlikeatechnicality.Afterall,whynotsimplyconsiderlinearpredictorswhoseoutputcanbeinalargerrange?Theproblemisthatitisn’tclearhowtoplugtheselargervaluesintothefairnessconstraintsinawaythatkeepstheoptimizationproblemconvexandalsohascompetitiveaccuracy.Logisticpredictorsseemconsiderablybetter−suitedtothistypeofscenario.Indeed,theclass, see Section 1.5.1).This might, at first glance, seem like a technicality. After all, why not simply consider linear predictors whose output can be in a larger range? The problem is that it isn’t clear how to plug these larger values into the fairness constraints in a way that keeps the optimization problem convex and also has competitive accuracy. Logistic predictors seem considerably better-suited to this type of scenario. Indeed, the classH_{\phi,L}canachievegoodaccuracyonlinearlyseparabledatawhosemargin(i.e.theexpecteddistancefromthehyperplane)islargerthancan achieve good accuracy on linearly separable data whose margin (i.e. the expected distance from the hyperplane) is larger than1/L$. Moreover, similarly to linear threshold functions, logistic regression can be applied after embedding the learning problem into a higher-dimensional space. For example, in the “quality score” example above, the score could be computed by a low-degree polynomial.

Our primary technical contribution is a polynomial-time relaxed PACF learner for Hϕ,LH_{\phi,L} where LL is constant.

For every constant L>0L>0, Hϕ,LH_{\phi,L} is relaxed PACF learnable with sample and time complexities of poly(1ϵγ,1ϵα,1ϵ,log⁡1δ)poly(\frac{1}{\epsilon_{\gamma}},\frac{1}{\epsilon_{\alpha}},\frac{1}{\epsilon},\log\frac{1}{\delta}). For every γ′∈[0,1)\gamma^{\prime}\in[0,1) and α′=(α⋅γ−γ′)\alpha^{\prime}=(\alpha\cdot\gamma-\gamma^{\prime}), the accuracy of the learned predictor approaches (or beats) the most accurate (α′,γ′)(\alpha^{\prime},\gamma^{\prime})-approximately MF predictor.

More generally, our algorithm is exponential in the parameter LL. Recall that we expect to have good accuracy on linearly separable data whose margins are larger than (1/L(1/L). Thus, one can interpret the algorithm as having runtime that is exponential in the reciprocal of the (expected) margin.

We note that fair learning of logistic predictors is considerably more challenging than the linear case, because the sigmoidal transfer function specifies non-convex fairness constraints. In standard logistic regression, where fairness is not a concern, polynomial-time learning is achieved by replacing the standard loss with a convex logistic loss. In metric-fair learning, however, it not clear how to replace the sigmoidal transfer function by a convex surrogate.

To overcome these barriers, we use improper learning. We embed the linear problem at hand into a higher-dimensional space, where logistic predictors and their fairness constraints can be approximated by convex expressions. To do so, we use a beautiful result of Shalev-Schwartz et al. [SSSS11] that presents a particular infinite-dimensional kernel space where our fairness constraints can be made convex.

In particular, we replace the problem of PACF learning Hϕ,LH_{\phi,L} with the problem of PACF learning HBH_{B}, a class of linear predictors with norm bounded by B in a RHKS defined by Vovk’s infinite-dimension polynomial kernel, k(x,x′)=(1−⟨x,x′⟩)−1k(x,x^{\prime})=\left(1-\left\langle x,x^{\prime}\right\rangle\right)^{-1}. We learn the linear predictor in this RHKS using the result of Theorem 1.5 to obtain a relaxed PACF algorithm for HBH_{B}. We use the kernel trick to argue that the sample complexity is m=O(B/(ϵ′)2)m=O(B/(\epsilon^{\prime})^{2}), where ϵ′=min⁡(ϵ,ϵα,ϵγ)\epsilon^{\prime}=\min(\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}), and the time complexity is poly(m)poly(m).

For every B≥0B\geq 0, we can thus learn a linear predictor (in the above RHKS) that is (empirically) sufficiently fair, and whose (empirical) accuracy is competitive with all the linear predictors with norm bounded by BB that are ((αγ−σ),σ)\left(\left(\alpha\gamma-\sigma\right),\sigma\right)-approximately MF, for any choice of σ\sigma. To prove PACF learnability of Hϕ,LH_{\phi,L}, we build on the polynomial approximation result of Shalev-Schwartz et al. [SSSS11] to show that taking BB to be sufficiently large ensures that the accuracy of the set of (α,γ)\left(\alpha,\gamma\right)-AMF predictors in Hϕ,LH_{\phi,L} is comparable to the accuracy of the set of (α,γ)\left(\alpha,\gamma\right)-AMF predictors in HBH_{B}. This requires a choice of BB that is exp⁡(O(L⋅ln⁡(L/ϵ′))\exp(O(L\cdot\ln(L/\epsilon^{\prime})), which is where the exponential dependence on LL comes in.

6 Hardness of Perfect Metric-Fairness

As discussed above, perfect metric-fairness does not generalize from a training set to the underlying population. For example, consider a very small subset of the population that isn’t represented in the training set. A classifier that discriminates against this small subset might be perfectly metric-fair on the training set. The failure of generalization poses serious challenges to constructing learning algorithms. Indeed, we show that perfect metric-fairness can make simple learning tasks computationally intractable (with respect to a particular metric).

We present a natural learning problem and a metric where, even though a perfectly fair and perfectly accurate simple (linear) classifier exists, it cannot be found by any polynomial-time learning algorithm that is perfectly metric-fair. Indeed, any such algorithm can only find trivial classifiers with error rate approaching 1/2 (not much better than random guessing). The learner can tell that a particular (linear) classifier is empirically perfectly fair (and perfectly accurate). However, even though the classifier is perfectly fair on the underlying distribution, the (polynomial-time) learner cannot certify that this is the case, and thus it has to settle for outputting a trivial classifier. We note that there does exist an exponential-time perfectly metric-fair learning algorithm with a competitive accuracy guarantee,For example, an exponential-time algorithm could learn by enumerating all possible classifiers, discarding all the ones that are not perfectly metric-fair (using a brute-force search over all pairs of individuals for each candidate classifier), and then output the most-accurate classifier among the perfectly metric-fair ones. It is important to note that this algorithm doesn’t try to guarantee empirical perfect metric-fairness, which we know does not generalize. Rather, the learner has to consider the fairness behavior over all pairs of individuals. the issue is the computational complexity of this task. In contrast, the relaxed notion of approximate metric-fairness does allow for polynomial-time relaxed-PACF learning algorithms that obtain competitive accuracy for this task (as it does for a rich class of learning problems, see Section 1.5).

We present an overview of the hard learning task and discuss its consequences below. See Section 6 and Theorem 6.1 for a more formal description. Since we want to argue about computational intractability, we need to make computational assumptions (in particular, if P=NPP=NP, then perfectly metric-fair learning would be tractable). We will make the minimal cryptographic hardness assumption that one-way functions exist, see [Gol01] for further background.

For this sketch, we take a uniform distribution D{\cal D} over a domain X={±1}n{\cal X}=\{\pm 1\}^{n}. For an item (or individual) x∈Xx\in{\cal X}, its label will be given by the linear classifier w(x)=x1w(x)=x_{1}. Note that the linear classifier ww indeed is perfectly accurate.Note that the expected margin in this distribution is small compared to the norms of the examples. This is for simplicity and readability. The full hardness result is shown (in a very similar manner) for data where the margins are large. In particular, this means that the class of predictors Hϕ,LH_{\phi,L} can achieve good accuracy with constant LL. See Section 6.

To argue that fair learning is intractable, we construct two metrics dUd_{U} and dVd_{V} that are computationally indistinguishable: no polynomial-time algorithm can tell them apart (even given the explicit description of the metric).More formally, we construct two distribution on metrics, such that no polynomial-time algorithm can tell whether a given metric was sampled from the first distribution or from the second. For readability, we mostly ignore this distinction in this sketch. We construct these metrics so that dUd_{U} does not allow any non-trivial accuracy, whereas dVd_{V} essentially imposes no fairness constraints. Thus, ww is a perfectly fair and perfectly accurate classifier w.r.t. dVd_{V}. Now, since a polynomial-time learning algorithm A{\cal A} cannot tell dUd_{U} and dVd_{V} apart, it has to output the same (distribution on) classifiers given either of these two metrics. If A{\cal A}, given dUd_{U}, outputs a classifier with non-trivial accuracy, then it violates perfect metric-fairness. Thus, when given dUd_{U}, A{\cal A} must (with high probability) output a classifier with error close to 1/21/2. This remains the case even when A{\cal A} is given the metric dVd_{V} (by indistinguishability), despite the fact perfect metric-fairness under dVd_{V} allows for perfect accuracy.

We construct the metrics as follows. The metric dVd_{V} gives every pair of individuals x,x′∈Xx,x^{\prime}\in{\cal X} distance 1. The metric dUd_{U}, on the other hand, partitions the items in X{\cal X} into disjoint pairs (x,x′)(x,x^{\prime}) where the label of xx is 11, the label of x′x^{\prime} is −1-1, but the distance between xx and x′x^{\prime} is 0.Formally, dUd_{U} is a pseudometric, since it has distinct items at distance 0. We can make dUd_{U} be a true metric by replacing the distance 0 with an arbitrarily small positive quantity. The hardness result is essentially unchanged. Thus, the metric dUd_{U} assigns to each item x∈Xx\in X a “hidden counterpart” x′x^{\prime} that is identical to xx, but has the opposite label. The distance between any two distinct elements that are not “hidden counterparts” is 1 (as in dVd_{V}). The metric dUd_{U} specifies that hidden counterparts (x,x′)(x,x^{\prime}) are identical, and thus any perfectly metric-fair classifier hh must treat them identically. Since xx and x′x^{\prime} have opposing labels, hh’s average error on the pair must be 1/21/2. The support of D{\cal D} is partitioned into disjoint hidden counterparts, and thus we conclude that errD(h)=1/2\mathit{err}_{\cal D}(h)=1/2. Note that this is true regardless of hh’s complexity (in particular, it also rules out improper learning). We construct the metrics using a cryptographic pseudorandom generator (PRG), which specifies the hidden counterparts (in dUd_{U}) or their absence (in dVd_{V}). See the full version for details.

We make several remarks about the above hardness result. First, note that the data distribution is fixed, and the optimal classifier is linear and very simple: it only considers a single coordinate. This makes the hardness result sharper: without fairness, the learning task is trivial (indeed, since the classifier is fixed there is nothing to learn). It is the fairness constraint (and only the fairness constraint) that leads to intractability. The computational hardness of perfectly fair learning applies also to improper learning. Finally, the metrics for which we show hardness are arguably contrived (though we note they do obey the triangle inequality). This rules out perfectly metric-fair learners that work for any given metric. A natural direction for future work is restricting the choice of metric, which may make perfectly metric-fair learning feasible.

7 Further Related Work

There is a growing body of work attempting to study the question of algorithmic discrimination, particularly through the lens of machine learning. This literature is characterized by an abundance of definitions, each capturing different discrimination concerns and notions of fairness. This literature is vast and growing, and so we restrict our attention to the works most relevant to ours.

One high-level distinction can be drawn between group and individual notions of fairness. Group-fairness notions assume the existence of a protected attribute (e.g gender, race), which induces a partition of the instance space into some small number of groups. A fair classifier is one that achieves parity of some statistical measure across these groups. Some prominent measures include classification rates (statistical parity, see e.g [FFM+15]), calibration, and false positive or negative rates [KMR16, Cho17, HPS16]. It has been established that some of these notions are inherently incompatible with each other, in all but trivial cases [KMR16, Cho17]. The work of [WGOS17] takes a step towards incorporating the fairness notion of [HPS16] into a statistical and computational theory of learning, and considers a relaxation of the fairness definition to overcome the computational intractability of the learning objective. The work of [DIKL17] proposes an efficient framework for learning different classifiers for different groups in a fair manner.

Individual fairness [DHP+12] posits that “similar individuals should be treated similarly”. This powerful guarantee is formalized via a Lipschitz condition (with respect to an existing task-specific similarity metric) on the classifier mapping individuals to distributions over outcomes. Recent works [JKMR16, JKM+] study different individual-level fairness guarantees in the contexts of reinforcement and online learning. The work of [ZWS+13] aims to learn an intermediate “fair” representation that best encodes the data while successfully obfuscating membership in a protected group. See also the more recent work [BCZC17].

Several works have studied fair regression [KAAS12, CKK+13, ZVGRG17, BHJ+17]. The main differences in our work are a focus on metric-based individual fairness, a strong rigorous fairness guarantee, and proofs of competitive accuracy (both stated with respect to the underlying population distribution).

Metric Fairness Definitions

Dwork et al. [DHP+12] introduced individual fairness, a similarity-based fairness notion in which a probabilistic classifier is said to be fair if it assigns similar distributions to similar individuals.

A probabilistic classifier h: X→[0,1]h:\,{\cal X}\rightarrow\left[0,1\right] is said to be perfectly metric-fair w.r.t a distance metric d: X×X→[0,1]d:\,{\cal X}\times{\cal X}\rightarrow\left[0,1\right], if for every x,x′∈Xx,x^{\prime}\in{\cal X},

where h(x)h(x) is interpreted as the probability hh will assign the label +1+1 to x∈Xx\in{\cal X}, Λ\Lambda is a distance measure between distributions and dd is a task-specific distance metric that is assumed to be known in advance. Throughout this work we take Λ\Lambda to be the statistical distance, yielding Λ(h(x),h(x′))=∣h(x)−h(x′)∣\Lambda\left(h(x),h(x^{\prime})\right)=\left|h(x)-h(x^{\prime})\right|).

In the setting considered by [DHP+12], a finite set of individuals VV should be assigned outcomes from a set AA. Under the assumption that dd is known, they demonstrated that the problem of minimizing an arbitrary loss function L:V×A→RL:V\times A\rightarrow R, subject to the individual fairness constraint can be formulated as an LP and thus can be solved in time poly(∣A∣,∣V∣)(|A|,|V|).

2 Approximate Metric-Fairness

We consider a learning setting in which the goal is learning a classifier hh that satisfies the fairness constraint in Equation (3) with respect to some unknown distribution D{\cal D} over X{\cal X}, after observing a finite sample S∼DmS\sim{\cal D}^{m}. To this end, we introduce a metric-fairness loss function that, for a given classifier hh and a pair of individuals in X{\cal X}, assigns a penalty of 1 if the fairness constraint is violated by more than a γ\gamma additive term.

For a metric dd and γ≥0\gamma\geq 0, the metric-fairness loss on a pair (x,x′)∈X(x,x^{\prime})\in{\cal X} is

The overall metric-fairness loss for a hypothesis hh is the expected violation for a random pair according to D{\cal D}.

We go on to define the empirical fairness loss, a data-dependent quantity designed to estimate the unknown LD,d,γF(h)\mathcal{L}_{\mathcal{D},d,\gamma}^{F}(h). To this end, we think of a sample S∼DmS\sim{\cal D}^{m} as defining a complete weighed graph, denoted G(S)G(S), whose vertices are SS and whose edges are weighed by w(e)=w(xi,xj)=d(xi,xj)w(e)=w(x_{i},x_{j})=d(x_{i},x_{j}). Now, observe that when SS is sampled i.i.d from D{\cal D}, any matching M⊆G(S)M\subseteq G(S)Note that from the structure of G(S)G(S), it has exactly mm matchings, each of size m−12\frac{m-1}{2} (w.l.o.g, we assume mm is odd). is an i.i.d sample from D×D{\cal D}\times{\cal D}. We now define the empirical loss by replacing the expectation over D{\cal D} in Equation (5) with the expectation over some matching M⊆G(S)M\subseteq G(S).

Finally, we will say that a classifier hh is (α,γ)\left(\alpha,\gamma\right)-fair w.r.t D{\cal D} (respectively, SS) and dd if its respective metric-fairness loss is at most α\alpha.

A probabilistic classifier h: X→[0,1]h:\,{\cal X}\rightarrow\left[0,1\right] is said to be (α,γ)\left(\alpha,\gamma\right)-fair w.r.t a metric dd and D{\cal D} (respectively, SS) if LD,d,γF(h)≤α\mathcal{L}_{\mathcal{D},d,\gamma}^{F}(h)\leq\alpha (respectively, LS,d,γF(h)≤α\mathcal{L}_{\mathcal{S},d,\gamma}^{F}(h)\leq\alpha).

When SS and dd are clear from context, we will use the more succinct notation LγF(h)\mathcal{L}^{F}_{\gamma}(h) for the true fairness loss and L^γF(h)\widehat{\mathcal{L}}^{F}_{\gamma}(h) for the empirical fairness loss. When dealing with a hypothesis class H{\cal H}, we use Hα,γ⊆H{\cal H}^{\alpha,\gamma}\subseteq{\cal H} to denote all the (α,γ)(\alpha,\gamma)-fair hypotheses in H{\cal H} (w.r.t D{\cal D}), and H^α,γ⊆H\widehat{H}^{\alpha,\gamma}\subseteq{\cal H} for those which are (α,γ)(\alpha,\gamma)-fair w.r.t SS.

3 Approximate Metric Fairness: Interpretation

An α\alpha-fair classifier (for α>0\alpha>0) no longer holds any guarantee for any single individual. To interpret the guarantee it does give, we consider the following definition.

A probabilistic classifier h: X→[0,1]h:\,{\cal X}\rightarrow\left[0,1\right] is said to be (α1,α2;γ)\left(\alpha_{1},\alpha_{2};\gamma\right) metric-fair w.r.t d,Dd,{\cal D} if

Definition 2.6 is very similar to 2.5 but it lends itself to a more intuitive interpretation of fairness for groups. Informally, we will say that an individual feels α2\alpha_{2}-discriminated against by hh if the proportion of individuals with whom his constraint is violated (think: individuals who are equally qualified to him but receive different treatment) exceeds α2\alpha_{2}; now, (α1,α2)\left(\alpha_{1},\alpha_{2}\right)-fairness ensures that the proportion of individuals who find hh to be α2\alpha_{2}-discriminatory does not exceed α1\alpha_{1}. Hence, this is a guarantee for groups: an (α1,α2)\left(\alpha_{1},\alpha_{2}\right)-fair classifier cannot cause an entire group of fractional mass α1\alpha_{1} to be discriminated against. The strength of this guarantee is that it holds for any such group (even for those formed “ex-ante”). In this sense, (α1,α2)\left(\alpha_{1},\alpha_{2}\right)-fairness represents a middle-ground between the strict notion of individual fairness and the loose notions of group-fairness.

Finally, we show that the two definitions are related: any α\alpha-fair classifier is also (α1,α2)\left(\alpha_{1},\alpha_{2}\right)-fair, for every α1,α2\alpha_{1},\alpha_{2} for which α1⋅α2≥α\alpha_{1}\cdot\alpha_{2}\geq\alpha. This demonstrates that optimizing for accuracy under an α\alpha-fairness constraint is a flexible way of achieving interpretable fairness guarantees for a range of desired α1,α2\alpha_{1},\alpha_{2} values.

For every α,γ∈(0,1)\alpha,\gamma\in(0,1), and α1,α2∈(0,1)\alpha_{1},\alpha_{2}\in(0,1) for which α1⋅α2≥α\alpha_{1}\cdot\alpha_{2}\geq\alpha, if hh is (α,γ)\left(\alpha,\gamma\right)-fair then it is also (α1,α2;γ)\left(\alpha_{1},\alpha_{2};\gamma\right)-fair.

Proof of Claim 2.7. For simplicity, we define the following indicator function,

Let α,γ,α1,α2∈(0,1)\alpha,\gamma,\alpha_{1},\alpha_{2}\in(0,1) such that α1⋅α2≥α\alpha_{1}\cdot\alpha_{2}\geq\alpha, and assume that hh is (α,γ)(\alpha,\gamma)-fair w.r.t D\mathcal{D}. Assume for contradiction that hh is not (α1,α2;γ)\left(\alpha_{1},\alpha_{2};\gamma\right)-fair w.r.t D\mathcal{D}. That means that

If we denote the subset of “α2\alpha_{2}-discriminated” individuals as BB,

then the assumption is equivalent to Prx∼D[x∈S]>α1Pr_{x\sim\mathcal{D}}\left[x\in S\right]>\alpha_{1}. We now obtain:

where the first transition is from the assumption that hh is (α,γ)\left(\alpha,\gamma\right)-fair, and the final transition is from the assumption that hh is not (α1,α2;γ)\left(\alpha_{1},\alpha_{2};\gamma\right)-fair. We therefore have that α>α1⋅α2\alpha>\alpha_{1}\cdot\alpha_{2}, which contradicts our assumption. □\Box

In this work we focus on approximate metric-fairness and the (α,γ)\left(\alpha,\gamma\right) metric fairness loss (Definition 2.2). We find that this notion provides appealing and interpretable protections from discrimination: as discussed above, for small enough α,γ\alpha,\gamma, every sufficiently large group is protected from blatant discrimination (see Section 2.3). However, in turning to design efficient metric-fair learning algorithms, working directly with this definition presents difficulties (see Section 5). In particular, the “0/1” nature of the metric fairness loss means that the set H^α,γ\widehat{H}^{\alpha,\gamma} is not a convex set. Trying to learn an empirically (α,γ)(\alpha,\gamma) metric-fair that optimizes accuracy is a non-convex optimization problem, and it isn’t clear how to optimize using convex-optimization tools.

In light of this difficulty, we introduce a different metric-fairness loss definition. It overcomes the non-convexity by replacing the bound on the expected number of fairness violations with a bound on the expected sum of the fairness violations.

Similarly to the regular metric-fairness loss, the loss for a hypothesis hh is the expected violation for a random pair according to D\mathcal{D}, and the empirical loss replaces the expectation over D\mathcal{D} with the expectation over some matching M⊆G(S)M\subseteq G(S).

Proof of Lemma 2.10. We begin by defining the induced violation vector of a classifier h∈Hh\in H. For a sample SS, a matching M⊆G(S)M\subseteq G(S) and a value γ∈(0,1)\gamma\in(0,1), the induced violation vector ξγ(h)∈{0,1}∣M∣\xi_{\gamma}(h)\in\left\{0,1\right\}^{\left|M\right|} is defined as:

where (x,x′)(\mathbf{x},\mathbf{x^{\prime}}) is the ii-th edge in the matching MM.

5 Generalization

A key issue in learning theory is that of generalization: to what extent is a classifier that is accurate on a finite sample S∼DmS\sim{\cal D}^{m} also guaranteed to be accurate w.r.t the underlying distribution? In this section, we work to develop similar generalization bounds for our metric-fairness loss function. Proving that fairness can generalize well is a crucial component in our analysis - it effectively rules out the possibility of creating a “false facade” of fairness (i.e, a classifier that only appears fair on a sample, but is not fair w.r.t new individuals).

The generalization bounds will be based on proving uniform convergence of the empirical estimates (in our case, L^γF(h)\widehat{\mathcal{L}}^{F}_{\gamma}(h)) to the fairness loss, simultaneously for every h∈Hh\in{\cal H}, in terms of the Rademacher complexity of the hypotheses class H{\cal H}. Rademacher complexity differs from celebrated VC-dimension complexity measure in three aspects: first, it is defined for any class of real-valued functions (making it suitable for our setting of learning probabilistic classifiers); second, it is data-dependent and can be measured from finite samples; third, it often results in tighter uniform convergence bounds (see, e.g, [KP02]).

Let ZZ be an input space, D{\cal D} a distribution on ZZ, and F\mathcal{F} a real-valued function class defined on ZZ. The empirical Rademacher complexity of F\mathcal{F} with respect to a sample S={z1…zm}S=\left\{z_{1}\dots z_{m}\right\} is the following random variable:

The expectation is taken over σ=(σ1,…,σm)\sigma=\left(\sigma_{1},\dots,\sigma_{m}\right) where the σi\sigma_{i}’s are independent uniformly random variables taking values in {±1}\{{\pm 1}\}. The Rademacher complexity of F\mathcal{F} is defined as the expectation of R^m(F)\widehat{\mathcal{R}}_{m}(\mathcal{F}) over all samples of size mm:

Let H\mathcal{H} be a hypotheses class with Rademacher complexity Rm(H)R_{m}(\mathcal{H}). For every δ,γ∈(0,1)\delta,\gamma\in(0,1), every G≥1G\geq 1 and every m≥0m\geq 0 (w.l.o.g assume mm is odd), with probability at least 1−δ1-\delta over an i.i.d sample S∼DmS\sim{\cal D}^{m}, simultaneously for every h∈Hh\in\mathcal{H}:

where Δm=2G⋅(4R^m−12(H)+4+17ln⁡(4/δ)m−1)\Delta_{m}=2G\cdot\left(4\widehat{R}_{\frac{m-1}{2}}\left(\mathcal{H}\right)+\frac{4+17\sqrt{\ln(4/\delta)}}{\sqrt{m-1}}\right).

Let Hψ,CH_{\psi,C} as above, for any C≥0C\geq 0 and kernel KK. For every δ,γ∈(0,1)\delta,\gamma\in(0,1), every G≥1G\geq 1 and every m≥0m\geq 0, w.p at least 1−δ1-\delta, simultaneously for every h∈Hψ,Ch\in H_{\psi,C}

where M=sup⁡K(x,x′)M=\sup K(\mathbf{x},\mathbf{x}^{\prime}) and Δm=2G⋅4+42CM+17ln⁡(4/δ)m−1\Delta_{m}=2G\cdot\frac{4+4\sqrt{2}\sqrt{CM}+17\sqrt{\ln(4/\delta)}}{\sqrt{m-1}}.

Proof of Corollary 2.13. The proof follows from Theorem 2.12 and the fact that the Rademacher complexity Rm(Hψ,C){R}_{m}{(H_{\psi,C})} is bounded by C⋅Mm\sqrt{\frac{C\cdot M}{m}} (see [KST09]).

To set the stage for proving Theorem 2.12, we state some useful properties of the Rademacher complexity notion, see [BM02].

Consider a set of functions F\mathcal{F} mapping ZZ to [0,1]\left[0,1\right]. For every δ>0\delta>0, with probability at least 1−δ1-\delta over a random draw of a sample SS of size mm, every f∈Ff\in F satisfies

Let FF be a class of real functions. Then, for any sample SS of size mm:

For every δ∈(0,1)\delta\in(0,1), w.p at least 1−δ1-\delta over the choice of SS,

Denote the threshold function at γ\gamma:

Observe that G\mathcal{G} can be further decomposed as

where H′={(x,x′)↦h(x)−h(x′)}h ∈ H≜{gh}h ∈ H\mathcal{H}^{\prime}=\left\{(x,x^{\prime})\mapsto h(x)-h(x^{\prime})\right\}_{h\,\in\,\mathcal{H}}\triangleq\left\{g_{h}\right\}_{h\,\in\,\mathcal{H}}, abs(⋅)(\cdot) is the absolute value function (which is 1-Lipschitz), and f=f(x,x′)=−d(x,x′)f=f(x,x^{\prime})=-d(x,x^{\prime}).

Rm~(H′)≤2Rm~(H)R_{\widetilde{m}}(\mathcal{H}^{\prime})\leq 2R_{\widetilde{m}}(\mathcal{H}).

Proof of Claim 2.16. Denote M(S)={z1,…,zm~},M(S)=\left\{z_{1},\dots,z_{\widetilde{m}}\right\},where zi=(xi1,xi2)z_{i}=\left(x_{i}^{1},x_{i}^{2}\right). By definition,

where the transition marked by (⋆)(\star) is due to the fact that negating a Rademacher variable does not change its distribution. □\Box

Rm~(G)≤4Rm~(H)+2m~R_{\widetilde{m}}(\mathcal{G})\leq 4R_{\widetilde{m}}(\mathcal{H})+\frac{2}{\sqrt{\widetilde{m}}}

□\Box Now, had the threshold function σγ\sigma_{\gamma} been Lipschitz, we could again use Fact 2 in Lemma 2.15 to finish the proof. Unfortunately, σγ\sigma_{\gamma} is not Lipschitz. We therefore instead approximate it using a piecewise linear function with Lipschitz constant GG, which we denote with τγG\tau_{\gamma}^{G}:

For every G≥0G\geq 0, every γ∈(0,1)\gamma\in(0,1) and every function hh,

Proof of Proposition 2.18. The proof follows directly from the fact that from the construction of τγG\tau_{\gamma}^{G}, it holds that for every uu, σγ+1G(u)≤τγG(u)≤σγ(u)\sigma_{\gamma+\frac{1}{G}}(u)\leq\tau_{\gamma}^{G}(u)\leq\sigma_{\gamma}(u). □\Box

We can use the Lipschitzness of τγG\tau_{\gamma}^{G} to obtain

By plugging F~\mathcal{\widetilde{\mathcal{F}}} into Theorem 2.14 (Equation 12), we’d have that with probability at least 1−δ21-\frac{\delta}{2} over random draws of samples of size m~\widetilde{m}, every h∈Hh\in H satisfies

Since we eventually want a data-dependent bound, we’ll Fact 3 in Lemma 2.15 to deduce that w.p at least 1−δ21-\frac{\delta}{2},

Combining both the previous inequalities and using the union bound, we obtain that for every G≥0G\geq 0, with probability at least 1−δ1-\delta, simultaneously ∀h∈H\forall h\in\mathcal{H}

where Δm=2G⋅(4R^m−12(H)+4+17ln⁡(4/δ)m−1)\Delta_{m}=2G\cdot\left(4\widehat{R}_{\frac{m-1}{2}}\left(\mathcal{H}\right)+\frac{4+17\sqrt{\ln(4/\delta)}}{\sqrt{m-1}}\right), as required.

(Fair and Accurate) Learning Objectives

We will consider a learning problem as given by a 5-tuple (X,(Y,Y′),H,(LU,LF))\left({\cal X},\left({\cal Y},{\cal Y}^{\prime}\right),\mathcal{H},\left(\mathcal{L}^{U},{\cal L}^{F}\right)\right). In this notation, X{\cal X} is the set of instances; Y{\cal Y} is the set of possible labels assigned to instances; Y′⊇Y{\cal Y}^{\prime}\supseteq{\cal Y} is the set of labels the learner is allowed to return; H{\cal H} is a fixed family of predictors h:X→Y′h:{\cal X}\rightarrow{\cal Y}^{\prime} which we require the learner to compete with (in terms of the returning a classifier with loss comparable to the best loss in H{\cal H}); LU{\cal L}^{U} is a univariate (“utility”) loss function used to measure the discrepancy between the predicted outputs and the true labels; and finally, LF{\cal L}^{F} is a bivariate (“fairness”) loss function. We denote LDU(H)=min⁡h∈H(LDU(h))\mathcal{L}_{\mathcal{D}}^{U}\left(\mathcal{H}\right)=\min_{h\in\mathcal{H}}\left(\mathcal{L}_{\mathcal{D}}^{U}(h)\right).

2 PAC Learnability under a fairness constraint

From a learning perspective, we say that a learning algorithm is fair if w.h.p, it returns a sufficiently-fair classifier.

Note that any learning algorithm AA that completely disregards the sample and simply outputs a constant predictor (e.g, h(x)≡1h(x)\equiv 1) satisfies the condition in Equation 2.1 and is therefore a (0,0)-fair learning algorithm. In other words, fair learning is, in itself, trivial. It is the combination of a fairness and an accuracy objective that makes for an interesting task. In this work, we focus on the objective of maximizing utility subject to a constraint on the fairness loss. This is a natural formulation, because we think of fairness as a hard (often externally imposed) requirement that cannot necessarily be traded off for better accuracy. The objective of finding the most accurate sufficiently-fair hypothesis is summarized in the following definition. Crucially, both fairness and accuracy goals are stated w.r.t the unknown underlying distribution.

We consider the above definition as strong PACF learnability, and also define a relaxed notion, in which the learner must still output an hypothesis that is α\alpha fair, but in terms of accuracy is only required to compete with Hα′\mathcal{H}^{\alpha^{\prime}}, for some 0≤α′≤α0\leq\alpha^{\prime}\leq\alpha, that does not need to approach α\alpha as m→∞m\rightarrow\infty. We formalize this using a function g:2→2g:^{2}\rightarrow^{2} that captures the degradation in the accuracy guarantee.

Information Theoretic PACF Learnability

Using the generalization result from Theorem 2.12, we can now derive the sample complexity for strong PACF learnability in the information theoretic setting.

Suppose H{\cal H} is PAC learnable with sample complexity mPAC(ϵ,δ)m_{PAC}(\epsilon,\delta). Then it is PACF learnable with sample complexity

Let α,γ∈(0,1)\alpha,\gamma\in(0,1) required fairness parameters, δ∈(0,1)\delta\in(0,1) required failure probability and ϵ,ϵα,ϵγ∈(0,1)\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}\in(0,1) error parameters. Let m,Gm,G be parameters to be determined later. Set γ~=γ−1G\widetilde{\gamma}=\gamma-\frac{1}{G} and α~=α−Δm\widetilde{\alpha}=\alpha-\Delta_{m}, for Δm=2G⋅(4R^m−12(H)+4+17ln⁡(4/δ)m−1)\Delta_{m}=2G\cdot\left(4\widehat{R}_{\frac{m-1}{2}}\left(\mathcal{H}\right)+\frac{4+17\sqrt{\ln(4/\delta)}}{\sqrt{m-1}}\right).

Let h⋆h^{\star} denote the solution to the fairness-constrained ERM,

Let mF=(8+34ln⁡(4/δ)ϵαϵγ−8R^m−12(H))2+1m_{F}=\left(\frac{8+34\sqrt{\ln(4/\delta)}}{\epsilon_{\alpha}\epsilon_{\gamma}-8\widehat{R}_{\frac{m-1}{2}}(\mathcal{H})}\right)^{2}+1 and mPAC=mPAC(ϵ,δ)m_{PAC}=m_{PAC}(\epsilon,\delta).,

For fairness, we use Theorem 2.12 to prove that for every m,Gm,G, w.p at least 1−δ21-\frac{\delta}{2} over the choice of S∼DmS\sim\mathcal{D}^{m}, h⋆h^{\star} is (α,γ)\left(\alpha,\gamma\right)-fair w.r.t D\mathcal{D}:

For accuracy, we note that the known equivalence of learnability and uniform convergence in the regression setting [ABDCBH97] implies that for m≥mPACm\geq m_{PAC}, w.p at least 1−δ/21-\delta/2, for every h∈Hh\in{\cal H}, LU(h)≤L^U(h)+ϵ\mathcal{L}^{U}(h)\leq\mathcal{\widehat{L}}^{U}(h)+\epsilon. Using this we obtain that w.p at least 1−δ/21-\delta/2, for m≥max⁡{mPAC,mPACF}m\geq\max\left\{m_{PAC},m_{PACF}\right\}:

We now use the union bound to conclude that setting m≥max⁡{mPAC,mF}m\geq\max\left\{m_{PAC},m_{F}\right\} yields that with probability at least 1−δ1-\delta over the choice of S∼DmS\sim\mathcal{D}^{m}, hh satisfies all the conditions in Definition 3.2, and is therefore (exact) PACF learnable.

Efficient relaxed-PACF Learnability of Linear Predictors

In this section, we present our main result, which is that the classes of (linear and logistic) predictorsSince we interpret the output of the linear and logistic regression models are probabilities for a classification model, we refer to them as linear and logistic classifiers, rather than regressors. are efficiently g(⋅)g(\cdot)-relaxed PACF-learnable, with g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}), for every γ⋆∈(0,1)\gamma^{\star}\in(0,1). We begin with the proof for the class of linear classifiers, which demonstrates the idea of a relaxation that allows for efficient solving of the optimization problem associated with the relaxed PACF learnability requirement. We then proceed to the case of logistic predictors, which is more involved due to the non-convexity of the fairness objective induced by a logistic transfer function. We overcome this difficulty using improper learning.

For the remainder of this section, we consider the problem of efficiently PACF learning the problem (X,(Y,Y′),H,(LU,LF))\allowbreak\left(\mathcal{X},\left(\mathcal{Y},\mathcal{Y}^{\prime}\right),H,\left(\mathcal{L}^{U},\mathcal{L}^{F}\right)\right), where: X\mathcal{X} is a compact subset of an RKHS, which w.l.o.g. will be taken to be the unit ball around the origin; Y={±1}\mathcal{Y=}\left\{\pm 1\right\} and Y′=[0,1]\mathcal{Y}^{\prime}=\left[0,1\right], since we’re interested in performing classification using probabilistic classifiers; the utility loss LU\mathcal{L}^{U} is the absolute value loss function and LF\mathcal{L}^{F} is the approximate metric-fairness loss w.r.t some known metric dd. We define hypothesis classes HlinH_{lin} and HϕH_{\phi}, corresponding to linear and logistic regression predictors, as follows. HlinH_{lin} is the class of linear predictors, The norm bound on w\mathbf{w} is so to ensure that h(x)∈[−1,1]=Yh(x)\in\left[-1,1\right]=\mathcal{Y}

And Hϕ,LH_{\phi,L} is the class of logistic predictors, formed by composing a linear function with a sigmoidal transfer function:

2 Linear Regression

For every γ⋆∈(0,1)\gamma^{\star}\in(0,1), HlinH_{lin} is relaxed PACF learnable with g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}) and sample and time complexities of poly(1ϵγ,1ϵα,1ϵ,log⁡1δ)poly(\frac{1}{\epsilon_{\gamma}},\frac{1}{\epsilon_{\alpha}},\frac{1}{\epsilon},\log\frac{1}{\delta})

The proof is structured as follows. First, we discuss why the immediate optimization problem associated with PACF learning HlinH_{lin} is not efficiently solvable. We then show a convex problem whose solution can be shown to meet the fairness and competitiveness requirements in Definition 3.3, but with respect to the sample. We conclude the proof by proving generalization of both the fairness and the competitiveness requirements.

For simplicity, we use H=HlinH=H_{lin} throughout the proof. Fix a sample SS. The straight-forward approach to PACF learn (X,(Y,Y′),H,(LU,LF))\allowbreak\left(\mathcal{X},\left(\mathcal{Y},\mathcal{Y}^{\prime}\right),H,\left(\mathcal{L}^{U},\mathcal{L}^{F}\right)\right) would be to search HH for an hypothesis that minimizes the empirical risk, subject to being sufficiently fair w.r.t the pairs from M(S)M(S) (a random matching induced by the sample SS). This is equivalent to solving the following optimization problem, for some appropriate setting of α,γ∈(0,1)\alpha,\gamma\in(0,1):

here, ξe(w)∈0,1\xi_{e}(\mathbf{w})\in{0,1} is an indicator for whether the metric-fairness constraint on the sample pair e=(x,x′)e=\left(\mathbf{x},\mathbf{x}^{\prime}\right) is violated by more than an additive γ\gamma term or not, ξ(w)∈{0,1}∣M(S)∣\xi(\mathbf{w})\in\left\{0,1\right\}^{\left|M(S)\right|} is the vector of violations on M(S)M(S) induced by the linear classifier parametrized by w\mathbf{w}, and ∥ξ(w)∥0≤α⋅∣M(S)∣\|\xi(\mathbf{w})\|_{0}\leq\alpha\cdot\left|M(S)\right| ensures that the overall fraction of such violations does not exceed α\alpha. We formalize the definition of a fairness-violation vector as follows:

For every w∈X\mathbf{w}\in{\cal X} and γ∈(0,1)\gamma\in(0,1), the induced violation vector ξγ(w)∈{0,1}∣M(S)∣\xi^{\gamma}(\mathbf{w})\in\left\{0,1\right\}^{\left|M(S)\right|} is defined as

Let e=(x,x′)∈M(S)e=\left(\mathbf{x},\mathbf{x}^{\prime}\right)\in M(S). Then,

this implies that for every e∈M(S)e\in M(S), ξe(w)=t⋅ξe(w1)+(1−t)⋅ξe(w2)\xi_{e}(\mathbf{w})=t\cdot\xi_{e}(\mathbf{w}_{1})+(1-t)\cdot\xi_{e}(\mathbf{w}_{2}). Observe that since t∈[0,1]t\in\left[0,1\right] and 0≤ξe(w1),ξe(w2)≤10\leq\xi_{e}(\mathbf{w}_{1}),\xi_{e}(\mathbf{w}_{2})\leq 1, we also have that 0≤ξe(w)≤10\leq\xi_{e}(\mathbf{w})\leq 1. Finally, the third constraint also holds, since we have that:

To arrive at satisfying the conditions of relaxed metric-fair learning, it’s left to prove that these guarantees can be extended to also hold for the underlying distribution D{\cal D}. To this end, we employ generalization arguments for both the utility and fairness loss. For utility (Claim 5.4), we use a standard Rademacher-based uniform convergence result, stated for the general setting of a class of linear predictors with bounded norm in a RHKS; for fairness (Claim 5.5) we use the generalization result from Corollary 2.13.

For every α,γ∈(0,1)\alpha,\gamma\in(0,1), G≥1G\geq 1 and δ∈(0,1)\delta\in(0,1), with probability at least 1−δ21-\frac{\delta}{2} over an i.i.d sample S∼DmS\sim{\cal D}^{m},

where ρ=2G⋅4+42+17ln⁡(4/δ)m−1\rho=2G\cdot\frac{4+4\sqrt{2}+17\sqrt{\ln(4/\delta)}}{\sqrt{m-1}}.

Proof of Claim 5.5. Let G≥1G\geq 1 and γ∈(0,1)\gamma\in(0,1). From Corollary 2.13 (recall that in our setting, C=M=1C=M=1), we obtain that w.p at least 1−δ21-\frac{\delta}{2} over an i.i.d sample S∼DmS\sim{\cal D}^{m},

This implies that with all but δ2\frac{\delta}{2} probability, for every α∈(0,1)\alpha\in(0,1), the following holds:

We are now prepared to prove relaxed PACF learnability of HH. Let α,γ∈(0,1)\alpha,\gamma\in(0,1) be the required fairness parameters, δ∈(0,1)\delta\in(0,1) required failure probability and ϵ,ϵα,ϵγ∈(0,1)\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}\in(0,1) error parameters. Let G,mG,m be parameters to be determined later. Define α~=(α−ρ)⋅γ~\widetilde{\alpha}=\left(\alpha-\rho\right)\cdot\widetilde{\gamma} and γ~=γ−1G\widetilde{\gamma}=\gamma-\frac{1}{G}, and denote with w\mathbf{w} the solution to the program in Equation 23 using the parameter α~\widetilde{\alpha}.

with probability at least 1−δ21-\tfrac{\delta}{2}, w\mathbf{w} is (α,γ)\left(\alpha,\gamma\right)-fair w.r.t D\mathcal{D}.

ensures that with probability at least 1−δ21-\tfrac{\delta}{2} over an i.i.d sample S∼DmS\sim{\cal D}^{m}, for every γ⋆\gamma^{\star},

First, let m1=(2⋅(2+ln⁡(8/δ))2ϵ)2m^{1}=\left(\frac{2\cdot\left(\sqrt{2}+\sqrt{\ln(8/\delta)}\right)}{\sqrt{2}\epsilon}\right)^{2}.

It is left to show that there is some setting of GG and a sufficiently large sample size mm for which it holds that

Denote ϵ′=min⁡{ϵα,ϵγ2}\epsilon^{\prime}=\min\left\{\epsilon_{\alpha},\frac{\epsilon_{\gamma}}{2}\right\} and set G=1ϵ′G=\frac{1}{\epsilon^{\prime}}. The second equation is now satisfied, because 1G=ϵ′≤ϵγ2≤ϵγ\frac{1}{G}=\epsilon^{\prime}\leq\frac{\epsilon_{\gamma}}{2}\leq\epsilon_{\gamma}. Plugging this into the first equation and simplifying, we obtain:

For simplicity, denote ρ=G(8+82+34ln⁡(4/δ))⏞z(δ)m−1=z(δ)ϵ′⋅m−1\rho=\frac{G\overbrace{\left(8+8\sqrt{2}+34\sqrt{\ln(4/\delta)}\right)}^{z(\delta)}}{\sqrt{m-1}}=\frac{z(\delta)}{\epsilon^{\prime}\cdot\sqrt{m-1}} and note that ϵα−α⋅ϵ′1+γ−ϵ′≥(1−α)⋅ϵα2\frac{\epsilon_{\alpha}-\alpha\cdot\epsilon^{\prime}}{1+\gamma-\epsilon^{\prime}}\geq\frac{(1-\alpha)\cdot\epsilon_{\alpha}}{2}. It therefore suffices to choose mm such that:

We can now use the union bound to conclude that for mm stated in the statement of Proposition 5.12, w.p at least 1−δ21-\frac{\delta}{2} over an i.i.d sample S∼DmS\sim{\cal D}^{m}, it holds that

To conclude the proof of Theorem 5.1, we note that by Propositions 5.6 and 5.7, we have that w.p at least 1−δ1-\delta over an i.i.d sample S∼DmS\sim{\cal D}^{m} all the conditions in Definition 3.3 are met for g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}) and mm as in the definition of Proposition 5.7. This implies that for this g(⋅)g(\cdot), HH is g(⋅)g(\cdot)-relaxed PACF learnable with sample complexity mm and in time poly(m)poly(m), as required.

3 Logistic Regression

For every constant L>0L>0 and for every γ⋆∈(0,1)\gamma^{\star}\in(0,1), Hϕ,LH_{\phi,L} is relaxed PACF learnable with g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}), with sample and time complexities that are polynomial in (1ϵγ,1ϵα,1ϵ,log⁡1δ)(\frac{1}{\epsilon_{\gamma}},\frac{1}{\epsilon_{\alpha}},\frac{1}{\epsilon},\log\frac{1}{\delta}).

The optimization problem that we used to efficiently-learn HlinH_{lin} in the proof of Theorem 5.1 (Equation 23) is no longer convex in the case of HϕH_{\phi}, due to the addition of the sigmoidal transfer function ϕ\phi:

We show that the optimization problem associated with PACF learning HBH_{B} can be solved efficiently, and that its solution satisfies the requirements for relaxed PACF learning of Hϕ.H_{\phi}.

HBH_{B} is efficiently relaxed-PACF learnable.

Proof of Claim 5.9. PACF learning HBH_{B} requires solving the following program:

Or its equivalent re-parametrizationThe two formulations are equivalent in the sense that any solution to the first program (for some desired BB) can be obtained by solving Program 2 (for an appropriate value λB\lambda_{B}), see Theorem 1 in [ORA16]., which we refer to as Program 2:

Note that while the constraints are now linear, the mapping ψ\psi induced by the kernel KK is possibly infinite dimensional, and hence it is not obvious that this optimization problem can be solved efficiently. Fortunately, we can use The Representer Theorem [Wah90] to reduce Program 2 to a finite dimensional optimization problem.

According to the Representer Theorem, any problem of the form

Lemma 5.10 implies we can instead optimize over β1…βm\beta_{1}\dots\beta_{m}. This yields the following optimization problem:

We can now conclude the proof of Claim 5.9, since this is a convex optimization problem in O(m)O(m) variables and therefore can be solved in time poly(m,log⁡B,log⁡1α)poly(m,\log B,\log\frac{1}{\alpha}) using standard optimization tools. □\Box

For convenience, we hereby denote the solution to the above program when instantiated with parameters BB and α\alpha as wB,α\mathbf{w}_{B,\alpha}. We define a learning algorithm AA that given parameters B⋆,α⋆B^{\star},\alpha^{\star} returns wB⋆,α⋆\mathbf{w}_{B^{\star},\alpha^{\star}}.

Now, let α,γ∈(0,1)\alpha,\gamma\in(0,1) be the required fairness parameters, δ∈(0,1)\delta\in(0,1) required failure probability, ϵ,ϵα,ϵγ∈(0,1)\epsilon,\epsilon_{\alpha},\epsilon_{\gamma}\in(0,1) error parameters and γ⋆∈(0,1)\gamma^{\star}\in(0,1). Recall (Definition 3.3) that in order to prove that HϕH_{\phi} is g(⋅)g(\cdot)-relaxed PACF learnable for g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}), we must prove that there is some setting of B⋆,α⋆B^{\star},\alpha^{\star} and a sample size m≤poly(1α,1γ,1ϵ,1ϵα,1ϵγ,log⁡1δ)m\leq poly(\frac{1}{\alpha},\frac{1}{\gamma},\frac{1}{\epsilon},\frac{1}{\epsilon_{\alpha}},\frac{1}{\epsilon_{\gamma}},\log\frac{1}{\delta}), for which running AA on a sample S∼DmS\sim\mathcal{D}^{m} yields w=A(B⋆,α⋆)\mathbf{w}=A(B^{\star},\alpha^{\star}) that satisfies:

Let G,BG,B parameters to be defined later, and define:

For every B>0B>0, w.p at least 1−δ21-\frac{\delta}{2} over a sample S∼DmS\sim{\cal D}^{m}, w=A(B,α~)\mathbf{w}=A(B,\widetilde{\alpha}) is (α,γ)\left(\alpha,\gamma\right)-fair w.r.t D\mathcal{D}.

Proof of Proposition 5.11. The argument follows directly from the same arguments in the proof of Proposition 5.6 in Theorem 5.1, since HBH_{B} is a class of linear classifiers. □\Box

ensures that for every γ⋆∈(0,1)\gamma^{\star}\in(0,1) and every δ,α,γ,ϵα,ϵγ,ϵ∈(0,1)\delta,\alpha,\gamma,\epsilon_{\alpha},\epsilon_{\gamma},\epsilon\in(0,1), w.p at least 1−δ21-\frac{\delta}{2} over the choice of a sample S∼DmS\sim{\cal D}^{m}, w=A(B⋆,α⋆)\mathbf{w}=A(B^{\star},\alpha^{\star}) satisfies

The proof of Proposition 5.12 will be based on the fact that for sufficiently large BB, Hϕα,γH_{\phi}^{\alpha,\gamma} is approximately contained (in terms of accuracy) in HBα,γH_{B}^{\alpha,\gamma}. This is formalized in the following claim.

For every α,γ,ϵ∈(0,1)\alpha,\gamma,\epsilon\in(0,1) and L≥3L\geq 3, setting B=6L4+exp⁡(9Llog⁡(4Lϵ)+5)B=6L^{4}+\exp\left(9L\log\left(\frac{4L}{\epsilon}\right)+5\right) ensures that LU(HBα,γ+ϵ)≤LU(Hϕα,γ)+ϵ2{\cal L}^{U}(H_{B}^{\alpha,\gamma+\epsilon})\leq{\cal L}^{U}(H_{\phi}^{\alpha,\gamma})+\frac{\epsilon}{2}.

From Lemma 2.5 in [SSSS11], for every ϵ′∈(0,1)\epsilon^{\prime}\in(0,1), setting B=6L4+exp⁡(9Llog⁡(2Lϵ)+5)B=6L^{4}+\exp\left(9L\log\left(\frac{2L}{\epsilon}\right)+5\right) yields that for any h∈Hϕh\in H_{\phi} there exists hB∈HBh_{B}\in H_{B} such that

Let α,γ,ϵ∈(0,1)\alpha,\gamma,\epsilon\in(0,1). Now, by applying the above with ϵ′=12ϵ\epsilon^{\prime}=\frac{1}{2}\epsilon, we conclude that for every h∈Hϕα,γh\in H_{\phi}^{\alpha,\gamma} there exists hB∈HBh_{B}\in H_{B} such that ∀x∈X,     ∣hB(x)−h(x)∣≤ϵ′\forall\mathbf{x}\in\mathcal{X},\,\,\,\,\,\left|h_{B}(\mathbf{x})-h(\mathbf{x})\right|\leq\epsilon^{\prime}. This implies that LU(hB)≤LU(h)+ϵ′\mathcal{L}^{U}(h_{B})\leq\mathcal{L}^{U}(h)+\epsilon^{\prime}.

To conclude the proof, it suffices to prove that hB∈HBα,γ+2ϵ′h_{B}\in H_{B}^{\alpha,\gamma+2\epsilon^{\prime}}.

where in ⋆\star we used the fact that from the triangle inequality,

□\Box We can now prove Proposition 5.12. Let γ⋆∈(0,1)\gamma^{\star}\in(0,1) and w=A(B⋆,α⋆)\mathbf{w}=A(B^{\star},\alpha^{\star}), for B⋆B^{\star} and α⋆\alpha^{\star} as in the proposition’s statement.

First, let m1=2Bϵ2(2+9ln⁡(8/δ))m^{1}=\frac{2B}{\epsilon^{2}}\left(2+9\sqrt{\ln(8/\delta)}\right) and ϵ′=min⁡{ϵ,ϵα,ϵγ2}\epsilon^{\prime}=\min\left\{\epsilon,\epsilon_{\alpha},\frac{\epsilon_{\gamma}}{2}\right\}. Now:

It is left to show that there is some setting of GG and a sufficiently large sample size mm for which it also holds that

We set G=1ϵ′G=\frac{1}{\epsilon^{\prime}}. The second inequality is satisfied, because 1G=ϵ′=2ϵ′−ϵ′≤ϵγ−ϵ′\frac{1}{G}=\epsilon^{\prime}=2\epsilon^{\prime}-\epsilon^{\prime}\leq\epsilon_{\gamma}-\epsilon^{\prime}. Plugging this into the first equation and simplifying, we obtain:

which is satisfied for any m≥(4(4+8B+17ln⁡(4/δ))(1−α)⋅ϵα⋅min⁡{ϵ,ϵα,ϵγ2})2+1m\geq\left(\frac{4\left(4+8\sqrt{B}+17\sqrt{\ln(4/\delta)}\right)}{(1-\alpha)\cdot\epsilon_{\alpha}\cdot\min\left\{\epsilon,\epsilon_{\alpha},\frac{\epsilon_{\gamma}}{2}\right\}}\right)^{2}+1.

We can now use the union bound to conclude that for the sample size mm specified in the Proposition’s statement, w.p at least 1−δ21-\frac{\delta}{2} over an i.i.d sample S∼DmS\sim{\cal D}^{m}, it holds that

To conclude the proof of Theorem 5.8, we note that by Propositions 5.11 and 5.12, we have that w.p at least 1−δ1-\delta over an i.i.d sample S∼DmS\sim{\cal D}^{m} all the conditions in Definition 3.3 are met for g(α,γ)=(α⋅γ−γ⋆,γ⋆)g(\alpha,\gamma)=(\alpha\cdot\gamma-\gamma^{\star},\gamma^{\star}) and m≥m⋆m\geq m^{\star} as in the definition of Proposition 5.12. This implies that for this g(⋅)g(\cdot), Hϕ,LH_{\phi,L} is g(⋅)g(\cdot)-relaxed PACF learnable with sample complexity mm and in time poly(m)poly(m), as required. □\Box

Intractability of Perfectly Metric-Fair Learning

We show that perfect metric-fairness can make simple learning tasks computationally intractable. Towards this, we exhibit a simple learning task that becomes intractable under a perfect metric-fairness constraint (for a particular metric). We note that this task can be solved in polynomial time under the approximate metric-fairness relaxation. See the discussion in Section 1.6.

Assume that one-way functions exist and let X{\cal X} be the unit ball in Rn\mathcal{R}^{n}. There exist: (i)(i) a fixed distribution D{\cal D} over (X×±1)({\cal X}\times\pm 1), (ii)(ii) a linear classifier w:X→±1w:{\cal X}\rightarrow\pm 1 that perfectly labels D{\cal D} (errD(w)=0\mathit{err}_{{\cal D}}(w)=0), and (iii)(iii) two efficiently sampleable distributions UU and VV on metrics d:X2→d:{\cal X}^{2}\rightarrow, where:

For every metric dd drawn from UU, every perfectly metric-fair classifier h:X→h:{\cal X}\rightarrow (in any hypothesis class) has error errD(h)=1/2\mathit{err}_{{\cal D}}(h)=1/2.

With overwhelming probability over a metric dd drawn from VV, the (linear) classifier ww is perfectly metric-fair.

For every polynomial-time learning algorithm A{\cal A} there exists a constant α∈\alpha\in such that one of the following two conditions holds:

Given a metric sampled from UU, A{\cal A} outputs a classifier that violates perfect metric-fairness with probability almost α\alpha.

Given a metric sampled from VV, A{\cal A} outputs a classifier hh whose error is almost 1/21/2 with probability at least (1−α)(1-\alpha).

Moreover, the linear classifier ww not only labels examples in D{\cal D} correctly, it also has large margins (greater than 1/21/2) on every example in D{\cal D}’s support.

For the sake of readability, we choose to be somewhat informal in our treatment of asymptotics (i.e. we refer to a single distribution on learning problems and metrics, rather than an ensemble of distributions that grows with nn). For an introduction to the foundations of cryptography, including pseudorandom generators, indistinguishability, and negligible quantities, we refer the reader to Goldreich [Gol01] .

We begin by specifying the distribution D{\cal D} and the classifier ww. D{\cal D} will be the uniform distribution on the unit ball X{\cal X}, conditioned on the nn-th coordinate being either 1/21/2 or −1/2-1/2. We restrict the last coordinate to ensure large margins (which are important for efficient PACF learnability). The linear classifier ww simply outputs the sign of the last coordinate, and each example x∈Xx\in{\cal X} gets the label w(x)w(x). Note that indeed the linear classifier ww has perfect accuracy and large margins.

To describe the metric, we use a cryptographic pseudo-random generator (PRG) as follows. Recall that a PRG is a function such-that no polynomial-time algorithm can distinguish between a uniformly random string in {0,1}2n\{0,1\}^{2n}, and the output of GG on a random string in {0,1}n−1\{0,1\}^{n-1}. Note that this is the case even though only a negligible fraction of the strings in {0,1}2n\{0,1\}^{2n} are in GG’s image. A celebrated result of Hastad et al. [HILL99] shows that PRGs can be constructed from any one-way function.

If xx and x′x^{\prime} get the same label, i.e. if sign(x[n])=sign(x′[n])\mathit{sign}(x[n])=\mathit{sign}(x^{\prime}[n]), then d(x,x′)=1d(x,x^{\prime})=1.

Otherwise, let Δx,x′∈{0,1}n−1\Delta^{x,x^{\prime}}\in\{0,1\}^{n-1} be computed as Δix,x′=1−(sign(xi)⋅sign(xi′))2\Delta^{x,x^{\prime}}_{i}=\frac{1-(\mathit{sign}(x_{i})\cdot\mathit{sign}(x^{\prime}_{i}))}{2}. I.e. Δix,x′\Delta^{x,x^{\prime}}_{i} is 0 if the signs of xix_{i} and xi′x^{\prime}_{i} are identical, and 1 if they are different.

If G(Δx,x′)=yG(\Delta^{x,x^{\prime}})=y, then d(x,x′)=0d(x,x^{\prime})=0.

Note that for any choice of yy, the above construction is indeed a pseduometric. The distance from xx to itself is defined to be 0, and distances are symmetric by symmetry of the ⊕\oplus operation. Finally, for every x,x′,x′′∈Xx,x^{\prime},x^{\prime\prime}\in X we have that:

To see this, observe that if d(x,x′)=0d(x,x^{\prime})=0 then the LHS is bounded by the RHS. On the other hand, if d(x,x′)=1d(x,x^{\prime})=1, then xx and x′x^{\prime} are distinct, and if x′′x^{\prime\prime} is also distinct from them, then it cannot be the case that both d(x,x′′)=0d(x,x^{\prime\prime})=0 and d(x′′,x′)=0d(x^{\prime\prime},x^{\prime})=0: one of these two distances must be 1.

We remark that in this construction we allow the distance between distinct points to be 0, and thus we get a distribution on pseudometrics. By defining the distance between examples xx and x′x^{\prime} s.t. G(Δx,x′)=yG(\Delta^{x,x^{\prime}})=y to be a small positive quantity rather than 0 we would obtain a true metric, and the results are essentially unchanged.

Turning to prove the claimed properties, we have:

For metrics in UU, yy is pseudorandom, where G(s)=yG(s)=y for some s∈{0,1}n−1s\in\{0,1\}^{n-1}. We can divide the examples in D{\cal D}’s support into (disjoint) pairs (x,x′)(x,x^{\prime}) s.t. Δx,x′=s\Delta^{x,x^{\prime}}=s, where the label of xx is 11 and the label of x′x^{\prime} is −1-1. Let hh be any perfectly metric-fair classifier. Since the d(x,x′)=0d(x,x^{\prime})=0, hh has to treat xx and x′x^{\prime} identically. Thus, the sum of hh’s errors on these two examples must be exactly 1. Since we can partition the support of D{\cal D} into disjoint pairs of this form, we conclude that hh’s overall error must be exactly 1/21/2.

For metrics in UU, yy is truly random. With overwhelming probability over the choice of yy, there does not exist any s∈{0,1}n−1s\in\{0,1\}^{n-1} such that G(s)=yG(s)=y. When no such ss exists, the metric dd assigns distance 1 to every pair of distinct individuals. Thus, every hypothesis is perfectly metric-fair and in particular the classifier ww is a perfectly metric-fair classifier with error 0.

Finally, since GG is a pseudorandom generator, no polynomial-time learner can distinguish between a metric (i.e. yy) drawn from UU and a metric (i.e. yy) drawn from VV (except with negligible advantage). For a learning algorithm A{\cal A}, let α\alpha be the probability that A{\cal A}, given a metric sampled from VV, outputs a classifier whose error is noticeably less than 1/21/2 (e.g. the error is no greater than (1/2−1/n)(1/2-1/n)). Then, by the PRG’s indistinguishability property, when given a metric sampled from UU, the learner A{\cal A} must also output a classifier whose error is noticeably less than 1/21/2 with probability almost α\alpha (e.g. at least (α−1/n)(\alpha-1/n)). But by Property 1, whenever this is the case, A{\cal A} is also violating perfect metric-fairness. ∎

Conclusions and Future Directions

We conclude with several directions for future exploration:

Throughout our work, we assumed that the similarity metric is known to the learner. This is a natural assumption in the scenario that the metric is used as a vehicle for knowledgeably correcting biases in the training data, or in domains where such metrics naturally exist (such as credit scores and insurance risk scores). In other settings, however, relying on the existence of a metric is clearly a limitation (as also noted by [DHP+12]). One potential avenue for future work is investigating the use of machine learning to recover a similarity metric from fairly labeled data.

We make no assumptions about the similarity metric. In particular, it can be completely incompatible with accuracy and cryptographically contrived. Studying fairness-accuracy trade-offs imposed by particular similarity metrics is an interesting direction for future research direction and could also be supplemented by empirical studies. Another interesting question is whether there exist natural classes of metrics for which the hardness results for perfect metric-fairness do not hold.

The main challenge in efficient metric-fair learning is that the metric-fairness constraints are specified in terms of the hypotheses themselves. This means that when the hypotheses are not convex (e.g, the class of logistic predictors), the fairness constraints specify a non-convex set. In the case of logistic regression we overcame these barriers using improper learning. However, computational tractability came at the cost of an increase in the sample complexity, and the resulting algorithm was only polynomial so long as the Lipschitz constant LL of the sigmoidal transfer function was small. In particular, we only expect good accuracy in cases where data is linearly separable with large (expected) margins. The hardness result in [SSSS11] suggest that a polynomial dependence on LL cannot be achieved using this method. A natural question, therefore, is whether other approaches can be used to construct metric-fair learning algorithms which are efficient and can be accurate even for data separated by smaller margins.

Acknowledgements

We thank Cynthia Dwork and Omer Reingold for invaluable and illuminating conversations.

References