Counterfactual Fairness with Partially Known Causal Graph
Abstract
Fair machine learning aims to avoid treating individuals or sub-populations unfavourably based on sensitive attributes , such as gender and race.
Those methods in fair machine learning that are built on causal inference ascertain discrimination and bias through causal effects.
Though causality-based fair learning is attracting increasing attention, current methods assume the true causal graph is fully known.
This paper proposes a general method to achieve the notion of counterfactual fairness when the true causal graph is unknown.
To select features that lead to counterfactual fairness, we derive the conditions and algorithms to identify ancestral relations between variables on a Partially Directed Acyclic Graph (PDAG) , specifically, a class of causal DAGs that can be learned from observational data combined with domain knowledge.
Interestingly, we find that counterfactual fairness can be achieved as if the true causal graph were fully known, when specific background knowledge is provided: the sensitive attributes do not have ancestors in the causal graph.
Results on both simulated and real-world datasets demonstrate the effectiveness of our method.
Introduction
With the widespread application of machine learning in various fields (e.g., hiring decisions [23], recidivism predictions [1, 11] and finance [26, 55]), the ethical and social impact of machine learning is receiving increasing attention.
In particular, machine learning algorithms are sensitive to the bias in training data which may render their decisions discriminatory against individual or sub-population group with respect to sensitive attributes , e.g., gender and race.
For example, bias against AfricanAmericans was found with COMPAS, a decision support tool used by U.S. courts to assess the likelihood of a defendant becoming a recidivist [12].
To achieve fair machine learning, a large body of methods have been proposed to mitigate bias according to different fairness measures.
These methods can be roughly categorized into two groups.
The first group focuses on devising statistical fairness notions, which typically indicate the statistical discrepancy between individuals or sub-populations, e.g., statistical parity [14], equalized odds [22], and predictive parity [8].
Built on the causal inference framework [40], the second group treats the presence of causal effect of the sensitive attribute on the decision as discrimination [4, 19, 25, 27– 29, 37, 48, 49, 58, 60, 64, 65, 67–69].
Among the causal fairness works, counterfactual fairness [29], which considers the causal effect of sensitive attributes on the individual level, has received much attention.
Given the true causal graph,
Kusner et al.
[29] provide the conditions and algorithms for achieving counterfactual fairness in the constructed predictive model.
Wu et al.
[60] and Chiappa [4] extend counterfactual fairness by considering path-specific effects.
When the counterfactual effect is unidentifiable, counterfactual fairness can be approximately achieved by lower and upper bounds of counterfactual effects [59].
Existing counterfactual fairness methods assume the availability of a causal directed acyclic graph (DAG) [39], which encodes causal relationships between variables.
However, in many real-world scenarios, the causal DAG is often unknown due to insufficient understanding of the system under investigation.
An obvious path forward is to infer the causal DAG from observational data using causal discovery methods [6, 9, 24, 43, 44, 51–53, 66].
Unfortunately, without strong assumptions on the data generating process, such as linearity [51] and additive noise [24, 44], one cannot uniquely recover the underlying true causal graph from observational data alone.
In the general case, causal discovery methods could output a Markov equivalence class of DAGs that encode the same set of conditional independencies from data, which can be represented by a completely partially directed acyclic graph (CPDAG) [6, 54].
With additional background knowledge, we can discern more causal directions, which can be represented by a maximally partially directed acyclic graph (MPDAG) [34], but we still cannot obtain a unique causal DAG.
Following this augment, we have a natural question to answer: can we learn counterfactual fairness with a partially known causal graph represented by MPDAG?
In a causal DAG, if a variable S has a causal path to another variable T , then S is an ancestor of T and T is a descendant of S .
Counterfactual fairness deems the prediction to be counterfactually fair if it is a function of the non-descendants of sensitive attributes [29], which are straightforward to identify in DAGs.
However, in an MPDAG, with respect to a variable S , a variable T can be either
• a definite descendant of S if T is a descendant of S in every equivalent DAG, • a definite non-descendant of S if T is a non-descendant of S in every equivalent DAG, • a possible descendant of S if T is neither a definite descendant nor a definite non-descendant of S .
To achieve counterfactual fairness in MPDAGs, we need to select the definite non-descendants and some possible descendants of the sensitive attributes that could be non-descendants in the true DAG to make prediction.
This comes to the core challenge: the identifiability of the ancestral relation between two distinct variables in an MPDAG.
We refer the interested readers to a summary of existing identifiability results in Appendix G.
In this paper, we assume no selection bias and presence of confounders because the causal discovery algorithms themselves will not work well in such challenging scenarios.
Under this assumption, which can also be found in the most related work [4, 7, 59, 68], but removing the assumption on a fully directed causal DAG, we make the following main contributions towards achieving counterfactual fairness on MPDAGs:
• We provide a sufficient and necessary graphical criterion (Theorem 4.5) to check whether a variable is a definite descendant of another variable on an MPDAG;
• Based on the proposed criterion, we give an efficient algorithm (Algorithm 2) to identify ancestral relations between any two variables on an MPDAG; • We propose the first approach for achieving counterfactual fairness on partially known causal graphs, specifically MPDAGs; • We find that on an MPDAG, counterfactual fairness can be achieved as if the true causal graph is fully known with the assumption that the sensitive attributes can not have ancestors in the causal graph.
Background
In this section, we first review the structural causal model, causal graph and counterfactual inference.
Then we introduce counterfactual fairness criterion and its intuitive implications.
2.1 Structural causal model, causal graph, and counterfactual inference
Structural causal model (SCM) [40] is a framework to model causal relations between variables.
It is defined by a triple ( U, V, F ) , where V are observable endogenous variables and U are unobserved exogenous variables that cannot be caused by any variable in V .
F is a set of functions f 1 , ..., f n , one for each V i ∈ V expressing how V i is dependant on its direct causes: V i =
f i ( pa i , U i ) , where pa i is the observed direct causes of V i and U i is the set of unobserved direct causes of V i .
The exogenous
U i s are required to be jointly independent.
The set of equations F induces a causal graph D over the variables, usually in the form of a directed acyclic graph (DAG), where the directed causes of V i represents its parent set in the causal graph.
Based on SCM, one can perform counterfactual inference to answer the problems in the counterfactual world.
For example, consider in a fairness context, A , Y and X represent the sensitive attributes, outcome of interest, and other observable attributes, respectively.
For an individual U = u with
A = a, Y = y and X = x , a common counterfactual query is: “For this individual u , what would the value of Y have been had A taken value a ′ ”.
The solution, denoted as Y A ← a ′ ( u ) can be obtained by three steps in the deterministic case: Abduction, Action and Prediction [40, Chapter 7.1].
In probabilistic counterfactual inference, the procedure can be modified to estimate the posterior of u and the distribution of Y A ← a ′ ( u ) .
DAGs, PDAGs and CPDAGs.
In a directed acyclic graph (DAG), all edges are directed and there is no directed cycle in the graph; when some edges are undirected, we say it is a partially directed graph (PDAG).
A DAG encodes a set of conditional independence relations based on the notion d-seperation [38].
Multiple DAGs are Markov equivalent if they encode the same set of conditional independence relations.
A Markov equivalence class of a DAG D can be uniquely represented by a completed partially directed acyclic graph (CPDAG)
G ∗ , denoted by [ G ∗ ] .
MPDAGs.
The CPDAGs with background knowledge constraint is known as maximally oriented
PDAGs (MPDAGs) [34], which can be obtained by applying Meek’s rules R1, R2, R3 and R4 in [34].
The Algorithm 1 in [42] can be used to construct the MPDAG G from the CPDAG G ∗ and backgroud knowledge B , where the background knowledge B is assumed to be the direct causal information in the form X → Y , meaning that X is a direct cause of Y .
The subset of Markov equivalent DAGs consistent with the background knowledge B can be uniquely represented by an
MPDAG G , denoted by [ G ] .
Both a DAG and a CPDAG can be regarded as special cases of an
MPDAG when the background knowledge is completely known and not known, respectively.
2.2 Counterfactual fairness
Counterfactual fairness [29] is a fairness criterion based on SCM [40].
Let A , Y and X represent the sensitive attributes, outcome of interest and other observable attributes, respectively and the prediction of Y is denoted by ˆ Y .
For an individual with X = x and A = a , we say the prediction ˆ Y is counterfactually fair if it would have been the same had A been a ′ in the counterfactual world as in the real world that A is a .
Definition 2.1 (Counterfactual fairness) .
[29, Definition 5]
We say the prediction ˆ Y is counterfactually fair if under any context X = x and A = a ,
[Equation]
for all y and any value a ′ attainable by A.
The definition of counterfactual fairness immediately suggests the following approach in Lemma 2.
to design a counterfactually fair model.
Lemma 2.2.
[29, Lemma 1] Let G be the causal graph of the given model ( U, V, F ) .
Then ˆ Y will be counterfactually fair if it is a function of the non-descendants of A .
Problem formulation
In this section, we introduce the task of achieving counterfactual fairness given PDAGs, especially
MPDAGs that can be learned from observational data using causal discovery algorithms [5, 9, 53].
Lemma 2.2 in Section 2.2 implies learning a counterfactually fair prediction can be framed as selecting the non-descendants of A to predict Y .
If a causal DAG is used to encode the causal relations of all attributes, finding all non-descendants of A is straightforward.
However, as mentioned in Section 1, given observational data and optional background knowledge about direct causal information, we can only learn a CPDAG or an MPDAG G , instead of the true DAG D ∈ [ G ] .
Unfortunately, not all ancestral relations between A and attributes in X are identifiable in a CPDAG or MPDAG.
Therefore, to achieve counterfactually fair prediction, we have two problems to solve:
• Identify the type of ancestral relations of any other attributes with A in G , i
e. , identifying the definite non-descendants, definite descendants, and possible descendants of A in an MPDAG (Section 4); • Build a counterfactually fair model based on the identified ancestral relations (Section 5).
Identifiability of ancestral relations in MPDAGs
In this section, we give a sufficient and necessary graphical criterion on identifying the definite ancestral relations between two distinct vertices in an MPDAG.
We also provide an efficient algorithm for implementing the proposed criterion.
We denote the parents, children, siblings and adjacencies of the node W in a graph G as pa ( W, G ) , ch ( W, G ) , sib ( W, G ) and adj ( W, G ) , respectively.
A chord of a path in G is any edge joining two non-consecutive vertices on the path.
A path without any chord is called chordless path .
In a graph G =
( V, E ) , where V and E represent the node set and edge set in G , the induced subgraph of G over V ′ ⊂
V is the graph with vertex V ′ and edges between vertices in V ′ , that is E ′ ⊂
E .
A graph is complete if any two distinct vertices are adjacent.
4.1 Graphical criterion on identifying ancestral relations in MPDAGs
We first introduce the term b-possibly causal path [42] in MPDAGs where the prefix b - stands for background.
Definition 4.1 (b-possibly causal path, b-non-causal path) .
[42, Definition 3.1] Suppose p = ⟨ S =
V 0 , ...,
V k
= T ⟩ is a path from S to T in an MPDAG G , p is b-possibly causal in G if and only if no edge V i ← V j , 0 ≤ i ≤ j ≤ k is in G , including the edge not on p .
Otherwise, p is a b-non-causal path in G .
Perkovi ´ c et al.
[42] state that T is a definite non-descendant of S in an MPDAG G
if and only if there is no b-possibly causal path from S to T in G .
In this section, to identify whether T is a definite descendant of S in an MPDAG, we provide a sufficient and necessary condition.
We introduce the term critical set [15] in CPDAGs as follows.
Definition 4.2 (Critical Set) .
[15, Definition 2] Let G be an CPDAG, S and T be two distinct vertices in G .
The critical set of S with respect to T in G consists of all adjacent vertices of S lying on at least one chordless possibly causal path from S to T .
Definition 4.2 can be extended to MPDAGs directly, based on which, we provide a sufficient and necessary graphical condition in Lemma 4.3 for identifying the definite ancestral relation between two distinct vertices in an MPDAG.
Lemma 4.3.
Let G be an MPDAG and S , T be two distinct vertices in G , then T is a definite descendant of S in G if and only if the critical set of S with respect to T always contains a child of S in every DAG D ∈
[ G ] .
The proof of Lemma 4.3 is in Appendix B.1.
Note that we have to enumerate all Markov equivalent
DAGs for checking the condition given in Lemma 4.3.
To resolve this problem, we provide a condition in Lemma 4.4 to check the graphical characteristic of the corresponding critical set in the
MPDAG directly.
The graphical criterion in Lemma 4.4 has been proved by [16, Lemma 2] and [3,
Lemma 1] for CPDAGs.
We extend it to general MPDAGs here.
Lemma 4.4.
Let G be an MPDAG and S , T be two distinct vertices in G .
Denote by C the critical set of S with respect to T in G , then C ∩ ch ( S, D ) = ∅ for some DAG D ∈ [ G ] , if and only if C = ∅ , or C induces a complete subgraph of G but C ∩ ch ( S, G ) = ∅ .
The proof of Lemma 4.4 is in Appendix B.2.
Building on Lemma 4.3 and Lemma 4.4, we arrived at the desired sufficient and necessary graphical criterion in Theorem 4.5.
Theorem 4.5.
Let S and T be two distinct vertices in an MPDAG G , and C be the critical set of S with respect to T in G .
Then T is a definite descendant of S if and only if either S has a definite arrow into C , that is C ∩ ch ( S, G ) ≠ ∅ , or S does not have a definite arrow into C but C is non-empty and induces an incomplete subgraph of G .
With Theorem 4.5, we can identify whether T is a definite descendant of S in an MPDAG by finding all chordless b-possibly causal path from S to T and checking graphical characteristic of the corresponding critical set.
We provide an example to illustrate Theorem 4.5 in Appendix C.
4.2 Algorithms
Here we provide an efficient algorithm to identify the ancestral relation between any two distinct vertices in an MPDAG based on the theoretical results in Theorem 4.5.
It is straightforward to identify the non-ancestral relation by checking if there exists a b-possibly causal path from the source to the target.
However, discriminating between a definite ancestral relation and a possible ancestral relation in an MPDAG by Theorem 4.5 requires finding the critical set.
According to the definition of the critical set, we need to find all chordless possibly causal paths from the source variable to the target variable first.
However, it is cumbersome to check whether a path is chordless, since it involves considering many edges not on the path.
In Proposition 4.7 we propose a more efficient way to find critical sets by leveraging the relation between chordless path and definite status path in Lemma 4.6.
We first provide the notion of collider and definite status path .
Colliders and Definite Status paths.
In a path p = ⟨ S = V 0 , ..., V k = T ⟩ , if V i − 1 → V i and
V i ← V
i + 1 , then we say V i is a collider on p .
If V i − 1 and V i + 1 are not adjacent, then the triple ⟨ V i − 1 , V i , V i + 1 ⟩ is called a v-structure collided on V i , and V i can be called unshielded collider .
A node V i is a definite non-collider on a path p if there is at least one edge out of V i on p or
V i − 1 − V
i − V i + 1 is a subpath of p and V i − 1 is not adjacent with V i + 1 .
A node is of definite status on a path if it is a collider, a definite non-collider or an endpoint on the path.
A path p is of definite status if every node on p is of definite status.
Lemma 4.6.
Let S and T be two distinct vertices in an MPDAG G .
If p is a chordless path from S to
T in G , then p is of definite status.
Proposition 4.7.
Let G be an MPDAG, S and T be two distinct vertices in G .
Denote by C ST the critical set of S with respect to T in G , then C ST = F ST , where F ST denotes all adjacent vertices of S lying on at least one b-possibly causal path of definite status from S to T in G that there is no chord with S as an endpoint.
Proposition 4.7 implies that, instead of enumerating all chordless possibly causal path from the source vertex to the target vertex, we enumerate b-possibly causal paths of definite status, excluding paths that contain any chord where the source vertex is an end node.
The nodes adjacent to the source vertex on these paths constitute the desired critical set.
The proof of Lemma 4.6 and Proposition 4.7 are in Appendix B.4 and Appendix B.5, respectively.
Following from Proposition 4.7, we develop Algorithm 1 showing how to efficiently find the critical set of S w.r.t.
T in an MPDAG G .
Given an MPDAG G , the source vertex S and the target vertex
T , the output of Algorithm 1 is the critical set of S w.r.t.
T in G .
Using the breadth-first-search algorithm, Algorithm 1 searches b-possibly causal path of definite status without any chord ending in
S from S to T .
A detailed explanation of this algorithm is provided in Appendix D.
Finally, we present Algorithm 2 to identify the type of ancestral relation.
We first find the critical set C of S with respect to T .
When C = ∅ , there is no b-possibly causal path from S to T , so T is a definite non-descendant of S .
When C ≠ ∅ , using Theorem 4.5, we can decide whether T is a definite descendant or a possible descendant of S .
Algorithm 2 Identify the type of with
Since in Algorithm 1, the same triple like ( α, ϕ, τ ) can only be visited at most once, where α is a sibling or a child of S in the MPDAG G , τ is a node on a b-possibly causal path of definite status from S to T without any chord ending in S , and ϕ lies immediately before τ on such path.
The complexity of Algorithm 1 in the worst case is O (∣ sib ( S, G )
+ ch ( S, G )
∣ ∗ ∣ E ( G )∣) , where ∣ E ( G )∣ is the number of edges in G .
Consequently, the computational complexity of Algorithm 2 is
O (∣ sib ( S, G )
+ ch ( S, G )
∣ ∗ ∣ E ( G )∣) .
Counterfactual fairness in MPDAGs
Now, we return to our problem of learning counterfactually fair models via selecting features from
X .
We will consider two cases: 1) a general MPDAG and 2) an MPDAG learned with background knowledge that A is a root node.
5.1 General case
We can identify the set of definite descendants, possible descendants and definite non-descendants of the sensitive attribute by simply applying Algorithm 2 to each pair of sensitive and any other attribute, which is concluded in Algorithm 4.
The detailed description of Algorithm 4 is provided in Appendix E.
As the computational complexity of Algorithm 2 in the worst case is O (∣ sib ( S, G ) + ch ( S, G )∣ ∗ ∣ E ( G )∣) , the complexity of Algorithm 4 is directly O (∣ sib ( S, G )
+ ch ( S, G )
∣ ∗ ∣ E ( G )∣ ∗ ∣ V ( G )∣) , where ∣ E ( G )∣ is the number of edges and ∣ V ( G )∣ is the number of nodes in G .
We consider two feature selection methods.
The first method (called Fair ) only selects the definite non-descendants, which ensures counterfactual fairness.
However, the number of definite non-descendants in an
MPDAG might be too small, resulting in low prediction accuracy.
Therefore, we also propose a second method (called FairRelax ),which uses possible descendants of A to increase the prediction accuracy at the cost of a violation of counterfactual fairness.
5.2 Under root node assumption
Kusner et al.
[29, Section 3.2] mentioned the ancestral closure of sensitive attributes, meaning that typically we should expect the sensitive attribute set A to be closed under ancestral relationships given by the causal graph.
For instance, in the example that religion can be affected by the geographical place of origin, if religion is a sensitive attribute and geographical place of origin is a parent of religion , then it should also be in A .
Therefore, A will be the root node in most cases except some counterintuitive scenarios.
Thus, we consider the following assumption, which is often true in real-world datasets.
Assumption 5.1.
The sensitive attribute can only be a root node in a causal MPDAG.
For example, ‘sex’ cannot be caused by factors like ‘education’ and ‘salary’.
In an MPDAG G , given
Assumption 5.1, the ancestral relation between the sensitive attribute and any other attribute is fully identified, as shown in the following proposition.
Proposition 5.2.
In a MPDAG G with sensitive attribute A , if Assumption 5.1 holds, then any other attribute is either a definite descendant or definite non-descendant of A .
Moreover, an arbitrary attribute W is a definite descendant of A if and only if there is a causal path from A to W in G .
The proof of Proposition 5.2 is in Appendix B.6.
From Proposition 5.2, it is very interesting to see that fitting a model with the definite non-descendants of A in G is exactly the same thing as fitting a model with the non-descendants of A in the true DAG D .
Thus, the counterfactual fairness can be achieved as if the true causal DAG is fully known.
Under Assumption 5.1, since there is a causal path from A to any definite descendant of A , we can directly identify whether a target attribute is a descendants of A by checking if there is a causal path from A to the target.
To find all definite descendants in an MPDAG, we can use a breath first search algorithm with computational complexity O (∣ V ∣ + ∣ E ∣) , where ∣ V ∣ is the number of nodes and ∣ E ∣ is the number of edges in G .
Then the remaining nodes are definite non-descendants of A in G .
Experiment
In this section, we illustrate our approach on a simulated and a real-world dataset by evaluating the prediction performance and fairness of our approach.
The prediction performance is evaluated by root mean squared error (RMSE).
The counterfactual unfairness can be measured by the discrepancy of the predictions in the real world and counterfactual world for each individual.
In addition, unfairness can also be revealed by comparing the distributions of the predictions in two worlds, which coincide if the prediction is counterfactually fair.
Baselines.
We consider three baselines: 1) Full is a standard model that uses all attributes, including the sensitive attributes to make predictions, 2) Unaware is a model that uses all attributes except the sensitive attributes to make predictions, and 3) Oracle is a model that makes predictions with all attributes that are non-descendants of the sensitive attribute given the groundtruth DAG.
As mentioned in Section 5, our proposed methods include FairRelax , which makes predictions using all definite non-descendants and possible descendants of the sensitive attribute in an MPDAG, and Fair , which makes predictions using all definite non-descendants of the sensitive attribute in an MPDAG.
6.1 Synthetic data
The synthetic data is generated from linear structural equation models according to a random DAG.
As the simulated DAG is known, we obtain the CPDAG from the true DAG without running the causal discovery algorithms.
3 We also add background knowledge to turn a CPDAG into its corresponding
MDPAG.
We first randomly generate DAGs with d nodes and 2 d directed edges from the graphical model
Erd ˝ os-Rényi (ER), where d is chosen from { 10 , 20 , 30 , 40 } .
For each setting, we generate
DAGs.
For each DAG D , two nodes are randomly chosen as the outcome and the sensitive attribute, respectively.
The sensitive attribute can have two or three values, drawn from a Binomial([0,1]) or
Multinomial([0,1,2]) distribution separately.
The weight, β ij , of each directed edges X i → X j in the generated DAG, is drawn from a Uniform( [ − 2 , − 0 .
5 ] ∪ [ 0 . 5 , 2 ] ) distribution.
The data are generated according to the following linear structural equation model:
[Equation]
where ϵ 1 , ..., ϵ n are independent N ( 0 , 1 . 5 ) .
Then we generate one sample with size 1000 for each
DAG.
The proportion of training and test data is splitted as 0 .
∶ 0 .
Once the CPDAG G ∗ is obtained, where D ∈ [ G ∗ ] , we randomly generate the direct causal information A → B as the background knowledge from the edges where A → B is in DAG D , while A − B is in CPDAG G ∗ .
We show a randomly generated DAG D , the corresponding CPDAG G ∗ and MPDAG G as in Figure 8, see Appendix F.1.
For additional experiments based on more complicated structural equations and varying amount of possible background knowledge, please refer to Appendix F.4 and Appendix F.5.
We also analyze the model robustness experimentally on causal discovery algorithms in Appendix F.6.
Counterfactual fairness.
According to the predefined linear causal model, we first generate the counterfactual data given counterfactual sensitive attributes.
For each individual, the noise of any counterfactual feature is the same as that in the observational data.
In order to evaluate the counterfactual fairness of the baseline methods, we sample data from both the original and counterfactual data and fit them with all the models.
Here, unfairness can be measured by the absolute difference of two predictions, ˆ Y A ← a ( u ) and ˆ Y A ← a ′ ( u ) .
The results for each model with different graph settings are shown in Table 1 and Figure 1a.
Obviously, Oracle and Fair is counterfactually fair, since they do not use any feature that is causally dependant on the sensitive attribute.
Full and Unaware have high counterfactual unfairness, while our FairRelax has very low counterfactual unfairness.
Additionally, when the model is counterfactually fair, the distributions of the predictions in two worlds should lie on top of each other, as in the Oracle and Fair models.
Although counterfactual unfairness is exhibited in the other three models, FairRelax is closer to strictly counterfactually fair methods.
An exemplary density plot of the predictions of all the models in one original and counterfactual dataset is shown in Figure 2.
[Table]
Accuracy.
For each graph setting, we report average RMSE achieved on 100 causal graphs by fitting a linear regression model for the baselines and our proposed models in Table 1 and Figure 1b.
We can observe that, for each graph setting, the Full model obtains the lowest RMSE, which is not surprising as it uses all features.
In addition, our FairRelax methods obtains better accuracy than the strictly counterfactually fair methods Fair and Oracle , which is consistent with the accuracy-fairness trade-off phenomenon.
More discussion on accuracy-fairness trade-off is included in Appendix H.
6.2 Real data
The UCI Student Performance Data Set [10] regarding students performance in Mathematics is used in this experiment.
The data attributes include student grade in secondary education, demographic, social, and school related features.
It contains 395 students records with 32 attributes.
We regard sex as the sensitive attribute in this dataset.
Besides, we remove the first, second and final period grade, denoted by G1,G2 , and G3 in the dataset and generate the value of target attribute Grade as the average of G1,G2 , and G3 .
[Figure]
30nodes60edges 40nodes80edges
[Figure]
[Figure]
In this section
[Figure]
we first learn the corresponding CPDAG from this dataset leveraging the GES structure learning algorithm [5], which is implemented by a general causal discovery software - TETRAD [45].
After uploading the preprocessed data, we can learn the CPDAG G ∗ .
The evolution of the CPDAG to
MPDAG is shown in Appendix F.2.
Our experiments are carried out under the root node assumption on the MPDAG G in Figure 9c, as sex cannot be caused by other variables in the dataset.
Due to the space limit, Figure 9c is provided in Appendix F.2.
Thus, the ancestral relations can be fully identified according to our theoretical results in Section 5.2.
Our algorithm will find all the non-descendants of the sensitive attribute.
On this dataset, the definite descendants of sex can be identified as {Walc, goout, Dalc, studytime} and all the other nodes are definite non-descendants of sex .
The counterfactual fairness and accuracy are measured in almost the same way as in Section 6.1.
The details on counterfactual data generation and model fitting can be referred to Appendix F.3.
The results are reported in Table 2.
Since under the root node assumption, there is no possible descendants of the sensitive attribute, the model Fair and FairRelax give the same RMSE result and both of them achieve counterfactual fairness at the cost of slight accuracy decrease.
Instead, the model Full and Unaware are unfair and the Full model is more unfair than Unaware .
Besides, the distribution of predictions for the original and counterfactual data for all models have the same trend as the synthetic data.
Figure 3 is the corresponding density plot.
Conclusion and discussion
In this paper, we have developed a general approach to achieve counterfactual fairness when the true causal graph is unknown.
In order to select features that lead to counterfactual fairness, we propose a sufficient and necessary condition and an efficient algorithm to identify the ancestral relations between any distinct vertices on an MPDAG, which may be applied to more applications.
[Table]
Furthermore, an intriguing finding is that, under the assumption that the sensitive attribute can only be a root node in the graph, there is no possible descendant of the sensitive attribute, so that the fair features can be selected correctly whatever the true DAG is.
Experiments on synthetic and real-world dataset show the effectiveness of our method.
One may claim that the fair prediction could be a function of the descendants of the sensitive attributes by balancing the observables, thus making the effect of the sensitive attribute canceled out.
We agree with this opinion.
However, it concerns the structural equations, which are in general unfalsifiable even if interventional data for all variables is available.
In this paper, we do not address the assumptions on structural equations for achieving counterfactual fairness on MPDAGs.
As a first step to obtaining a counterfactual fair predictor on an MPDAG, we focus on utilising the property of the causal graph (Level 1 in [29]) — making prediction with the definite non-descendants (and possible descendants) of the sensitive attribute.
But our work can also be extended to the case where “cancel out“ could happen on an MPDAG.
One possible idea is to learn latent variables by specifying the structural equations (or more relaxed, conditional distributions).
However, due to the fact that an
MPDAG represents a set of DAGs with different conditional distributions components and thus enjoy different latent space, the intuitive way to enumerate all DAGs is unrealistic.
Addressing such issue on an MPDAG is an interesting future direction.
Following prior work on establishing counterfactual fairness [4, 7, 59, 68], we assumed no selection bias and the presence of confounders throughout this paper.
Yet, another fundamental assumption in these earlier studies in causal modelling is that the causal graph is known, which offers a new chance for the bias induced by misspecifying the causal DAG.
Our work gives the first method to achieve counterfactual fairness without requiring the causal DAG to be specified.
In the presence of selection bias and confounders on a causal DAG, a counterfactual fairness measure degenerates to demographic parity, which is discussed extensively by Fawkes et al.
In this situation, it is considerably more difficult to provide a clear causal interpretation without specifying the causal
DAG.
This gives rise to an exciting topic to research in future work.
Exploring causal discovery algorithms to find the ground-truth causal graph in the presence of selection bias and confounders and then achieving counterfactual fairness on partially ancestral graphs [46, 63], which would be significantly more difficult, is another possible future direction.
Acknowledgement
AZ was supported by Melbourne Research Scholarship from the University of Melbourne.
SW was supported by ARC DE200101253.
TL was partially supported by Australian Research Council
Projects DP180103424, DE-190101473, IC-190100031, DP-220102121, and FT-220100318.
BH was supported by NSFC Young Scientists Fund No. 62006202 and Guangdong Basic and Applied
Basic Research Foundation No. 2022A1515011652.
KZ was partially supported by the National
Institutes of Health (NIH) under Contract R01HL159805, by the NSF-Convergence Accelerator
Track-D award #2134901, by a grant from Apple Inc., and by a grant from KDDI Research Inc.. MG was supported by ARC DE210101624.
A Preliminaries
Graph and Path.
Let p = ⟨ S = V 0 , ...,
V k
= T ⟩ be a path in a graph G , p is a causal path from S to
T if V i
→ V i + 1 for all 0 ≤ i ≤ k − 1 .
p is a possibly causal path from S to T if no edge V i ←
V
i +is in G .
Otherwise, p is a non-causal path in G .
A (causal, possibly causal, non-causal) cycle is a (causal, possibly causal, non-causal) path from a vertex to itself.
Ancestral Relations.
If there is S → T in G , we say S is a parent of T and T is a child of S , denoted by pa ( T, G ) and ch ( S, G ) , respectively.
If there is a causal path from S to T , then we say S is an ancestor of T and T is a descendant of S , denoted by an ( T, G ) and de ( S, G ) . If there is a possibly causal path from S to T , then we say S is a possible ancestor of T and T is a possible descendant of S , denoted by possAn ( T, G ) and possDe ( S, G ) .
As a convention, we regard every node as an ancestor and a descendant of itself.
MPDAGs Construction.
Borrowed from [42], Algorithm 3 summarizes, the way to construct the maximal PDAG G ′ from the maximal PDAG G and backgroud knowledge B , by leveraging Meek’s rule in Figure 4.
Specifically, here the background knowledge B is assumed to be the direct causal information in the form S → T , meaning that S is a direct cause of T .
If Algorithm 3 does not return
FAIL, then the background knowledge B and returned maximal PDAG G ′ are consistent with the input maximal PDAG G .
Algorithm 3 Construct MPDAG [34, 42]
T
} OR
{ S → T } is in G ′ then
Orient { S → T } in G ′
Orienting edges in G ′ following the rules in
Figure
until no edge can be oriented; 10: else 11:
FAIL;
[Figure]
A.1 Existing results
Lemma A.1.
[42, Lemma B.1] Let p = ⟨ V 1 , ..., V k ⟩ be a b-possibly causal definite status path in an
MPDAG G .
If there is a node i ∈ { 1 , ..., n − 1 } such that V i
→ V i + 1 , then p ( V i , V k ) is a causal path in G .
Lemma A.2.
[42, Lemma 3.6] Let S and T be distinct nodes in an MPDAG G .
If p is a b-possibly causal path from S to T in G , then a subsequence p ∗ of p forms a b-possibly causal unshielded path from S to T in G .
Let X be a variable in an MPDAG G , R ⊂ sib
( X, G ) , then we use G R → X to denote the partially directed graph resulted by orienting R → X and X → sib ( X, G )\ R in G .
Fang & He [15] propose the following Theorem A.3 to check the existence of G R → X .
Theorem A.3.
[15, Theorem 1] Let G be an MPDAG consistent with a CPDAG G ∗ .
For any vertex
X and R ⊂ sib
( X, G ) , the following three statements are equivalent.
• There is a DAG D ∈ [ G ] such that pa ( X, D )
=
R ∪ pa ( X, G ) and ch ( X, D )
=
sib ( X, G ) ∪ ch ( X, G )\ R .
Compared with G , G R → X does not introduce any new V-structure collided on X or any directed triangle containing X .
• The induced subgraph of G over R is complete, and there does not exist an R ∈ R and a W ∈ adj ( X, G )\( R ∪ pa ( X, G ))
such that W → R .
Definition A.4 (Critical Set) .
[15, Definition 2] Let G ∗ be a CPDAG.
S and T are two distinct vertices in G ∗ .
The critical set of S with respect to T in G ∗ consists of all adjacent vertices of S lying on at least one chordless possibly causal path from S to T .
Theorem A.5.
[16, Theorem 1] Suppose that G ∗ is a CPDAG, S and T are two distinct vertices in
G ∗ , and C is the critical set of S with respect to T in G ∗ .
Then, T is a definite descendant of S if and only if C ∩ ch ( S, G ∗ ) ≠ ∅ , or C is non-empty and induces an incomplete subgraph of G ∗ .
Lemma A.6.
[32, Lemma 3.1] Given a CPDAG G ∗ , a variable X , and R ⊂ sib
( X, G ∗ ) , orienting
R → X for each R ∈ R and X → W for each W ∈ sib ( S, G ∗ )\ R is consistent with G ∗ if and only if new orientations do not introduce v-structures collided on X .
B Detailed proofs B.1 Proof of Lemma 4.
Proof.
First, we prove the sufficiency.
Let D be any underlying DAG D ∈ [ G ] , and C be the critical set of S with respect to T in G .
Suppose C ∈ C is a child of S in D , that is S
→ C in D .
By the definition of critical set, C lies on a chordless b-possibly causal path π from S to T in G .
Since
S → C in D , by Lemma A.1, the corresponding path π in D is directed.
Therefore, S is an ancestor of T in the underlying DAG.
Next, we prove the necessity: For another direction, suppose that S is a definite ancestor of T in any underlying DAG D .
Let π be the shortest causal path from S to T in D , then the corresponding path of π in G is a chordless b-possibly causal path, since if π has any chord in G , π in D cannot be the shortest path.
Denote the vertex adjacent to S on π be C , then C ∈ C and C is a child of S in the
DAG D .
Therefore, if T is definite descendant of S in G , then C always contains a child of S in every DAG D ∈
[ G ] .
B.2 Proof of Lemma 4.
The proof idea of Lemma 4.4 is to find the graphical condition in an MPDAG that when C ≠ ∅ , all vertices in C or a superset of C can be oriented to X in some Markov equivalent DAG, by utilizing locally valid orientation rules for MPDAGs (Theorem A.3).
The rules are to check whether a set of variables in an MPDAG can be the parents of a given target.
In this section, we will first introduce some technical lemmas, and then prove Lemma 4.4 in Section 4.1.
B.2.1 Technical lemmas
In this section, we introduce some technical lemmas that are useful in the proof of Lemma 4.4.
Lemma B.1.
Let G be an MPDAG.
For any vertex X in G and R ⊂ sib
( X, G ) , if R induces a complete subgraph of G and there exists a R ∈ R and a W ∈ adj ( X, G )\( R ∪ pa ( X, G ))
such that
W → R , then R ∪ W induces a complete subgraph of G and W ∈ sib
( X, G )\ R .
Proof.
Suppose for a contradiction that R ∪ W induces an incomplete subgraph of G .
Since R induces a complete subgraph of G , that means some vertex R ′
∈ R is not adjacent with W .
As
W ∈ adj ( X, G )\( R ∪ pa ( X, G ))
, the node W can be a child or a sibling of X .
(1) For the first case, as in Figure 5a, if W is a child of X in G , since W → R , then X − R can be oriented by Rule 2 in Meek’s criteria as X → R , which contradicts that R is a sibling of X ; (2) For the second case, if W is a sibling of X in G and W → R , then the edge between R and R ′ can not be an undirected edge in G , since R ′ and W are not adjacent.
R → R ′ can be oriented by
Meek’s Rule 2, or R ← R ′ and ⟨ R ′ , R, W ⟩ is a v-structure collided on R .
For the former case, if R → R ′ is in G as in Figure 5b, then X → R ′ can be oriented by Rule 4, which contradicts that R ′ is a sibling of X in G .
For the latter case in Figure 5c, if W is a sibling of X in G and
W → R ← R ′ , since R ′ and W are not adjacent, then X − R can be oriented as X → R in G by
Meek’s Rule 3, which contradicts that R is a sibling of X .
Therefore, there does not exist any vertex R ′ ∈ R not adjacent with W , so R ∪ W induces a complete subgraph of G .
[Figure]
Lemma B.2.
In an MPDAG G , for any vertex X , there exists
H ⊆ sib
( X, G ) that induces a complete subgraph of G
if and only if there exists some R that
H ⊆ R ⊆ sib ( X, G ) , such that there is a DAG
D ∈
[ G ] that pa ( X, D ) =
R ∪ pa ( X, G ) and ch ( X, D )
=
sib ( X, G ) ∪ ch ( X, G )\ R .
Proof.
According to Theorem A.3, in an MPDAG G , for any vertex X and R ⊂ sib ( X, G ) , the following two statements are equivalent:
(1) There is a DAG D ∈ [ G ] such that pa ( X, D )
=
R ∪ pa ( X, G ) and ch ( X, D )
=
sib ( X, G ) ∪ ch ( X, G )\ R .
The induced subgraph of G over R is complete, and there does not exist an R ∈ R and a W ∈ adj ( X, G )\( R ∪ pa ( X, G ))
such that W → R .
Therefore, Lemma B.2 can also be stated as: In an MPDAG G , for any vertex X , there exists
H ⊆ sib ( X, G ) that induces a complete subgraph of G if and only if there exists some R that
H ⊆ R ⊆
sib ( X, G ) , such that the induced subgraph of G over R is complete, and there does not exist an R ∈ R and a W ∈ adj ( X, G )\( R ∪ pa ( X, G ))
such that W → R .
The proof of sufficiency is straightforward.
That set R induces a complete subgraph can ensure that any subset of R induces a complete subgraph of G .
Next, we prove the necessity.
If H ⊆ R is complete and there does not exist an H ∈ H and a
W ∈ adj ( X, G )\( H ∪ pa ( X, G ))
such that W → H , then H satisfies the condition and we are done.
Otherwise, if H is complete and there exists an H ∈ H and a W ∈ adj ( X, G )\( H ∪ pa ( X, G )) such that W → H , by Lemma B.1, ( H ∪ W ) ⊆
R induces a complete subgraph of G .
Similarly, if H ∪ W is complete and there does not exist
an H ′ ∈
H ∪ W and a W ′ ∈ adj ( X, G )\( H ∪ W ∪ pa ( X, G ))
such that W ′
→ H ′ , then H ∪ W satisfies the condition and we are done.
Otherwise, ( H ∪ W ∪ W ′ ) ⊆
R induces a complete subgraph of G .
Following this derivation, either we are done or we will end with the result that sib ( X, G ) is complete.
For the latter situation, by Theorem A.3, since orienting every vertex in sib ( X, G ) towards X does not introduce any new V-structure collided on X or any directed triangle containing X .
In this case, R = sib
( X, G ) meets the left hand side and we are done.
B.2.2 Proof of Lemma 4.
Proof.
We first show the necessity.
By Definition 4.2, C ⊆ sib ( S, G ) ∪ ch ( S, G ) .
Let D ∈
[ G ] be an arbitrary DAG.
If C ∩ ch ( S, D ) = ∅ and C ≠ ∅ , then C ⊆ pa ( S, D ) , and thus C ⊆ sib ( S, G ) .
Denote by R = sib ( S, G ) ∩ pa ( S, D ) , we have C ⊆ R ⊆
sib ( S, G ) and C ⊆ R ⊆
pa ( S, D ) .
Theorem A.3 proved that a non-empty subset R of sib ( S, G ) can be a part of S ’s parent set in some equivalent DAG if and only if R induces a complete subgraph of G , and there does not exist a set
R ∈ R and a W ∈ adj ( S, G )\
( R ∪ pa ( S, G )) such that W → R .
Therefore, as a subset of R , C induces a complete subgraph of G .
This completes the proof of necessity.
We next prove the sufficiency.
If C = ∅ , then it is straightforward that C ∩ ch ( S, D ) = ∅ for some D ∈ [ G ] .
Now assume C ≠ ∅ and C ∩ ch ( S, G ) = ∅ .
As C ⊆ sib ( S, G ) ∪ ch ( S, G ) , we have C ⊆ sib ( S, G ) .
Since C induces a complete subgraph of G , by Lemma B.2, there exists
R , C ⊆ R ⊆
sib ( S, G ) , that there is a DAG D ∈
[ G ] such that pa ( S, D ) =
R ∪ pa ( S, G ) and ch ( S, D )
=
sib ( S, G ) ∪ ch ( S, G )\ R .
As R ⊆ pa ( S, D ) and C ⊆ R , C ⊆ pa ( S, D ) and thus
C ∩ ch ( S, D ) = ∅ .
B.3 Proof of Theorem 4.
Theorem 4.5 is closely related to Theorem A.5 for CPDAGs from [16].
Since CPDAG is a special case of MPDAG, all results for MPDAGs works for CPDAGs.
Although the condition provided by these two theorems are the same, they based on different theoretical results on locally valid orientation rules for CPDAGs and MPDAGs.
The one for CPDAGs is mainly based on Lemma A.6 and for
MPDAGs, it is mainly based on Theorem A.3.
Proof.
Figure 6 shows how all lemmas fit together to prove the Theorem 4.5.
To decide whether
T is a definite descendant of S in an MPDAG G , Lemma 4.3 provides a sufficient and necessary condition on a graphical characteristic of C on every DAG D ∈ [ G ] , which is then further explored by Lemma 4.4 to a graphical characteristic of C on the corresponding MPDAG G .
Following from
Lemma 4.3 and Lemma 4.4, we have the desired sufficient and necessary condition to check whether
T is a definite descendant of S in an MPDAG G on the graphical characteristic of C .
Theorem 4.
Lemma 4.3 Lemma 4.4 Lemma B.2 Lemma B.
B.4 Proof of Lemma 4.
Proof.
Suppose p = ⟨ S = V 0 , ...,
V k
= T ⟩ is a chordless path from S to T .
We will show that p is of definite status by showing that every vertex on p is of definite status.
Any triple ⟨ V i − 1 , V i , V i + 1 ⟩ on p with i ∈ { 1 , ..., k − 1 } can be in the form: (1) V i − 1 → V i ←
V
i + 1 ; or (2) V i
→ V i + 1 or V i − 1 → V i on p or V i − 1 − V
i − V i + 1 is a subpath of p and V i − 1 is not adjacent with V i + 1 .
In the former case,
V i is a collider; in the latter case, V i is a definite non-collider.
The triple cannot be in the form
V i − 1 → V i − V
i + 1 or V i − 1 − V
i ← V i
+ 1 , since the undirected edge can be oriented departs V i by Rule 1 in Meek’s criterion.
Therefore, every vertex on p is of definite status.
Thus, we completes the proof that p is of definite status.
B.5 Proof of Proposition 4.
Proof.
If all definite status b-possibly causal path from S to T are chordless, then by Lemma 4.6,
F ST is exactly C ST .
Suppose that there are definite status b-possibly causal path from S to T with chords.
We first prove that C ST ⊆ F ST .
By the definition of critical set, for any C ∈ C ST , there is a chordless possibly causal path p from X to Y on which C is adjacent to S .
By Lemma 4.6, p is also a definite status b-possibly causal path from S to T without any chord.
Therefore, as an adjacent vertex of S on p , C ∈ F ST as well.
Since C is an arbitrary vertex in C ST , C ST ⊆ F ST .
Then we prove F ST ⊆ C ST .
For any F ∈ F ST , there is a definite status b-possibly causal path p ∗ from S to
T in G that there is no chord with S as an endpoint, on which F is adjacent to X .
By Lemma A.2, some subsequence of p ∗ forms a chordless b-possibly causal path p
∗∗ from S to T .
As on p ∗ , there is no chord with S as an endpoint, the chordless b-possibly causal path p ∗∗ must start with the edge
S − F... or S → F... .
Therefore, F ∈ C ST .
Since F is an arbitrary vertex in F ST , F ST ⊆ C ST .
This completes the proof of Proposition 4.7.
B.6 Proof of Proposition 5.
Proof.
Suppose there is a possible descendant of A in G , which is denoted by B .
Then there is a b-possibly causal path p from A to B .
By Lemma A.2, a subsequence p ∗ of p forms a b-possibly causal unshielded path from A to B .
Suppose p ∗ =
⟨ A = V 0 , ..., V k = B ⟩ , Assumption 5.1 implies
A → V 1 .
By Lemma A.1, p ∗ is a causal path from A to B in G .
Therefore, B is a definite descendant of A .
C An illustration example for Theorem 4.
Example.
Consider the MPDAG G in Figure 7 and the node A .
We show the ancestral relations between A and any other nodes.
In G , it is obvious that B, C, D and H are possible descendants of
A .
That is because B is adjacent with A , and the critical set of B with respect to A is itself, which induces a complete subgraph of G .
The same conclusion can be drawn for C, D , and H .
Node E is also a possible descendant of A , since the chordless possibly causal path from A to E are A − B − E and A − C − E , the critical set of A with respect to E is { B, C }.
As the induced subgraph of G over { B, C } is complete, by Theorem 4.5, E is not a definite descendant of A , so it is a possible descendant of A .
For F , the chordless possibly causal path from A to F are A − B − F , A − C − F and A − D − F , thus the critical set of A with respect to F is { B, C, D }.
Since the corresponding induced subgraph is incomplete, by Theorem 4.5, F is a definite descendant of A .
A
[Figure]
C
[Figure]
F
H
D, E and H are possible descendants of A ; node F is a definite descendant of A .
D Algorithm 1 and detailed explanation
In Algorithm 1, every b-possibly causal path of definite status (Line 12-13) on the way starting from S to τ without any chord ending in S (Line 14) is recorded in a queue Q as a triple ( α, ϕ, τ ) , where α is the node lying immediately after S and ϕ is the node that lie immediately before τ on the path.
If τ is exactly Y , we add α to the critical set C and remove from Q all triples where the first element is α , that is, we stop enumerating the required paths on which the node adjacent with S is α (Line 8-9).
Otherwise, we extend the path to the adjacencies of τ , β , so that the path from S to β is still a b-possibly causal path of definite status without any chord ending in S
and then we add the corresponding triples to the queue Q (Line 11-16).
In this algorithm, H is introduced to store the visited triples, and to avoid visiting the same triple twice.
E Algorithm in Section 5.
Algorithm 4 Identify the type of ancestral relation of S with respect to all the other vertices in an
MPDAG
F Supplementary experimental results F.1 Causal graphs for one simulation
[Figure]
C
H
[Figure]
F
I
[Figure]
C
H
Y
D
B
F
I (
[Figure]
MPDAG
[Figure]
Mjob
Medu
Fedu
Grade schoolsup age school address internet traveltime goout
Walc
Dalc sex studytime
Fjob absences reason famsup paid higher activities famsize guardian
Pstatus famrel nursery health freetime romantic (a) CPDAG G ∗ .
Mjob
Medu
Fedu
Grade schoolsup age school address internet traveltime goout
Walc
Dalc sex studytime
Fjob absences reason famsup paid higher activities famsize guardian
Pstatus famrel nursery health freetime romantic (b) MPDAG G ′ without the root assumption.
Mjob
Medu
Fedu
Grade schoolsup age school address internet traveltime goout
Walc
Dalc sex studytime
Fjob absences reason famsup paid higher activities famsize guardian
Pstatus famrel nursery health freetime romantic (c) MPDAG G with the root assumption.
Mjob
Medu
Fedu
Grade schoolsup age school address internet traveltime goout
Walc
Dalc sex studytime
Fjob absences reason famsup paid higher activities famsize guardian
Pstatus famrel nursery health freetime romantic (d) An arbitrary DAG D in Markov equivalence class of G .
class of G .
F.3 Training details on real data
We assume the linear causal model in the obtained MPDAG G .
To test the counterfactual fairness of the baseline methods, as in Section 6.1, we first generate the counterfactual data.
Since the ground-truth DAG is unknown, we generate the counterfactual data from a DAG sampled from the
Markov equivalence class of MPDAG G .
Then we fit the parameters of the model using the original data and generate samples from the model given the counterfactual sex and the same noise in the original data for each individual.
We fit baseline models to both the original and counterfactual sampled data and measure the unfairness in the same way as in Section 6.1.
This procedure is carried out 10 times and the average unfairness and RMSE results for five models are reported in Table 2.
F.4 Experiment based on more complicated structural equations
To show the generality of our method, we generate each variable X i from the following non-linear structure equation:
[Equation]
where the causal mechanism f
i is randomly chosen from linear , sin , cos , tanh , sigmoid function and their combinations; g i , which represents the post-nonlinear distortion in variable X i , is randomly chosen from linear function, absolute and reciprocal function; ϵ i is the noise term, sampling from
Gaussian , Exponential and Gumbel distributions.
With the same basic settings and evaluation metrics as Section 6.1, we fit a SVM regression model for the baselines and our proposed models.
The average unfairness and RMSE achieved on 100 causal graphs is reported in Table 3.
The corresponding boxplot is shown in Figure 10 as well.
We can see that it yields the same trend on counterfactual fairness as the linear case, while the accuracy in this dataset does not necessarily decrease with the increase in fairness.
More discussion on accuracy-fairness tradeoff can be referred to Appendix H.
[Table]
[Figure]
F.5 Experiment analyzing fairness performance with varying amount of given domain knowledge
Prediction using Fair method results in a strictly fair model regardless of how much domain knowledge is given.
Prediction using FairRelax method will show different fairness performance with different amount of domain knowledge, since some definite descendants X of the sensitive attribute may be possible descendants when less domain knowledge is given, thus the unfair feature
X will be involved to make predictions.
At this point we do not know, theoretically, how different amounts or even types of domain knowledge will affect the performance of FairRelax .
However, we can explore this experimentally.
For a given CPDAG, only the fairness performance of FairRelax model among all models will be affected by the amount of background knowledge.
The more background knowledge, the fairer the
FairRelax .
For example, in the setting ‘10nodes20edges’, when the proportion of the undirected edges’ true orientation is increased from 0.1, 0.3, 0.6 to 1, the unfairness for FairRelax are 0.075, 0.023, 0.018, 0.0, respectively.
The same trend can be found in other graph settings, see Table 4.
The ‘ BK (%)’ represents how much the undirected edges’ true orientation is given as background knowledge.
[Table]
F.6 Experiment analyzing model robustness on causal discovery algorithms
In Section 6.
[Table]
we obtain the ture CPDAG from the true DAG without running the causal discovery algorithm.
However, in practice, with the true DAG unknown, the CPDAG can only be obtained from causal discovery algorithms.
In order to test the model robustness on causal discovery algorithms, we learn the corresponding CPDAG from the synthetic data by the Greedy Equivalence Search (GES) procedure [5].
The prediction performance and fairness results are reported in Table 5 and Figure 11, from which, we can see the same trend on five models as the one in Section 6.1.
Moreover, there is not much difference on fairness and prediction performance on FairRelax model between the case that the CPDAG is induced directly from the true DAG and the case that the CPDAG is learnt from the observational data by a causal discovery algorithm.
[Table]
G Additional related works on ancestral relations identifiability
A basic task in causal reasoning on an MPDAG G is to identify the ancestral relations between two distinct nodes in G .
The first intuitive method is to list all DAGs in G and then read off the ancestral
[Figure]
Oracle
[Figure]
i r ne ss 10nodes20edges 20nodes40edges 30nodes60edges 40nodes80edges
[Figure]
[Figure]
Oracle
Fair
R M SE 10nodes20edges 20nodes40edges
30nodes60edges 40nodes80edges
[Figure]
relations in each DAG.
However, this method is computationally burdensome.
The second approach is to measure the possible causal effect [15, 21, 30, 31, 41, 42] from the source variable to the target variable in an MPDAG.
The target is a definite descendant (or non-descendant) of the source if and only if all possible causal effect are non-zero (or zero).
The third approach is to analyse the path from the source to target in an MPDAG G .
Perkovi ´ c et al.
[42] propose that the target is a definite non-descendant of the source if and only if there is no b-possibly causal path from the source to target.
There is also a sufficient and necessary graphical condition [16, Theorem 1] to identify whether a variable is a definite descendant of another variable in CPDAGs.
The authors in [36, 47] 5 extend the sufficiency of this condition to other kinds of causal graphs as well.
However, to the best of our knowledge, such graphical criterion to determine the definite descendants for MPDAGs has not been examined before.
H Discussion on accuracy-fairness trade-off
The accuracy-fairness trade-off is pointed out in a great number of existing algorithmic fairness works [2, 33, 35, 56, 70, 71].
Yet, accuracy may not be doomed to decrease as fairness increases depending on the data setting [13, 18, 61].
For example, in the synthetic dataset in Section 6.1, we do happen to observe an accuracy-fairness trade-off, while it seems that such trade-off does not exist in the synthetic dataset generated by the nonlinear structure equations in Appendix F.4.
The authors in [13, 50, 57] describe when such trade-off exists and when it does not theoretically or empirically.
Future work may take the fairness-accuracy trade-off into more consideration.