{'fraction_non_alphanumeric': 0.037437995582751, 'fraction_numerical': 0.0121655382164452, 'mean_word_length': 4.5273163898339, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fair When Trained, Unfair When Deployed: Observable Fairness Measures are Unstable in Performative Prediction Settings

Many popular algorithmic fairness measures depend on the joint distribution of predictions, outcomes, and a sensitive feature like race or gender. These measures are sensitive to distribution shift: a predictor which is trained to satisfy one of these fairness definitions may become unfair if the distribution changes. In performative prediction settings, however, predictors are precisely intended to induce distribution shift. For example, in many applications in criminal justice, healthcare, and consumer finance, the purpose of building a predictor is to reduce the rate of adverse outcomes such as recidivism, hospitalization, or default on a loan. We formalize the effect of such predictors as a type of concept shift-a particular variety of distribution shift-and show both theoretically and via simulated examples how this causes predictors which are fair when they are trained to become unfair when they are deployed. We further show how many of these issues can be avoided by using fairness definitions that depend on counterfactual rather than observable outcomes.


Introduction
Much of the algorithmic fairness literature is concerned with so-called observable or statistical fairness criteria. These criteria consider the relationship between the predictor, a sensitive feature, and a strictly observable outcome, such as whether a person recidivates or has an adverse health event. For example, in a binary classification setting with a binary sensitive feature, the criterion of equalized odds requires the classifier to have equal true and false positive rates for both groups [Hardt et al., 2016], while equality of predictive values requires the classifier to have equal positive and negative predictive values for both groups [Mitchell et al., 2021].
In many settings, however, predictors are designed to inform decisions that affect the very outcomes that are the target of prediction. This is true for example in risk assessment, when the predictor is meant to estimate the risk of an adverse outcome so that a decision maker can intervene in order to preempt that outcome. For example, a judge might choose to detain a defendant pretrial to prevent recidivism, or a doctor might choose to treat a patient to prevent complications. Such performative predictors (the term used by Perdomo et al. [2020]) induce distribution shift, which affects predictive performance. In practice, this may be dealt with by periodically retraining the predictor. Recent work has identified conditions under which iteratively retrained performative predictors converge to an equilibrium [Perdomo et al., 2020], while other work has examined how performative predictors, with or without fairness considerations, affect the welfare of groups who are subject to their predictions [Ensign et al., 2018, Hu and Chen, 2018, Hashimoto et al., 2018, Liu et al., 2018, Mishler and Dalmasso, 2019, D'Amour et al., 2020, Zhang et al., 2020.
In this paper, we focus on the interaction between performativity and fairness. Specifically, we show that a performative predictor which appears to satisfy an observable fairness criterion when trained may not satisfy it when deployed. This is because performative predictors are designed to change a decision making process, which in turn changes observable outcomes, resulting in concept shift. Fairness definitions which depend on observable outcomes may no longer be satisfied when the distribution changes. Although this observation is extremely simple, we have not seen it clearly articulated in the literature.
Naturally, a predictor which is trained to be fair with respect to one population may be unfair if it is deployed in a different population, but performativity can induce unfairness even when the populations in which the predictor is trained and deployed are the same, i.e. there is no covariate shift. Perversely, this effect may be larger the more the predictor affects decision making, even though the point of training a predictor in such a setting is to improve decision making in order to improve outcomes. We argue that counterfactual fairness criteria, which are not sensitive to observable outcomes and hence do not suffer this limitation, are preferable in this type of setting.
The remainder of the paper is organized as follows. We define the problem setting in Section 2 and discuss related work in Section 3. We formalize the effects of interest theoretically in Section 4 and with simple simulated examples in Section 5. In Section 6, we argue that the use of counterfactual outcomes and associated counterfactual fairness criteria avoids these issues. We conclude in Section 7.

Notation and Problem Setting
Let A ∈ {0, 1} denote a sensitive feature such as race or sex; X ∈ X a set of additional covariates such as medical, criminal, or financial history; D ∈ {0, 1} a binary decision or treatment variable such as whether to hospitalize a patient, detain a defendant, or issue credit; and Y ∈ {0, 1} a binary outcome that depends on D, such as patient death, recidivism, or default on a loan. We use "group 0" and "group 1" to refer to the A = 0 and A = 1 groups. Note that the issues we identify do not depend on the use of binary variables; our analyses can all be generalized to more complex cases.
We identify potential or counterfactual outcomes with the notation Y D=d . This refers to the outcome that would be observed if, possibly contrary to fact, the decision variable were set to d. For example, if Y represents whether a defendant recidivates, and D represents whether a defendant is released (D = 0) or detained (D = 1) pre-trial, then Y D=0 represents whether a defendant would recidivate if released, while Y D=1 represents whether they would recidivate if detained. (Presumably, we'd have Y D=1 ≡ 0, insofar as recidivism is not possible under detention.) Importantly, we only observe a single outcome for each individual, since each individual is either detained or not. The other potential outcome remains counterfactual. This is the "fundamental problem of causal inference" [Holland, 1986]. More formally, we make the following assumption: (A1) says that for each individual, the outcome that is observed is the potential outcome corresponding to the treatment they actually receive, meaning for example that an individual's outcome does not depend on the treatment status of others. See Holland [1986], Rubin [2005] for an overview of the potential outcomes framework.
We suppose that a classifier R : A × X → {0, 1} is trained to predict Y from the covariates, and that R is then deployed to support future decisions D which may themselves affect Y . We contrast the accuracy and fairness of R with respect to Y at two time points t: before it is deployed ("pre"), i.e. at training time; and after it is deployed ("post"), i.e. with respect to some future test data distribution. We use subscripts t to indicate time, so that for example P pre and E pre refer to the distribution of the training data and expectations over that distribution, respectively, while P post and E post refer to the corresponding quantities in the test data. Quantities without subscripts are assumed not to change over time.

Fairness criteria
Many fairness criteria are defined with respect to the joint distribution of A, R, and Y . We consider popular fairness criteria that depend on the following quantities: the group-specific prediction rates (P(R = 1 | A)); positive predictive values (PPVs: P(Y = 1 | A, R = 1)) and negative predictive values (NPVs: P(Y = 0 | A, R = 0)); and the error rates, meaning the false positive rates (FPRs: P(R = 1 | A, Y = 0)), and false negative rates (FNRs: P(R = 0 | A, Y = 1)). The criterion of demographic parity requires R ⊥ ⊥ A, so that the prediction rates are the same for group 0 and group 1. Sufficiency or equality of predictive values requires that Y ⊥ ⊥ A | R, so that the PPVs are the same for group 0 and group 1, and likewise for the NPVs. Finally, separation or equalized odds requires that R ⊥ ⊥ A | Y , so that the FPRs and FNRs are the same for the two groups [Hardt et al., 2016, Barocas et al., 2019, Mitchell et al., 2021.
Counterfactual versions of these fairness-related quantities may be defined by for example substituting Y D=0 for Y . This substitution makes sense in risk assessment settings, where the goal is to estimate the risk of an adverse outcome absent some intervention, and where the use of observable fairness criteria in these settings can be misleading [Coston et al., 2020, Mishler et al., 2021.

Dataset shift
Dataset shift, or distribution shift, generally refers to a difference in distribution between training data and test data [Quiñonero-Candela et al., 2009, Moreno-Torres et al., 2012. In our setting, dataset shift may occur across the two time points. The two main types of dataset shift studied in the literature are: • covariate shift, when the marginal distribution of the features changes in time but the conditional distribution of the response given the features does not: • concept shift (or concept drift), when the marginal distribution of the features remains the same but the conditional distribution of the response given the features changes: Detecting and mitigating covariate shift with respect to predictor performance is an active area of research [Shimodaira, 2000, Sugiyama et al., 2007, Gretton et al., 2008, Tibshirani et al., 2020, Hu and Lei, 2020, and likewise for concept shift [Vorburger and Bernstein, 2006, Webb et al., 2018, Vovk, 2020. In the fairness literature, Singh et al. [2021] and Rezaei et al. [2021] have studied the effect of covariate shift on fair classifiers and how to mitigate it. In our work, by contrast, we show that introducing a predictor into a decision making context can induce concept shift for the response Y from pre-to post-deployment, even when no covariate shift is present. This concept shift can affect both the accuracy and fairness of the predictor.

Performative prediction and risk assessment
In many cases, the purpose of training a predictor is to improve decision making in order to improve overall outcomes. When a predictor is optimized for observable outcomes in such settings, then it is performative [Perdomo et al., 2020]: the predictor affects the very outcomes it aims to predict. One common setting where performative prediction occurs is risk assessment, in which the predictor targets an adverse outcome such as recidivism or a negative health event. Previous work has illustrated how optimizing predictors for observable accuracy in risk assessment can worsen rather than improving outcomes [Mishler and Dalmasso, 2019]. Here, we analyze fairness rather than accuracy. While previous work has shown that observable fairness criteria can be misleading in performative settings [Coston et al., 2020], we show how performativity causes predictors to fail to satisfy the very criteria they are trained to satisfy once they are introduced into a decision making context.
Perdomo et al. [2020] developed conditions under which an iteratively retrained predictor which targets observable outcomes will converge to an equilibrium. By contrast, we propose that in performative contexts, predictors should target counterfactual outcomes, which under reasonable conditions bypasses the issue of performativity and avoids the need for retraining.
In the next section, we illustrate how a change in the decision process (equivalently the "treatment propensity") can induce concept shift, which in turn can change the predictive values and error rates. This in turn can cause R to become (more) unfair with respect to equalized odds or equality of predictive values.

Theoretical analysis
If P pre and P post , the data generating processes at t = pre and t = post, can differ arbitrarily, then the fairness and accuracy of R can also differ arbitrarily across the two distributions. For example, if R is trained on one population and then deployed in a different population, then P pre (A, X), the distribution of the covariates at t = pre, may be completely different than at t = post, which may affect how R performs.
However, changes in accuracy and fairness are still likely to occur even if the two populations are identical and all that changes across the two time points is how decisions D are made. To formalize this, let U be a set of unobserved variables such that the vector W = (A, X, U ) is sufficient to deconfound the treatment process from the potential outcomes. That is, for d ∈ {0, 1}: In general, outside the context of randomized experiments, decisions are not marginally independent of potential outcomes, i.e. D ⊥ ⊥ Y D=d . For example, in the recidivism setting, judges aim to detain precisely those defendants who are at higher risk of recidivism were they to be released, meaning In order for the condition above to hold, W should include all observed and unobserved variables that are relevant to both the decision process and the outcome. Another way of understanding this is that conditional on W , the treatment assignment is essentially random.
For the remainder of the paper, we make the following assumption: The inclusion of the potential outcomes Y D=0 and Y D=1 means that the population does not change either in terms of (un)observed covariates or in terms of responsiveness to different treatments. Under assumption (A1), this means that the only way that outcomes can change is if the decision process changes. We make this point to emphasize that instability in observable fairness is intrinsic to this problem setting, even when the predictor is applied on exactly the same population on which it was trained. For convenience, define the following quantities: The quantities µ D=0 (W ) and µ D=1 (W ) are not indexed by t because under (A2) they do not change over time. Again, only the treatment propensity π t is allowed to change, reflecting the influence of the predictor R on the decision process once it is deployed. Since R is a deterministic function of A and X, and (A, X) ⊆ W , we could equivalently write π post (W ) as π post (W ) = P post (D = 1 | W, R), but we choose the simpler form for consistency with π pre .
The subsequent propositions show how changes in the treatment propensity π t from pre-to postdeployment can give rise to concept shift and changes in fairness. All proofs are in the appendix. Proposition 4.1 (Concept shift).
From (1), it is easy to see that if π post (W ) ≡ π pre (W ), then E post [Y | A, X] will in general not equal E pre [Y | A, X]: changes in the treatment propensity induce concept shift. We now turn to the fairness metrics discussed above. In the absence of covariate shift, the prediction rates do not change over time, since they don't involve outcomes. However, concept shift will generally induce a change in the predictive values and error rates.

Proposition 4.2 (Prediction rates). Under assumption
It follows immediately from Proposition 4.2 that a predictor that achieves demographic parity at training time also achieves demographic parity post-deployment; that is, concept shift does not affect demographic parity. Proposition 4.3 (Predictive values). Under (A1)-(A2), the PPV and NPV of R for group A = a at time t are given by ] Proposition 4.4 (Error rates). The FPR and FNR of R for group A = a at time t are given by Combining Propositions 4.1, 4.3, and 4.4, we see that if π pre ≡ π post , then the predictive values and error rates may change from pre-to post-deployment. If they change differentially for the A = 0 and A = 1 groups, then a predictor which is fair pre-deployment will be unfair (or less fair) post-deployment. This is illustrated in the next section.

Example Setting
We provide a simple example that illustrates how predictors which are fair when trained can become unfair when deployed.
For the purposes of setting up the problem, let f (p) = 10p 1−p+10p , for p ∈ (0, 1). That is, f multiplies the odds of p by 10.
In addition to the binary sensitive feature A, decision D, and outcome Y , suppose we have covariates X = (X (1) , X (2) ), with X (1) ∈ {0, 1} and X (2) ∈ R. Figure 1(a) shows a causal DAG representing the data-generating process that produces the training data. There are no unobserved confounders. The variable X (2) is independent of all the other variables, while the decision and outcome both depend on X (1) . The specific parameters of this process at time t = pre are as follows: A ∼ Bern(0.5) As one possible interpretation of this setting, suppose we are interested in consumers applying for a loan. Let A be sex, let X (1) indicate whether an applicant has high income, let D indicate whether the loan is approved, and let Y represent whether the applicant becomes a homeowner within a specified time window.
80% of applicants in group 0 are high income, vs. 60% in group 1. High income increases the likelihood of receiving a loan (P(D = 1)), and there is no difference in this propensity based on sex. Without the loan, low-income applicants have a 30% chance of becoming a homeowner, while high-income applicants have an 80% chance. With the loan, the odds of becoming a homeowner are multiplied by 10.
Suppose that a predictor R is introduced to help lenders decide whether to issue a loan. In many high-stakes settings, predictive tools cannot legally be used to render automatic decisions, and (a) DAG at time t = pre for the example setting.
(b) DAG at time t = post for Predictor 1 in the example setting.
(c) DAG at time t = post for Predictor 2 in the example setting. Figure 1: DAGs for the example setting. Red circles indicate that the predictor R is a function of X (1) (predictor 1) or X (2) (predictor 2). Red arrows indicate causal connections at time t = post that are not present at time t = pre, due to the influence of R.
decision makers have full discretion to utilize information from a predictive tool in a manner they see fit [Green, 2021]. Hence, decision making processes can in principle change arbitrarily after the introduction of a predictor. We examine the behavior of two possible predictors R, coupled with two possible changes in the decision process that result when R is deployed. Since our interest is in illustrating how changes in the decision process can render a "fair" predictor unfair in deployment, we do not belabor the mechanism by which R changes the decision process. Each predictor is trained using a training set of size 10,000.

Predictor 1
The first predictor we consider is defined by R(A, Since this R is a function of X (1) only, it follows from Figure 1(a) that at time t = pre, Y ⊥ ⊥ A | R, meaning R satisfies equality of predictive values.
For simplicity, the only quantity that changes over time in this scenario is P t (D = 1 | A = 1, R = 0), the loan approval rate for applicants in group 1 with a negative prediction. Relative to t = pre, the odds of approval for applicants in this group at t = post is multiplied by a value ranging from 1 to 10,000. This results in an increase in the loan approval probability for this group of between 0 and roughly 0.60. Although this example is simplified for the purposes of illustration, this increase could arise as a form of affirmative action, in which loan officers increase approvals for applicants in the disadvantaged group (the group with lower overall income) who might otherwise not become homeowners. Figure 2 shows the PPV, NPV, and accuracy at t = post for groups 0 and 1, as well as the absolute differences between the two groups. When there is no change in approval rates from pre to post (the point 0 on the x-axis), the PPV and NPV remain the same for the two groups. As the change in loan approval rates for group 1 increases, the NPVs for this group decrease, which causes the difference in NPVs between the two groups to increase. That is, R becomes less and less fair at t = post, according to the equality of predictive values criterion. Furthermore, the greater the impact of R on the decision process, the worse the accuracy becomes for group 1. This causes the difference in accuracy between the two groups to increase.
Once again, for simplicity we only vary one component of the decision process: P t (D = 1 | A = 1, R = 1), the loan approval rate for applicants in group 1 with a positive prediction. Relative to t = pre, the odds of approval for applicants in this group at t = post is multiplied by a value ranging from 1 to 10,000. This results in an increase in the loan approval rate for this group of between 0 and roughly 0.32. This could represent a different type of affirmative action from the previous section, in which loan approvals are increased for the complementary subset of applicants in the disadvantaged group, namely those who are predicted to achieve home ownership. , and accuracy for the two groups at time t = post. abs_diff represents the absolute difference between the two groups in the relevant metric. The x-axis represents the change in loan approval rates for group 1 at t = post relative to t = pre, with all other components of the decision process held constant. R is fair according to equality of predictive values at t = pre. The greater the impact of R on the decision process, the less fair with respect to equality of predictive values R becomes, and the more inaccurate, at t = post. Figure 3 shows the FPRs, FNR, and accuracy at t = post for groups 0 and 1, as well as the absolute difference between the two groups. When there is no change in approvals, the FPR and FNR remain the same for the two groups (with some slight differences observed due to sampling error). As the change in loan approval rates for group 1 increases, the FPRs and FNRs for this group decrease, which causes the difference in error rates between the two groups to increase. This means that R becomes less and less fair at t = post, according to the equalized odds criterion. In this case, the accuracy of R improves as the loan approval rate for group 1 increases, although this results in an increasing difference in accuracy between the two groups. , and accuracy for the two groups at t = post. abs_diff represents the absolute difference between the two groups in the relevant metric. The x-axis represents the change in loan approval rates for group 1 at t = post relative to t = pre, with all other components of the decision process held constant. R is fair according to equalized odds at t = pre. The greater the impact of R on the decision process, the less fair with respect to equalized odds R becomes at t = post.

Counterfactual accuracy and fairness
The previous examples illustrate how predictors which satisfy a chosen observable fairness criterion with respect to the data generating process used to train them can fail to satisfy that same criterion when they are deployed. The whole point of introducing a predictor into a decision making setting is to change the decision process in order to improve outcomes. Perversely, the larger the effect of the predictor on decisions, the greater the potential for the fairness and performance of the predictor to differ between training and deployment. These effects occur even when distribution of all other variables, including observed and unobserved covariates and potential outcomes, remains the same.
The use of counterfactual rather than observable outcomes avoids this issue. When a predictor is designed to inform decisions, the outcomes of interest are not the historical observed outcomes under a particular decision process, but rather the outcomes that would occur under available courses of action. In particular, in risk assessment, it is natural to target Y D=0 , where D = 0 represents a baseline course of action such as releasing a defendant or sending a patient home [Coston et al., 2020]. In general, Y 0 and Y 1 represent an individual's responsiveness to different courses of action D, but D should not itself affect Y 0 or Y 1 . Under assumption (A1), for example, a predictor which satisfies counterfactual equalized odds (R ⊥ ⊥ A | Y D=0 ) or counterfactual equality of predictive values (Y D=0 ⊥ ⊥ R | A) at t = pre will also satisfy it at t = post, regardless of changes in the treatment process.

Conclusion
We showed theoretically and in simulated examples that performative prediction settings can induce concept shift, which in turn can affect error rates (false positive and false negative rates), positive and negative predictive values, and accuracy, with respect to observable outcomes. These changes can cause a predictor which satisfies an observable fairness criterion at training time to fail to satisfy this criterion when it is deployed, and they can also cause a predictor to become less accurate in deployment. These phenomena can occur even when the population is identical across the two time points, i.e. when there is no covariate shift, simply as a result of changes in the decision making process. By contrast, concept shift alone has no impact on counterfactual fairness criteria such as counterfactual sufficiency and counterfactual equalized odds.
These results bring into question the value of observable fairness measures in performative contexts, and they add to previous results that suggest that counterfactual outcomes are more natural targets in such settings.
Disclaimer This paper was prepared for informational purposes by the Artificial Intelligence Research group of JPMorgan Chase & Co. and its affiliates ("JP Morgan"), and is not a product of the Research Department of JP Morgan. JP Morgan makes no representation and warranty whatsoever and disclaims all liability, for the completeness, accuracy or reliability of the information contained herein. This document is not intended as investment research or investment advice, or a recommendation, offer or solicitation for the purchase or sale of any security, financial instrument, financial product or service, or to be used in any way for evaluating the merits of participating in any transaction, and shall not constitute a solicitation under any jurisdiction or to any person, if such solicitation under such jurisdiction or to such person would be unlawful.

A Appendix: Proofs
Recall that R is a deterministic function of (A, X), that (A, X) ⊆ W , and that D ⊥ ⊥ Y D=d | W for d ∈ {0, 1}.
Proof of Proposition 4.1 (Concept shift). We have Proof of Proposition 4.2 (Prediction rates). We have Under assumption (A2), P pre (X | A) ≡ P post (X | A), so E t [R | A] does not change from t = pre to t = post. It follows that if E pre [R | A = 0] = E pre [R | A = 1], then E post [R | A = 0] = E post [R | A = 1]: if the classifier achieves demographic parity at t = pre, then it achieves demographic parity at t = post.
Proof of Proposition 4.3 (Predictive values). Following the same logic used in the previous proof, the positive predictive values for group A = a at time t can be expressed as: Again, the reasoning for the negative predictive values is analogous, with (1 − R) and (1 − Y ) replacing R and Y .
Proof of Proposition 4.4 (Error rates). Starting with the false positive rates, note that we have We can therefore express the FPR for group A = a at time t as where the third line uses iterated expectation. Note that the outer expectations in the third and fourth lines are not indexed by time, because P pre (A, X) ≡ P post (A, X) by assumption (A1). The reasoning for the false negative rates is analogous, with (1 − R) replacing R and Y replacing (1 − Y ).