Title: Counterfactually Fair Representation
Venue: NeurIPS 2023
Accepted: yes
Keywords: Counterfactual fairness

Representation learning
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

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 et 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, in which the individual belongs to another social group. Learning fair models satisfying CF can be challenging. It was shown in [26] that a sufficient condition for satisfying CF is to 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 1 .

1 Introduction

While machine learning (ML) has had significant impacts on human-involved applications (e.g., lending, hiring, healthcare, criminal justice, college admission), it also poses significant risks, particularly regarding unfairness against protected social groups. For example, it has been shown that computer-aided clinical diagnostic systems can exhibit discrimination against people of color [9]; face recognition surveillance technology used by police may have racial bias [1]; a decision support tool COMPAS used for predicting the recidivism risk of defendants is biased against African Americans [5]. Various fairness 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 [13], predictive parity [20]; iii) preference-based fairness that is 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, 12].

However, the fairness notions mentioned above do not 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; it

requires that the ML outcome received by an individual should be the same in the real world as it would be in a 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 a necessary condition for achieving CF. In particular, we propose a novel method for generating counterfactually fair representations using all available features (including both descendants and non-descendants of sensitive attribute). The idea is to first generate counterfactual samples of each data point based on the causal structure, and the fair representations can be generated subsequently by applying a symmetric function to both factual (i.e., original data) and counterfactual samples. We can theoretically show that ML models (or any other downstream tasks) trained with counterfactually fair representations can satisfy perfect CF. Experiments on real data further validate our theorem.

It 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-dependent counterfactual fairness [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 definitions) 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 1 , · · · , X d ] ⊤ ∈ X are observable features, A ∈ A is the sensitive attribute (e.g., race, gender) indicating the group membership, and Y ∈ Y ⊆ R is the label/output. Similar to [31], we associate the observable V = ( X,A,Y ) with a 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 = { f 1 , f 2 , · · · , f d , f d +1 , f d +2 } is a set of functions (a.k.a. structural equations [4]) with one for each variable in V . WLOG, let

where pa i and U pa i are the sets of observable and unobservable variables that are the parents of X i . pa d +1 and pa d +2 (resp. U pa d +1 and U pa d +2 ) are the observable (resp. unobservable) variables that are parents of A and Y , respectively. Assume ( U, V ) can be represented as a directed acyclic graph.

Our goal is to learn a predictor ˆ Y = g w ( R ) parameterized by weight vector w ∈ R d w from training data. Here R = h ( X,A ; M ) is a representation generated using ( X,A ) and causal model M . Define loss function l : Y × R → R where l ( Y, g w ( R )) is the loss associated with g w 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 { l ( Y, g w ( R )) } . Throughout the paper, we use small letters to denote the realizations of random variables, e.g., ( x, a, y ) is a realization of ( X,A,Y ) .

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 i ∈ V and even study the impact of intervening certain observed variables on other variables. Specifically, the intervention on variable V i can be done by simply replacing structural equation V i = f i ( pa i , U pa i ) with equation V i = v for some v . To study the impact of intervening V i , we can use new structural equations to find resulting distributions of other observable variables and see how they may differ as v 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 z for two observable variables Z, 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 = u can be computed by replacing structural equations for Z as Z = z . Such counterfactual value is typically denoted as Y Z ← z ( u ) .

The goal of counterfactual inference is to compute the probabilities Pr { Y Z ← z ( U ) | O = o } for some observable variables O . It can be used to infer "the value of Y if Z had taken value z in the presence of evidence O = o ". Based on [16], Pr { Y Z ← z ( U ) | O = o } can be computed in three steps: (i) abduction that finds posterior distribution of U given O = o for a given prior on U ; (ii) action that performs intervention Z = z by replacing structural equations of Z ; (iii) prediction that computes the distribution of Y using new structural equations and the posterior Pr { U | O = o }

2.2 Counterfactual Fairness

Without fairness consideration, simply learning a predictor by minimizing the expected loss, i.e., arg min w L ( w ) , may exhibit biases against certain social groups. One way to tackle unfairness issue is to enforce a certain fairness constraint when learning the predictor. In this work, we consider counterfactual fairness as formally defined below.

Definition 1 (Counterfactual Fairness (CF) [26]) . We say a predictor ˆ Y = g w ( R ) satisfies CF if the following holds for every ( x, a ) :

This notion suggests that any intervention on sensitive attribute A should not change the distribution ˆ Y given that U follows distribution Pr M { U | X = x, A = a } 2 . In other words, adjusting A should not affect the distribution of ˆ Y if we keep other factors that are not causally dependent on A constant. Learning a 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 D = { x ( i ) , a ( i ) , y ( i ) } n i =1 , it suffices to minimize the following empirical risk to satisfy CF:

where x ( i ) ⊁ A are non-descendant features of A corresponding to i -th sample, and the expectation is with respect to the random variable U ( i ) ∼ Pr M { U | X = x ( i ) , A = a ( i ) } .

Although removing the descendants of A from the input is a simple method to address the unfairness issue, it comes at the cost of losing important information. In some examples (e.g., the ones provided in [26]), it is possible that all (or most of) the features are descendants of A and need to be eliminated when training the predictor. We thus ask:

Can we train a 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 a theoretically-certified algorithm that finds counterfactually fair predictors using all the available features.

3 Proposed Method

In this section, we introduce our algorithm for training a 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 in 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.

̸

Definition 2 (Counterfactual Sample) . Consider i -th data point in training dataset with feature vector x ( i ) and sensitive attribute a ( i ) . Let u ( i ) be the unobservable variable associated with ( x ( i ) , a ( i ) ) sampled from distribution Pr M { U | X = x ( i ) , A = a ( i ) } under causal model M = ( V, U, F ) . Then, (ˇ x ( i ) , ˇ a ( i ) ) is a counterfactual sample with respect to ( x ( i ) , a ( i ) ) if ˇ a ( i ) = a ( i ) and ˇ x ( i ) is generated using structural equations F , unobservable variable U = u ( i ) , and intervention A = ˇ a ( i ) . 3

Equivalently, we can represent the counterfactual feature ˇ x ( i ) = ˇ X ( i ) A ← ˇ a ( i ) ( u ( i ) ) . Next, we use an example to clarify the generation process of counterfactual sample.

Example 1 ( Law School Success [26]) . Consider a group of students, each has observable features grade-point average (GPA) before entering college X G and entrance exam score (LSAT) X L . 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 U G , U L , U F representing errors and the relations between these variables can be characterized by the following structural equations:

where ( b G , b L , b F , w Q G , w S G , w Q L , w S L , w R F , w S F ) are the parameters of the causal model, which we assume are given 4 . Consider one student with x (0) = ( x (0) G , x (0) L ) and a (0) = ( q (0) , s (0) ) . To generate its counterfactual sample, we first compute the underlying unobservable variables ( u (0) G , u (0) L ) :

Then, for any (ˇ q, ˇ s ) ∈ A-{ ( q (0) , s (0) ) } , the corresponding counterfactual features can be generated:

In the above example, finding unobservable variables is straightforward due to the additive error model (i.e., each observable variable V i is equal to f i ( pa i ) + U i ). For other causal models that are non-additive, we can leverage techniques such as Variational Auto Encoder (VAE) to first learn distribution Pr M { U | X = x, A = a } and then sample from this distribution, see e.g., [21, 24, 30, 37].

Counterfactually fair representation generation. Next, we introduce how to generate counterfactually fair representation R = h ( X,A ; M , s ) using counterfactual samples generated above.

The complete procedure is given in Algorithm 1. The idea is to first apply a symmetric function s ( · ) to both factual feature x and counterfactual features { ˇ x [ j ] } |A|1 j =1 . This output can be leveraged to generate CF representation. The symmetry of the function is formally defined below.

Definition 3. A function s : X |A| → R is symmetric if the output is the same for any permutation of inputs.

Algorithm 1 CF Representation Generation h ( x, a ; M , s )

Input: Causal model M , observable features ( x, a ) , symmetric function s

1: Sample u from distribution Pr M { U | X = x, A = a }

2: Use u and causal model M to generate |A|1 counterfactual samples { (ˇ x [1] , ˇ a [1] ) , . . . , (ˇ x [ |A|1] , ˇ a [ |A|1] ) } , where ˇ a [ j ] ∈ A - { a } .

3: Use symmetric function s ( . ) to generate representation

Output: counterfactually fair representation R One example of symmetric function is the average over all inputs, e.g., s ( x, ˇ x [1] , . . . , ˇ x [ | A |-1] ) = ( x +ˇ x [1] + ... +ˇ x [ | A |-1] ) | A | .

Fair model training. Given CF representation R = h ( X,A ; M , s ) generated by Algorithm 1, we can use it directly to learn a predictor that satisfies CF. Indeed, we can show that any predictor learned based on CF representation satisfies perfect CF, as stated in Theorem 1 below.

Theorem 1. If representation is generated based on h ( x, a ; M , s ) in Algorithm 1, then the predictor g w ( h ( x, a ; M , s )) satisfies perfect CF for all w ∈ R d w .

Because g w ( h ( x, a ; M , s )) satisfies CF for all parameter w , we can find the optimal predictor directly by solving an unconstrained optimization:

Under Theorem 1, it is guaranteed that the optimal predictor g w ∗ satisfies counterfactual fairness.

Inference. After learning the optimal CF predictor g w ∗ , we can use it to make fair predictions about new data. At the inference phase, for a given example ( x, a ) , we first generate its CF representation using Algorithm 1 and find the prediction ˆ y using g w ∗ . That is, ˆ y = g w ∗ ( h ( x, a ; M , s )) .

Discussion. Compared to [26], 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 use 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 P G A be the set of all unfair directed paths from sensitive attribute A to output Y . Further, we define X P c G A as the features that are not present in any unfair path in P G A and X P G A as the features along the unfair paths. Path-dependent Counterfactual Fairness is defined as follows.

Definition 4 (Path-dependent Counterfactual Fairness (PCF) [26]) . We say ˆ Y = g w ( R ) satisfies PCF with respect to path set P G A if the following holds for every ( x, a ) : ∀ y ∈ Y , a ′ ∈ A

This notion suggests that if we fix attributes X P c G A and let U follows posterior distribution Pr M { U | X = x, A = a } , then variable A should not affect the predictor along unfair path(s) in P G A . Note that PCF reduces to CF if X P c G A = ∅ . We want to emphasize that pathspecific counterfactual fairness defined in [7] is different from Definition 4. Pathspecific counterfactual fairness [7] considers a baseline value a ′ for A , and requires A = a ′ propagate

Algorithm 2 PCF Representation Generation h ( x, a ; M , s, X P c G A )

Input: Causal model M , Set of variables X P c G A that are not along unfair paths, ( x, a ) , symmetric function s

1: Sample u from distribution Pr M { U | X = x, A = a }

3: Use u and causal model M ′ to generate |A|1 counterfactual features { (ˇ x [1] P G A , ˇ a [1] ) , . . . , (ˇ x [ |A|1] P c G A , ˇ a [ |A|1] ) } , where ˇ a [ j ] ∈ A-{ a } .

2: Apply intervention X P c G A = x P c G A to get a new model M ′ .

4: Use symmetric function s ( . ) to generate representation

Output: path-dependent counterfactually fair representation R

through unfair paths, and the true value of A propagates through other paths. In contrast, in pathdependent CF, there is no baseline value for A , and A should not cause Y through unfair paths.

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 2 ( Representation for PCF ) . Consider a causal graph shown in Figure 1. In this graph, there are two directed paths from A to Y . We assume that A is binary, and P G A = { ( A → X 2 → Y ) } ,

̸

and X P c G A = { X 1 } . Based on Definition 4, given sample ( x, a ) , after intervention X 1 = x 1 (Figure 2), intervention on A should not affect the prediction outcome. We generate a representation in the following steps, 1) we find distribution Pr M { U | X = x, A = a } and sample u from this distribution. 2) Using the graph in Figure 2, we generate counterfactual value for X 2 . That is, for a given structural equation X 2 = f 2 ( A,X 1 , U ) , we generate counterfactual value ˇ x 2 = f 2 ( a ′ , x 1 , u ) , where a ′ = a . 3) We generate representation R = [ x 1 , s ( x 2 , ˇ x 2 ) , u ] , where s is a symmetric function.

Based on the above example, the representation should be generated based on causal graph G after intervention X P c G A = x P c G A . The detailed representation generation procedure under PCF is stated in Algorithm 2. Let h ( x, a ; M , s, X P c G A ) be the function that generates such a presentation using Algorithm 2. We have the following theorem for h ( x, a ; M , s, X P c G A ) .

Theorem 2. Assume R = h ( x, a ; M , s, X P c G A ) is representation generated based on Algorithm 2. Then the predictor g w ( h ( x, a ; M , s, X P c G A )) satisfies perfect PCF for all w ∈ R d w .

The above theorem implies if we train a predictor using { r ( i ) = h ( x ( i ) , a ( i ) ; M , s, X P c G A ) , y ( i ) } n i =1 , and we use r = h ( x, a ; M , s, X P c G A ) 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 our 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 as the sensitive attribute A , whether income is greater than $50 K 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, X α and X β . 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,

Figure 3: CVAE causal graph Figure 4: DCEVAE causal graph X α consists of {Race} and X β includes {LSAT, GPA}. For the UCI Adult Income dataset, similar to [24], we assume that X α contains {Age, Race, Native Country} and X β includes {Workclass, Education, Marital Status, Occupation, Relationship, Hours per Week}.

The second graph is proposed by DCEVAE paper [24] (see Figure 4). The main assumption in [24] is that the exogenous variables controlling X α and X β can be disentangled into U α and U β . We used the same sets of X α and X β as in the CVAE graph.

In contrast to the structural equations used in [26], 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. 5 The parameters of the V AE network are learned from observational data. In the CV AE causal model, the decoder part includes functions f α , f β , and f Y and is trained such that the following structural equations hold,

For the DCEVAE causal model, the decoder part also includes functions f α , f β , and f Y but it is trained such that the following holds,

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 ( x ( i ) , y ( i ) , a ( i ) ) ∈ D , first we use the encoder of VAE to find unobserved variable u ( i ) . Then, we use the decoder to generate both factual and counterfactual samples. Specifically, for counterfactual samples, we use u ( i ) and ˇ a ( i )[1] = a ( i ) as the input of decoder to generate ˇ x ( i )[1] and ˇ y ( i )[1] . For factual data, we use u ( i ) and ˇ a ( i )[0] = a ( i ) as the input of the decoder to generate ˇ x ( i )[0] and ˇ y ( i )[0] . We use the following dataset to train a predictor, ˇ D = { (ˇ x ( i )[0] , ˇ a ( i )[0] , ˇ y ( i )[0] ) , (ˇ x ( i )[1] , ˇ a ( i )[1] , ˇ y ( i )[1] ) | i = 1 , . . . , n } .

Improved Counterfactual Augmentation (ICA). We realized that the baseline CA could further be improved by training the predictor using ˇ D = { ( x ( i ) , a ( i ) , y ( i ) ) , (ˇ x ( i )[1] , ˇ a ( i )[0] , ˇ y ( i )[1] ) | i = 1 , . . . , 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 a regularizer || ˆ y ( i ) -ˇ ˆ y ( i )[1] || 2 to the loss function, where ˆ y ( i ) is the output of the predictor for input ( x ( i ) , a ( i ) ) and ˇ ˆ y ( i )[1] is the output of the prediction for (ˇ x ( i )[1] , ˇ a ( i )[1] ) .

For our method, we use Algorithm 1 and s ( x, ˇ x ) = x +ˇ x 2 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 a training dataset D = { ( x ( i ) , a ( i ) , y ( i ) ) | i = 1 , . . . , n } and a test dataset D test = { ( x ( i ) , a ( i ) , y ( i ) ) | i = n +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 use total effect (TE) measure defined as TE = 1 m ∑ m i = n +1 | ˆ y ( i ) -ˇ ˆ y ( i )[1] | , where ˇ ˆ y ( i )[1] is the output of the predictor for the counterfactual sample (ˇ x ( i )[1] , ˇ a ( i )[1] ) . We also calculate the total effect for each protected group. More specifically, TE a = 1 |{ i | i>n,a ( i ) = a }| ∑ i>n,a ( i ) = a | ˆ y ( i ) -ˇ ˆ y ( i )[1] | . In our experiments, TE 0 is the total effect for females, and TE 1 is the total effect for males. In general, smaller TE , TE 0 , TE 1 imply that the method is 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 , TE 0 , and TE 1 are 0 for the CE method.

Results. Table 1 and Table 2 represent the results for the UCI Adult Income dataset under CVAE and DCEVAE causal model, respectively. Note that there is 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

School Success dataset under CVAE and DCEVAE are presented in Tables 3 and 4. Based on Table 3, 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 DCEV AE model and the law school success dataset (Table 4), the CR method exhibits similar performance as our method. It is worth mentioning that TE 1 and TE 2 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 in Figure 5. 6 Under CF, we expect these two distributions to be the same. These figures show that our method is able to keep the model's behavior the same for factual and counterfactual samples.

0.0

0.2

0.4

FYA

0

2

4

density

Baseline

0.0

0.2

0.4

FYA

0

1

2

density

CA

0.0

0.2

0.4

FYA

0

1

2

density

ICA

0.0

0.2

0.4

FYA

0

2

4

density

CE

0.0

0.2

0.4

FYA

0

1

2

3

density

CR

0.0

0.2

0.4

FYA

0

2

4

density

Ours

factual

counterfactual

Path-dependent Counterfactual Fairness. Table 8 and Table 9 show the results for the UCI Adult Income dataset under path-dependent counterfactual. In this experiment, for finding counterfactual samples, we first consider a 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 8 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 2 are in the appendix. Societal Impact: In this paper, we introduced an algorithm that can find a

fair predictor under counterfactual fairness. However, we do not 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], to find a predictor under CF, causal model M should be known to the fair learning algorithm. Finding a causal model is challenging since there can be several causal models consistent with observational data [31]. This limitation exists for our algorithm and baselines.

6 Conclusion

We proposed a novel method to train a predictor under counterfactual fairness. Unlike [26], which shows that a sufficient condition for satisfying CF is to not use the features that are descendants of the sensitive attribute, our algorithm uses all the available features leading to better performance. The proposed algorithm generates a 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.

References

Racial discrimination in face recognition technology, 2020.

M. Abroshan, M. M. Khalili, and A. Elliott. Counterfactual fairness in synthetic data generation. In NeurIPS 2022 Workshop on Synthetic Data for Empowering ML Research , 2022.

A. Agarwal, A. Beygelzimer, M. Dudík, J. Langford, and H. Wallach. A reductions approach to fair classification. In International Conference on Machine Learning , pages 60-69. PMLR, 2018.

K. A. Bollen. Structural equations with latent variables , volume 210. John Wiley & Sons, 1989.

A. Brackey. Analysis of Racial Bias in Northpointe's COMPAS Algorithm . PhD thesis, Tulane University School of Science and Engineering, 2019.

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.

S. Chiappa. Path-specific counterfactual fairness. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 33, pages 7801-7808, 2019.

S. Dandl, F. Pfisterer, and B. Bischl. Multi-objective counterfactual fairness. In Proceedings of the Genetic and Evolutionary Computation Conference Companion , pages 328-331, 2022.

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:2111.08006 , 2021.

A. M. Davani, A. Omrani, B. Kennedy, M. Atari, X. Ren, and M. Dehghani. Improving counterfactual generation for fair hate speech detection. arXiv preprint arXiv:2108.01721 , 2021.

P. G. Di Stefano, J. M. Hickey, and V. Vasileiou. Counterfactual fairness: removing direct effects through regularization. arXiv preprint arXiv:2002.10774 , 2020.

V. Do, S. Corbett-Davies, J. Atif, and N. Usunier. Online certification of preference-based fairness for personalized recommender systems. In Proceedings of the AAAI Conference on Artificial Intelligence , volume 36, pages 6532-6540, 2022.

C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel. Fairness through awareness. In Proceedings of the 3rd innovations in theoretical computer science conference , pages 214-226, 2012.

S. Garg, V. Perot, N. Limtiaco, A. Taly, E. H. Chi, and A. Beutel. Counterfactual fairness in text classification through robustness. In Proceedings of the 2019 AAAI/ACM Conference on AI, Ethics, and Society , pages 219-226, 2019.

C. J. Geyer. Practical markov chain monte carlo. Statistical science , pages 473-483, 1992.

M. Glymour, J. Pearl, and N. P. Jewell. Causal inference in statistics: A primer . John Wiley & Sons, 2016.

V. Grari, S. Lamprier, and M. Detyniecki. Adversarial learning for counterfactual fairness. Machine Learning , 112(3):741-763, 2023.

N. Grgic-Hlaca, M. B. Zafar, K. P. Gummadi, and A. Weller. The case for process fairness in learning: Feature selection for fair decision making. In NIPS symposium on machine learning and the law , volume 1, page 11. Barcelona, Spain, 2016.

X. Han, L. Zhang, Y. Wu, and S. Yuan. Achieving counterfactual fairness for anomaly detection. arXiv preprint arXiv:2303.02318 , 2023.

M. Hardt, E. Price, and N. Srebro. Equality of opportunity in supervised learning. Advances in neural information processing systems , 29:3315-3323, 2016.

J. Joo and K. Kärkkäinen. Gender slopes: Counterfactual fairness 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.

M. M. Khalili, X. Zhang, and M. Abroshan. Fair sequential selection using supervised learning models. Advances in Neural Information Processing Systems , 34:28144-28155, 2021.

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 Learning Research , pages 16271-16290. PMLR, 23-29 Jul 2023.

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 of the AAAI Conference on Artificial Intelligence , volume 35, pages 8128-8136, 2021.

R. Kohavi. Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. In Kdd , volume 96, pages 202-207, 1996.

M. J. Kusner, J. Loftus, C. Russell, and R. Silva. Counterfactual fairness. Advances in neural information processing systems , 30, 2017.

Y. Li, H. Chen, S. Xu, Y. Ge, and Y. Zhang. Personalized counterfactual fairness in recommendation. arXiv preprint arXiv:2105.09829 , 2021.

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.

P. Lohia. Counterfactual multi-token fairness in text classification. arXiv preprint arXiv:2202.03792 , 2022.

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.

J. Pearl et al. Models, reasoning and inference. Cambridge, UK: CambridgeUniversityPress , 19(2), 2000.

F. Petersen, D. Mukherjee, Y. Sun, and M. Yurochkin. Post-processing for individual fairness. Advances in Neural Information Processing Systems , 34:25944-25955, 2021.

S. R. Pfohl, T. Duan, D. Y. Ding, and N. H. Shah. Counterfactual reasoning for fair clinical risk prediction. In Machine Learning for Healthcare Conference , pages 325-358. PMLR, 2019.

T.-H. Pham, X. Zhang, and P. Zhang. Fairness and accuracy under domain generalization. In The Eleventh International Conference on Learning Representations , 2023.

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-First International Joint Conference on Artificial Intelligence, IJCAI , pages 732-739, 2022.

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.

K. Sohn, H. Lee, and X. Yan. Learning structured output representation using deep conditional generative models. Advances in neural information processing systems , 28, 2015.

S. Verma and J. Rubin. Fairness definitions explained. In Proceedings of the international workshop on software fairness , pages 1-7, 2018.

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 arXiv:2210.15500 , 2022.

L. F. Wightman. Lsac national longitudinal bar passage study. lsac research report series. 1998.

Z. Xu, J. Liu, D. Cheng, J. Li, L. Liu, and K. Wang. Disentangled representation with causal constraints for counterfactual fairness. arXiv preprint arXiv:2208.09147 , 2022.

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 on world wide web , pages 1171-1180, 2017.

M. B. Zafar, I. Valera, M. Rodriguez, K. Gummadi, and A. Weller. From parity to preferencebased notions of fairness in classification. Advances in neural information processing systems , 30, 2017.

X. Zhang, M. M. Khalili, K. Jin, P. Naghizadeh, and M. Liu. Fairness interventions as (dis) incentives for strategic manipulation. In International Conference on Machine Learning , pages 26239-26264. PMLR, 2022.

A Related Work

This section succinctly presents an overview of fairness 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 learning algorithms (see, e.g., [23, 44, 42, 22, 3, 34]), fairness 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 on 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 ( ˆ Y | A = 0) = P ( ˆ Y | A = 1) [13].

Equal opportunity is another key criterion, ensuring that individuals from diverse protected attribute groups have the same probability of selection, represented by P ( ˆ Y = 1 | A = 0 , Y = 1) = P ( ˆ Y = 1 | A = 1 , Y = 1) [20]. The related concept of equal odds prescribes equal true positive and false positive rates across different protected attribute groups [38].

Additionally, preference-based fairness argues that an algorithm's design should not be solely determined by its creators or regulators but should also incorporate the preferences of those directly affected by the algorithm's outputs [43, 12].

Counterfactual Fairness. Emerging from the broader concept of individual fairness, counterfactual fairness seeks to guarantee that similar datapoints are treated identically [32]. It uses counterfactual 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 to generate counterfactual data [29, 14]. However, this approach might overlook possible causal relationships among words.

To overcome this, a more sophisticated causal model was proposed by [31], facilitating a three-step process for counterfactual data generation: Abduction-Action-Prediction. This process includes the 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.

Adopting the advanced assumptions of [31] 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 encoder-decoder-like structure for counterfactual inference, with the encoder'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 a causal model by reconceptualizing it as a multi-objective issue.

A 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 an approach that uses only the non-descendant variables of the sensitive attribute as model inputs, achieving perfect fairness. Other research aimed to attain approximate counterfactual fairness [36].

A common approach employed by [14, 36, 6, 11, 33] introduces a fairness penalty regularizer to the loss function when training a counterfactually fair model. Meanwhile, studies by [24, 14, 35, 10] 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 fairness from the causal perspective, differing from [26].

While the method proposed by [26] maintains perfect fairness, it often leads to a significant decrease in precision due to the underutilization of observed data's information. Subsequent methodologies have managed to enhance precision, though they cannot theoretically guarantee counterfactual fairness. As

counterfactual fairness gains increasing traction [17, 6, 27], there is an urgent need for approaches that simultaneously augment performance and uphold fairness.

B Proofs

Theorem 1. We start by finding Pr { R A ← a ′ ( U ) = r | X = x, A = a } .

Note that R in Algorithm 1 depends on value realization u and feature vector x . However, given u , R A ← a ′ ( u ) does not depend on intervention A = a ′ as s ( . ) is a symmetric function and gets all the counterfactual samples for different values of a ′ . As a result, Pr( R A ← a ′ ( U ) = r | X = x, A = a ) does not depend on a ′ . Moreover, Pr( U = u | X = x, 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 ( x, a ) , Pr( R A ← a ′ ( U ) = r | X = x, A = a ) remains unchanged for all a ′ ∈ A . This implies that R satisfies CF. Consequently, any function of R including g w ( R ) satisfies CF.

Theorem 2. Assume that R has been generated using Algorithm 2. We have,

Note that, Pr( R A ← a ′ ,X P c G A ← x P c G A ( U ) = r | X = x, A = a ) does not depend on a ′ . This is because, Algorithm 2 generates a presentation using a symmetric function, and all the counterfactual samples { (ˇ x [1] P G A , ˇ a [1] ) , . . . , (ˇ x [ |A|1] P G A , ˇ a [ |A|1] ) } , and intervention on A does not change the presentation. Note that Pr( U = u | X = x, 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 ( x, a ) , Pr( R A ← a ′ ,X P c G A ← x P c G A ( U ) = r | X = x, A = a ) remains unchanged for all a ′ ∈ A . This implies that R satisfies PCF. Consequently, any function of R including g w ( R ) satisfies PCF.

C Synthetic Data Simulation

For the real data experiments in Section 5, the causal model behind the problem remains unknown, and we had to make an assumption about the causal structure and estimate the causal model parameters using observed data.

In order to make sure that we are working with a true causal model and true structural equations and demonstrate our proposed method can improve performance while maintaining counterfactual fairness, we carry out a simulation experiment on the synthetic data.

We consider a causal graph shown in Figure 6. The structural function defined in the corresponding causal model is

To generate the synthetic dataset, we sampled A from the Bernoulli distribution with p = 0 . 4 for 3000 times. U 1 and U 2 are sampled independently from the normal distribution N (0 , 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 a training set and a test set with a ratio of 80% - 20%. Then we trained a linear

regression model with the training data and calculate MSE, TE, TE 0 , TE 1 with the test data. For each method, we run the experiments five times with different random splits. Table 7 provided the results for the simulation. With the ground truth of the causal model, our proposed method could achieve a 100% counterfactual fairness as the CE method. However, with the use of X , we improved the MSE to a large extent, almost as well as the CA method.

D Detailed Experimental Setup on Real Data

We conducted our experiments using a supercomputing platform. The CPUs used were Intel(R) Xeon(R) 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.

The VAE structure for the CVAE model is shown in Figure 7. The details for training the V AE can be found in [37]. However, we briefly discuss how the training was done. An encoder takes [ X α , X β , Y, A ] as input to generate the hidden variable U . The decoders then serve as structural functions. Decoder f α takes U as ˇ X f [ U, ˇ A ] ˇ X f

input to generate α , decoder β takes to generate β , and Y also uses [ U, ˇ A ] to generate ˇ Y .

During the training of the V AE, we used the following loss function:

For the Law School Success dataset, l α is the BCE loss function, and l β and l Y are the MSE loss function. For the UCI Adult Income dataset, l α , l β , and l Y are BCE loss functions. We set w α = 1 , w β = 1 , w Y = 1 , w u = 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 on the same VAE.

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 f Y . Hence, the encoder uses [ X α , X β , A ] to obtain U , and ˇ X α = f α ( U ) , ˇ X β = f β ( U, ˇ A ) . In this case, the loss function becomes:

For the Law School dataset, we kept the hyperparameters the same, so w α = 1 , w β = 1 , w u = 1 . For the UCI Adult Income dataset, we set w α to 1, w β to 1, and w u to 1.

Figure 8 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 U β . Hence, U α = E α ( X α , Y ) and U β = E β ( X β , A, Y ) . During the decoding stage, ˇ X α = f α ( U α ) , ˇ X β = f β ( U β , ˇ A ) , and ˇ Y = f Y ( U α , U β , ˇ A ) . A discriminator, D ψ , is also employed to aid in disentangling U α and U β .

The training of this VAE can be divided into two stages. In the first stage, we permuted the U β generated in the batch of data and concatenated them with U α . The discriminator was trained to distinguish whether a [ U α , U β ] is randomly permuted. In the second stage, we trained the encoders and decoders. The loss function is:

Here, TC refers to the total correlation loss, which is the negative discrimination loss of D ψ 7 . We used the same l α , l β , l Y , and weights ( w α , w β , w Y ) as those used for training the CV AE. We also used the same batch size and learning rate. w h is set at 0.4, and w fair is set at 0.2. As before, we 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 CV AE. For the Law School Success dataset, we kept the hyperparameters the same. And for the UCI Adult Income dataset, we set w u to 0.5 and w h to 0.4.

For the finding predictors, we 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, we set the coefficient of the regularization term as 0.002.

We split each dataset into a training set, validation set, and test set with a ratio of 60%-20%-20%. The validation set was used to stop the training of the V AE 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 are stable.

0.0

0.2

0.4

FYA

0

2

4

density

Baseline

0.0

0.2

0.4

FYA

0

1

2

density

CA

0.0

0.2

0.4

FYA

0

1

2

3

density

ICA

0.0

0.2

0.4

FYA

0

10

20

density

CE

0.0

0.2

0.4

FYA

0

2

4

6

density

CR

0.0

0.2

0.4

FYA

0

1

2

3

density

Ours

factual

counterfactual

Figure 9 visualizes the PDF of the predicted FYA under the CV AE causal model. As seen in Figure 5, our model is more effective in maintaining the model's behavior for both factual and counterfactual data.

Tables 8 and 9 present the results for the Law School Success dataset under path-dependent counterfactuals. 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 not in any unfair path. The results affirm that our method consistently satisfies PCF in every case. Although the CR method can achieve PCF similar to our method when GPA or LSAT is not in any unfair path of the DCEVAE causal model, it fails in other scenarios because it does not guarantee counterfactual fairness.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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.\n\nSTRENGTHS:\n**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.\n\nWEAKNESSES:\n**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}).\n\nQUESTIONS:\nQuestion:\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.\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-03"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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\nSTRENGTHS:\nThe 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.\n\nWEAKNESSES:\nIn 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.\n\nQUESTIONS:\n(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.\n\nLIMITATIONS:\nAlthough 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.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-04"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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.\n\nSTRENGTHS:\n* 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\nWEAKNESSES:\n* 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\nQUESTIONS:\n* 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\nLIMITATIONS:\nThe authors adequately addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-08"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe 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.\n\nSTRENGTHS:\nThe 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.\n\nWEAKNESSES:\nAbstract: 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.\n\nQUESTIONS:\n1. 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?\n\nLIMITATIONS:\nThe 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.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-26"}