Counterfactually Fair Representation
Authors: Zhiqun Zuo
Mohammad Mahdi Khalili
Xueru Zhang
Venue: NeurIPS 2023 poster (2023)
Keywords: Counterfactual fairness
Representation learning
TL;DR: This work introduces a novel algorithm that uses all features for getting representations, ensuring counterfactual fairness both theoretically and empirically.

Abstract: The use of machine learning models in high-stake applications (e.g., healthcare, lending, college admission) has raised growing concerns due to potential biases against protected social groups. Various fairness notions and methods have been proposed to mitigate such biases. In this work, we focus on Counterfactual Fairness (CF), a fairness notion that is dependent on an underlying causal graph and first proposed by Kusner $\textit{et al.}$; it requires that the outcome an individual perceives is the same in the real world as it would be in a "counterfactual" world, in which the individual belongs to another social group. 
Learning fair models satisfying CF can be challenging. It was shown in (Kusner $\textit{et al.}$) that a sufficient condition for satisfying CF is to $\textbf{not}$ use features that are descendants of sensitive attributes in the causal graph. This implies a simple method that learns CF models only using non-descendants of sensitive attributes while eliminating all descendants. Although several subsequent works proposed methods that use all features for training CF models, there is no theoretical guarantee that they can satisfy CF. In contrast, this work proposes a new algorithm that trains models using all the available features. We theoretically and empirically show that models trained with this method can satisfy CF.

Counterfactually Fair Representation
Zhiqun Zuo' zuo. 1.678ssu.eee edu
Mohammad Mahdi Khalili 1,2 khalili. 17@osu. edu
Xueru Zhang'
zhang. 12807@osu. edu
CCS Department, The Ohio State University, Columbus, OH 43210
Yahoo Research, New York, NY, 10003
Abstract
The use of machine learning models in high-stake applications (e.g.. healthcare, lending, college admission) has raised growing concerns due to potential biases against protected social groups. Various fairness notions and methods have been proposed mitigate such biases. In this work, we focus on Counterfactual Fairness (CF), fairness notion that is dependent on an underlying causal graph and first proposed by Kusner al. [26): it requires that the outcome an individual perceives is the same in the real world as it would be in a "counterfactual" world, which the individual belongs another social group. Learning fair models satisfying CF be challenging. was shown in 226 that sufficient condition for satisfying CF is not use features that descendants of sensitive attributes in the causal graph. This implies a simple method that learns CF models only using non-descendants sensitive attributes while eliminating all descendants. Although several subsequent works proposed methods that use all features for training CF models, there no theoretical guarantee that they can satisfy CF. In contrast, this work proposes algorithm that trains models using all the available features. We theoretically and empirically show that models trained with this method can satisfy CT
Introduction
While machine learning (ML) has had significant impacts on human-involved applications (e.g.. lending, hiring, healthcare, criminal justice, college admission), also poses significant risks, particularly regarding unfairness against protected social groups. For example, it has been shown that computer-aiee aided clinical diagnostic systems can exhibit discrimination against people color [9; face recognition surveillance technology used by police may have racial bias [[] decision support tool COMPAS used for predicting the recidivism risk defendants is biased against African Americans (5). Various faimess notions have been proposed to mathematically measure the biases in ML based on observational data. Examples include: i) unawareness which prohibits the use of sensitive attribute in model training process; ii) parity-based fairness that requires certain statistical measures to be equalized across different groups, e.g., equalized odds [20]. equal opportunity (20), statistical parity [33, predictive parity (20): iii) preference-buse fairness that inspired by the fair-division and envy-freeness literature in economics, it ensures that given the choice between various decision outcomes, every group of users would collectively prefer its perceived outcomes. regardless of the (dis)parity compared to the other groups (43 [2].
However, the faimess notions mentioned above do take into account the causal structure and relations among different features/variables. Recently, Kusner et al. [26] proposed a fairness notion called Counterfactual Fairness (CF) based on the causal model and counterfactual inference;
'The code repository for this work can be found in https://githun httpa://gituub.coom/ast wwt.ooo-ssmmm////// Appresentatioon_eerniin
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

requires that the ML outcome received by an individual should be the same in the real world as it would be counterfactual world, in which the individual belongs to a different social group. To satisfy CF, [26] shows that it is sufficient to make predictions only using the features that are non-descendants of the sensitive attribute node in the causal graph. However, this approach may discard crucial data, as descendants of sensitive attribute may contain useful information that is critical for prediction and downstream tasks. In this work, we show that using only non-descendants is not necessary condition for achieving CF. In particular, we propose novel method for generating counterfactually fair representations using all available features (including both descendants and non-descendants of sensitive attribute). The idea is first generate counterfactual samples of each data point based on the causal structure, and the fair representations can be generated subsequently by applying symmetric function to both factual (i.c., original data) and counterfactual samples. We can theoretically show that MI. models (or any other downstream tasks) trained with counterfactually fair representations can satisfy perfect CF. Experiments on real data further validate our theorem.
is worth noting that several subsequent studies of [26] also proposed methods to learn CF models using all available features, e.g., [14 36 24 10 2]. However, these methods are empirical and there is no theoretical guarantee that these methods can satisfy (perfect) CF. In Appendix A we introduce more related work and discuss the differences with ours. Our main contributions are as follows:
We propose a novel and efficient method for generating counterfactually fair representations. We theoretically show that ML models trained with such representations can achieve perfect/exact CF
We extend our method to path- math-dependent counterfactual faimess [26]. That is, for any unfair path in a causal graph, we can generate representations that mitigate the impact of sensitive attributes on the prediction along the unfair path.
We conduct extensive experiments (across different causal models, datasets, and fairness defini- tions) to compare our method with existing methods. Empirical results show that 1) our method outperforms the method of only using non-descendants of sensitive attributes; 2) existing heuristic methods for training ML model under CF fall short of achieving perfect CF fairness.
2 Problem Formulation
Consider a supervised learning problem where the training dataset consists of triples V = (X, A, Y).
where random vector X = [X,.... attribute (e.g.. race, gender) indicating the group membership, and Y E y S is the label/output. Similar to [3I], we associate the observable V = (X, A. Y) with causal model M (U, V, F), where U is a set of unobserved (exogenous) random variables that are factors not caused by any variable in V, and F = (S1, J2..... Sd. Ja=1, fa+2) is set of functions (a.k.a. structural equations with one for each variable in V. WLOG, let
[X,, Xx]" E X are observable features, A E A is the sensitive
X, = f.(a;, Up E (1,....dd) .d); A = fa+1 Up =a-2 U Up
where pa, and Upa; are the sets of observable and unobservable variables that are the parents of X;- p0.41 and paa-2 (resp. Upastl and 12 2) are the observable (resp. unobservable) variables that are parents of A and Y, respectively. Assume (U, can be represented as a directed acyelic graph.
Our goal is to learn a predictor Y = gw (R) parameterized by weight vector w E Rd from training data. Here Rt = h(X, A; M)) is representation generated using AX and causal model M. Define loss function / y x IR + IR where I(Y, 9w. (R)) is the loss associated with Iue in estimating Y using representation R. We denote the expected loss with respect to the joint probability distribution of (R, Y' by L(w)= == E{!(Y, gw (R))). Throughout the paper. we use small letters to denote the realizations of random variables, e.g., (z, a. y) is realization of (X,
2.1 Background: Intervention and Counterfactual Inference
Given structural equations and the distribution of unobservable variables U, we can calculate the distribution of any observed variable V; E V and even study the impact of intervening certain observed variables on other variables. Specifically, the intervention on variable Vú can be done by simply replacing structural equation Vi = f(pa,, Up,,) with equation V; = v for some v. To study the impact of intervening VI, we can use new structural equations to find resulting distributions of other observable variables and see how they may differ changes.

---

The specification of structural equations F further allows us to compute counterfactual quantities, i.e. computing the value of Y if Z had taken value for two observable variables Z.Y Y. Because the value of any observable variable is fully determined by unobserved variables U and structural equations, the counterfactual value of Y for a given = u can be computed by replacing structural equations for Z as Z z. Such counterfactual value is typically denoted as (u).
The goal of counterfactual inference is to compute the probabilities Pr]Yz==(U]JO some observable variables O. It can be used to infer "the value of Y if Z had taken value in the presence of evidence O o". Based on [16], Pr Tr())==(U)J0
o} for
o} can be computed in three steps: (i) abduction that finds posterior distribution of U given O = for a given prior on U: (ii) action that performs intervention Z by replacing structural equations of Z; (iii) prediction that computes the distribution of Y using new structural equations and the posterior Pr = =o}
2.2 Counterfactual Fairness
Without fairness consideration, simply learning a predictor by minimizing the expected loss, i.e., arg min, [ww), may exhibit biases against certain social groups. One way to tackle unfairness issue to enforce a certain fairness constraint when learning the predictor. In this work, we consider counterfactual fairness formally defined below.
Definition (Counterfactual Fairness (CF) (26)). We say a predictor Ý = (R) satisfies CF if the following holds for every (I, a):
Pr(YA-o = x = z, A = a} = PT()A=>(U) y/Xx = x, A a} Vy E y,a' E
This notion suggests that any intervention on sensitive attribute A should not change the distribution Y given that U follows distribution PrM[U|XX = x, A = a In other words, adjusting A should not affect the distribution Y if we keep other factors that are not causally dependent on A constant. Learning fair predictor satisfying CF can be challenging. As shown in (26), a sufficient condition for satisfying CF is to not use features that are descendant of A. In other words, given training dataset = {x a(8), 1 1, it suffices to minimize the following empirical risk to satisfy CF:
argmin 1 n Er B (A))X B, (U,
2,()), A= a()) }
where x ( AA are dendeeseendant features of A corresponding to i-th sample, and the expectation is with respect to the random variable (+)) Pr = !0)) A = (1)
Although removing the descendants of from the input a simple method address the unfairness issue. it comes at the cost of losing important information. In some examples (e.g., the ones provided in (26). is possible that all (or most of) the features are descendants of A and need be eliminated when training the predictor. We thus ask:
Can we train predictor that satisfies perfect CF using all the available features as input?
Although several recently proposed methods try to train CF predictors using all the available features (including both non-descendants and descendants of A) 14 36) there is no guarantee that they can satisfy CF. In contrast, our work aims to propose theoretically-cerifff algorithm that finds counterfactually fair predictors using all the available features.
Proposed Method
In this section, we introduce our algorithm for training supervised model under CF. Our method consists of three steps: (i) counterfactual samples generation; (ii) counterfactually fair representation generation; and (iii) fair model training. We present each step detail as follows.
1. Counterfactual samples generation. We first introduce the definition of counterfactual samples and then present the method for generating them. They will be used for generating CF representations.
"Sometimes, we use subscript M to emphasize that the distribution is calculated based on causal model M which we assume known.
3

---

Definition 2 (Counterfactual Sample), Consider i-th data point in training dataset with feature vector xe()) and sensitive attribute (t Let ④ be the unobservable variable associated with (x(1) a sampled from distribution PrM(UIX = x(11 A= = } under causal model M = (V, U,U,GK F). Then, , ifā() o a! and f(6) is generated using structural equations F, unobservable variable U = u and intervention A = (
(z66) ,)) is a counterfactual sample with respect to (x((),, )
Equivalently, we can represent the counterfactual feature x(0) = x example clarify the generation process of counterfactual sample.
Ae-aco (u()). Next, we use an
Example 1 (Law School Success (261). Consider a group of students, each has observable features grade-point average (GPA) before entering college XG and entrance exam score (LSAT) Xt. Let first-year average grade in college (FYA) be label Y to be predicted and let race Q and sex S be the sensitive attributes. Suppose there are three unobservable variables Ua. UL, Ur representing errors and the relations between these variables can be characterized by the following structural equations:
XG = GPA = bg + w + w + UG.
X1. LSAT b₁. + w0Q w/, UL.
Y = FYA by + w w + w UF,
where (ba, by, by. w. w wL, , w L, wF wx) are the parameters of the causal model, which we assume are given Consider one student with x0)) = (- ,= and (0)) = , )0)). To generate its counterfactual sample, we first compute the underlying unobservable variables (ug u1
(0)
(0) (0) GG
= (0) be -wgg - s I bL 2 w0
L "G
Then, for any (4,8) E A - (4 ,,)))) the corresponding counterfactual features can be generated:
x0(0) bg + w Q w u IG
(0) (0)
+ w g ( (0)) + 3 (5- s0) (0)
(0) L by + w Q w u x + w 20 (0) + w 10)
In the above example, finding unobservable variables is straightforward due the additive error model (i.e.. each observable variable V, is equal to (pa.) + U, ). For other causal models that are non-additive, we can leverage techniques such as Variational Auto Encoder (VAE) to first learn distribution [U x, A a} and then sample from this distribution, see e.g., 21 24 30 37
2. Counterfactually fair representation generation. Next, we introduce how generate counter- factually fair representation R (xX, A; M, 8) using counterfactual samples generated above.
The complete procedure is given in Al- gorithm [ The idea is to first apply a symmetric function functiionn s-)) to both factual feature I and counterfactual features be lever- aged to generate CF representation. The symmetry of the function is formally de- fined below.
Algorithm 1 CF Representation Generation 1(x,, a; M, 8)
Input: Causal model M, observable features (2. a). sym- metric function
) { This output
1: Sample u from distribution PIMIU|X = A a}
2: Use u and causal model M to generate - - counter-
factual samples {(*D) a(I),,.... (x (11 - [ where اهاة E AA- - {a).
Definition 3. A function x1AI + R is symmetric if the output is the same for any permutation of inputs.
3: Use symmetric function s(.) to generate representation
R = [s(r, _ a -|||| u]
One example of symmetric function is
Output: counterfactually fair representation R
the average over all inputs, e.g., s(x, 801] -l1A|-11) 42l1)1))
[4]
3. Fair model training. Given CF representation R h(xx M; s) generated by Algorithm | we can use it directly to learn predictor that satisfies CF. Indeed, we can show that any predictor learned based on CF representation satisfies perfect CF, as stated in Theorem bbloow.
If A is non-binary, can generate |A| counterfactual samples for each & A- {a}. We can use اbب {a}-
represent j-th counterfactual sample corresponding to x and the j-th element 'The parameters of causal model can be found using observational data and by the maximum likelihood estimation. As result, assume that the parameters of the causal model are given.

---

Theorem 1. If representation is generated based on h(x, a; M, s) in Algorithm 2 Iu (h(a,, a; M,))) 8)) satisfies perfect CF for all w E Rd
then the predictor
Because (h(r, a; M, s)) satisfies CF for all parameter w, we can find the optimal predictor directly by solving an unconstrained optimization:
1 ( aa
w arg min =
Under Theorem D it is guaranteed that the optimal predictor Iw- satisfies counterfactual fairness.
Inference. After learning the optimal CF predictor Iw- we can use it to make fair predictions about new data. At the inference phase, for given example (a, a). we first generate its CF representation
using Algorithm 1 and find the prediction using Jw-. That is, y = Iw- (h(x, a; M,, s)).
Discussion. Compared 266. our method leverages all available features and can attain much better performance without sacrificing fairness. We will further validate this in experiments (Section (5).
As mentioned earlier, there are existing methods that also all features to train predictors under CF constraint, For instance, the method proposed in [24] also generates the counterfactual sample for each training data and it trains model using both factual and counterfactual samples; [14] learns CF predictor by adding a penalty term to the learning objective function, where the penalty term is calculated based on the counterfactual samples. While these two methods also leverage counterfactual samples to reduce bias, they cannot satisfy perfect CF and there is no theoretical guarantee.
4 Path-dependent Counterfactual Fairness
In this section, we consider a variant notion of CF called Path-dependent Counterfactual Fairness (PCF). We will show how the proposed method can be adapted to train predictors under PCF. Let g be the graph associated with causal model M, and Pg. be the set of all unfair directed paths from sensitive attribute A to output Y. Further, we define XP; as the features that are not present in any unfair path in Рça and XPs, as the features along the unfair paths. Path-dependent Counterfactual Fairness is defined follows.
Definition& 4 (Path-dependent Counterfactual Fairness (PCF) 26
We say Y = gw satisfies PCF with respect to path set Pga if the following holds for every (I, Vy E D,a' E
Pr Pr(VseaXpg ExpG (U) = x|X x, A = a] Pr Pr(V
pg (U) y x. A a}
This notion suggests that if we fix attributes XP3, and let follows posterior distribution (U xr, A = a). then variable A should not affect the predictor along unfair path(s) in PG.. Note that PCF reduces to CF if Xps, O. We want to emphasize that path-specific counterfactual fairness defined in 7 is different from Defi- nition Path-specific coun- terfactual fairness 77] consid- ers baseline value a' for A, and requires A = a' propagate through unfair paths, and the true value of A propagates through other paths. In contrast, in path- dependent CF, there is no baseline value for A, and A should not cause Y through unfair paths.
Algorithm 2 PCF Representation Generation h(x, M, 8, XPs
Input: Causal model .M, Set of variables Xps, that are not along unfair paths, (ze, a), symmetric function
1: Sample u from distribution PrM[U|X- = x, a
2: Apply intervention Xp; = -Ppp, to get a new model M'.
3: Use u and causal model M' to generate |.A| counterfactual features ((=f) Po aa"l)..... (#||_|-") à ||||))))}
-l)}. where abi
A A {a]. 4: Use symmetric function s(.) to generate representation
R IPS, S(PP,
[1] Po,
[1A|-1)), Pg.
u
Output: path-dependent counterfactually fair representation R
In this section, we describe how our proposed method could be adapted to the path-dependent case. Before describing the algorithm formally, we present an example.
Example (Representation for PCF). Consider a causal graph shown Figure 7 In this graph, there two directed paths from A to Y. We assume that A is binary, and Pg. {(A + X2 + Y)}.
5

---

and XP5, = {X1}. Based on Definition 4 given sample (z, a),, after intervention X1 21 (Figure 2). intervention A should not affect the prediction outcome. We generate a representation in the following steps, 1) we find distribution P = z, = a} and sample from this distribution. 2) Using the graph Figure] we generate counterfactual value for X2. That is, for given structural equation X2 = [2,A,1, U), we generate counterfactual value 82 = f2(a', Iı, u), where a' F 3) We generate representation R ( s $2), u,, where a symmetric function.
Based the above example, the represen- tation should be generated based on causal graph after intervention Xps, The detailed representation generation proce- dure under PCF is stated in Algorithm 2 Let h(x, a; M, Xp;,) be the function that generates such a presentation using Algo- rithm We have the following theorem for 1(,, 07 M,
A
X1
X₃
21
Figure The causal graph in Example 2. There directed paths from A to Y.
Figure 2: The causal graph in Example 2 af- ter applying interven- tion XP3 -PG
Theorem 2. Assume == h(z, M, XPG,
representation generated based on Algorithm Then the predictor gw (h(, a; M, 8, Xp3 satisfies perfect PCF for all w E Rd=
The above theorem implies if train predictor using (r(() M(x((,) ( 8, Xps, 1 and we use 1(x,, a; M, Xps, at the time of inference, then PCF is satisfied by the predictor.
5 Experiment
Datasets and Causal Models. We use the Law School Success dataset [40] and the UCI Adult Income Dataset [25] to evaluate our proposed method. The Law School Success dataset consists of 21,790 students across 163 law schools in the United States. It includes five attributes for each student: entrance exam score (LSAT), grade-point average (GPA), first-year grade (FYA), race, and gender. In experiment, gender is the sensitive attribute A, and the goal is to predict FYA (label Y) using LSAT, GPA, Race (three features X), and the sensitive attribute A.
The UCI Adult Income Dataset contains 65,123 data instances, each with 14 attributes: age, work class, education, marital status, occupation, relationship, race, sex, hours per week, native country, and income. In our experiments, we consider sex the sensitive attribute A, whether income is greater than $50K or not as the target variable Y, and all other attributes as features X.
We evaluated our methods using two distinct causal graphs. The first graph is the one presented in CVAE paper 37 (see Figure 3) We divided the feature attributes into two subsets, Xa and Xg. X. comprises attributes that are not causally affected by A, while X₃ includes the remaining attributes. Exogenous variable U is defined as the latent influencing factors. For the Law School Success dataset, X. consists of |Race) and X3 in- Figure 3: CVAE causal graph Figure 4: DCEVAE causal graph
X_
U
x,
A
cludes (LSAT, GPA). For the UCI Adult Income dataset, similar to 24,. we assume that X,, contains (Age, Race, Native Country) and X3 includes Workclaas, Education, Marital Status, Occupation, Relationship, Hours per Week).
The second graph is proposed by DCEVAE paper 24 (see Figure The main assumption in 24 is
that the exogenous variables controlling X,, and X3 can be disentangled into U, and Ug. We used the same sets of X., and X3 as in the CVAE graph.

---

In contrast to the structural equations used in (6),, we let structural functions be a family of functions represented by the decoder of a VAE network, as proposed in CVAE [37 and DCEVAE [24]. Moreover, the encoder is able to find unobserved variable U for any given data point The parameters of the VAE network are learned from observational data. In the CVAE causal model, the decoder part includes functions for fa, and fy and is trained such that the following structural equations hold,
X. - fa(); X3 - Sa(U A); Y = (U,,
For the DCEVAE causal model, the decoder part also includes functions Sa. Sas and fr but it is trained such that the following holds,
X, = fa = (U; Uz.
Baselines and Experimental Setup. For each dataset, we perform two separate experiments; one under CVAE causal model, and the other under DCEVAE causal model. For each experiment, we consider the following five baselines.
Unfair (UF). This method trains a supervised model (logistic regression for the UCI Adult Income dataset, and linear regression for the Law School Success dataset) without any fairness constraint.
Counterfactual Augmentation (CA) [24]. For each sample (xx*), y (0) E D, first we use the encoder of VAE to find unobserved variable (. Then, we use the decoder to generate both factual and counterfactual samples. Specifically, for counterfactual samples, we use u(f) and ((0)1) + (
as the input of decoder to generate (((([1] and 1 For factual data, we use (1()) and [(1)0 (3)
the input of the decoder to generate a(()[o) and (())0), We use the following dataset to train predictor, D {((())0) a())) g(olo)), (a1(), a a(0l), g 1..... n.).
Improved Counterfactual Augmentation (ICA). We realized that the baseline CA could further be improved by training the predictor using D = ((x(*), , y()), (a(Ol)) 2000 g(lui)j
1,....n) n). Thus, this improved method is also considered as a baseline in experiments.
Counterfactual Training Using Exogenous Variable (CE) (26). This method only uses the variables that are not descendants of the sensitive attribute.
Counterfactual Regularizer (CR) [14]. This baseline adds regularizer (10(0) - /000 to the loss function, where g(و) is the output of the predictor for input (x!(), a ())) and 5(0m is the output of the prediction for (11() (())))).
For our method, we use Algorithm I and s(x, i)) =+ē to generate CF representation. We use the generated representation for training and inference as stated in Section 3
For each method, we split the dataset randomly (with 80%-20% ratio) into training dataset D {(x(1) ("9,, y/ I,..., n.) and test dataset Diest {(x(1) (")),, ) = + 1...., n + m}. The metrics for each method are calculated in five independent runs using the test dataset, and the average and standard deviation are reported in the tables. We use the mean squared error (MSE) for the regression task and the classification accuracy (Acc) for the classification task to evaluate the performance of our method and the baselines. To assess counterfactual fairness, we total effect (TE) measure defined as TE- Emn++ (g(0) J(اII)|, where (()))) is the output of the predictor for the counterfactual sample (x(111) a(ll)). We also calculate the total effect for each protected group. More specifically, TE,- (()>n,n))) Ei>n,att=a
(g(( - JOuul In our experiments, TEo is the total effect for females, and TE, is the total effect for males. In general, smaller TE, TEg. TE, imply that the method fairer regarding the CF definition. Note that because CE method proposed in (26 makes predictions solely using non-descendants of A, empirical values for TE, TEg, and TE, are 0 for the CE method.
Results. Table I and Table reppeesett the results for the UCI Adult Income dataset under CVAE and DCEVAE causal model, respectively. Note that there no theoretical guarantee that UF, CA. ICA, and CR methods can satisfy Counterfactual fairness. As we can see in these two tables, the TE metric is significantly large for UF, CA, ICA, and they are not fair. On the other hand, CE, CR. and our methods can achieve relatively small TE values. However, among these three methods, our method can achieve the highest accuracy. Moreover, compared with the CR method, our method achieves roughly 80% improvement in terms of TE metric. It is worth mentioning that when we compare our algorithm with the UF model (which achieves the highest accuracy), our method only results in roughly 2% drop in accuracy but improves the TE metric by 92%. The results for the Law
7

---

Table I: Logistic regression classifier results on UCI Adult dataset with DCEVAE causal model
Method
Accuracy
TE
TE₃
TE₂
UF
0.8165
0.0037
0.2286 + 0.0037
0.1903 + 0.0061
0.2475
0.0040
CA
0.8053 + 0.0040
0.1847 + 0.0075
0.1463 = 0.0077
0.2037 + 0.0090
ICA
0.8141 = 0.0039
0.2085 = 0.0035
0.1737 = 0.0062
0.2256 = 0.0025
CE
0.7858 = 0.0028
CR
0.7914 0.0015
0.0821 + 0.0022
0.0506 = 0.0034
0.0977 0.0022
Ours
0.7931 + 0.0030
0.0163 + 0.0013
0.0146 = 0.0021
0.0172 0.0022
Table 2: Logistic regression classifier results UCI Adult dataset with CVAE causal model
Method
Accuracy
TE
TE1
TE₂
UF
0.8136 + 0.0012
0.2338 + 0.0044
0.1974 = 0.0062
0.2517 = 0.0069
CA
0.7946 0.0021
0.1717 = 0.0038
0.1203 = 0.0069
0.1970 = 0.0030
ICA
0.8095 = 0.0026
0.2021 + 0.0063
0.1540 = 0.0082
0.2267
0.0062
CE
0.7596 0.0030
CR
0.7882
+ 0.0020
0.0868 + 0.0041
0.0565 + 0.0036
0.1017 + 0.0048
Ours
0.7951 0.0020
0.0126 + 0.0042
0.0107 + 0.0027
0.0139 0.0060
School Success dataset under CVAE and DCEVAE are presented in Tables and Based on Table [] only our algorithm and the CE method are able to achieve TE less 0.1. However, the MSE under our algorithm is significantly smaller. We also notice that under DCEVAE model and the law school success dataset (Table 4. the CR method exhibits similar performance our method. It is worth mentioning that TE₁ and TE2 under our algorithm are almost the same under our algorithm in all four tables. This shows our algorithm treats male and female groups almost the same in terms of CF.
We visualize the probability density function (pdf) of predicted FYA (output of the linear regression model) under the DECVAE causal model for factual (blue curve) and counterfactual (red curve) samples Figure 5 Under CF, we expect these two distributions to be the same. These figures show that our method is able to keep the model's s behavior the same for factual and counterfactual samples.
countertactual
Baseline
ICA
depuity
Qupaity
0
0
FYA
FYA
FYA
CE
CR
Ours
ceeatty
clesity
0.0
0.2
0.4
0.0
6.2
0.4
0.0
0.2
0.4
FYA
FVA
FVA
Figure
Density distribution of FYA with DCEVAE causal model
Path-dependent Counterfactual Fairness. Table 8 and Table 9 show the results for the UCI Adult Income dataset under path-depender counterfactual. In this experiment, for finding counterfactual samples, we first consider causal graph obtained after intervention on the variables that are not present on any unfair paths. Then, we use the resulting graph to generate counterfactual samples. In Tables [ and 9 Acc (W) and TE (W) represent the accuracy and the total effect for a scenario in which Workclass is not on any unfair paths. Moreover, Acc (E) and TE (E) represent another scenario where Education is not on unfair paths. These tables show that, except for our algorithm and the CE method, other baselines fall short in satisfying the PCF Our method exhibits significantly higher accuracy compared to the CE method as well. Similar results Additional results for Algorithm are in the appendix. Societal Impact: In this paper, we introduced an algorithm that can find
'The details about the network structure used for VAE can be found in appendix. Figure 9 in the appendix illustrates the pdf of predicted FYA under the CVAE model.
8

---

Table 3: Linear regression results on Law School Success dataset with CVAE causal model
Method
MSE
TE
TE1
TE₂
UF
0.8664 + 0.0040
0.1346 + 0.0036
0.1345 = 0.0028
0.1347 0.0057
CA
0.8893 0.0096
0.2335 = 0.0125
0.2301 = 0.0092
0.2362 0.0016
ICA
0.8679 = 0.0064
0.1608 = 0.0058
0.1594 = 0.0046
0.1619 0.0078
CE
0.8900 0.0054
CR
0.8622 + 0.0148
0.1035 + 0.0027
0.1032 + 0.0024
0.1038
0.0039
Ours
0.8692 0.0060
0.0661 + 0.0019
0.0654 + 0.0023
0.0667 0.0016
Table 4: Linear regression Results on Law School Success dataset with DCEVAE causal model
Method
MSE
TE
TE1
TE₂
UF
0.8677 + 0.0043
0.1344 + 0.0056
0.1345 = 0.0064
0,1343 + 0,0054
CA
0.8783 0.0084
0.1759 + 0.0368
0.1767 = 0.0384
0.1753 0.0357 0.1454 + 0.0161
ICA
0,8693 + 0.0045
0.1459 + 0.0169
0.1466 = 0.0182
CE
0.8781 0.0068
CR
0,8703 + 0.0055
0.0989 + 0.0058
0.1000 = 0.0070
0.098 + 0.0052
Ours
0.8687 0.0045
0.1076 + 0.0039
0.1086 = 0.0049
0.1068 0.0032
fair predictor under counterfactual faimess. However, do claim CF is the only right fairness
notion. Depending on the application, counterfactual fairness may or may not be the right choice for counterfactual fairness. Limitation: As stated in [26). find a predictor under CF, causal model M should be known to the fair learning algorithm. Finding causal model is challenging since there be several causal models consistent with observational data (3.. This limitation exists for algorithm and baselines.
Conclusion
We proposed a novel method to train a predictor under counterfactual fairness. Unlike 26 which shows that sufficient condition for satisfying CF is use the features that descendants of the sensitive attribute, our algorithm uses all the available features leading to better performance. The proposed algorithm generates representation for training that guarantees CF and improves performance compared to the baselines. We also showed that our algorithm can be extended to path-dependent counterfactual fairness.
Table 5: Logistic regression classifier on UCI Adult dataset with CVAB causal model
Method
Acc (W)
TE (W)
Acc (E)
TE (E)
UF
0.8136 + 0.0012
0.2340 + 0.0043
0.8136 + 0.0012
0.1884 + 0.0048
CA
0.7945 0.0026
0.1715 + 0.0046
0.7947 + 0.0020
0.1600 0.0057
ICA
0.8063 + 0.0022
0.1997 + 0.0107
0.8076 + 0.0032
0.1689 + 0.0116
CE
0.7596
0.0030
0.7596 = 0.0030
CR
0.7882 + 0.0020
0.0869 + 0.0040
0.7926 = 0.0021
0.1097 - 0.0023
Ours
0.7951 0.0030
0.0127 + 0.0043
0.7952 0.0022
0.0131 0.0053
Table Logistic regression classifier on UCI Adult dataset with DCEVAE causal model
Method
Acc (W)
TE (W)
Acc (E)
TE (E)
UF
0.8165 0.0037
0.2285 + 0.0037
0.8165 + 0.0037
0.2065 0.0036
CA
0.8063 + 0.0030
0.1871 + 0.0030
0.8039 = 0.0028
0.1570 + 0.0096
ICA
0.8141 0.0039
0.2087 0.0041
0.8143 + 0.0035
0.1766
0.0042
CE
0.7858 = 0.0028
0.7858 = 0.0028
CR
0.7911 0.0020
0.0824 + 0.0028
0.7968 = 0.0027
0.1026 0.0021
Ours
0.7932 + 0.0030
0.0164 + 0.0014
0.7939 = 0.0038
0.0159 0.0016

---

Acknowledgements
This work was funded in part by the National Science Foundation under award IIS-2202699, IIS- 2301599, and ECCS-230160) by grant from the Ohio State University Translational Data Analytics Institute, by the National Center For Advancing Translational Sciences under award ULITRR02233.
References
[1] Racial discrimination in face recognition technology, 2020.
[2] M. Abroshan, M. M. Khalili, and A. Elliott. Counterfactual faimess in synthetic data generation. In NeurIPS 2022 Workshop on Synthetic Data for Empowering ML Research, 2022.
[3] A. Agarwal, Beygelzimer, M. Dudík, Langford, and H. Wallach. A reductions approach to fair classification. In International Conference on Machine Learning, pages 60-69. PMLR, 2018.
[4] K. A. Bollen. Structural equations with latent variables, volume 210. John Wiley Sons, 1989.
[5] A. Brackey, Analysis of Racial Bias Northpointe's COMPAS Algorithm. PhD thesis, Tulane University School of Science and Engineering, 2019.
[6] J. Cheong, S. Kalkan, and H. Gunes. Counterfactual fairness for facial expression recognition. In Computer Vision-ECCV 2022 Workshops: Tel Aviv, Israel, October 23-27, 2022, Proceedings, Part V. pages 245-261. Springer, 2023.
[7] S. Chiappa. Path-specific counterfactual faimess. In Proceedings the Artificial Intelligence, volume 33, pages 7801-7808, 2019.
the AAAI Conference
[8] S. Dandl, F. Pfisterer, and B. Bischl. Multi-objective counterfactual faireess. In Proceedings of the Genetic and Evolutionary Computation Conference Companion, pages 328-331, 2022.
[9] R. Daneshjou, K. Vodrahalli, W. Liang, R. A. Novoa, M. Jenkins, V. Rotemberg, J. Ko, S. M. Swetter, E. E. Bailey, O. Gevaert, et al. Disparities in dermatology ai: Assessments using diverse clinical images. arXiv preprint arXiv:21 1,08006, 2021.
[10] A. M. Davani, A. Omrani, B. Kennedy, M. Atari, X. Ren, and M. Dehghami. Improving counterfactual generation for fair hate speech detection. arXiv preprint arXiv:2108.0/721, 2021.
[11] P. G. Di Stefano, J. M. Hickey, and V. Vasileiou. Counterfactual faimess: removing direct effects through regularization. arXiv preprint arXiv:2002. 10774, 2020.
[12] V. Do. S. Corbett- Davies, J. Atif, and N. Usunier. Online certification of preference-ber based fairness for personalized recommender systems. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 6532-654 6540, 2022.
[13] C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel. Faimess through awareness. In Proceedings of the 3rd innovations in theoretical computer science conference, pages 214-226, 2012.
[14] S. Garg, Perot, N. Limtiaco, A. Taly, H. Chi, and Beutel. Counterfactual fairnsss in text classification through robustness. In Proceedings of the 2019 AAAI/ACM Conference on Al, Ethics, and Sociery, pages
2019.
[15] C. J. Geyer. Practical markov chain monte carlo. Statistical science, pages 473-483, 1992.
[16] M. Glymour, J. Pearl, and N. P. Jewell. Causal inference in statistics: A primer. John Wiley & Sons, 2016.
[17] V. Grari, S. Lamprier, and M. Detyniecki. Adversarial learning for counterfactual fairness. Machine Learning, 11(3))741-763, 2023.
10

---

[18] N. Grgic-Hlaca, M. B. Zafar, K. P. Gummadi, and A. Weller. The case for process faireess in learning: Feature selection for fair decision making. In NIPS symposium on machine learning and the law, volume 1, page 11. Barcelona, Spain, 2016.
[19] X. Han, L. Zhang, Y. Wu, and S. Yuan. Achieving counterfactual fairness for anomaly detection. arXiv preprint arXiv:2303.00 303.02318,, 2023.
[20] M. Hardt, E. Price, and N. Srebro. Equality of opportunity in supervised learning. Advances in neural information processing systems, 15:311--3233, 2016.
[21] J. Joo and K. Kärkkäinen. Gender slopes: Counterfactual faimess for computer vision models by attribute manipulation. In Proceedings of the 2nd international workshop on fairness, accountability, transparency and ethics in multimedia, pages 1-5, 2020.
[22] M. M. Khalili, X. Zhang, and M. Abroshan. Fair sequential selection using supervised learning models, Advances in Neural Information Processing Systems, 34:281 44-24412200 1555,, 2021.
[23] M. M. Khalili, X. Zhang, and M. Abroshan. Loss balancing for fair supervised learning. In A. Krause, E. Brunskill, K. Cho, B. Engelhardt. S. Sabato, and J. Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Leurning Research, pages 16271-16290, PMLR, 23-29 Jul 2023.
[24] H. Kim, S. Shin, J. Jang, K. Song, W. Joo, W. Kang, and I.-C. Moon. Counterfactual fairness with disentangled causal effect variational autoencoder. In Proceedings the AAAI Conference on Artificial Intelligence, volume 35, pages 8128-8136, 2021.
[25] R. Kohavi. Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. In Kdd, volume 96, pages 202-207, 1996.
[26] M. J. Kusner, Loftus, C. Russell, and R. Silva. Counterfactual fairness. Advances in neural information processing systems, 30, 2017.
[27] Y. Li, H. Chen, S. Xu, Y. Ge, and Y. Zhang. Personalized counterfactual fairness in recommen- dation, arXiv preprint arXiv: 098299 2021.
[28] Y. Li, H. Chen, S. Xu, Y. Ge, and Y. Zhang. Towards personalized fairness based on causal notion. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pages 1054-1063, 2021.
[29] Lohia. Counterfactual multi-token fairness in text classification. arXiv:2202.0377 2022.
arXiv preprint
[30] J. Ma, R. Guo, M. Wan, L. Yang, A. Zhang, and J. Li. Learning fair node representations with graph counterfactual fairness. In Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, pages 695-703, 2022.
[31] J. Pearl et al. Models, reasoning and inference. Cambridge, UK: CambridgeUniierssiyppesss 19(2), 2000.
[32] Petersen, D. Mukherjee, Y. Sun, and M. Yurochkin. Post-processing for individual fairness. Advances in Neural Information Processing Systems, 34:25944 2021.
[33] S. R. Pfohl, T. Duan, D. Y. Ding, and N. H. Shah. Counterfactual reasoning for fair clinical risk prediction. In Muchine Learning for Healthcare Conference, pages 325-358. PMLR, 2019.
[34] T.-H. Pham, Zhang, and Zhang. Fairness and accuracy under domain generalization. In The Eleventh International Conference on Learning Representations, 2023.
[35] Y. Qiang, C. Li, M. Brocanelli, and D. Zhu. Counterfactual interpolation augmentation (cia): A unified approach to enhance fairness and explainability of dnn. In Proceedings of the Thirty- International Joint Conference Artificial Intelligence, IJCAI, pages 732-739, 2022.
[36] C. Russell, M. J. Kusner, J. Loftus, and R. Silva. When worlds collide: integrating different counterfactual assumptions in fairness. Advances in neural information processing systems, 30, 2017.
11

---

[37] K. Sohn, H. Lee, and X. Yan. Learning structured output representation using deep conditional generative models. Advances in neural information processing systems, 28, 2015.
[38] Verma and J. Rubin. Fairness definitions explained. In Proceedings of the international workshop software fairness, pages 1-7, 2018.
[39] N. Wang. S. Nie, Q Wang, Y.-C. Wang, M. Sanjabi, J. Liu, H. Firooz, and H. Wang. Coffee: Counterfactual fairness for personalized text generation in explainable recommendation. arXiv preprint 2rXiv:2210.15500 2022.
[40] L. F. Wightman. Lsac national longitudinal bar passage study, Isac research report series. 1998.
[41] Z. Xu, Liu, D. Cheng. J. Li, Liu, and K. Wang. Disentangled representation with causal constraints for counterfactual fairness. arXiv preprint arXiv:2208.09/ 2022.
[42] M. B. Zafar, I. Valera, M. Gomez Rodriguez, and K. P. Gummadi. Fairness beyond disparate treatment disparate impact: Learning classification without disparate mistreatment. In Proceedings of the 26th international conference world wide web, pages 1171-1180, 2017.
[43] M. B. Zafar, I. Valera, M. Rodriguez, K. Gummadi, and A. Weller. From parity to preference- based notions of fairness in classification. Advances in neural information processing systems, 30, 2017.
[44] X. Zhang, M. M. Khalili, K. Jin, Naghizadch, and M. Liu. Fairness interventions as (dis) incentives for strategic manipulation. In International Conference on Machine Learning, pages 26239 262644 PMLR, 2022.
12

---

A Related Work
This section succinctly presents an overview of faireess in the context of machine learning, especially focusing on the burgeoning concept of counterfactual fairness.
Fairness in Machine Learning. While there have been several efforts on developing fair machine fairesss still remains an elusive and loosely defined concept. Several definitions have been proposed, each motivated by unique considerations and emphasizing different elements. For instance, one such notion is 'unawareness', which necessitates the exclusion of sensitive attributes from the input data fed into machine learning models. Conversely, parity-based fairness sets guidelines how models should perform across different demographics. Demographic parity, a widely accepted group fairness criterion, ensures consistent distribution of predictions (Y), regardless of sensitive attributes (A), defined as P( A = 0) = PA = 1) [3]
learning algorithms (sce, e.g.. [23 44 42 22
3 B4)
Equal opportunity is another key criterion, ensuring that individuals from diverse protected attribute groups have the same probability of selection, represented by P(ý = 1 A 0, Y 1) P(
1 = 1) [20]. The related concept of equal odds prescribes equal true positive and false positive rates across different protected attribute groups (38)
Additionally, preference-baae -bsed fairness argues that an algorithm's 's design should not solely de- termined by its creators regulators but should also incorporate the preferences of those directly affected by the algorithm's 's outputs 143 12).
Emerging from the broader concept of individual fairness, counterfactual fairness seeks to guarantee that similar datapoints are treated identically 32] It uses counterfactall pairs to establish similarity. The field of natural language processing has seen the use of intuitive causal models, where words associated with protected attributes are substituted generate counter- factual data 229 [4]. However, this approach might overlook possible causal relationships among words.
Counterfactual Fairness.
To overcome this, a more sophisticated causal model was proposed by [3], facilitating a three-step process for counterfactual data generation: inference of exogenous variables' distribution based on observed data, the modification of protected attributes, and the computation of resultant attributes. Leveraging this causal model, (26 proposed the formal definition of counterfactual fairness.
This process includes the
Adopting the advanced assumptions of [3 about structural functions in the causal model allows for counterfactual data generation via the Markov chain Monte Carlo (MCMC) algorithm [15]. Several practical applications employ an mecoee--eecoder-like structure for counterfactual inference, with the encoder's s hidden representation considered as the exogenous variable [30] 21 37 24]. The decoder predicts counterfactual data after the sensitive attribute is modified. Certain research, such as (8) explores counterfactual inference without causal model by reconceptualizing it as multi-objective issue.
myriad of techniques exist to construct fair models using counterfactual inference. The simplest among these, unawareness, involves the removal of the protected attribute from the input [18]. Yet, due to potential correlations between remaining features and protected attributes, this method often falls short. [26] suggested approach that uses only the nes-descnnd variables of the sensitive attribute as model inputs, achieving perfect fairness. Other research aimed to attain approximate counterfactual fairness (36]
common approach employed by 14 36 6 [T] 33) introduces a fairness penalty regularizer to the
loss function when training counterfactually fair model. Mcanwhile, studics by [24 14 35 [0]
have used a counterfactual augmentation method to increase fairness. This involves generating a new training dataset by mixing counterfactual and factual data. Notably, several studies [17 39 41
19 28
sought to minimize the correlation between exogenous variables and the sensitive attribute using adversarial learning or regularization. They propose another kind of faimess from the causal perspective, differing from 26).
While the method proposed by (26) maintains perfect fairness, it often leads to significant decrease in precision due the underutilization observed data's 's information. Subsequent methodologies have managed to enhance precision, though they cannot theoretically guarantee counterfactual faimesss. As
13

---

counterfactual fairness gains increasing traction [ 27], there is an urgent need for approaches that simultaneously augment performance and uphold faimess.
B Proofs
Theorem
We start by finding Pr( = (r/== aj.
Pr( (U) = r|X x, A= a) Per--PPrRReeee Pr((Ra-arV)) = r| = =z, ar = u|X
2, A= a)
Note that R in Algorithm| 1 Idepends on value realization u and feature vector x. However, given u, (a does not depend on intervention A a' as s(.) is symmetric function and gets all the counterfactual samples for different values of a'. As a result, Pr(RAtor = r| = x, A = a) a) is not a function of a' and does not depend on a'. This implies the right-hand side of 3) does not change by a'. As a result, for a given pair of (z, a). Pr( (U) r|X I, a) remains unchanged for all a' A. This implies that R satisfies CF. Consequently, any function of R including Iw (R) satisfies CF.
does not depend on a'. Moreover, Pr(U x x.
Theorem
Assume that R. has been generated using Algorithm 2 We have,
Pr(RA X + (U) = X x, A=
S p (u) r|x x, A a) Pr(U u x. x, -=
Note that, Pr Pr(Raco' Xrg, +2rg, (U) r|X = a) does not depend on a'. This is because, Algorithm 2 generates presentation using symmetric function, and all the counterfactual samples ( ...... Pa -| al A|) and intervention on does not change the presentation. Note that Pr(U u x, A a) is not function of a' and does not depend a'. This implies the right-hand side of 3 does not change by a'. As a result, for given pair of (I, a). Pr(RAed',xpp Xrg, trrg, (U) = r|X I, A a) remains unchanged for all a' A. This implies that satisfies PCF. Consequently, any function of R including Iw (I)) satisfies PCF.
Pr(FAta.XOg, Ex0g, (U) = x|X x, a} Pr(y A Xxs, d's E (U) y| x. A A= a}
C Synthetic Data Simulation
For the real data experiments in Scction the causal model behind the problem remains unknown, and we had make an assumption about the causal structure and estimate the causal model parameters using observed data.
In order to make sure that and demonstrate our proposed method can improve performance while maintaining counterfactual fairness, we carry out simulation experiment the synthetic data.
working with true causal model and true structural equations
We consider a causal graph shown in Figure The structural function defined in the corresponding causal model is
fx = sin U1 + cos U2A + A 0.1; = 0.2x 1.2X +
To generate the synthetic dataset, we sampled A from the Bernoulli distribution with p = 0.4 for 3000 times. U1 and U2 are sampled independently from the normal distribution NO, 1). X and Y were computed with the structural function. The counterfactual data X were computed by substituting A in the structural function with A.
We implemented our method and the baseline methods as described in Section 5 (since there is no difference between observed data and factual data in this scenario, we have no ICA baseline here). For the CR method, we set the weight of the fairness regularization term as 0.05. The 3000 synthetic data were split into training set and a test set with ratio of 80% 20%. Then we trained linear
14

---

Table 7: Linear regression results on the synthetic datal
Method
MSE (L)
TE
TE₂
TE1
UF
0.0172 0.0009
1.2499 +: 0.0093
1.2460 = 0.0252
1.2543 0.0310
CA
0.3467 + 0.0208
0.5372 + 0.0057
0.5409 = 0.0125
0.5316 = 0.0160
CE
0.7868 0.0556
0.000 0.0000
0.000 = 0.0000
0.000 = 0.0000
CR
0.8598 + 0.0521
0.2572 = 0.0036
0.2590 = 0.0066
0.2544 = 0.0078
Ours
0.4739 0.0202
0.000 0.0000
0.000 + 0.0000
0.000 0.0000
regression model with the training data and calculate MSE, TE, TEg, TE₁ with the test data. For each method, we run the experiments five times with different random splits. Table7ppe provided the results for the simulation. With the ground truth of the causal model, our proposed method could achieve 100% counterfactual fairness as the CE method. However, with the use of X, we improved the MSE large extent, almost as well as the CA method.
D Detailed Experimental Setup on Real Data
We conducted our experiments using supercomputing platform. The CPUs used were Intel(R) (Ro Platinum 8268 CPU @ 2.90GHz, and the GPU model was a Tesla V100, Our primary software environments were Python 3.9, Pytorch 1.12.1, and CUDA 10.2.
U1
F/
X
The VAE structure for the CVAE model is shown in Figure The details for training the VAE can be found (37]. However, we briefly discuss how the training was done. An encoder takes Figure 6: Synthetic causal [X., X3. Y, A] as input to generate
hidden variable U. The decoders then serve structural functions. Decoder Sa takes U as input to generate X.. decoder ʃa takes [U, A] to generate X3, and fy also uses (U, Å] to generate Y.
graph
8.
X
fo
fs
fy
U
E
X
A
Figure VAE Structure for CVAE Model
During the training of the VAE, used the following loss function:
Wala Xa) - wala X3) + wyly (Y, (Y, + w. (LLLUU)), + W || i
For the Law School Success dataset, I,, the BCE loss function, and la and ly are MSE loss function. For the UCI Adult Income dataset, l,, 1g, and ly are BCE loss functions. We set w. = 1, We = 1, wy = 1, Wi 1, and w fair 0.15. The batch size was set to 256 and the learning rate to 0.001. The experiments for the UF, CA, ICA, and CR methods were based the same VAE.
15

---

For the CE and our method, as we needed to use the VAE during the test time, we removed the use of Y from the structure, including the decoder fy. Hence, the encoder uses [Xa: Xs. . A] obtain U,
and Xa fu(U), X3 = fo(U, A). this case, the loss function becomes: wata (Xa. Xa) + ( X3) + w, ,, (L(
For the Law School dataset, we kept the hyperparameters the same, so Wa = 1, Wg 1, Wt 1. For the UCT Adult Income dataset, we set wa to 1, wg to and tc to 1.
Figure depicts the VAE structure for the DCEVAE model. The details for training the VAE can be found in [24]. and we summarize it here. The hidden variable is divided into two parts, U, and Ug. Hence, Ua- = Ea (Xa: Y) and U3 = Eg (x,, A,Y). During the decoding stage, X. = fa (Ua). X fa(Ug, A), and = fy (Va, UB, Å). A discriminator, Dv, is also employed to aid in disentangling U, and Ug.
Real
Perm
fo
fr
fp
D
C,
Ug
E.
X,
Figure 8: VAE Structure for DCEVAE Model
The training of this VAE can divided into two stages. In the first stage, we permuted the Us generated in the batch of data and concatenated them with U.. The discriminator was trained to distinguish whether (Ua, Ug] is randomly permuted. the second stage, we trained the encoders and decoders. The loss function is:
L wala(X, Xa) + wala(Xs, X,)) + wy wy (Y, + w,KL(U)) +W | (0) - y + wy * TC
Here, TC refers to the total correlation loss, which is the negative discrimination loss of D, We used the same las lg, ly, and weights (Wa; Wa, wy) as those used for training the CVAE, We also used the same batch size and learning rate. wh is set at 0.4, and Wfir is set at 0.2. As before, used the same VAE for the implementation of UF, CA, ICA, and CR methods.
For the CE and our method, we removed all structures related to Y, as we did with the CVAE. For the Law School Success dataset, we kept the hyperparameters the same. And for the UCI Adult Income dataset, we set Wa to 0.5 and W/ to 0.4.
For the finding predictors, used the linear regression model for the Law School Success Dataset and the logistic regression model for the UCI Adult Income dataset. When training the CR model, set the coefficient of the regularization term 0.002.
We split each dataset into training set, validation set, and test set with a ratio of 60%-20%-24 The validation set was used to stop the training of the VAE early. The training and validation sets were used together to train the predictors. All experiments were repeated five times with different splits to ensure the results stable.
More details about the function can be found
24
16

---

Factual
counterfaciuull
Baseline
CA
ICA
densiy
density
density
0
0.0
0.2
PYA
FYA
FYA
CE
CR
Ours
dendtry
1.0
Figure Density distribution of PÝA with CVAB causal model
Figure 9 visualizes the PDF of the predicted FYA under the CVAE causal model. As seen in Figure 5 our model more effective in maintaining the model's behavior for both factual and counterfactual data.
Table 8: Linear regression results on Law School Success dataset with CVAE causal model
Method
MSE (G)
TE (G)
MSE (L)
TE (L)
UF
0.8664 0.0060
0.1331 + 0.0034
0.8664
0.0060
0.1258 0.0039
CA
0,8889 + 0.0097
0.2330 + 0.0126
0.8915 = 0.0098
0.2358 = 0.0127
ICA
0.8704 0.0042
0.1633
0.0014
0.8683 = 0.0065
0.1543
0.0044
CE
0.8900 + 0.0076
0.8900 + 0.0076
CR
0.8693 0.0064
0.1035 0.0027
0.8696 0.0063
0.0880
0.0025
Ours
0.8689 + 0.0059
0.0663 + 0.0019
0.8682 + 0.0060
0.0655 + 0.0019
Table Linear regression results on Law School Success dataset with DCEVAE causal model
Method
MSE (G)
TE (G)
MSE (L)
TE (L)
UF
0.8677 0.0043
0.0780 + 0.0086
0.8677 0.0043
0.1300 0.0053
CA
0,8748 + 0.0050
0.1151 + 0.00277
0.8794 + 0.0010
0.1736 +:2 0.0398
ICA
0.8687 + 0.0046
0.0934 + 0.0160
0.8696 0.0047
0.1372
0.0166
CE
0.8781 + 0.0068
0.8781 + 0.0068
CR
0,8708 + 0.0042
0.0463 + 0.0049
0.8712 = 0.0053
0.0821 + 0.0052
Ours
0.8679 + 0.0045
0.0693 + 0.0037
0.8692 + 0.0047
0.0968 + 0.0024
Tables and present the results for the Law School Success dataset under path-dependent coun- terfactuals. In these tables, MSE(L) and TE(L) represent the MSE and TE when the LSAT is not in any unfair path, while MSE(G) and TE(G) correspond to the scenario in which GPA is unfair path. The results affirm that our method consistently satisfies PCF in every case. Although the CR method can achieve PCF similar our method when GPA LSAT not in any unfair path of the DCEVAE causal model, it fails in other scenarios because it does not guarantee counterfactual fairness.
any
17


Reviews:
[{"review_id": "JzOQW6csLz", "reviewer": "Reviewer_7vQZ", "summary": "The authors claim to:\n* present a novel and efficient method for generating counterfactually fair representations through the use of a symmetric function. \n* theoretically show that ML models trained with such representations can achieve perfect/exact CF.\n* extend their method to path-dependent counterfactual fairness as a bias mitigation strategy for unfair paths in a given causal graph. \n* provide empirical validation with different causal models, datasets, and fairness notions to compare their method with other CF methods. They claim that 1) their method outperforms the method of only using non-descendants of sensitive attributes; 2) existing heuristic methods for training ML model under CF fall short of achieving perfect CF fairness. \nThe authors use mean squared error (for regression) and overall classification accuracy, and additionally total effect for each protected group, to compare their method against a collection of baseline methods.", "questions": "1. How does your method perform on different types of features, i.e. continuous, discrete, categorical, ordinal? Are there any data requirements?\n\n2. What are the requirements for using your method in practice? Any hyperparameters or other dependencies? This information should be included for reproducibility. (Also, it's important to include a mention that reproducibility details are included in the Appendix!)\n\n3. It's unclear from your paper what the role or benefits are from using a symmetric function-based representation is within the ERM problem you outline in Theorem 1, or what the motivation is for this choice of representation. Can you please provide this? (This is also missing from the main paper and is a suggestion to add.)\n\n4. What is the sampling complexity for step 1 in Algo 1? Is it reasonable in practice to assume that the distribution calculated based on causal model M is known (referring to subscript 1 on page 3)? [I noted at the end of the paper your mention that finding a causal model is challenging - I think there's room to expand upon this, perhaps in the appendix.]\n\n5. Your experiments used logistic regression and linear regression as base models - how does this approach perform with more complex tasks / base models, especially non-linear ones?\n\n6. Do you plan to release any code?", "limitations": "The authors provide a brief acknowledgement of potential social impact (namely that counterfactual fairness is not the only notion one could consider and may not be the appropriate in some settings). Additionally, they briefly acknowledge that finding a causal model is challenging since there can be multiple causal models consistent with observational data.", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 2, "strengths": "The authors evaluate their method against a variety of baseline approaches, using two different causal models and two different datasets which provides a multiple points of reference for empirical comparison. Assuming the choice of representation is justified and the causal model distribution is obtainable, the approach presented in Algo 1 for generating a counterfactual representation to use within the unconstrained ERM problem is fairly straightforward. The authors provide acknowledgement of potential societal impacts, briefly noting that counterfactual fairness is not the only (or most appropriate) fairness notion depending on the task.", "weaknesses": "Abstract: The abstract is framed too closely around other works and does not effectively set the stage of this paper and its contributions. Note that only the last two sentences introduce aspects of this paper, while the remainder broadly introduce content that would be better suited for the introduction or related work section. I suggest beginning with the general problem setting, why it matters, implications of the current status quo (and thus why your work is relevant), and then outline the contributions to the problem/field that is presented in the paper.\n\nExperiments: Please add justification for your choice of metrics - why are these meaningful or \"good fits\" at measuring CF between the different baselines? Note that even if these are the best choice for the included tasks, excluding the rationale/significance diminishes this. \n\nIt would be informative, interesting, and straightforward to also compute each sensitive attribute-specific accuracy in addition to the overall as another indicator of model bias for all methods.  \n\nPlease consider using an additional and/or different dataset in the future. Consider referring to https://openreview.net/pdf?id=bYi_2708mKK for an argument on why the UCI Adult dataset may be worthwhile to \"retire\" in the context of fairness evaluation.\n\nConclusion: too short and brief, it reads as though the authors ran out of space.\n\n\n- Provide rationale and citations for the use of symmetric functions in the context of representation learning. This is a nontrivial component of your proposed method, and without justification of this choice, it's challenging to make informed judgments around your method.\n\n- The transition from Definition 1 and minimizing the provided empirical risk to satisfy CF, to the representation R = h(X, A; M, s), to the unconstrained ERM problem + demonstration that it suffices to learn parameters w is a bit convoluted and was hard (for me personally) to follow, despite the outline in Section 3. Please at least add an equation number for the argmin equation in Definition 1. \n\n- Example 1 was not very easy for me to follow and did not help me build a greater intuition for your approach. It's possible that the notation-heavy nature made it more cumbersome to parse.\n\n- I was unconvinced of the proof of Theorem 1 in the main paper, especially given that there was no mention of additional details in the Appendix. It's very important to indicate if any additional details/proofs/etc are included in the Appendix so the reader knows to reference that (otherwise, there's no guarantee that the reader will check)! Please add these references to related Appendix sections in all relevant places in the main paper.\n\n- Nit: please use the citation reference style where the first author's name and year is displayed in place of a number. It makes it much easier to recall which reference corresponds to which paper.\n\n- Nit: please use the full name for the \"CVAE\" and \"DCEVAE\" methods before abbreviating. Getting a sense of what these refer to without including the full name requires many more steps for the reader. \n\n- Nit: Paper may benefit from additional peer read-through(s) before submitting for clarity, flow, catching typos.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your comment. Here are our responses to your questions one by one. \n\nQuestion 1: We do not have any requirements on the type of features. As you can see, we provided an algorithm that generates a new representation using the original feature and a counterfactual feature with a symmetric function. As long as the feature can be expressed in a numeric way, our algorithm worked. Note that categorical features can be represented numerically by one-hot encoding. Ordinal features also can be represented numerically by ordinal encoding.  In our experiments, the Law School dataset is composed of continuous features, and the UCI dataset consists of categorical features.  \n\nQuestion 2: There is no special requirement for using our method. We included the hyper-parameters in the appendix. There are Hyper-parameters for the VAE (which was used to approximate the causal model). After training the VAE and approximating the causal model, generating counterfactual fair representation does not need any hyper-parameter tuning for a given symmetric function $s$ (symmetric function $s$ has been used in algorithm 1 and algorithm 2).  \n\nQuestion 3: Our motivation for using such a symmetric function comes from the definition of counterfactual fairness (Definition 1 in the paper). Counterfactual fairness implies that the decision should be the same in the factual and counterfactual world. Algorithms 1 and 2 find a presentation that is a symmetric function of the factual and counterfactual world. This means that if replace the counterfactual world with the factual world, the presentation still remains the same and does not change. As a result, representation $R$ and the downstream classifier/regressor remain counterfactually fair. Without such a symmetric function, it is hard to find a representation under counterfactual fairness.\n\nQuestion 4: In our experimental study, we use VAE to sample $u$. The time complexity of generating $u$ is $\\mathcal{O}$(#of parameters of VAE). We can use other algorithms to generate $u$. For example,  MCMC is another algorithm that has been used by [22] and its time complexity has been discussed in several works (see e.g., https://arxiv.org/pdf/0704.2167.pdf) \n\nRegarding the causal model, we assume that the causal model is known. This is the common assumption in the causal fairness literature (e.g. [22], which is the original paper that introduces counterfactual fairness). Once the causal structure is known, the structural equations can be estimated using VAEs. In the appendix, we explained how VAE can be used. If the causal model is not known,  human knowledge and causal structure learning methods (see e.g., https://arxiv.org/pdf/1706.09141.pdf) can help to find the causal structure. The general problem of learning a causal structure is beyond the scope of this paper. \n\nQuestion 5: Our method is able to generate a representation that will be used as the input of a machine-learning model.  Our algorithm generates a counterfactually fair representation regardless of the downstream task. The representation is independent of the machine learning model used in the downstream task.  Nevertheless, the followings are the numerical results with MLP (with default in sklearn). Our method still gets an accuracy of 79.55% and a TE of 0.0256. In this case, the CE method achieves 79.33% accuracy. \n\n| Method | Accuracy            | TE                  | TE0                 | TE1                 |\n|--------|---------------------|---------------------|---------------------|---------------------|\n| UF     | $0.8199 \\pm 0.0013$ | $0.1494 \\pm 0.0103$ | $0.1187 \\pm 0.014$  | $0.1644 \\pm 0.0103$ |\n| CA     | $0.8142 \\pm 0.0027$ | $0.1838 \\pm 0.0103$ | $0.1312 \\pm 0.0050$ | $0.2098 \\pm 0.0151$ |\n| CE     | $0.7933 \\pm 0.0010$ | 0                   | 0                   | 0                   |\n| Ours   | $0.7955 \\pm 0.0017$ | $0.0256 \\pm 0.0031$ | $0.0212 \\pm 0.0043$ | $0.0278 \\pm 0.0037$ |\n\nQuestion 6: Yes, we plan to release the code. Here is an anonymous link to the code (https://anonymous.4open.science/r/CF_Representation-B01B/readme.md). \n\nAnd thank you for your comment about the writing. We take your comment seriously and will write it in a more organized way in the camera-ready version."}, {"review_id": "KydyWvRESa", "reviewer": "Reviewer_rDmX", "summary": "The paper proposes a new algorithm to learn counterfactual fairness representation. The idea behind this is first to generate the counterfactual examples and use the symmetric function to generate the symmetric function. Empirical results models trained with this method can better satisfy counterfactual fairness compared to the other methods.", "questions": "* Please respond to the first point in the Weaknesses section (e.g., tunable utility-fairness trade-off parameter).\n\n* Please respond to the second point in the Weaknesses section (e.g., the gap between the experiment and theory).\n", "limitations": "The authors adequately addressed the limitations.", "rating": 5, "confidence": 3, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "* The proposed method is novel since it is the first work to focus on learning counterfactual fair representation, while the existing works focus on data augmentation or regularization. It also advances state-of-the-art results in terms of counterfactual unfairness mitigation. \n\n* Compared to the existing methods, the proposed method is technically sound since the claims are supported by both theoretical analysis and experimental results. \n\n* The submission is clearly written and well organized.\n", "weaknesses": "* Overall, the methods seem flexible to tune the utility and fairness trade-offs. Although the methods achieve the best performance in terms of effect total effect measure, the method lacks a tunable parameter to tune the utility and fairness trade-offs. In comparison, I believe counterfactual regularizer does not share the problem.\n\n* The author claims their theoretical analysis as the guarantee to ensure counterfactual fairness. However, I think the word *guarantee* might be too strong. The reason is that in the experiment, the method does not ensure perfect counterfactual fairness (e.g., TE=0). The authors fail to provide such an explanation why there is a gap between the theory and experiments (e.g., where does unfairness in their method come from). \n\n* I also think the result presentation could be better. Only listing the number in the table is not the best way to present the results. For example, the author can add the percentage of improvement of all metrics compared to the UF baseline for better presentation. Using Figures to visualize the trade-offs between fairness and utility is also a good choice. \n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your comment. Here are our responses to your questions. \n\nQuestion 1: Our goal in our paper is to have a perfect fair algorithm, so we did not include tunable parameters to adjust between accuracy and fairness like the weights used in the regularization-like method (Note that using a regularizer cannot satisfy perfect fairness). However, our idea is easy to be extended to sacrifice some fairness to achieve better accuracy. In particular, we can slightly break the symmetry of the function $s$. For example, with the same setting of the experiment in the Appendix, we can replace the $0.5x + 0.5\\check{x}$ with $0.6x + 0.4\\check{x}$, which can sacrifice TE from 0 to 0.26 while improving the MSE from 0.46 to 0.31. \n\nQuestion 2: The reason why TE for our method is not 0 is that we used VAE to model the structural functions of the causal model. Since VAE can only approximate the underlying causal mechanisms, we cannot compute the exact counterfactual features, which results in the non-zero value of TE. In the appendix, we used another experiment on the synthetic data showing our algorithm can achieve perfect fairness when the exact causal model $\\mathcal{M}$ is known.  \n\nAnd thank you for your comment regarding the presentation. We will present the results in the format that you mentioned in the camera-ready version. We have plotted the mse-fairness trade-off curve for our method and the CR method and put it in the anonymous link (https://anonymous.4open.science/r/CF_Representation-B01B/trade_off.png )."}, {"review_id": "5WZBxnjOst", "reviewer": "Reviewer_TTY3", "summary": "The paper introduces an innovative training technique that guarantees adherence to the counterfactual fairness measure. The method comprises three distinct steps: counterfactual samples generation, counterfactually fair representation generation, and fair model training. \nIn contrast to previous approaches that exclude descendants of the sensitive attribute under investigation, authors investigate the possibility of training a predictor that uses all attributes and simultaneously reaches counterfactual fairness. Indeed, the proposed approach leverages all attributes while achieving enhanced performance. Additionally, it is extended to incorporate the concept of path-dependent counterfactual fairness. \nTheoretical and empirical evidence is provided to demonstrate the correctness and efficacy of the method.\n", "questions": "(1) The value of MSE needs to be properly contextualized, as its interpretation depends on the range. The authors should briefly describe the dataset properties and report the results achieved by state-of-the-art solutions to facilitate interpretation.\n(2) The chosen baseline for ADULT is weak and needs better motivation and contextualization. The baseline's performance levels are lower than the state-of-the-art results. In this context, the Fairness scores do not differ significantly and do not seem to be indicative of how well the method works or representative of the different impacts on performance. Perhaps by using a more complex model or a stronger baseline, the impacts on Accuracy would be more evident and further demonstrate the contribution's novelty.", "limitations": "Although the authors have included considerations on the limitations and societal impact of the proposed work, the discussion appears too concise and could benefit from further elaboration. \nFor example, regarding the reported limitation of adopting a causal model, it is a general drawback of causality that, although valid and important to mention, may not provide sufficient information or relevance to the specific contextualized method presented in the paper. \nFurthermore, the authors indicate that this limitation applies to both their method and the baselines. However, not all baselines rely on the same assumptions as the proposed method; for example, not all baselines require structural equations. Therefore, this limitation is not equally suffered by all techniques.\nFinally, the assumption of knowing the causal model, understood in terms of structural equations, is a condition that is practically impossible in real-world contexts. Since real-world applications drive the motivation for pursuing fairness, there remains a significant gap that needs to be more adequately stated despite the authors mentioning this limitation.", "rating": 7, "confidence": 3, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "The contribution is framed with the necessary background notions and critically positioned with respect to relevant previous literature. \nCompared to existing solutions, the proposed solution overcomes the restriction of using only non-descendants to achieve counterfactual fairness. \nAlso, it introduces a path-dependent variation of the measure, offering a valuable and novel, original contribution to the field. The authors further demonstrate the theoretical and empirical efficacy of the proposed method. \nThrough the experiments, the authors compare the results of their approach with those of competitors, thereby subjecting the method's outcomes to rigorous testing against relevant techniques. The implementation choices, such as those related to the type of causal models selected, are well justified. The description and interpretation of the conducted results are comprehensive and presented clearly and straightforwardly.\nThe paper's explicit problem definition is essential to understand the proposed method and its algorithms. Lastly, the examples reported multiple times during the method presentation provide a clear and coherent framework for the reader to follow and fully comprehend the proposed approach. ", "weaknesses": "In presenting the method, it is often challenging to differentiate between the innovative aspects proposed and the background knowledge derived from existing literature. The authors could more explicitly highlight the original contributions.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your comment. Here are our answers to your questions. \n\nQuestion 1: $Y$ in the law school dataset represents the (normalized) first-year average GPA (FYA). The range of it in the dataset is from –3.45 to 3.48 (We will add more information about the dataset to include the range of $Y$ and other features.).\nThe UF baseline is the best MSE that we can get using a linear regression model since it does not take into account any fairness constraint. Please note, the goal of our experiment is to measure the fairness-accuracy trade-off. Accuracy alone is not informative. CE, CA, ICA, and CR baselines are the recent works (or the sate-off the art) that try to satisfy counterfactual fairness while improving the fairness-accuracy trade-off. Therefore, as long as we train the same model (e.g., linear regression) with the same training dataset using the baseline methods, we can correctly compare the fairness-accuracy trade-off. Yes, we maybe can improve the accuracy using a more complex model. However, still we need to look at the trade-off between accuracy and fairness. \n\nQuestion 2:  We want to again emphasize that the goal of our experiment is to measure the fairness-accuracy trade-off for different methods (looking at accuracy without measuring fairness is not appropriate). Therefore, we measured the accuracy and TE of baselines and our method under the same situation. We trained a linear model using our algorithm and baseline algorithms. We kept the training data the same for all the methods. The training dataset was pre-processed in the same manner as that in this paper (https://arxiv.org/abs/2011.11878). Only under the same situation, the baselines and our method can be compared.   \n\nThat is true that we can improve accuracy using a non-linear model. But improving accuracy using a more complex model is not the goal of the experiment. We are mainly concerned with the fairness-accuracy trade-off. For the sake of completeness, we will add the following results which are for neural networks:\n\n| Method | Accuracy            | TE                  | TE0                 | TE1                 |\n|--------|---------------------|---------------------|---------------------|---------------------|\n| UF     | $0.8199 \\pm 0.0013$ | $0.1494 \\pm 0.0103$ | $0.1187 \\pm 0.014$  | $0.1644 \\pm 0.0103$ |\n| CA     | $0.8142 \\pm 0.0027$ | $0.1838 \\pm 0.0103$ | $0.1312 \\pm 0.0050$ | $0.2098 \\pm 0.0151$ |\n| CE     | $0.7933 \\pm 0.0010$ | 0                   | 0                   | 0                   |\n| Ours   | $0.7955 \\pm 0.0017$ | $0.0256 \\pm 0.0031$ | $0.0212 \\pm 0.0043$ | $0.0278 \\pm 0.0037$ |\n \nRegarding limitation: All the baselines except UF (which trains a model without any fairness constraint) rely on an underlying causal model for generating counterfactual examples. We will clarify this in our paper. Also, we will further emphasize that if the causal model is not known, human knowledge and causal structure learning methods (see e.g., https://arxiv.org/pdf/1706.09141.pdf) can help to find the causal structure.\n  "}, {"review_id": "svrXbI4ruA", "reviewer": "Reviewer_jctR", "summary": "The paper presents a new approach for achieving counterfactual fairness.  Specifically, builds on past work on counterfactual fairness and proposes an improved algorithm that does not discard any input features. The paper achieves this by sampling from the latent background variables to aggregate a set of counterfactual features. The features are then passed through a symmetric function and concatenated with the latent factor to form a data representation. The representations are then used to train a model that is guaranteed to achieve counterfactual fairness. The paper also presents the notion of path-dependent counterfactual fairness and extends their original algorithm to this fairness notion.", "questions": "Question:\n\n1. Clarification question about the sampling of u. When u is sampled from the posterior distribution? Is it kept fixed while the dependent x features are generated for each of the labels of the protected attribute A=a’ or is a different u used for every sample?\n\nPlease reply to any questions in the weakness section as well. ", "limitations": "N/A", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "**Strengths**:\n\n1. The paper is fairly easy to follow and provides detailed background on counterfactual fairness.\n2. The proposed path-dependent counterfactual fairness is a welcome extension of counterfactual fairness that does not neglect features for being dependent on the protected attribute.\n3. The paper showcases extensive experiments on multiple setups to show the efficacy of the proposed approach.", "weaknesses": "**Weakness**: \n\n1. The motivation behind using a symmetric function needs to be provided in more detail. Why is it better to form a single representation than to augment the individual counterfactual samples in the training set? Also, if the proposed approach takes the mean of all features, isn’t it losing a lot of information? Will this work well when most (or all) of the input features are dependent on the protected attribute A? Are there any synthetic experiments to show evidence?\n2. It is unclear why the paper does not report TE results for CE in any of the results tables. It would be interesting to see the trade-off between fairness and utility with this baseline, which ignores all the descendants of A. \n3. It would interesting to have a qualitative discussion on the impact of path-dependent counterfactual fairness. Also, how the performance of the proposed PCF and CF algorithms differs from each other?\n4. The presentation towards the beginning of the paper can be smoothened out for readers not too familiar with CF literature. For example, in line 86: it is unclear how Y and Z fit into the graphical model. Are they subsets of the unobserved U or observed variables V? Alternatively, the paper can also state a real-world example in the beginning (section 2 instead of section 3 as it is now) and use parts of it to guide the reader through the rest of the paper. \n5. The presentation of the proofs can be formalized a bit by having an explicit proof section for each theorem/lemma. The paper can write the proofs in blocks of (begin{proof} \\end{proof}).", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your comment. Here are our answers to your questions. \n\nQuestion 1: As we can see in algorithms 1 and 2, $u$ is generated based on conditional distribution U given X=x and A=a. As a result, $u$ is generated differently for each sample. As we discussed in the paper and the appendix, we can generate $u$ from the conditional distribution $\\Pr(U|X=x, A=a)$ using VAEs. \n\n#### Weakness 1:  \n**The motivation behind using a symmetric function needs to be provided in more detail.**  Our motivation for using such a symmetric function comes from the definition of counterfactual fairness (Definition 1 in the paper). Counterfactual fairness implies that the decision should be the same in the factual and counterfactual world. Algorithms 1 and 2 find a representation that is a symmetric function of the factual and counterfactual world. This means that if replace the counterfactual world with the factual world, the representation remains the same and does not change. \n\n**Why is it better to form a single representation than to augment the individual counterfactual samples in the training set?** Counterfactual factual data augmentation is one of our baselines. There is no theoretical guarantee that Counterfactual factual data augmentation can satisfy counterfactual fairness (as we can see in our experiment). However, our representation satisfies exact counterfactual fairness (proved in Theorem 1 and 2). \n\n**Also, if the proposed approach takes the mean of all features, isn’t it losing a lot of information?** Always there is a trade-off between fairness and accuracy. However, as you can see in the experiment, our method is able to satisfy CF and the obtained accuracy is very close to the accuracy of a model trained without any fairness constraint.\n\n**Will this work well when most (or all) of the input features are dependent on the protected attribute A? Are there any synthetic experiments to show evidence?** Yes, it still works well as the representation includes $u$ in addition to the features. Please check the appendix for experiments with synthetic data. In that experiment, $A$ directly impacts all the features.  \n\n#### Weakness 2: \nWe explained why we did not fill in the TE values for CE methods in the paper (line 286).  CE method always has 0 TE by the definition (Not by empirical calculation) since it does not use any observable feature. We will enter 0.0 for TE for CE in the tables in the camera-ready version. \n\n#### Weakness 3: \nPath-dependent counterfactual fairness has been proposed by [22] (https://arxiv.org/pdf/1703.06856.pdf). In the last paragraph of page 15 of [22], the authors provide an example from UC Berkeley’s admission process to show the importance of path-dependent CF. We will add this example to our paper and will discuss the difference between CF and path-dependent CF in more detail. Generally, based on UC Berkeley’s admission, if all the causal path from sensitive attributes to target $Y$ is not considered unfair, then we should consider using Path dependent CF.  \n\n#### Weakness 4: \nAs we mentioned in line 86, $Y$ and $Z$ here are observable variables and are subsets of $V$. Thank you for your advice. We will re-write this part, and add an example similar to Example 1 to section 2.1. Example 1 in the paper is coming from [22] which is based on a real-world scenario and can be used to explain observable and unobservable variables.   \n\n#### Weakness 5: \nThank you for your comment. Yes, we take this comment very seriously and will write the proof in a more organized way in the camera-ready version. \n"}]

Author rebuttal:

Meta-review: This paper proposes a novel approach for generating counterfactually fair representations through the use of a symmetric function. The authors then show that any downstream models trained with such representations can achieve perfect/exact CF. In the initial reviews, the reviewers had concerns about the choice of metrics used in the experiments, the presentation of the numerical results, as well as the presentation of the overall paper. Some of the comments have been partially addressed in the rebuttal. The presentation needs further improvement.
Decision: Accept (poster)