On the Fairness of Causal Algorithmic Recourse

Algorithmic fairness is typically studied from the perspective of predictions. Instead, here we investigate fairness from the perspective of recourse actions suggested to individuals to remedy an unfavourable classification. We propose two new fairness criteria at the group and individual level, which -- unlike prior work on equalising the average group-wise distance from the decision boundary -- explicitly account for causal relationships between features, thereby capturing downstream effects of recourse actions performed in the physical world. We explore how our criteria relate to others, such as counterfactual fairness, and show that fairness of recourse is complementary to fairness of prediction. We study theoretically and empirically how to enforce fair causal recourse by altering the classifier and perform a case study on the Adult dataset. Finally, we discuss whether fairness violations in the data generating process revealed by our criteria may be better addressed by societal interventions as opposed to constraints on the classifier.

Figure 1: Example demonstrating the difference between fair prediction and fair recourse: here, only the variance of (centered income) X differs across two protected groups A ∈ {0, 1}, while the true and predicted label (whether an individual is approved for a credit card) are determined by sign(X). This scenario would be considered fair from the perspective of prediction, but the cost of recourse (here, the distance to the decision boundary, set at X = 0) is much larger for individuals in the blue group with A = 0.
Lakkaraju 2021). For a given classifier and a negativelyclassified individual, algorithmic recourse aims to identify which changes the individual could perform to flip the decision. Contrary to predictive fairness, recourse thus considers the classifier as fixed but ascribes agency to the individual.
Within machine learning (ML), fairness and recourse have mostly been considered in isolation and viewed as separate problems. While recourse has been investigated in the presence of protected attributes-e.g., by comparing recourse actions (flipsets) suggested to otherwise similar male and female individuals (Ustun, Spangher, and Liu 2019), or comparing the aggregated cost of recourse (burden) across different protected groups (Sharma, Henderson, and Ghosh 2019)its relation to fairness has only been studied informally, in the sense that differences in recourse have typically been understood as proxies of predictive unfairness (Karimi et al. 2020a). However, as we argue in the present work, recourse actually constitutes an interesting fairness criterion in its own right as it allows for the notions of agency and effort to be integrated into the study of fairness.
In fact, discriminatory recourse does not imply predictive unfairness (and is not implied by it either 1 ). To see this, consider the data shown in Fig. 1. Suppose the feature X represents the (centered) income of an individual from one of two sub-groups A ∈ {0, 1}, distributed as N (0, 1) and N (0, 4), i.e., only the variances differ. Now consider a binary classifier h(X) = sign(X) which perfectly predicts whether the individual is approved for a credit card (the true label Y ) (Barocas, Selbst, and Raghavan 2020). While this scenario satisfies several predictive fairness criteria (e.g., demographic parity, equalised odds, calibration), the required increase in income for negatively-classified individuals to be approved for a credit card (i.e., the effort required to achieve recourse) is much larger for the higher variance group. If individuals from one protected group need to work harder than "similar" ones from another group to achieve the same goal, this violates the concept of equal opportunity, a notion aiming for people to operate on a level playing field (Arneson 2015). 2 However, this type of unfairness is not captured by predictive notions which-in only distinguishing between (unalterable) worthy or unworthy individuals-do not consider the possibility for individuals to deliberately improve their situation by means of changes or interventions.
In this vein, Gupta et al. (2019) recently introduced Equalizing Recourse, the first recourse-based and predictionindependent notion of fairness in ML. They propose to measure recourse fairness in terms of the average group-wise distance to the decision boundary for those getting a bad outcome, and show that this can be calibrated during classifier training. However, this formulation ignores that recourse is fundamentally a causal problem since actions performed by individuals in the real-world to change their situation may have downstream effects (Mahajan, Tan, and Sharma 2019;Karimi, Schölkopf, and Valera 2021;Karimi et al. 2020c;Mothilal, Sharma, and Tan 2020), cf. also (Barocas, Selbst, and Raghavan 2020;Wachter, Mittelstadt, and Russell 2017;Ustun, Spangher, and Liu 2019). By not reasoning about causal relations between features, the distancebased approach (i) does not accurately reflect the true (differences in) recourse cost, and (ii) is restricted to the classical prediction-centered approach of changing the classifier to address discriminatory recourse.
In the present work, we address both of these limitations. First, by extending the idea of Equalizing Recourse to the minimal intervention-based framework of recourse (Karimi, Schölkopf, and Valera 2021), we introduce causal notions of fair recourse which capture the true differences in recourse cost more faithfully if features are not independently manipulable, as is generally the case. Second, we argue that a causal model of the data generating process opens up a new route to fairness via societal interventions in the form of changes to the underlying system. Such societal interventions may reflect common policies like subgroup-specific subsidies or tax breaks. We highlight the following contributions: • we introduce a causal version (Defn. 3.1) of Equalizing Recourse, as well as a stronger (Prop. 3.3) individual-level criterion (Defn. 3.2) which we argue is more appropriate; • we provide the first formal study of the relation between fair prediction and fair recourse, and show that they are complementary notions which do not imply each other (Prop. 3.4); • we establish sufficient conditions that allow for individually-fair causal recourse (Prop. 3.6); • we evaluate different fair recourse metrics for several classifiers ( § 4.1), verify our main results, and demonstrate that non-causal metrics misrepresent recourse unfairness; • in a case study on the Adult dataset, we detect recourse discrimination at the group and individual level ( § 4.2), demonstrating its relevance for real world settings; • we propose societal interventions as an alternative to altering a classifier to address unfairness ( § 5).

Preliminaries & Background
Notation. Let the random vector X = (X 1 , ..., X n ) taking values x = (x 1 , ..., x n ) ∈ X = X 1 × ... × X n ⊆ R n denote observed (non-protected) features. Let the random variable A taking values a ∈ A = {1, . . . , K} for some K ∈ Z >1 denote a (legally) protected attribute/feature indicating which group each individual belongs to (based, e.g., on her age, sex, ethnicity, religion, etc). And let h : X → Y be a given binary classifier with Y ∈ Y = {±1} denoting the ground truth label (e.g., whether her credit card was approved). We Counterfactual Explanations. A common framework for explaining decisions made by (black-box) ML models is that of counterfactual explanations (CE; Wachter, Mittelstadt, and Russell 2017). A CE is a closest feature vector on the other side of the decision boundary. Given a distance d : X × X → R + , a CE for an individual x F who obtained an unfavourable prediction, h(x F ) = −1, is defined as a solution to: While CEs are useful to understand the behaviour of a classifier, they do not generally lead to actionable recommendations: they inform an individual of where she should be to obtain a more favourable prediction, but they may not suggest feasible changes she could perform to get there. Figure 2: (a) The framework underlying counterfactual explanations and distance-based recourse treats X i as independently manipulable features (IMF). In a fairness context, this means that the X i may depend on the protected attribute A (and potentially other unobserved factors) but do not causally influence each other. (b) The present work considers a generalisation the IMF assumption by allowing for causal influences between the X i , thus modeling the downstream effects of changing some features on others. This causal approach allows us to more accurately quantify recourse unfairness in real-world settings where the IMF assumption is typically violated. It also provides a framework for studying alternative routes to achieve fair recourse beyond changing the classifier.
Recourse with Independently-Manipulable Features. Ustun, Spangher, and Liu (2019) refer to a person's ability to change the decision of a model by altering actionable variables as recourse and propose to solve where F(x F ) is a set of feasible change vectors and c(·; x F ) is a cost function defined over these actions, both of which may depend on the individual. 4 As pointed out by Karimi, Schölkopf, and Valera (2021), (2) implicitly treats features as manipulable independently of each other (see Fig. 2a) and does not account for causal relations that may exist between them (see Fig. 2b): while allowing feasibility constraints on actions, variables which are not acted-upon (δ i = 0) are assumed to remain unchanged. We refer to this as the independently-manipulable features (IMF) assumption. While the IMF-view may be appropriate when only analysing the behaviour of a classifier, it falls short of capturing effects of interventions performed in the real world, as is the case in actionable recourse; e.g., an increase in income will likely also positively affect the individual's savings balance. As a consequence, (2) only guarantees recourse if the acted-upon variables have no causal effect on the remaining variables (Karimi, Schölkopf, and Valera 2021).
Structural Causal Models. A structural causal model (SCM) (Pearl 2009;Peters, Janzing, and Schölkopf 2017) , which compute each V i as a deterministic function f i of its direct causes (causal parents) PA i ⊆ V \ V i and an unobserved variable U i . In this work, we make the common assumption that the distribution P U factorises over the latent U = {U i } n i=1 , meaning that there is no unobserved confounding (causal sufficiency). If the causal graph G associated with M (obtained by drawing a directed edge from each variable in PA i to V i , see Fig. 2 for examples) is acyclic, M induces a unique "observational" distribution over V, defined as the push forward of P U via S.
SCMs can be used to model the effect of interventions: external manipulations to the system that change the generative process (i.e., the structural assignments) of a subset of variables V I ⊆ V, e.g., by fixing their value to a constant θ I . Such (atomic) interventions are denoted using Pearl's dooperator by do(V I := θ I ), or do(θ I ) for short. Interventional distributions are obtained from M by replacing the structural equations {V i := f i (PA i , U i )} i∈I by their new assignments {V i := θ i } i∈I to obtain the modified structural equations S do(θ I ) and then computing the distribution induced by the interventional SCM M do(θ I ) = (S do(θ I ) , P U ), i.e., the push-forward of P U via S do(θ I ) .
Similarly, SCMs allow reasoning about (structural) counterfactuals: statements about interventions performed in a hypothetical world where all unobserved noise terms U are kept unchanged and fixed to their factual value u F . The counterfactual distribution for a hypothetical intervention do(θ I ) given a factual observation v F , denoted v θ I (u F ), can be obtained from M using a three step procedure: first, inferring the posterior distribution over the unobserved variables P U|v F (abduction); second, replacing some of the structural equations as in the interventional case (action); third, computing the distribution induced by the counterfactual SCM Causal Recourse. To capture causal relations between features, Karimi, Schölkopf, and Valera (2021) propose to approach the actionable recourse task within the framework of SCMs and to shift the focus from nearest CEs to minimal interventions, leading to the optimisation problem min where x θ I (u F ) denotes the "counterfactual twin" of x F had X I been θ I . 5 In practice, the SCM is unknown and needs to be inferred from data based on additional (domain-specific) assumptions, leading to probabilistic versions of (3) which aim to find actions that achieve recourse with high probability (Karimi et al. 2020c). If the IMF assumptions holds (i.e., the set of descendants of all actionable variables is empty), then (3) reduces to IMF recourse (2) as a special case.
Algorithmic and Counterfactual Fairness. While there are many statistical notions of fairness (Zafar et al. 2017a,b), these are sometimes mutually incompatible (Chouldechova 2017), and it has been argued that discrimination, at its heart, corresponds to a (direct or indirect) causal influence of a protected attribute on the prediction, thus making fairness a fundamentally causal problem (Kilbertus et al. 2017;Russell et al. 2017;Loftus et al. 2018;Zhang and Bareinboim 2018a,b;Nabi and Shpitser 2018;Nabi, Malinsky, and where v a (u F ) denotes the "counterfactual twin" of v F had the attribute been a instead of a F .
Equalizing Recourse Across Groups. The main focus of this paper is the fairness of recourse actions which, to the best of our knowledge, was studied for the first time by Gupta et al. (2019). They advocate for equalizing the average cost of recourse across protected groups and to incorporate this as a constraint when training a classifier. Taking a distance-based approach in line with CEs, they define the cost of recourse for x F with h(x F ) = −1 as the minimum achieved in (1): which is equivalent to IMF-recourse (2) if c(δ; x F ) = d(x F + δ, x F ) is chosen as cost function. Defining the protected subgroups, G a = {v i ∈ D : a i = a}, and G − a = {v ∈ G a : h(v) = −1}, the group-level cost of recourse (here, the average distance to the decision boundary) is then given by, The idea of Equalizing Recourse across groups (Gupta et al. 2019) can then be summarised as follows. Definition 2.1 (Group-level fair IMF-recourse, from (Gupta et al. 2019)). The group-level unfairness of recourse with independently-manipulable features (IMF) for a dataset D, classifier h, and distance metric d is: Recourse for (D, h, d) is "group IMF-fair" if ∆ dist = 0.

Fair Causal Recourse
Since Defn. 2.1 rests on the IMF assumption, it ignores causal relationships between variables, fails to account for downstream effects of actions on other relevant features, and thus generally incorrectly estimates the true cost of recourse. We argue that recourse-based fairness considerations should rest on a causal model that captures the effect of interventions performed in the physical world where features are often causally related to each other. We therefore consider an SCM M over V = (X, A) to model causal relationships between the protected attribute and the remaining features.

Group-Level Fair Causal Recourse
Defn. 2.1 can be adapted to the causal (CAU) recourse framework (3) by replacing the minimum distance in (4) with the cost of recourse within a causal model, i.e., the minimum achieved in (3): where we recall that the constraint h(v θ I (u F )) = 1 ensures that the counterfactual twin of v F in M falls on the favourable side of the classifier. Let r CAU (G − a ) be the average of r CAU (v F ) across G − a , analogously to (5). We can then define group-level fair causal recourse as follows. Definition 3.1 (Group-level fair causal recourse). The grouplevel unfairness of causal (CAU) recourse for a dataset D, classifier h, and cost function c w.r.t. an SCM M is given by: While Defn. 2.1 is agnostic to the (causal) generative process of the data (note the absence of a reference SCM M from Defn. 2.1), Defn. 3.1 takes causal relationships between features into account when calculating the cost of recourse. It thus captures the effect of actions and the necessary cost of recourse more faithfully when the IMF-assumption is violated, as is realistic for most applications.
A shortcoming of both Defns. 2.1 and 3.1 is that they are group-level definitions, i.e., they only consider the average cost of recourse across all individuals sharing the same protected attribute. However, it has been argued from causal (Chiappa 2019;) and noncausal (Dwork et al. 2012) perspectives that fairness is fundamentally an individual-level concept: 6 group-level fairness still allows for unfairness at the level of the individual, provided that positive and negative discrimination cancel out across the group. This is one motivation behind counterfactual fairness ): a decision is considered fair at the individual level if it would not have changed, had the individual belonged to a different protected group.

Individually Fair Causal Recourse
Inspired by counterfactual fairness , we propose that (causal) recourse may be considered fair at the level of the individual if the cost of recourse would have been the same had the individual belonged to a different protected group, i.e., under a counterfactual change to A. Definition 3.2 (Individually fair causal recourse). The individual-level unfairness of causal recourse for a dataset D, classifier h, and cost function c w.r.t. an SCM M is This is a stronger notion in the sense that it is possible to satisfy both group IMF-fair (Defn. 2.1) and group CAU-fair recourse (Defn. 3.1), without satisfying Defn. 3.2: Proposition 3.3. Neither of the group-level notions of fair recourse (Defn. 2.1 and Defn. 3.1) are sufficient conditions for individually CAU-fair recourse (Defn. 3.2), i.e., Group IMF-fair =⇒ Individually CAU-fair. Group CAU-fair =⇒ Individually CAU-fair.

Proof. A counterexample is given by the following combination of SCM and classifier
We have P X|A=0 = P X|A=1 = Bern(0.5), so the distance to the boundary at X = 0.5 is the same across groups. The criterion for "group IMF-fair" recourse (Defn. 2.1) is thus satisfied.
Since protected attributes are generally immutable (thus making any recourse actions involving changes to A infeasible) and since there is only a single feature in this example (so that causal downstream effects on descendant features can be ignored), the distance between the factual and counterfactual value of X is a reasonable choice of cost function also for causal recourse. In this case, (D, h, M) also satisfies group-level CAU-fair recourse (Defn. 3.1).
However, for all v F = (x F , a F ) and any a = a F , we have , so it is maximally unfair at the individual level: for any individual, the cost of recourse would have been zero had the protected attribute been different, as the prediction would have flipped.

Relation to Counterfactual Fairness
The classifier h used in the proof of Prop. 3.3 is not counterfactually fair. This suggests to investigate their relation more closely: does a counterfactually fair classifier imply fair (causal) recourse? The answer is no. Proposition 3.4. Counterfactual fairness is insufficient for any of the three notions of fair recourse: h counterfactually fair =⇒ Group IMF-fair h counterfactually fair =⇒ Group CAU-fair h counterfactually fair =⇒ Individually CAU-fair Proof. A counterexample is given by the following combination of SCM and classifier: which we used to generate Fig. 1. As sign(X) = sign(U X ), and U X is assumed fixed when reasoning about a counterfactual change of A, h is counterfactually fair.
However, P X|A=0 = N (0, 4) and P X|A=1 = N (0, 1), so the distance to the boundary (which is a reasonable cost for CAU-recourse in this one-variable toy example) differs at the group level. Moreover, X either doubles or halves when counterfactually changing A.
Remark 3.5. An important characteristic of the counterexample used in the proof of Prop. 3.4 is that h is deterministic, which makes it possible that h is counterfactually fair, even though it depends on a descendant of A. This is generally not be the case if h is probabilistic (e.g., a logistic regression), h : X → [0, 1], so that the probability of a positive classification decreases with the distance from the decision boundary.

Achieving Fair Causal Recourse
Constrained Optimisation. A first approach is to explicitly take constraints on the (group or individual level) fairness of causal recourse into account when training a classifier, as implemented for non-causal recourse under the IMF assumption by Gupta et al. (2019). Herein we can control the potential trade-off between accuracy and fairness with a hyperparameter. However, the optimisation problem in (3) involves optimising over the combinatorial space of intervention targets I ⊆ {1, ..., n}, so it is unclear whether fairness of causal recourse may easily be included as a differentiable constraint.
Restricting the Classifier Inputs. An approach that only requires qualitative knowledge in form of the causal graph (but not a fully-specified SCM), is to restrict the set of input features to the classifier to only contain non-descendants of the protected attribute. In this case, and subject to some additional assumptions stated in more detail below, individually fair causal recourse can be guaranteed.
Proof. According to Defn. 3.2, it suffices to show that Substituting our assumptions in the definition of r CAU from § 3.1, we obtain: It remains to show that which follows from applying do-calculus (Pearl 2009) sincẽ X does not contain any descendants of A by assumption, and is thus not influenced by counterfactual changes to A.
The assumption of Prop. 3.6 that both the set of feasible actions F(v F ) and the cost function c(· ; v F ) remain the same under a counterfactual change to the protected attribute may not always hold. For example, if a protected group were precluded (by law) or discouraged from performing certain recourse actions such as taking on a particular job or applying for a certification, that would constitute such a violation due to a separate source of discrimination.
Moreover, since protected attributes usually represent socio-demographic features (e.g., age, gender, ethnicity, etc), they often appear as root nodes in the causal graph and have downstream effects on numerous other features. Forcing the classifier to only consider non-descendants of A as inputs, as in Prop. 3.6, can therefore lead to a drop in accuracy which can be a restriction .  (2018)) used for the Adult dataset (Lichman et al. 2013); A denotes the three protected attributes {sex, age, nationality}; M denotes {marital status, education level}; and W corresponds to {working class, occupation, hrs per week}. Here, we show the coarse-grained causal graph for simplicity. In practice, we model each node separately. For example, the single arrow from A to M actually corresponds to six directed edges, one from each feature in A to each feature in M.
Abduction / Representation Learning. We have shown that considering only non-descendants of A is a way to achieve individually CAU-fair recourse. In particular, this also applies to the unobserved variables U which are, by definition, not descendants of any observed variables. This suggests to use U i in place of any descendants X i of A when training the classifier-in a way, U i can be seen as a "fair representation" of X i since it is an exogenous component that is not due to A. However, as U is unobserved, it needs to be inferred from the observed v F , corresponding to the abduction step of counterfactual reasoning. Great care needs to be taken in learning such a representation in terms of the (fair) background variables as (untestable) counterfactual assumptions are required (Kusner et al. 2017, § 4.1).

Experiments
We perform two sets of experiments. First, we verify our main claims in numerical simulations ( § 4.1). Second, we use our causal measures of fair recourse to conduct a preliminary case study on the Adult dataset ( § 4.2). We refer to Appendix A for further experimental details and to Appendix B for additional results and analyses. Code to reproduce our experiments is available at https://github.com/amirhk/recourse.

Numerical Simulations
Data. Since computing recourse actions, in general, requires knowledge (or estimation) of the true SCM, we first consider a controlled setting with two kinds of synthetic data: • IMF: the setting underlying IMF recourse where features do not causally influence each other, but may depend on the protected attribute A, see To make distances comparable across classifiers, we use either a linear or polynomial kernel for all SVMs (depending on the GT labels) and select all remaining hyperparameters (including the trade-off parameter λ for FairSVM) using 5-fold cross validation. Results for kernel selection by crossvalidation are also provided in Tab. 4 in Appendix B.3. Linear (nonlinear, resp.) LR is used when the GT labels are generated using linear (nonlinear, resp.) logistic regression, as detailed in Appendix A.2.
Solving the Causal Recourse Optimisation Problem.
We treat A and all U i as non-actionable and all X i as actionable. For each negatively predicted individual, we discretise the space of feasible actions, compute the efficacy of each action using a learned approximate SCM (M KR ) (following Karimi et al. (2020c) FairSVM ( Table 1: Results for our numerical simulations from § 4.1, comparing various classifiers differing mostly in their input sets with respect to accuracy (Acc, higher is better) and different recourse fairness metrics (∆ (·) , lower is better) on a number of synthetic datasets (columns). SVM: support vector machine, LR: logistic regresion; the first four rows are baselines, the middle row corresponds to the method of (Gupta et al. 2019), and the last four rows are methods taking causal structure into account. For each dataset and metric, the best performing methods are highlighted in bold. As can be seen, only our causally-motivated methods (last four rows) achieve individually fair recourse (∆ ind = 0) throughout. and individual level (∆ ind , Defn. 3.2) criteria. For (b), we select 50 negatively classified individuals from each protected group and report the difference in group-wise means (∆ dist and ∆ cost ) or the maximum difference over all 100 individuals (∆ ind ). To facilitate a comparison between the different SVMs, ∆ dist is reported in terms of absolute distance to the decision boundary in units of margins. As a cost function in the causal recourse optimisation problem, we use the L2 distance between the intervention value θ I and the factual value of the intervention targets x F I .

Results
. Results are shown in Tab. 1. We find that the naïve and unaware baselines generally exhibit high accuracy and rather poor performance in terms of fairness metrics, but achieve surprisingly low ∆ cost on some datasets. We observe no clear preference of one baseline over the other, consistent with prior work showing that blindness to protected attributes is not necessarily beneficial for fair prediction (Dwork et al. 2012); our results suggest this is also true for fair recourse. FairSVM generally performs well in terms of ∆ dist (which is what it is trained for), especially on the two IMF datasets, and sometimes (though not consistently) outperforms the baselines on the causal fairness metrics. However, this comes at decreased accuracy, particularly on linearly-separable data.
Both of our causally-motivated setups, LR/SVM(X nd(A) ) and LR/SVM(X nd(A) , U d(A) ), achieve ∆ ind = 0 throughout as expected per Prop. 3.6, and they are the only methods to do so. Whereas the former comes at a substantial drop in accuracy due to access to fewer predictive features (see § 3.4), the latter maintains high accuracy by additionally relying on (the true) U d(A) for prediction. Its accuracy should be understood as an upper bound on what is possible while preserving "individually CAU-fair" recourse if abduction is done correctly, see the discussion in § 3.4.
Generally, we observe no clear relationship between the different fairness metrics: e.g., low ∆ dist does not imply low ∆ cost (nor vice versa) justifying the need for taking causal relations between features into account (if present) to enforce fair recourse at the group-level. Likewise, neither small ∆ dist nor small ∆ cost imply small ∆ ind , consistent with Prop. 3.3, and, empirically, the converse does not hold either.

Case Study on the Adult Dataset
Data. We use the Adult dataset (Lichman et al. 2013), which consists of 45k+ samples without missing data. We process the dataset similarly to Chiappa (2019) and Nabi and Shpitser (2018) and adopt the causal graph assumed therein, see Fig. 3c. The eight heterogeneous variables include the three binary protected attributes sex (m=male, f=female), age (binarised as I{age ≥ 38}; y=young, o=old), and nationality (Nat; US vs non-US), as well as five non-protected features: marital status (MS; categorical), education level (Edu; integer), working class (WC; categorical), occupation (Occ; categorical), and hours per week (Hrs; integer). We treat the protected attributes and marital status as non-actionable, and the remaining variables as actionable when searching for recourse actions.
Experimental Setup. We extend the probabilistic framework of Karimi et al. (2020c) to consider causal recourse in the presence of heterogeneous features, see Appendix B.2 for more details. We use a nonlinear LR(X) as a classifier (i.e., fairness through unawareness) which attains 78.4% accuracy, and (approximately) solve the recourse optimisation problem (3) using brute force search as in § 4.1. We compute the best recourse actions for 10 (uniformly sampled) negatively predicted individuals from each of the eight different protected groups (all 2 3 combinations of the three protected  Table 2: Individual-level recourse discrimination on the Adult dataset ( § 4.2). Factual (F) observation highlighted in cyan, counterfactual (CF) twin with largest individual-level recourse difference in magenta. Consistent with the group-level trends, we observe quantitative discrimination across each protected attribute (favouring older age, male gender, and US nationalism), and qualitative differences in the suggested recourse actions across groups (e.g., favourable predictions based on higher education for men and more working hours for non-US nationals).
attributes), as well as for each of their seven counterfactual twins, and evaluate using the same metrics as in § 4.1.

Results.
At the group level, we obtain ∆ dist = 0.89 and ∆ cost = 33.32, indicating group-level recourse discrimination. Moreover, the maximum difference in distance is between old US males and old non-US females (latter is furthest from the boundary), while that in cost is between old US females and old non-US females (latter is most costly). This quantitative and qualitative difference between ∆ dist and ∆ cost emphasises the general need to account for causalrelations in fair recourse, as present in the Adult dataset. At the individual-level, we find an average difference in recourse cost to the counterfactual twins of 24.32 and a maximum difference (∆ ind ) of 61.53. The corresponding individual/factual observation for which this maximum is obtained is summarised along with its seven counterfactual twins in Tab. 2, see the caption for additional analysis.
Summary of Main Findings from § 4.2: Our causal fairness metrics reveal qualitative and quantitative aspects of recourse discrimination at both the group and individual level. In spite of efforts to design classifiers that are predictively fair, recourse unfairness remains a valid concern on real datasets.

On Societal Interventions
Our notions of fair causal recourse (Defns. 3.1 and 3.2) depend on multiple components (D, h, c, M). As discussed in § 1, in fair ML, the typical procedure is to alter the classifier h. This is the approach proposed for Equalizing Recourse by Gupta et al. (2019), which we have discussed in the context of fair causal recourse ( § 3.4) and explored experimentally ( § 4). However, requiring the learnt classifier h to satisfy some constraint implicitly places the cost of an intervention on the deployer. For example, a bank might need to modify their classifier so as to offer credit cards to some individuals who would not otherwise receive them.
Another possibility is to alter the data-generating process (as captured by the SCM M and manifested in the form of the observed data D) via a societal intervention in order to achieve fair causal recourse with a fixed classifier h. By considering changes to the underlying SCM or to some of its mechanisms, we may facilitate outcomes which are more societally fair overall, and perhaps end up with a dataset that is more amenable to fair causal recourse (either at the group or individual level). Unlike the setup of Gupta et al. (2019), our causal approach here is perhaps particularly well suited to exploring this perspective, as we are already explicitly modelling the causal generative process, i.e., how changes to parts of the system will affect the other variables.
We demonstrate our ideas for the toy example with different variances across groups from Fig. 1. Here, the difference in recourse cost across groups cannot easily be resolved by changing the classifier h (e.g., per the techniques in § 3.4): to achieve perfectly fair recourse, we would have to use a constant classifier, i.e., either approve all credit cards, or none, irrespective of income. Essentially, changing h does not address the root of the problem, namely the discrepancy in the two populations. Instead, we investigate how to reduce the larger cost of recourse within the higher-variance group by altering the data generating process via societal interventions.
Let i k denote a societal intervention that modifies the data generating process, X := (2 − A)U X , U X ∼ N (0, 1), by changing the original SCM M to M k = i k (M). For example, i k may introduce additional variables or modify a subset of the original structural equations. Specifically, we consider subsidies to particular eligible individuals. We introduce a new treatment variable T which randomly selects a proportion 0 ≤ p ≤ 1 of individuals from A = 0 who are awarded a subsidy s if their latent variable U X is below a threshold t. 7 This is captured by the modified structural equations Here, each societal intervention i k thus corresponds to a particular way of setting the triple (p, t, s). To avoid changing the predictions sgn(X), we only consider t ≤ 0 and s ≤ −2t.  Fig. 1. We randomly select a proportion p = 1 of individuals from the disadvantaged group (blue, A = 0) to receive a subsidy s = 1.5 if U X is below the threshold t = −0.75. As a result, the distribution of negatively-classified individuals (X < 0) shifts towards the boundary which makes it more similar to those in A = 1, thus resulting in fairer recourse. At the same time, the distribution of positively-classified individuals (X > 0) remains unchanged. (b) Comparison of different societal interventions i k = (1, t, −2t) with respect to their benefit (reduction in recourse difference) and cost (paid-out subsidies). The threshold t ≈ −0.75 (corresponding to the distribution shown on the left) leads to the largest reduction in recourse difference, but also incurs the highest cost. Smaller reductions can be achieved using two different thresholds: one corresponding to giving a larger subsidy to fewer individuals, and the other to giving a smaller subsidy to more individuals.
The modified distribution resulting from i k = (1, −0.75, 1.5) is shown in Fig. 4a, see the caption for details. To evaluate the effectiveness of different societal interventions i k in reducing recourse unfairness, we compare their associated societal costs c k and benefits b k . Here, the cost c k of implementing i k can reasonably be chosen as the total amount of paid-out subsidies, and the benefit b k , as the reduction in the difference of average recourse cost across groups. We then reason about different societal interventions i k by simulating the proposed change via sampling data from M k and computing b k and c k based on the simulated data. To decide which intervention to implement, we compare the societal benefit b k and cost c k of i k for different k and choose the one with the most favourable trade-off. We show the societal benefit and cost tradeoff for i k = (1, t, −2t) with varying t in Fig. 4b and refer to the caption for further details. Plots similar to Fig. 4 for different choices of (p, t, s) are shown in Fig. 5 in Appendix B.1. Effectively, our societal intervention does not change the outcome of credit card approval but ensures that the effort required (additional income needed) for rejected individuals from two groups is the same. Instead of using a threshold to select eligible individuals as in the toy example above, for more complex settings, our individuallevel unfairness metric (Defn. 3.2) may provide a useful way to inform whom to target with societal interventions as it can be used to identify individuals for whom the counterfactual difference in recourse cost is particularly high.

Discussion
With data-driven decision systems pervading our societies, establishing appropriate fairness metrics and paths to recourse are gaining major significance. There is still much work to do in identifying and conceptually understanding the best path forward. Here we make progress towards this goal by applying tools of graphical causality. We are hopeful that this approach will continue to be fruitful as we search together with stakeholders and broader society for the right concepts and definitions, as well as for assaying interventions on societal mechanisms. While our fairness criteria may help assess the fairness of recourse, it is still unclear how best to achieve fair causal recourse algorithmically. Here, we argue that fairness considerations may benefit from considering the larger system at play-instead of focusing solely on the classifier-and that a causal model of the underlying data generating process provides a principled framework for addressing issues such as multiple sources of unfairness, as well as different costs and benefits to individuals, institutions, and society.
Societal interventions to overcome (algorithmic) discrimination constitute a complex topic which not only applies to fair recourse but also to other notions of fairness. It deserves further study well beyond the scope of the present work. We may also question whether it is appropriate to perform a societal intervention on all individuals in a subgroup. For example, when considering who is approved for a credit card, an individual might not be able to pay their statements on time and this could imply costs to them, to the bank, or to society. This idea relates to the economics literature which studies the effect of policy interventions on society, institutions, and individuals (Heckman and Vytlacil 2005;Heckman 2010). Thus, future work could focus on formalising the effect of these interventions to the SCM, as such a framework would help trade off the costs and benefits for individuals, companies, and society.

A Experimental Details
In this Appendix, we provide additional details on our experiment setup.

A.1 SCM Specification
First, we give the exact form of SCMs used to generate our three synthetic data sets IMF, CAU-LIN, and CAU-ANM. Besides the desired characteristics of independentlymanipulable (IMF) or causally dependent (CAU) features and linear (LIN) or nonlinear (ANM) relationships with additive noise, we choose the particular form of structural equations for each setting such that all features are roughly standardised, i.e., such that they all approximately have a mean of zero and a variance one.
We use the causal structures shown in Fig. 3. Apart from the desire two make the causal graphs similar to facilitate a better comparison and avoid introducing further nuisance factors while respecting the different structural constraints of the IMF and CAU settings, this particular choice is motivated by having at least one feature which is not a descendant of the protected attribute A. This is so that LR/SVM(X nd(A) ) and LR/SVM(X nd(A) , U d(A) ) always have access to at least one actionable variable (X 2 ) which can be manipulated to achieve recourse.
IMF For the IMF data sets, we sample the protected attribute A and the features X i according to the following SCM: CAU-LIN For the CAU-LIN data sets, we sample A and X i according to the following SCM: CAU-ANM For the CAU-ANM data sets, we sample A and X i according to the following SCM:

A.2 Label generation
To generate ground truth labels on which the different classifiers are trained, we consider both a linear and a nonlinear logistic regression. Specifically, we generate ground truth labels according to In the linear case, h(X 1 , X 2 , X 3 ) is given by h(X 1 , X 2 , X 3 ) = 1 + e −2(X1−X2+X3) −1 .

A.3 Fair model architectures and training hyper-parameters
We use the implementation of Gupta et al. (2019)  For the nonlinear logistic regression model, we opted for an instance of the sklearn MLPClassifier class with two hidden layers (10 neurons each) and ReLU activation functions. This model was then optimised on its inputs using the default optimiser and training hyperparameters.

A.4 Optimisation approach
Since an algorithmic contribution for solving the causal recourse optimisation problem is not the main focus of this work, we choose to discretise the space of possible recourse actions and select the best (i.e., lowest cost) valid action by performing a brute-force search. For an alternative gradientbased approach to solving the causal recourse optimisation problem, we refer to (Karimi et al. 2020c).
For each actionable feature X i , denote by max i and min i its maximum and minimum attained in the training set, respectively. Given a factual observation x F i of X i , we discretise the search space and pick possible intervention values θ i using 15 equally-spaced bins in the range We then consider all possible combinations of intervention values over all subsets I of the actionable variables. We note that for LR/SVM(X nd ) and LR/SVM(X nd , U d ), only X 2 is actionable, while for the other LR/SVMs all of {X 1 , X 2 , X 3 } are actionable.

A.5 Adult dataset case study
The causal graph for the Adult dataset informed by expert knowledge (Nabi and Shpitser 2018;Chiappa 2019) is depicted in Fig. 3c.
Because the true structural equations are not known, we learn an approximate SCM for the Adult dataset by fitting each parent-child relationship in the causal graph. Since most variables in the Adult dataset are categorical, additive noise is not an appropriate assumption for most of them. We therefore opt for modelling each structural equation, X i := f i (PA i , U i ), using a latent variable model; specifically, we use a conditional variational autoencoder (CVAE) (Sohn, Lee, and Yan 2015), similar to (Karimi et al. 2020c).
We use deterministic conditional decoders D i (PA i , U i ; ψ i ), implemented as neural nets parametrised by ψ i , and use an isotropic Gaussian prior, U i ∼ N (0, I), for each X i .
For continuous features, the decoders directly output the value assigned to X i , i.e., we approximate the structural equations as (8) For categorical features, the decoders output a vector of class probabilities (by applying a softmax operation after the last layer). The arg max is then assigned as the value of the corresponding categorical feature, i.e., (9) The decoders D i (PA i , U i ; ψ i ) are trained using the standard variational framework (Kingma and Welling 2014;Rezende, Mohamed, and Wierstra 2014), amortised with approximate Gaussian posteriors q φi (U i |X i , PA i ) whose means and variances are computed by encoders in the form of neural nets with parameters φ i . For continuous features, we use the standard reconstruction error between real-valued predictions and targets, i.e., L2/MSE(X i , D i (PA i , U i ; ψ i )), whereas for categorical features, we instead use the cross entropy loss between the one-hot encoded value of X i and the predicted vector of class probabilities, i.e., The CVAEs are trained on 6, 000 training samples using a fixed learning rate of 0.05, and a batch size of 128 for 100 epochs with early stopping on a held-out validation set of 250 samples. For each parent-child relation, we train 10 models with the number of hidden layers and units randomly drawn from the following configurations for the encoder: enc arch = {(ζ, 2, 2), (ζ, 3, 3), (ζ, 5, 5), (ζ, 32, 32, 32)}, where ζ is the input dimensionality; and similarly for the decoders from: dec arch = {(2, η), (2, 2, η), (3, 3, η), (5, 5, η), (32, 32, 32, η)}, where η is either one for continuous variables, or alternatively the size of the one-hot embedding for categorical variables (e.g., Work Class, Marital Status, and Occupation have 7, 10, and 14 categories, respectively). Moreover, we also randomly pick a latent dimension from {1, 3, 5}. We then select the model with the smallest MMD score (Gretton et al. 2012) between true instances and samples from the decoder post-training.
To perform abduction for counterfactual reasoning with such an approximate CVAE-SCM, we sample U i from the approximate posterior. For further discussion, we refer to (Karimi et al. 2020c), Appendix C.
Finally, using this approximate SCM, we solve the recourse optimisation problem similar to the synthetic experiments above. The caveat with this approach (and any realworld dataset absent a true SCM for that matter) is that we are not able to certify that a given recourse action generated under the assumption of an approximate SCM will guarantee recourse when executed in the true world governed by the real (unknown) SCM.

B Additional Results
In this Appendix, we provide additional experimental results omitted from the main paper due to space constraints.

B.1 Additional Societal Interventions
In § 5, we only showed plots for i k with p = 1 since this has the largest potential to reduce recourse unfairness. However, it may not be feasible to give subsidies to all eligible individuals, and so, for completeness, we also show plots similar to Fig. 4 for different choices of (p, t, s) in Fig. 5.

B.2 Using different SCMs for Recourse
The results presented in § 4.1 of the main paper use an esti-mateM KR of the ground truth SCM M (learnt via kernel ridge regression under an additive noise assumption) to solve the recourse optimisation problem.
In Tab. 3 we show a more complete account of results which also includes the cases where the ground truth SCM M or a linear (M LIN ) estimate thereof is used as the basis for computing recourse actions. When using an SCM estimate for recourse, we only consider valid actions to compute ∆ cost and ∆ ind , where the validity of an action is determined by whether it results in a changed prediction according the oracle M .
We find that, as expected, using different SCMs does not affect Acc or ∆ dist since these metrics are, by definition, agnostic to the underlying causal generative process encoded by the SCM. However, using an estimated SCM in place of the true one may result in different values for ∆ cost and ∆ ind since these metrics take the downstream effects of recourse actions on other features into account and thus depend on the underlying SCM, c.f. Defns. 3.1 and 3.2.
We observe that using an estimated SCM may lead to underestimating or overestimating the true fair causal recourse metric (without any apparent clear trend as to when one or the other occurs). Moreover, the mis-estimation of fair causal recourse metrics is particularly pronounced when using the linear SCM estimateM LIN in a scenario in which the true SCM is, in fact, nonlinear, i.e., on the CAU-ANM data sets. This behaviour is intuitive and to be expected and should caution against using overly strong assumptions or too simplistic parametric models when estimating an SCM for use in (fair) recourse. We also remark that, in practice, underestimation of the true fairness metric is probably more problematic than overestimation.
Despite some small differences, the overall trends reported in § 4.1 remain very much the same, and thus seem relatively robust to small differences in the SCM which is used to compute recourse actions.

B.3 Kernel selection by cross validation
For completeness, we perform the same set of experiments shown in Tab. 3 where we also choose the kernel function by cross validation, instead of fixing it to either a linear or a polynomial kernel as before. The results are shown in Tab. 4 and the overall trends, again, remain largely the same.  Figure 5: Plots for additional societal interventions i k = (p, t, s) in the context of the credit card approval example. We consider budgets of p = 0.25 (left column), p = 0.5 (middle column), and p = 0.75 (right column). In the top row, we show the difference across groups in the average distance to the decision boundary for negatively classified individuals (recourse difference), the proportion of negatively-classified individuals in the disadvantaged group A = 0 who received the treatment (proportion treated), and the amount of subsidies actually paid out to these individuals (subsidies spent) as a function of the threshold t. Note that the subsidy amount is fixed to its maximum amount without affecting the label distribution, i.e., s = −2t. In rows 2-5, we show the feature distribution resulting from i k = (p, t, s) with t = −2s ∈ {−0.5, −1, −1.5, −2}, see the plot titles for the exact values.
As expected, we observe variations in accuracy compared to Tab. 3 due to the different kernel choice. Perhaps most interestingly, the FairSVM seems to generally perform slightly better in terms of ∆ dist when given the "free" choice of kernel, especially on the first three data sets with linearly generated labels. This suggests that the use of a nonlinear kernel may be important for FairSVM to achieve its goal.
However, we caution that the results in Tab. 4 may not be easily comparable across classifiers as distances are computed in the induced feature spaces which are either lowdimensional (in case of a linear kernel), high-dimensional (in case of a polynomial kernel), or infinite-dimensional (in case of an RBF kernel), which is also why we chose to report results based on the same kernel type in § 4. Table 3: Complete account of experimental results corresponding to the setting described in § 4 of the main paper, where we additionally consider using the true SCM M or a linear (M LIN ) estimate thereof to infer the latent variables U and solve the recourse optimisation problem. We compare different classifiers with respect to accuracy and different recourse fairness metrics on our three synthetic data sets with ground truth labels drawn from either a linear or a nonlinear logistic regression. For ease of comparison, we use the same kernel for all SVM variants for a given dataset: a linear kernel for linearly generated ground truth labels and a polynomial kernel for non-linearly generated ground truth labels. Moreover, linear (resp. nonlinear) logistic regression classifiers are used for linearly (resp. nonlinearly) generated ground truth labels. All other hyper-parameters are chosen by 10-fold cross-validation. We use a dataset of 500 observations for all experiments and make sure that it is roughly balanced, both with respect to the protected attribute A and the label Y . Accuracies (higher is better) are computed on a separate i.i.d. test set of equal size. Fairness metrics (lower is better) are computed based on randomly selecting 50 negatively-classified samples from each of the two protected groups and using these to compute the difference between group-wise averages (∆ dist and ∆ cost ) and maximum individual unfairness. When using an SCM estimate for recourse, we only consider valid actions to compute ∆ cost and ∆ ind , where the validity of an action is determined by whether it results in a changed prediction according the oracle M . For each experiment and metric, the best performing method is highlighted in bold. Table 4: Additional results where also the kernel (linear, polynomial, or rbf) for each SVM is chosen by 5-fold cross-validation instead of being fixed based on the ground truth label distribution. We remark that some metrics (e.g., ∆ dist ) may not be comparable across methods since they are computed in a different reference space when different kernels are selected. Otherwise the experimental setup is identical to that from Tab. 3, see the caption for details.