Title: Causal Context Connects Counterfactual Fairness to Robust Prediction and Group Fairness
Venue: NeurIPS 2023
Accepted: yes
Keywords: causal graphs

causality

counterfactual fairness

domain generalization

fairness

robustness

machine learning

artificial intelligence
Abstract: Counterfactual fairness requires that a person would have been classified in the same way by an AI or other algorithmic system if they had a different protected class, such as a different race or gender. This is an intuitive standard, as reflected in the U.S. legal system, but its use is limited because counterfactuals cannot be directly observed in real-world data. On the other hand, group fairness metrics (e.g., demographic parity or equalized odds) are less intuitive but more readily observed. In this paper, we use \textit{causal context} to bridge the gaps between counterfactual fairness, robust prediction, and group fairness. First, we motivate counterfactual fairness by showing that there is not necessarily a fundamental trade-off between fairness and accuracy because, under plausible conditions, the counterfactually fair predictor is in fact accuracy-optimal in an unbiased target distribution. Second, we develop a correspondence between the causal graph of the data-generating process and which, if any, group fairness metrics are equivalent to counterfactual fairness. Third, we show that in three common fairness contexts—measurement error, selection on label, and selection on predictors—counterfactual fairness is equivalent to demographic parity, equalized odds, and calibration, respectively. Counterfactual fairness can sometimes be tested by measuring relatively simple group fairness metrics.

Causal Context Connects Counterfactual Fairness to Robust Prediction and Group Fairness

Abstract

Counterfactual fairness requires that a person would have been classified in the same way by an AI or other algorithmic system if they had a different protected class, such as a different race or gender. This is an intuitive standard, as reflected in the U.S. legal system, but its use is limited because counterfactuals cannot be directly observed in real-world data. On the other hand, group fairness metrics (e.g., demographic parity or equalized odds) are less intuitive but more readily observed. In this paper, we use causal context to bridge the gaps between counterfactual fairness, robust prediction, and group fairness. First, we motivate counterfactual fairness by showing that there is not necessarily a fundamental trade-off between fairness and accuracy because, under plausible conditions, the counterfactually fair predictor is in fact accuracy-optimal in an unbiased target distribution. Second, we develop a correspondence between the causal graph of the data-generating process and which, if any, group fairness metrics are equivalent to counterfactual fairness. Third, we show that in three common fairness contexts-measurement error, selection on label, and selection on predictors-counterfactual fairness is equivalent to demographic parity, equalized odds, and calibration, respectively. Counterfactual fairness can sometimes be tested by measuring relatively simple group fairness metrics.

1 Introduction

The increasing use of artificial intelligence and machine learning in high stakes contexts such as healthcare, hiring, and financial lending has driven widespread interest in algorithmic fairness. A canonical example is risk assessment in the U.S. judicial system, which became well-known after a 2016 investigation into the recidivism prediction tool COMPAS revealed significant racial disparities [2]. There are several metrics one can use to operationalize fairness. These typically refer to a protected class or sensitive label, such as race or gender, and define an equality of prediction rates across the protected class. For example, demographic parity, also known as statistical parity or group parity, requires equal classification rates across all levels of the protected class [7].

However, there is an open challenge of deciding which metrics to enforce in a given context [e.g., 24, 44]. Appropriateness can vary based on different ways to measure false positive and false negative rates and the costs of such errors [19] as well as the potential trade-offs between fairness and accuracy [11, 12, 21, 55]. Moreover, there are well-known technical results showing that it is impossible to achieve the different fairness metrics simultaneously, even to an ϵ -approximation [10, 30], which suggest that a practitioner's context-specific perspective may be necessary to achieve satisfactory outcomes [4].

A different paradigm, counterfactual fairness, requires that a prediction would have been the same if the person had a different protected class [31]. This matches common intuitions and legal standards

Tools to Detect

and Enforce

Group

Fairness

•

Data augmentation

•

Data generation

•

Regularization

•

Etc.

Group

Fairness Metrics

•

Demographic parity

•

Equalized odds

•

Calibration

•

Etc.

Causal

Context

Connection

•

Theorem 2

•

Corollary 2.1

•

Corollary 2.2

Counterfactual

Fairness

•

Ethics / philosophy

•

Public policy

•

Law

•

Etc.

[25]. For example, in McCleskey v. Kemp (1987), the Supreme Court found "disproportionate impact" as shown by group disparity to be insufficient evidence of discrimination and required evidence that "racial considerations played a part." The Court found that there was no merit to the argument that the Georgia legislature had violated the Equal Protection Clause via its use of capital punishment on the grounds that it had not been shown that this was [sic] " because of an anticipated racially discriminatory effect." While judges do not formally specify causal models, their language usually evokes such counterfactuals; see, for example, the test of "but-for causation" in Bostock v. Clayton County (2020).

We take a new perspective on counterfactual fairness by leveraging causal context . First, we provide a novel motivation for counterfactual fairness from the perspective of robust prediction by showing that, with certain causal structures of the data-generating process, counterfactually fair predictors are accuracy-optimal in an unbiased target distribution (Theorem 1). The contexts we consider ihave two important features: the faithfulness of the causal structure, in the sense that no causal effects happen to be precisely counterbalanced, which could lead to a coincidental achievement of group fairness metrics, and that the association between the label Y and the protected class A is "purely spurious," in the sense that intervening on A does not affect Y or vice versa.

Second, we address the fundamental challenge in enforcing counterfactual fairness, which is that, by definition, we never directly observe counterfactual information in the real world. To deal with this, we show that the causal context connects counterfactual fairness to observational group fairness metrics (Theorem 2 and Corollary 2.1), and this correspondence can be used to apply tools from group fairness frameworks to the ideal of achieving counterfactual fairness (Figure 1). For example, the fairness literature has developed techniques to achieve group fairness through augmenting the input data [13, 27, 42], data generation [1], or regularization [45]. With this pipeline, these tools can be applied to enforce counterfactual fairness by achieving the specific group fairness metric that corresponds to counterfactual fairness in the given context. In particular, we show that in each fairness context shown in Figure 2, counterfactual fairness is equivalent to a particular metric (Corollary 2.2). This correspondence can be used to apply tools built for group fairness to the goal of counterfactual fairness or vice versa.

Finally, we conduct brief experiments in a semi-synthetic setting with the Adult income dataset [3] to confirm that a counterfactually fair predictor under these conditions achieves out-of-distribution accuracy and the corresponding group fairness metric. To do this, we develop a novel counterfactually fair predictor that is a weighted average of naive predictors, each under the assumption that the observation is in each protected class (Theorem 3).

X

⊥

A

˜

Y

Y

A

X

⊥

Y

(a) Measurement error (corresponding to demographic parity)

X

⊥

A

Y

S

A

X

⊥

Y

(b) Selection on label (corresponding to equalized odds)

X

⊥

A

Y

S

A

X

⊥

Y

(c) Selection on predictors (corresponding to

calibration)

In summary, we make three main contributions:

We provide a novel motivation for counterfactual fairness from the perspective of robust prediction by showing that, in certain causal contexts, the counterfactually fair predictor is accuracy-optimal in an unbiased target distribution (Theorem 1).

We provide criteria for whether a causal context implies equivalence between counterfactual fairness and each of the three primary group fairness metrics (Theorem 2) as well as seven derivative metrics (Corollary 2.1).

We provide three causal contexts, as shown in Figure 2, in which counterfactual fairness is equivalent to a particular group fairness metric: measurement error with demographic parity, selection on label with equalized odds, and selection on predictors with calibration (Corollary 2.2).

For a running example, consider the case of recidivism prediction with measurement error, as shown in Figure 2a, where X is the set of predictors of recidivism, such as past convictions; ˜ Y is committing a crime; Y is committing a crime that has been reported and prosecuted; and A is race, which in this example affects the likelihood crime is reported and prosecuted but not the likelihood of crime itself. In this case, we show that a predictor is counterfactually fair if and only if it achieves demographic parity.

2 Related work

Previous work has developed a number of fairness metrics, particularly demographic parity [7], equalized odds [23], and calibration [19]. Verma and Rubin [48] details 15 group fairness metrics-also known as observational or distributional fairness metrics-including these three, and Makhlouf, Zhioua, and Palamidessi [34] details 19 causal fairness metrics, including counterfactual fairness [31]. Many notions of fairness can be viewed as specific instances of the general goal of invariant representation [18, 53, 55, 56]. Much contemporary work in algorithmic fairness develops ways to better enforce certain fairness metrics, such as through reprogramming a pretrained model [54],

contrastive learning when most data lacks labels of the protected class [8], and differentiating between critical and non-critical features for selective removal [16].

Several papers have criticized the group fairness metrics and enriched them correspondingly. For example, one can achieve demographic parity by arbitrarily classifying a subset of individuals in a protected class, regardless of the other characteristics of those individuals. This is particularly important for subgroup fairness, in which a predictor can achieve the fairness metric for one category within the protected class but fail to achieve it when subgroups are considered across different protected classes, such as people who have a certain race and gender. This is particularly important given the intersectional nature of social disparities [14], and metrics have been modified to include possible subgroups [29].

Well-known impossibility theorems show that fairness metrics such as the three listed above cannot be simultaneously enforced outside of unusual situations such as a perfectly accurate classifier, a random classifier, or a population with equal rates across the protected class, and this is true even to an ϵ -approximation [10, 30, 40]. Moreover, insofar as fairness and classification accuracy diverge, there appears to be a trade-off between the two objectives. Two well-known papers in the literature, Corbett-Davies et al. [12] and Corbett-Davies and Goel [11], detail the cost of fairness and argue for the prioritization of classification accuracy. More recent work on this trade-off includes a geometric characterization and Pareto optimal frontier for invariance goals such as fairness [55], the cost of causal fairness in terms of Pareto dominance in classification accuracy and diversity [37], the potential for increases in fairness via data reweighting in some cases without a cost to classification accuracy [32], and showing optimal fairness and accuracy in an ideal distribution given mismatched distributional data [17].

Our project uses the framework of causality to enrich fairness metric selection. Recent work has used structural causal models to formalize and solve a wide range of causal problems in machine learning, such as disentangled representations [41, 50], out-of-distribution generalization [41, 49, 50], and the identification and removal of spurious correlations [47, 50]. While Veitch et al. [47] focuses on the correspondence between counterfactual invariance and domain generalization, Remark 3.3 notes that counterfactual fairness as an instance of counterfactual invariance can imply either demographic parity or equalized odds in the two graphs they analyze, respectively, and Makar and D'Amour [33] draw the correspondence between risk invariance and equalized odds under a certain graph. The present work can be viewed as a generalization of these results to correspondence between counterfactual fairness, which is equivalent to risk invariance when the association is "purely spurious," and each of the group fairness metrics.

3 Preliminaries and Examples

For simplicity of exposition, we focus on binary classification with an input dataset X ∈ X and a binary label Y ∈ Y = { 0 , 1 } , and in our data we may have ground-truth unobserved labels ˜ Y ∈ { 0 , 1 } that do not always match the potentially noisy observed labels Y . The goal is to estimate a prediction function f : X ↦→ Y , producing estimated labels f ( X ) ∈ { 0 , 1 } , that minimizes E [ ℓ ( f ( X ) , Y )] for some loss function ℓ : Y × Y ↦→ R . There are a number of popular fairness metrics in the literature that can be formulated as conditional probabilities for some protected class A ∈ { 0 , 1 } , or equivalently, as independence of random variables, and we can define a notion of counterfactual fairness.

Definition 1. (Demographic parity). A predictor f ( X ) achieves demographic parity if and only if:

Definition 2. (Equalized odds). A predictor f ( X ) achieves equalized odds if and only if:

Definition 3. (Calibration). A predictor f ( X ) achieves calibration if and only if:

Definition 4. (Counterfactual fairness). A predictor f ( X ) achieves counterfactual fairness if and only if for any a, a ′ ∈ A :

̸

In this case, x (0) and x (1) are the potential outcomes. That is, for an individual associated with data x ∈ X with protected class a ∈ A , their counterfactual is x ( a ′ ) where a ′ ∈ A and a = a ′ . The counterfactual observation is what would obtain if the individual had a different protected class. We represent causal structures as directed acyclic graphs (DAGs) in which nodes are variables and directed arrows indicates the direction of causal effect. Nodes in a solid circle are observed variables that may or may not be included in a predictive model. A dashed circle indicates an unobserved variable, such as in the case of measurement error in which the true label ˜ Y is a parent of the observed label Y . A rectangle indicates an observed variable that is conditioned on in the data-generating process, typically denoted by S for a selection effect, which induces an association between its parents. For clarity, we decompose X into X ⊥ A , the component that is not causally affected by A , and X ⊥ Y , the component that does not causally affect Y (in a causal-direction graph, i.e., X affects Y ) or is not causally affected by Y (in an anti-causal graph, i.e., Y affects X ). In general, there could be a third component that is causally connected to both A and Y (i.e., a non-spurious interaction effect). This third component is excluded through the assumption that the association between Y and A in the training distribution is purely spurious [47].

Definition 5. (Purely spurious). We say the association between Y and A is purely spurious if Y ⊥ X | X ⊥ A , A .

In other words, if we condition on A , then the only information about Y is in X ⊥ A (i.e., the component of the input that is not causally affected by the protected class). We also restrict ourselves to cases in which A is exogenous to the causal structure (i.e., there is no confounder of A and X or of A and Y ), which seems reasonable in the case of fairness because the protected class is typically not caused by other variables in the specified model.

Despite the intuitive appeal and legal precedent for counterfactual fairness, the determination of counterfactuals is fundamentally contentious because, by definition, we do not observe counterfactual worlds, and we cannot run scientific experiments to test what would have happened in a different world history. Some counterfactuals are relatively clear, but counterfactuals in contexts of protected classes such as race, gender, and disability can be ambiguous. Consider Bob, a hypothetical Black criminal defendant being assessed for recidivism who is determined to be high-risk by a human judge or a machine algorithm. The assessment involves extensive information about his life: where he has lived, how he has been employed, what crimes he has been arrested and convicted of before, and so on. What is the counterfactual in which Bob is White? Is it the world in which Bob was born to White parents, the one in which Bob's parents were themselves born to White parents, or another change further back? Would Bob still have the same educational and economic circumstances? Would those White parents have raised Bob in the same majority-Black neighborhood he grew up in or in a majority-White neighborhood? Questions of counterfactual ambiguity do not have established answers in the fairness literature, either in philosophy [35], epidemiology [46], or the nascent machine learning literature [28], and we do not attempt to resolve them in the present work.

Additionally, defining counterfactual fairness in a given context requires some identification of the causal structure of the data generating process. Fortunately, mitigating this challenge is more technically tractable than mitigating ambiguity, as there is an extensive literature on how we can learn about the causal structure, known as as causal inference [15] or causal discovery when we have minimal prior knowledge or assumptions of which parent-child relationships do and do not obtain [43]. The literature also contains a number of methods for assessing counterfactual fairness given a partial or complete causal graph [9, 20, 51, 52, 57]. Again, we do not attempt to resolve debates about appropriate causal inference strategies in the present work, but merely to provide a conceptual tool for those researchers and practitioners who are comfortable staking a claim of some partial or complete causal structure of the context at hand.

To ground our technical results, we briefly sketch three fairness contexts that match those in Figure 2 and will be the basis of Corollary 2.2. First, measurement error [6] is a well-known source of fairness issues as developed in the "measurement error models" of Jacobs and Wallach [26]. Suppose that COMPAS is assessing the risk of recidivism, but they do not have perfect knowledge of who has committed crimes because not all crimes are reported and prosecuted. Thus, X causes ˜ Y , the actual committing of a crime, which is one cause of Y , the imperfect labels. Also suppose that the protected class A affects whether the crime is reported and prosecuted, such as through police bias, but does not affect the actual committing of a crime. A also affects X , other data used for the recidivism

prediction. This is represented by the causal DAG in Figure 2a, which connects counterfactual fairness to demographic parity.

Second, a protected class can affect whether individuals are selected into the dataset. For example, drugs may be prescribed on the basis of whether the individual's lab work X indicates the presence of disease Y . People with the disease are presumably more likely to have lab work done, and the socioeconomic status A of the person (or of the hospital where their lab work is done) may make them more likely to have lab work done. We represent this with a selection variable S that we condition on by only using the lab work data that is available. This collider induces an association between A and Y . This is represented by the causal DAG in Figure 2b, which connects counterfactual fairness to equalized odds.

Third, individuals may be selected into the dataset based on predictors, X , which cause the label Y . For example, loans may be given out with a prediction of loan repayment Y based on demographic and financial records X . There may be data only for people who choose to work with a certain bank based on financial records and a protected class A . This is represented by the causal DAG in Figure 2c, which connects counterfactual fairness to calibration.

4 Counterfactual fairness and robust prediction

Characterizations of the trade-off between prediction accuracy and fairness treat them as two competing goals [e.g., 11, 12, 21, 55]. That view assumes the task is to find an optimal model f ∗ ( X ) that minimizes risk (i.e., expected loss) in the training distribution X,Y,A ∼ P :

However, the discrepancy between levels of the protected class in the training data may itself be due to biases in the dataset, such as measurement error, selection on label, and selection on predictors. As such, the practical interest may not be risk minimization in the training distribution, but out-ofdistribution (OOD) generalization from the training distribution to an unbiased target distribution where these effects are not present.

Whether the counterfactually fair empirical risk minimizer also minimizes risk in the target distribution depends on how the distributions differ. Because a counterfactually fair predictor does not depend on the protected class, it minimizes risk if the protected class in the target distribution contains no information about the corresponding labels (i.e., if protected class and label are uncorrelated). If the protected class and label are correlated in the target distribution, then risk depends on whether the counterfactually fair predictor learns all the information about the label contained in the protected class. If so, then its prediction has no reason to vary in the counterfactual scenario. Theorem 1 motivates counterfactual fairness by stating that, for a distribution with bias due to selection on label and equal marginal label distributions or due to selection on predictors, the counterfactually fair predictor is accuracy-optimal in the unbiased target distribution.

Theorem 1. Let F CF be the set of all counterfactually fair predictors. Let ℓ be a proper scoring rule (e.g., square error, cross entropy loss). Let the counterfactually fair predictor that minimizes risk on the training distribution X,Y,A ∼ P be:

Then, f ∗ also minimizes risk on the target distribution X,Y,A ∼ Q with no selection effects, i.e.,

if either of the following conditions hold:

The association between Y and A is due to selection on label and the marginal distribution of the label Y is the same in each distribution, i.e., P ( Y ) = Q ( Y ) .

The association between Y and A is due to selection on predictors.

In the context of measurement error, there are not straightforward conditions for the risk minimization of the counterfactually fair predictor because the training dataset contains Y , observed noisy labels,

and not ˜ Y , the true unobserved labels. Thus any risk minimization (including in the training distribution) depends on the causal process that generates Y from ˜ Y .

5 Counterfactual fairness and group fairness

Causal structures imply conditional independencies. For example, if the only causal relationships are that X causes Y and Y causes Z , then we know that X ⊥ Z | Y . On a directed acyclic graph (DAG), following Pearl and Dechter [38], we say that a variable Y dependence-separates or d-separates X and Z if X and Z are connected via an unblocked path (i.e., no unconditioned collider in which two arrows point directly to the same variable) but are no longer connected after removing all arrows that directly connect to Y [22]. So in this example, Y d-separates X and Z , which is equivalent to the conditional independence statement. A selection variable S in a rectangle indicates an observed variable that is conditioned on in the data-generating process, which induces an association between its parents and thereby does not block the path as an unconditioned collider would. For Theorem 2, Corollary 2.1, and Corollary 2.2, we make the usual assumption of faithfulness of the causal graph, meaning that the only conditional independencies are those implied by d-separation, rather than any causal effects that happen to be precisely counterbalanced. Specifically, we assume faithfulness between the protected class A , the label Y , and the component of X on which the predictor f ( X ) is based. If the component is not already its own node in the causal graph, then faithfulness would apply if the component were isolated into its own node or nodes.

For a predictor, these implied conditional independencies can be group fairness metrics. We can restate conditional independencies containing X ⊥ A as containing f ( X ) because, if f ( X ) is a counterfactually fair predictor, it only depends on X ⊥ A , the component that is not causally affected by A . In Theorem 2, we provide the correspondence between counterfactual fairness and the three most common metrics: demographic parity, equalized odds, and calibration.

Theorem 2. Let the causal structure be a causal DAG with X ⊥ Y , X ⊥ A , Y , and A , such as in Figure 2. Assume faithfulness between A , Y , and f ( X ) . Then:

Counterfactual fairness is equivalent to demographic parity if and only if there is no unblocked path between X ⊥ A and A .

Counterfactual fairness is equivalent to equalized odds if and only if all paths between X ⊥ A and A , if any, are either blocked by a variable other than Y or unblocked and contain Y .

Counterfactual fairness is equivalent to calibration if and only if all paths between Y and A , if any, are either blocked by a variable other than X ⊥ A or unblocked and contain X ⊥ A .

Similar statements can be made for any group fairness metric. For example, the notion of false negative error rate balance, also known as equal opportunity [23], is identical to equalized odds but only considers individuals who have a positive label ( Y = 1 ). The case for this metric is based on false negatives being a particular moral or legal concern, motivated by principles such as "innocent until proven guilty," in which a false negative represents an innocent person ( Y = 1 ) who is found guilty ( f ( X ) = 0 ). False negative error rate balance is assessed in the same way as equalized odds but only with observations that have a positive true label, which may be consequential if different causal structures are believed to obtain for different groups.

Table 1 shows the ten group fairness metrics presented in Verma and Rubin [48] that can be expressed as conditional independencies. Theorem 2 specified the correspondence between three of these (demographic parity, equalized odds, and calibration), and we extend to the other seven in Corollary 2.1.

We have so far restricted ourselves to a binary classifier f ( X ) ∈ { 0 , 1 } . Here, we denote this as a decision f ( x ) = d ∈ D = { 0 , 1 } and also consider probabilistic classifiers that produce a score s that can take any probability from 0 to 1, i.e., f ( x ) = s ∈ S = [0 , 1] = P ( Y = 1) . The metrics of balance for positive class, balance for negative class, and score calibration are defined by Verma and Rubin [48] in terms of score. Verma and Rubin [48] refer to calibration for binary classification (Definition 3) as "conditional use accuracy equality." To differentiate these, we henceforth refer to the binary classification metric as "binary calibration" and the probabilistic classification metric as "score calibration."

Corollary 2.1. Let the causal structure be a causal DAG with X ⊥ Y , X ⊥ A , Y , and A , such as in Figure 2. Assume faithfulness between A , Y , and f ( X ) . Then:

For a binary classifier, counterfactual fairness is equivalent to conditional demographic parity if and only if, when a set of legitimate factors L is held constant at level l , there is no unblocked path between X ⊥ A and A .

For a binary classifier, counterfactual fairness is equivalent to false positive error rate balance if and only if, for the subset of the population with negative label (i.e., Y = 0 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a binary classifier, counterfactual fairness is equivalent to false negative error rate balance if and only if, for the subset of the population with positive label (i.e., Y = 1 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to balance for negative class if and only if, for the subset of the population with negative label (i.e., Y = 0 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to balance for positive class if and only if, for the subset of the population with positive label (i.e., Y = 1 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to predictive parity if and only if, for the subset of the population with positive label (i.e., D = 1 ), there is no path between Y and A , a path blocked by a variable other than X ⊥ A , or an unblocked path that contains X ⊥ A .

For a probabilistic classifier, counterfactual fairness is equivalent to score calibration if and only if there is no path between Y and A , a path blocked by a variable other than X ⊥ A , or an unblocked path that contains X ⊥ A .

This general specification can be unwieldy, so to illustrate this, we provide three real-world examples shown in Figure 2: measurement error, selection on label (i.e., "post-treatment bias" or "selection on outcome" if the label Y is causally affected by X ), and selection on predictors. These imply demographic parity, equalized odds, and calibration, respectively.

Corollary 2.2. Assume faithfulness between A , Y , and f ( X ) .

Under the graph with measurement error as shown in Figure 2a, a predictor achieves counterfactual fairness if and only if it achieves demographic parity.

Under the graph with selection on label as shown in Figure 2b, a predictor achieves counterfactual fairness if and only if it achieves equalized odds.

Under the graph with selection on predictors as shown in Figure 2c, a predictor achieves counterfactual fairness if and only if it achieves calibration.

6 Experiments

We conducted brief experiments in a semi-synthetic setting to show that a counterfactually fair predictor achieves robust prediction and group fairness. We used the Adult income dataset [3] with a simulated protected class A , balanced with P ( A = 0) = P ( A = 1) = 0 . 5 . For observations with A = 1 , we manipulated the input data to simulate a causal effect of A on X : P ( race = Other ) = 0 . 8 . With this as the target distribution, we produced three biased datasets that result from each effect produced with a fixed probability for observations when A = 1 : measurement error ( P = 0 . 8 ), selection on label ( P = 0 . 5 ), and selection on predictors ( P = 0 . 8 ).

On each dataset, we trained three predictors: a naive predictor trained on A and X , a fairness through unawareness (FTU) predictor trained only on X , and a counterfactually fair predictor based on an average of the naive prediction under the assumption that A = 1 and the naive prediction under the assumption A = 0 , weighted by the proportion of each group in the target distribution.

Theorem 3. Let X be an input dataset X ∈ X with a binary label Y ∈ Y = { 0 , 1 } and protected class A ∈ { 0 , 1 } . Define a predictor:

where f is a proper scoring rule. Define another predictor:

If the association between Y and A is purely spurious, then f CF is counterfactually fair.

For robust prediction, we show that the counterfactually fair (CF) predictor has accuracy in the target distribution near the accuracy of a predictor trained directly on the target distribution. For group fairness, we show that the counterfactually fair predictor achieves demographic parity, equalized odds, and calibration, corresponding to the three biased datasets. Results are shown in Table 2 and Table 3, and code to reproduce these results or produce results with varied inputs (number of datasets sampled, effect of A on X , probabilities of each bias, type of predictor) is available at https://github.com/jacyanthis/Causal-Context.

7 Discussion

In this paper, we provided a new argument for counterfactual fairness-that the supposed tradeoff between fairness and accuracy [12] can evaporate under plausible conditions when the goal is accuracy in an unbiased target distribution (Theorem 1). To address the challenge of trade-offs between different group fairness metrics, such as their mutual incompatibility [30] and the variation in costs of certain errors such as false positives and false negatives [19], we provided a conceptual tool for adjudicating between them using knowledge of the underlying causal context of the social problem (Theorem 2 and Corollary 2.1). We illustrated this for the three most common fairness metrics, in which the bias of measurement error implies demographic parity; selection on label implies equalized odds; and selection on predictors implies calibration (Corollary 2.2), and we showed a minimal example by inducing particular biases on a simulated protected class in the Adult income dataset.

There are nonetheless important limitations that we hope can be addressed in future work. First, the counterfactual fairness paradigm still faces significant practical challenges, such as ambiguity and identification. Researchers can use causal discovery strategies developed in a fairness context [5, 20] to identify the causal structure of biases in real-world datasets and ensure theory like that outlined in this paper can be translated to application. Second, a key assumption in our paper and related work has been the assumption that associations between Y and A are "purely spurious," a term coined by Veitch et al. [47] to refer to cases where, if one conditions on A , then the only information about Y in X is in the component of X that is not causally affected by A . This has provided a useful conceptual foothold to build theory, but it should be possible for future work to move beyond the purely spurious case, such as by articulating distribution shift and deriving observable signatures of counterfactual fairness in more complex settings [36, 39].

8 Acknowledgments

We thank Bryon Aragam, James Evans, and Sean Richardson for useful discussions.

References

Kartik Ahuja et al. 'Conditionally Independent Data Generation'. In: Proceedings of the Thirty-Seventh Conference on Uncertainty in Artificial Intelligence . Ed. by Cassio de Campos and Marloes H. Maathuis. Vol. 161. Proceedings of Machine Learning Research. PMLR, July 2021, pp. 2050-2060.

Julia Angwin et al. 'Machine Bias'. In: ProPublica (2016). (Visited on 08/20/2023).

Barry Becker and Ronny Kohavi. Adult . 1996. DOI: 10 . 24432 / C5XW20 . (Visited on 08/21/2023).

Andrew Bell et al. 'The Possibility of Fairness: Revisiting the Impossibility Theorem in Practice'. In: 2023 ACM Conference on Fairness, Accountability, and Transparency . Chicago IL USA: ACM, June 2023, pp. 400-422. DOI: 10.1145/3593013.3594007 . (Visited on 08/05/2023).

R¯ uta Binkyt˙ e-Sadauskien˙ e et al. Causal Discovery for Fairness . June 2022. arXiv: 2206. 06685 [cs, stat] . (Visited on 05/02/2023).

J M. Bland and D. G Altman. 'Statistics Notes: Measurement Error'. In: BMJ 312.7047 (June 1996), pp. 1654-1654. ISSN: 0959-8138, 1468-5833. DOI: 10.1136/bmj.312.7047.1654 . (Visited on 08/05/2023).

Toon Calders, Faisal Kamiran, and Mykola Pechenizkiy. 'Building Classifiers with Independency Constraints'. In: 2009 IEEE International Conference on Data Mining Workshops . Miami, FL, USA: IEEE, Dec. 2009, pp. 13-18. ISBN: 978-1-4244-5384-9. DOI: 10.1109/ ICDMW.2009.83 . (Visited on 05/18/2022).

Junyi Chai and Xiaoqian Wang. 'Self-Supervised Fair Representation Learning without Demographics'. In: Advances in Neural Information Processing Systems . Oct. 2022. (Visited on 01/08/2023).

Silvia Chiappa. 'Path-Specific Counterfactual Fairness'. In: Proceedings of the AAAI Conference on Artificial Intelligence 33.01 (July 2019), pp. 7801-7808. ISSN: 2374-3468, 2159-5399. DOI: 10.1609/aaai.v33i01.33017801 . (Visited on 02/13/2023).

Alexandra Chouldechova. 'Fair Prediction with Disparate Impact: A Study of Bias in Recidivism Prediction Instruments'. In: Big Data 5.2 (June 2017), pp. 153-163. ISSN: 2167-6461, 2167-647X. DOI: 10.1089/big.2016.0047 . (Visited on 02/13/2023).

Sam Corbett-Davies and Sharad Goel. The Measure and Mismeasure of Fairness: A Critical Review of Fair Machine Learning . Aug. 2018. arXiv: 1808.00023 [cs] . (Visited on 02/12/2023).

Sam Corbett-Davies et al. 'Algorithmic Decision Making and the Cost of Fairness'. In: Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining . Halifax NS Canada: ACM, Aug. 2017, pp. 797-806. ISBN: 978-1-45034887-4. DOI: 10.1145/3097983.3098095 . (Visited on 11/21/2020).

Elliot Creager et al. 'Flexibly Fair Representation Learning by Disentanglement'. In: Proceedings of the 36th International Conference on Machine Learning . Ed. by Kamalika Chaudhuri and Ruslan Salakhutdinov. Vol. 97. Proceedings of Machine Learning Research. PMLR, June 2019, pp. 1436-1445.

Kimberle Crenshaw. 'Demarginalizing the Intersection of Race and Sex: A Black Feminist Critique of Antidiscrimination Doctrine, Feminist Theory and Antiracist Politics'. In: The University of Chicago Legal Forum 140 (1989), pp. 139-167.

Scott Cunningham. Causal Inference: The Mixtape . Yale University Press, Jan. 2021. ISBN: 978-0-300-25588-1. DOI: 10.12987/9780300255881 . (Visited on 05/20/2022).

Sanghamitra Dutta et al. 'An Information-Theoretic Quantification of Discrimination with Exempt Features'. In: Proceedings of the AAAI Conference on Artificial Intelligence 34.04 (Apr. 2020), pp. 3825-3833. ISSN: 2374-3468, 2159-5399. DOI: 10.1609/aaai.v34i04.5794 . (Visited on 08/21/2023).

Sanghamitra Dutta et al. 'Is There a Trade-off between Fairness and Accuracy? A Perspective Using Mismatched Hypothesis Testing'. In: Proceedings of the 37th International Conference on Machine Learning . Ed. by Hal Daumé III and Aarti Singh. Vol. 119. Proceedings of Machine Learning Research. PMLR, July 2020, pp. 2803-2813.

Harrison Edwards and Amos Storkey. 'Censoring Representations with an Adversary'. In: arXiv:1511.05897 [cs, stat] (Mar. 2016). arXiv: 1511.05897 [cs, stat] . (Visited on 11/15/2021).

Anthony Flores, Christopher Lowenkamp, and Kristin Bechtel. False Positives, False Negatives, and False Analyses: A Rejoinder to 'machine Bias: There's Software Used across the Country to Predict Future Criminals. and Its Biased against Blacks . Tech. rep. Crime & Justice Institute, 2016.

Sainyam Galhotra et al. 'Causal Feature Selection for Algorithmic Fairness'. In: Proceedings of the 2022 International Conference on Management of Data . Philadelphia PA USA: ACM, June 2022, pp. 276-285. ISBN: 978-1-4503-9249-5. DOI: 10.1145/3514221.3517909 . (Visited on 08/05/2023).

Yingqiang Ge et al. 'Toward Pareto Efficient Fairness-Utility Trade-off in Recommendation through Reinforcement Learning'. In: Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining . Virtual Event AZ USA: ACM, Feb. 2022, pp. 316-324. ISBN: 978-1-4503-9132-0. DOI: 10.1145/3488560.3498487 . (Visited on 08/05/2023).

MMaria Glymour and Sander Greenland. 'Causal Diagrams'. In: Modern Epidemiology . Ed. by Kenneth J. Rothman, Timothy L. Lash, and Sander Greenland. Philadelphia, PA: Lippincott Williams & Wilkins, 2008, pp. 183-209.

Moritz Hardt et al. 'Equality of Opportunity in Supervised Learning'. In: Advances in Neural Information Processing Systems . Ed. by D. Lee et al. Vol. 29. Curran Associates, Inc., 2016.

Brian Hsu et al. 'Pushing the Limits of Fairness Impossibility: Who's the Fairest of Them All?' In: Advances in Neural Information Processing Systems . Oct. 2022. (Visited on 02/13/2023).

Issa Kohler-Hausmann. 'Eddie Murphy and the Dangers of Counterfactual Causal Thinking About Detecting Racial Discrimination'. In: Northwestern University Law Review 113.5 (Mar. 2019), pp. 1163-1228. ISSN: 0029-3571.

Abigail Z. Jacobs and Hanna Wallach. 'Measurement and Fairness'. In: Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency . Virtual Event Canada: ACM, Mar. 2021, pp. 375-385. ISBN: 978-1-4503-8309-7. DOI: 10.1145/3442188.3445901 . (Visited on 05/19/2022).

Taeuk Jang, Feng Zheng, and Xiaoqian Wang. 'Constructing a Fair Classifier with Generated Fair Data'. In: Proceedings of the AAAI Conference on Artificial Intelligence 35.9 (May 2021), pp. 7908-7916. ISSN: 2374-3468. DOI: 10.1609/aaai.v35i9.16965 . (Visited on 04/17/2023).

Atoosa Kasirzadeh and Andrew Smart. 'The Use and Misuse of Counterfactuals in Ethical Machine Learning'. In: Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency . Virtual Event Canada: ACM, Mar. 2021, pp. 228-236. ISBN: 978-1-45038309-7. DOI: 10.1145/3442188.3445886 . (Visited on 02/13/2023).

Michael Kearns et al. 'Preventing Fairness Gerrymandering: Auditing and Learning for Subgroup Fairness'. In: Proceedings of the 35th International Conference on Machine Learning . PMLR, July 2018, pp. 2564-2572. (Visited on 02/13/2023).

Jon Kleinberg, Sendhil Mullainathan, and Manish Raghavan. 'Inherent Trade-Offs in the Fair Determination of Risk Scores'. In: Proceedings of Innovations in Theoretical Computer Science (ITCS), 2017 (Sept. 2016). DOI: 10.48550/arXiv.1609.05807 . (Visited on 02/13/2023).

Matt J Kusner et al. 'Counterfactual Fairness'. In: Advances in Neural Information Processing Systems . Vol. 30. Curran Associates, Inc., 2017. (Visited on 02/13/2023).

Peizhao Li and Hongfu Liu. 'Achieving Fairness at No Utility Cost via Data Reweighing with Influence'. In: Proceedings of the 39th International Conference on Machine Learning . PMLR, June 2022, pp. 12917-12930. (Visited on 02/13/2023).

Maggie Makar and Alexander D'Amour. 'Fairness and Robustness in Anti-Causal Prediction'. In: Transactions on Machine Learning Research (Jan. 2023). ISSN: 2835-8856. (Visited on 02/13/2023).

Karima Makhlouf, Sami Zhioua, and Catuscia Palamidessi. 'Survey on Causal-based Machine Learning Fairness Notions'. In: arXiv:2010.09553 [cs] (Feb. 2022). arXiv: 2010.09553 [cs] . (Visited on 04/21/2022).

Alexandre Marcellesi. 'Is Race a Cause?' In: Philosophy of Science 80.5 (Dec. 2013), pp. 650659. ISSN: 0031-8248, 1539-767X. DOI: 10.1086/673721 . (Visited on 05/18/2022).

Razieh Nabi and Ilya Shpitser. 'Fair Inference on Outcomes'. In: Proceedings of the AAAI Conference on Artificial Intelligence 32.1 (Apr. 2018). ISSN: 2374-3468, 2159-5399. DOI: 10.1609/aaai.v32i1.11553 . (Visited on 08/21/2023).

Hamed Nilforoshan et al. 'Causal Conceptions of Fairness and Their Consequences'. In: Proceedings of the 39th International Conference on Machine Learning . PMLR, June 2022, pp. 16848-16887. (Visited on 02/13/2023).

Judea Pearl and Rina Dechter. 'Learning Structure from Data: A Survey'. In: Proceedings COLT '89 (1989), pp. 30-244.

Drago Plecko and Elias Bareinboim. Causal Fairness Analysis . July 2022. arXiv: 2207.11385 [cs, stat] . (Visited on 08/05/2023).

Geoff Pleiss et al. 'On Fairness and Calibration'. In: Advances in Neural Information Processing Systems . Vol. 30. Curran Associates, Inc., 2017. (Visited on 01/08/2023).

Bernhard Schölkopf et al. 'Towards Causal Representation Learning'. In: Special Issue of Proceedings of the IEEE - Advances in Machine Learning and Deep Neural Networks (Feb. 2021). DOI: 10.48550/arXiv.2102.11107 . (Visited on 02/13/2023).

Shubham Sharma et al. 'Data Augmentation for Discrimination Prevention and Bias Disambiguation'. In: Proceedings of the AAAI/ACM Conference on AI, Ethics, and Society . New York NY USA: ACM, Feb. 2020, pp. 358-364. ISBN: 978-1-4503-7110-0. DOI: 10.1145/ 3375627.3375865 . (Visited on 08/21/2023).

Peter Spirtes and Kun Zhang. 'Causal Discovery and Inference: Concepts and Recent Methodological Advances'. In: Applied Informatics 3.1 (Dec. 2016), p. 3. ISSN: 2196-0089. DOI: 10.1186/s40535-016-0018-x . (Visited on 05/20/2022).

Megha Srivastava, Hoda Heidari, and Andreas Krause. 'Mathematical Notions vs. Human Perception of Fairness: A Descriptive Approach to Fairness for Machine Learning'. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining . Anchorage AK USA: ACM, July 2019, pp. 2459-2468. ISBN: 978-1-4503-6201-6. DOI: 10.1145/3292500.3330664 . (Visited on 02/13/2023).

Pietro G. Di Stefano, James M. Hickey, and Vlasios Vasileiou. 'Counterfactual Fairness: Removing Direct Effects through Regularization'. In: CoRR abs/2002.10774 (2020). arXiv: 2002.10774 .

Tyler J. VanderWeele and Whitney R. Robinson. 'On the Causal Interpretation of Race in Regressions Adjusting for Confounding and Mediating Variables:' in: Epidemiology 25.4 (July 2014), pp. 473-484. ISSN: 1044-3983. DOI: 10.1097/EDE.0000000000000105 . (Visited on 05/18/2022).

Victor Veitch et al. 'Counterfactual Invariance to Spurious Correlations in Text Classification'. In: Advances in Neural Information Processing Systems . Ed. by M. Ranzato et al. Vol. 34. Curran Associates, Inc., 2021, pp. 16196-16208.

Sahil Verma and Julia Rubin. 'Fairness Definitions Explained'. In: Proceedings of the International Workshop on Software Fairness . Gothenburg Sweden: ACM, May 2018, pp. 1-7. ISBN: 978-1-4503-5746-3. DOI: 10.1145/3194770.3194776 . (Visited on 04/03/2022).

Yoav Wald et al. 'On Calibration and Out-of-Domain Generalization'. In: Advances in Neural Information Processing Systems . Oct. 2021. (Visited on 02/13/2023).

Yixin Wang and Michael I. Jordan. 'Desiderata for Representation Learning: A Causal Perspective'. In: Advances in neural information processing systems (Sept. 2021). DOI: 10.48550/ arXiv.2109.03795 . (Visited on 02/13/2023).

Yongkai Wu, Lu Zhang, and Xintao Wu. 'Counterfactual Fairness: Unidentification, Bound and Algorithm'. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence . Macao, China: International Joint Conferences on Artificial Intelligence Organization, Aug. 2019, pp. 1438-1444. ISBN: 978-0-9992411-4-1. DOI: 10.24963/ijcai. 2019/199 . (Visited on 02/12/2023).

Yongkai Wu et al. 'PC-Fairness: A Unified Framework for Measuring Causality-Based Fairness'. In: Advances in Neural Information Processing Systems . Ed. by H. Wallach et al. V ol. 32. Curran Associates, Inc., 2019.

Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. 'Mitigating Unwanted Biases with Adversarial Learning'. In: Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society . New Orleans LA USA: ACM, Dec. 2018, pp. 335-340. ISBN: 978-1-4503-6012-8. DOI: 10.1145/3278721.3278779 . (Visited on 02/13/2023).

Guanhua Zhang et al. 'Fairness Reprogramming'. In: Advances in Neural Information Processing Systems . Oct. 2022. (Visited on 01/08/2023).

Han Zhao et al. 'Conditional Learning of Fair Representations'. In: International Conference on Learning Representations . Mar. 2020. (Visited on 02/13/2023).

Han Zhao et al. 'Fundamental Limits and Tradeoffs in Invariant Representation Learning'. In: Journal of Machine Learning Research 23.340 (2022), pp. 1-49.

Aoqi Zuo et al. 'Counterfactual Fairness with Partially Known Causal Graph'. In: Advances in Neural Information Processing Systems . Oct. 2022. (Visited on 02/13/2023).

A Proofs

Theorem 1. Let F CF be the set of all counterfactually fair predictors. Let ℓ be a proper scoring rule (e.g., square error, cross entropy loss). Let the counterfactually fair predictor that minimizes risk on the training distribution X,Y,A ∼ P be:

Then, f ∗ also minimizes risk on the target distribution X,Y,A ∼ Q with no selection effects, i.e.,

if either of the following conditions hold:

The association between Y and A is due to selection on label and the marginal distribution of the label Y is the same in each distribution, i.e., P ( Y ) = Q ( Y ) .

The association between Y and A is due to selection on predictors.

Proof. Counterfactual fairness is a case of counterfactual invariance. By Lemma 3.1 in Veitch et al. [47], this implies X is X ⊥ A -measurable. Therefore,

Following the same reasoning as Theorem 4.2 in Veitch et al. [47], it is well-known that under squared error or cross entropy loss the risk minimizer is f ∗ ( x ⊥ A ) = E P [ Y | x ⊥ A ] . Because the target distribution Q has no selection (and no confounding because A is exogenous in the case of counterfactual fairness), the risk minimizer in the target distribution is the same as the counterfactually fair risk minimizer in the target distribution, i.e., E Q [ Y | x ] = E Q [ Y | x ⊥ A ] . Thus our task is to show E P [ Y | x ⊥ A ] = E Q [ Y | x ⊥ A ] .

Selection on label is shown in Figure 2b. Because X ⊥ A does not d-separate Y and A , f ∗ ( X ) depends on the marginal distribution of Y , so we need an additional assumption that P ( Y ) = Q ( Y ) . We can use this with Bayes' theorem to show the equivalence of the conditional distributions,

where the first and fourth lines follow from Bayes' theorem, the second line follows from the causal structure ( X causes Y ), and the third line follows from the assumption that P ( Y ) = Q ( Y ) . This equality of distributions implies equality of expectations.

Selection on predictors is shown in Figure 2c. Because X ⊥ A d-separates Y and A , f ∗ ( X ) does not depend on the marginal distribution of Y , so we immediately have an equality of conditional distributions, Q ( Y | X ⊥ A ) = P ( Y | X ⊥ A ) , and equal distributions have equal expectations, E P [ Y | x ⊥ A ] = E Q [ Y | x ⊥ A ] .

Theorem 2. Let the causal structure be a causal DAG with X ⊥ Y , X ⊥ A , Y , and A , such as in Figure 2. Assume faithfulness between A , Y , and f ( X ) . Then:

Counterfactual fairness is equivalent to demographic parity if and only if there is no unblocked path between X ⊥ A and A .

Counterfactual fairness is equivalent to equalized odds if and only if all paths between X ⊥ A and A , if any, are either blocked by a variable other than Y or unblocked and contain Y .

X

⊥

A

Y

A

X

⊥

A

Y

A

Counterfactual fairness is equivalent to calibration if and only if all paths between Y and A , if any, are either blocked by a variable other than X ⊥ A or unblocked and contain X ⊥ A .

Proof. For a predictor f ( X ) to be counterfactually fair, it must only depend on X ⊥ A .

By Definition 1, demographic parity is achieved if and only if X ⊥ A ⊥ A . In a DAG, variables are dependent if and only if there is an unblocked path between them (i.e., no unconditioned collider in which two arrows point directly to the same variable). For example, Figure 3a shows an unblocked path between A and X ⊥ A .

By Definition 2, equalized odds are achieved if and only if X ⊥ A ⊥ A | Y . If there is no path between X ⊥ A and A , then X ⊥ A and A are independent under any conditions. If there is a blocked path between X ⊥ A and A , and it has a block that is not Y , then X ⊥ A and A remain independent because a blocked path induces no dependence. If there is an unblocked path between X ⊥ A and A that contains Y , then Y d-separates X ⊥ A and A , so X ⊥ A and A remain independent when conditioning on Y . On the other hand, if there is a blocked path between X ⊥ A and A and its only block is Y , then conditioning on the block induces dependence. If there is an unblocked path that does not contain Y , then X ⊥ A and A are dependent.

With Definition 3, we can apply analogous reasoning to the case of equalized odds. Calibration is achieved if and only if Y ⊥ A | X ⊥ A . If there is no path between Y and A , then Y and A are independent under any conditions. If there is a blocked path between Y and A , and it has a block is not X ⊥ A , then Y and A remain independent because a blocked path induces no dependence. If there is an unblocked path between Y and A that contains X ⊥ A , then X ⊥ A d-separates Y and A , so Y and A remain independent when conditioning on X ⊥ A . On the other hand, if there is a blocked path between Y and A and its only block is X ⊥ A , then conditioning on the block induces dependence. If there is an unblocked path that does not contain X ⊥ A , then Y and A are dependent.

Corollary 2.1. Let the causal structure be a causal DAG with X ⊥ Y , X ⊥ A , Y , and A , such as in Figure 2. Assume faithfulness between A , Y , and f ( X ) . Then:

For a binary classifier, counterfactual fairness is equivalent to conditional demographic parity if and only if, when a set of legitimate factors L is held constant at level l , there is no unblocked path between X ⊥ A and A .

For a binary classifier, counterfactual fairness is equivalent to false positive error rate balance if and only if, for the subset of the population with negative label (i.e., Y = 0 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a binary classifier, counterfactual fairness is equivalent to false negative error rate balance if and only if, for the subset of the population with positive label (i.e., Y = 1 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to balance for negative class if and only if, for the subset of the population with negative label (i.e., Y = 0 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to balance for positive class if and only if, for the subset of the population with positive label (i.e., Y = 1 ), there is no path between X ⊥ A and A , a path blocked by a variable other than Y , or an unblocked path that contains Y .

For a probabilistic classifier, counterfactual fairness is equivalent to predictive parity if and only if, for the subset of the population with positive label (i.e., D = 1 ), there is no path between Y and A , a path blocked by a variable other than X ⊥ A , or an unblocked path that contains X ⊥ A .

For a probabilistic classifier, counterfactual fairness is equivalent to score calibration if and only if there is no path between Y and A , a path blocked by a variable other than X ⊥ A , or an unblocked path that contains X ⊥ A .

Proof. Each of these seven metrics can be stated as a conditional independence statement, as shown in Table 1, and each of the seven graphical tests of those statements can be derived from one of the three graphical tests in Theorem 2. Note that the graphical test for a binary classifier is the same as that for the corresponding probabilistic classifiers because the causal graph does not change when f ( X ⊥ A ) changes from a binary-valued (i.e., f ( X ) ∈ { 0 , 1 } ) function to a probability-valued function (i.e., f ( X ) ∈ [0 , 1] ).

From demographic parity:

Conditional demographic parity is equivalent to demographic parity when some set of legitimate factors L is held constant at some value l .

From equalized odds:

False positive error rate balance is equivalent to equalized odds when considering only the population with negative label (i.e., Y = 0 ).

False negative error rate balance is equivalent to equalized odds when considering only the population with positive label (i.e., Y = 1 ).

Balance for negative class is equivalent to equalized odds for probabilistic classifiers when considering only the population with negative label (i.e., Y = 0 ).

Balance for positive class is equivalent to equalized odds for probabilistic classifiers when considering only the population with negative label (i.e., Y = 1 ).

From binary calibration:

Predictive parity is equivalent to binary calibration when considering only the population with positive label (i.e., D = 1 ).

Score calibration is equivalent to binary calibration for probabilistic classifiers.

Corollary 2.2. Assume faithfulness between A , Y , and f ( X ) .

Under the graph with measurement error as shown in Figure 2a, a predictor achieves counterfactual fairness if and only if it achieves demographic parity.

Under the graph with selection on label as shown in Figure 2b, a predictor achieves counterfactual fairness if and only if it achieves equalized odds.

Under the graph with selection on predictors as shown in Figure 2c, a predictor achieves counterfactual fairness if and only if it achieves calibration.

Proof. By Theorem 2:

Observe in Figure 2a that the only path between X ⊥ A and A is blocked by Y , so counterfactual fairness implies demographic parity. Because the only block in that path is Y , counterfactual fairness does not imply equalized odds. And the only path between Y and A (a parent-child relationship) is unblocked and does not contain X ⊥ A , so counterfactual fairness does not imply calibration.

Observe in Figure 2b that the only path between X ⊥ A and A is unblocked (because S is necessarily included in the predictive model), so counterfactual fairness does not imply demographic parity. Because that path contains Y , counterfactual fairness implies equalized odds. And the only path between Y and A is unblocked (because S is necessarily included in the predictive model) and does not contain X ⊥ A , so counterfactual fairness does not imply calibration.

Observe in Figure 2c that the only path between X ⊥ A and A is unblocked (because S is necessarily included in the predictive model), so counterfactual fairness does not imply demographic parity. Because that path does not contain Y , counterfactual fairness does not imply equalized odds. And the only path between Y and A is unblocked (because S is necessarily included in the predictive model) and contains X ⊥ A , so counterfactual fairness implies calibration.

Theorem 3. Let X be an input dataset X ∈ X with a binary label Y ∈ Y = { 0 , 1 } and protected class A ∈ { 0 , 1 } . Define a predictor:

where f is a proper scoring rule. Define another predictor:

If the association between Y and A is purely spurious, then f CF is counterfactually fair.

Proof. Notice that f CF does not depend on A directly because the realization of A is not in the definition. To show that f CF also does not depend on A indirectly (i.e., through X ), consider that a purely spurious association means that Y ⊥ X | X ⊥ A , A . Therefore, the naive predictor:

Because X ⊥ A is the component of X that is not causally affected by A , there is no term in f CF that depends on A , which means f CF is counterfactually fair.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work aims to provide guidance for contextually-informed algorithmic fairness criteria selection. The work motivates counterfactual fairness from its legal and ethical foundations. The primary contribution of the work is to detail a set of cases (data generating processes and selection mechanisms) where counterfactually fair predictors are accuracy-optimal in the (unselected) target distribution and consistent with specific correlational fairness criteria in the observed data.\n\nSTRENGTHS:\n*  The work is generally well-written and clear.\n* The arguments and key results of this work provide a new perspective on cases where counterfactual fairness is consistent with predicting outcomes under particular selection mechanisms and data generating processes. While the results regarding the mapping between counterfactual fairness and observational fairness criteria largely follow from prior work on counterfactual invariance, this work does expand upon the prior work meaningfully.\n\nWEAKNESSES:\nMajor:\n* There are no experiments with either simulated or real-world data. At a minimum, it would be beneficial to include simulated experiments that verify the basic claims regarding the optimality of the counterfactually-fair predictors and the relationships between counterfactual fairness and the observational fairness criteria under different data generating processes. \n* The restriction of the scope of the work to the purely spurious setting (line 201) limits the generalizability of the claims and this is largely not acknowledged. The work makes the claim that the purely spurious setting where association between group attributes and outcomes are due to selection is reasonable to cover the space of problems where fairness is of interest. I would argue that this is a serious limitation of the work because of the aim to provide guidance that broadly applies to the space of settings where it is of interest to evaluate fairness and bias considerations.\n  *  For an example where the spurious setting may not hold, consider that in medical applications, structural racism and social determinants of health contribute to differences in observed health status across racial groups in addition to the differences in access to care that may be considered as selection effects. This can induce a difference in the conditional Y | X across subgroups (effectively an association between A and Y not mediated by X) that arises because race serves as a proxy for exposure to structural racism and social determinants. To the best of my understanding, this setting does not map cleanly on to the type of selection graphs considered in this work.\n\nMinor:\n* There is inconsistency in which variable is used to the ground truth outcome versus the noisy outcome with measurement error. In lines 112-113, Y-tilde is considered the noisy label and Y the ground truth. Elsewhere in the paper, Y-tilde is considered the ground truth.\n\nQUESTIONS:\n*  To what extent should the statements about the observable implications of counterfactual fairness be considered if and only if statements versus unidirectional statements? For instance, under Corollary 2.1.1 does demographic parity imply counterfactual fairness under the causal measurement error graph?\n* Could you please add additional detail to prove the result regarding predictive parity? I generally follow the claim that binary calibration for binary classifiers is analogous to score calibration for risk scores, but it is not clear how conditioning on Y=1 yields predictive parity (which is confusingly referred to as D=1 in the supplement). It is also unclear whether the argument assumes that score calibration implies predictive parity. In general, this is not true (see Chouldechova 2017 Arxiv version, discussion immediately following definition 2.2 [1]).\n\n1. Chouldechova, Alexandra. \"Fair prediction with disparate impact: A study of bias in recidivism prediction instruments.\" arXiv preprint arXiv:1703.00056 (2017).\n\nMinor suggestions:\n*  Introduce the notion that a counterfactually fair predictor depends only on X_{A}^{\\perp} in the main text rather than in the supplementary material\n*  Replace “correlational” with “observational”\n*  Replace “persecuted” with “prosecuted”\n\nLIMITATIONS:\nIt would be beneficial for this work to expand upon the potential limits of the generalizability of its claims, especially due to the assumption of the purely spurious setting. Relatedly, it is not clear how well the claims are applicable outside of the set of graphs and selection mechanisms considered in this work.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-04"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe authors show that under various causal graphs involving protected attributes, features and labels, that a counterfactually fair classifier achieves a specific association-based fairness metric. From this, they suggest a pipeline to detect counterfactual fairness.\n\nSTRENGTHS:\nThe authors do a really good job making the point that counterfactual fairness, which is what is desired in a lot of theory, can be evaluated using more standard associational fairness metrics when assuming (or discovering) particular causal graphs. \n\nThe math seems to be correct.\n\nThe findings are useful to push causal fairness further into practice.\n\nWEAKNESSES:\nThe organization of the paper can be improved. For example, a lot of the beginning of Section 4 would make more sense in the introduction. Figure 2 and its associated introductory text would make more sense in Section 5. \n\nI don't think the impossibility theorems need to be emphasized so much. They're cute, but don't really give us anything practical, which this paper tries to do.\n\nFigure 2: please put the corresponding correlational fairness metric in the main figure rather than only mentioning them in the caption.\n\nLine 48: I don't think Ref [3] does data augmentation. However, this reference does: https://doi.org/10.1145/3375627.3375865. \n\nFigure 1 mentions data generation and regularization, but they don't come up in the text. I think bringing up examples of each would be useful to the reader, e.g. https://proceedings.mlr.press/v161/ahuja21a.html and https://arxiv.org/abs/2002.10774.\n\nIt would be useful to discuss other theoretical work on the fairness-accuracy tradeoff, especially papers that relate this discussion to the presence or absence of different kinds of bias, e.g. https://proceedings.mlr.press/v119/dutta20a.html. \n\nI understand the difficulty of empirical validation when dealing with counterfactuals, but the paper would be a lot stronger if the pipeline of Figure 1 were carried out to show the steps tangibly.\n\nQUESTIONS:\nCan you try to relate the evaporation of the tradeoff that you show to the argument made by Dutta et al. (reference given in the Weaknesses section of the review) and point out similarities and differences. It would also be good to relate the decomposition of X on line 268 to Dutta's other work https://doi.org/10.1609/aaai.v34i04.5794.\n\nLIMITATIONS:\nIt would be good if the authors could be more explicit on how they obtain/discover the causal graph because it is quite important. That limitation hasn't been discussed enough. As part of that discussion, they may wish to mention causal fairness methods that do not require the entire causal graph a priori and are able to get pieces of it through a group-testing based approach which require a sublinear number of conditional independence tests.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work investigated two important coutnterfactual fairness problems: (1) When will the counterfactually fair predictor also be the risk minimizer on the target distribution? (2) How do the classic statistical fairness metrics correspond to counterfactual fairness? In response to these questions, this work contextualized the problem in three causal DAG where selection bias may exist. To respond the first question, Theorem 1 shows under certain conditions that the counterfactual fair predictor is in fact accuracy-optimal. To respond the second question, Theorem 2 and Corollary 2.2 characterized the counterfactual fairness using the knowledge of the underlying causal context.  The success in responding the two questions will motivate a pipeline to achieve counterfactual fairness without performance degradation.\n\nSTRENGTHS:\nThis work bridges the gap between counterfactual fairness and statistical fairness metrics in the presence of selection biases. The studied problem is novel, and the theoretical results are of high quality. The motivation and the presentation of the whole paper is clear, and can provide high-level insights for fairness researchers and practitioners.\n\nWEAKNESSES:\nI did not fully check the proof details but only read the sketch. It looks like the statements heavily depend on the three causal DAGs in Figure 2. For the theoretical results, the assumptions for each statement can be made more clearly.\n\nQUESTIONS:\n1. In Figure 2(b), $X^\\perp_A$ is the effect of outcome $Y$. What is the implication of such causal structure in the real world?\n2. In Figure 2(c), the selection variable $S$ is the causal effect of protected class $A$ and observed outcome $Y$. What if the selection $S$ is modeled as the cause of the outcome $Y$? Do the statements still hold?\n\nLIMITATIONS:\nThe authors did not address the limitations of how the counterfactual fairness can be evaluated in the real world.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-06"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper explores a connection between counterfactual fairness and correlation-based fairness metrics, exhibiting causal graph settings in which counterfactual fairness implies specific correlational metrics are satisfied. The paper further connects this mapping to the accuracy-fairness tradeoff.\n\nSTRENGTHS:\nI think the mapping between causal/counterfactual notions of fairness and metric-based fairness is useful. The paper does a good job of integrating several literatures into a coherent frame. The specific causal scenarios that relate counterfactual fairness and correlational fairness are useful, although I'm not well equipped enough in the structural causal modeling literature to understand the significance of this as a contribution.\n\nWEAKNESSES:\nI think the paper itself foresees my largest concern: it's not clear what settings these results apply in. While I'm not suggesting, as the conclusion tries to defend against, a full empirical validation of the theory, it would be nice if there was at least some attempt at mapping the causal graphs in Figure 2 to specific scenarios where the relationship being offered is relevant and an explanation of the relevance in that scenario. This exists, but way down in Section 5. Help your reader by making these connections right away.\n\nThe literature on fairness (the human value) as operationalized by fairness (statistical metrics) strongly suggests that the problem with choosing metrics is less a fairness/accuracy tradeoff or impossibility of satisfying multiple metrics, but the need to contextualize the model well in the application, understanding the cost and meaning of things like errors and the value of their avoidance. It's not obvious that connections to counterfactual fairness help with this problem, and if they don't, that's a limitation worth articulating.\n\nThe paper often cites into the literature in a way that only thinly and tenuously represents the large issues at play in the topic of the paper. I'd like to see more alignment between supporting sources and the content of the paper. For example, the citation of Jacobs & Wallach is offered as a problem with the difficulty of measurement error, but the paper is mostly about how to establish validity of models through explicit measurement modeling, a thing not considered by the methods in this paper at all.\n\nNit: the paper consistently uses the word \"persecuted\" instead of \"prosecuted\" (e.g., at 53, 264, and 266, and maybe elsewhere?)\nNit: the symbol l in Theorem 1 should probably be $\\ell$.\nNit: the discussion of gender at 164 is highly oversimplified and is probably actually a description of biological sex. Later text clarifies this, but the claims are a little vague as currently stated.\nNit: \"obtain\" at 178 is probably the wrong word?\n\nQUESTIONS:\nHow can the connections offered in this paper be oeprationalized for real-world cases? Many applications are mentioned, but the value of the connections is only loosely coupled to these.\n\nLIMITATIONS:\nThere is some defensive posturing in the conclusion about the lack of real-world connection, which is probably a limitation to address by improving the connections rather than by disclaiming the possibility of doing this (since making those connections is the ostensible value of the paper).", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-08"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper provides a new way to analyze the fairness-accuracy tradeoff in many fairness definition through the lens of counterfactual fairness. The authors prove that, under certain conditions, the counterfactually fair predictor is optimal when the target is OOD generalization. The theoretical analyses build the connection between counterfactual fairness and 10 well-known correlational fairness.\n\nSTRENGTHS:\nS1. Interesting way to connect counterfactual fairness, out-of-distribution generalization and other fairness definitions.\n\nS2. Technically sound proof on the theorems and corollaries.\n\nS3. Writing quality is good.\n\nWEAKNESSES:\nW1. Some statements/assumptions need more comprehensive illustration.\n\nW2. Interesting theoretical analyses on counterfactual fairness\n\nW3. The authors use impossibility theorem as one motivation, but more discussion about the technical analyses to impossibility theorem would better position this paper.\n\nW4. Title is a bit misleading to me.\n\nQUESTIONS:\nQ1. I agree that assumptions about the purely spurious relationship between $Y$ and $A$ helps with theorem 1. But for the race and zip code example in lines 203 -- 205, can we simply say the bias is due to selection effect? It is obvious that population from different demographic groups are distributed unevenly in a community, and the selection effect may further amplify the bias. Can we simply characterize it as due to selection effect only? \n\nQ2. Is it possible to elaborate more on the assumption about decomposing $X$ into $X_{\\perp A}$ and $X_{\\perp Y}$? Is it a linear decomposition of $X$? It is a pretty strong assumption to decompose $X$ and I am not sure whether it is reasonable or not.\n\nQ3. What is the relationship between the proposed counterfacutal fairness-based analysis to impossibility theorem? The authors use impossibility theorem as one motivation for studying counterfactual fairness, but no more discussion about how these analyses are related to impossibility theorem is included.\n\nQ4. Where is the evaluation on simulated data? The authors mention it as a contribution but I could not find it. If I miss it, it would be good to provide pointers.\n\nQ5. How does the proposed analyses help **select** the algorithmic fairness metrics? Some discussions (or maybe a case study) about how to use the proposed analyses to select fairness metrics would help.\n\nLIMITATIONS:\nL1. Many theoretical analysis in the paper assume the decompostion of $X$ into two parts. But it is unclear whether this assumption is reasonable.\n\nL2. It might be good to draw figures for some concepts for better clarity (e.g., illustrative figures for unblocked path and the correspondence between counterfactual fairness and correlational fairness). And it would be good to recall Figure 2 when discussing related technical details (e.g., theorem 2).\n\nL3. The authors mention that the theorems hold on simulated data, but no evaluation is found.\n\nL4. It would be great to better connect the content with the title `select algorithmic fairness metrics'.\n\nL5. Please carefully check typos in the paper, e.g., `if they had if they were classified negatively' $\\rightarrow$ `if they were classfied negatively'.\n\n================== Post-rebuttal ==================\nThe authors have addressed my concern so I am raising my score.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-08"}