Paper: Counterfactual Fairness for Predictions using Generative Adversarial Networks (ICLR-2024)

Reviewer comment (Reproducibility):
The paper focuses on binary-sensitive attributes. It is unclear whether the proposed method is applicable to settings where sensitive attribute has multiple categories. Specifically, for each $a$ sensitive attribute may take, do we need a GAN to learn the corresponding counterfactual distribution? Or do we only need a single GAN to learn “averaged counterfactual distribution?”

Author response:
**1. Applicability beyond binary sensitive attributes**

Thank you. Our method can **easily extended to scenarios where the sensitive attribute has multiple categories**. (We only opted for the binary case for ease of readability.) To this end, we improved our paper in the following ways: 

* We added a **new description of how our method can be applied to a sensitive attribute with multiple categories** (see our **new Appendix G**). Importantly, we do **not** need several GANs for each category $a$. Instead, we show how a single GAN is sufficient. The reason for that is that we can learn the joint distribution for all counterfactuals. 
* We added a **mathematical proof** that a single GAN can effectively learn the joint distribution for all counterfactuals (see our **new Corollary 1**). 
* We added **new experiments** to show that our method is also effective in settings with multiple categories (see our **new Appendix G.4**).

Reviewer comment (Theory):
While the paper establishes an upper bound on the violation of fairness, the bound seems to be very trivial. The strength of fairness is controlled empirically by hyper-parameter $\lambda$.

Author response:
**2. New theoretical guarantees beyond Lemma 1**

Thank you. We have greatly reworked our theoretical analysis: 
* We added a **new Lemma 2** with **theoretical guarantees** to show that our generator provides **consistent estimates** of the counterfactual distribution of mediators. This ensures that we learn the **correct** counterfactuals. Together with Lemma 1, this ensures mathematically that we achieve counterfactual fairness. 

* Importantly, the proof of our new Lemma 2 is **non-trivial**. We kindly refer to our **extensive proof in Supplement D.2**, where we leverage ideas from [1,2] that were published only recently at NeurIPS 2023. 

* The hyperparameter $\lambda$ controls the strength of counterfactual fairness. Hence, by $\lambda$->$\infty$, we ensure that the predictions adhere to counterfactual fairness more strictly. One may think that one could make the hyperparameter $\lambda$ similarly arbitrarily large to ensure counterfactual fairness. However, this would undermine the accuracy of the predictions. Rather, $\lambda$ is a hyperparameter that is used to trade-off counterfactual fairness vs. accuracy. 

* To the best of our knowledge, ours is the **first** neural method that offers theoretical guarantees that the method is effective in learning counterfactual fairness. In fact, many baselines (e.g., [CFGAN]) have even been shown to learn incorrect objectives that act as heuristics but fail to recover counterfactual fairness. To the best of our knowledge, our method is the first neural approach that ensures to correctly learn counterfactual fairness predictions with theoretical guarantees.

References:

[1] Arash Nasr-Esfahany, Mohammad Alizadeh, and Devavrat Shah. Counterfactual identifiability of bijective causal models. In ICML, 2023

[2] Valentyn Melnychuk, Dennis Frauen, and Stefan Feuerriegel. Partial counterfactual identification of continuous outcomes with a curvature sensitivity model. In NeurIPS, 2023.

Reviewer comment (Theory):
Because only factual mediators are observable, how can the generator ensure the generated counterfactual mediators are accurate? To my understanding, the generator’s accuracy is ensured via construction loss between generated factual mediators and actual factual mediators. Can it imply the accuracy of counterfactual mediators?

Author response:
**1. Correctness of counterfactual mediators** 

Thank you for raising this important question. You are right in pointing out that, during training, we cannot directly learn the counterfactual mediators in a supervised way as they are unobservable. Instead, we can only leverage the reconstruction loss on the factual mediators. The reason why we can still learn the correct counterfactual mediators is due to the adversarial training process of the generator. By training the discriminator to differentiate between factual and generated counterfactual mediators, the generator is guided to learn the correct counterfactual distribution.

Motivated by your question, we now added a **new Lemma 2** where we **show theoretically that we learn the correct counterfactual mediators**. Specifically, our new Lemma 2 offers a theoretical guarantee that our generator consistently estimates the counterfactual distribution of the mediator. This first provides a theoretical justification behind the design of our generator for the counterfactual mediators. On top of that, Lemma 2 addresses your question by establishing convergence to the correct counterfactual distribution (point mass distribution).

Reviewer comment (Theory):
How can the method be generalized to settings with more than 2 social groups?

Author response:
**2. Generalization to multiple social groups** 

Thank you. Our method can **easily extended to scenarios with multiple social groups.** To demonstrate this, we improved our paper in the following ways: 

* We added a description of **how our method can be applied to a sensitive attribute with multiple categories** (see our **new Appendix G**). Importantly, we do not need several GANs for each category $a$. Instead, we show how a single GAN is sufficient. The reason for that is that we can learn the joint distribution for all counterfactuals.  

* We **added mathematical proof** of how a single GAN learns the joint distribution for all counterfactuals (see our **new Corollary 1**). 

* We added **new experiments** to show that our method is also effective in settings with multiple categories (see our new Appendix G4).

We also updated the codes in our anonymous GitHub repository accordingly.

Reviewer comment (Novelty):
Related work say that VAE based methods fail because they capture correlations between the sensitive and the latent representation. Authors should at least mention that most cited approaches (e.g. Grari et al.2023) have regularizers that seek at removing these correlations. I cannot see why the proposed approach would be really better on that point, as I feel the discriminator makes some similar job as, for instance, VAE with adversarial loss that seek at reducing mutual information between the latent and the sensitive of these approaches.

Author response:
Thank you. We followed your suggestion and added the reference to VAE-based methods with regularization (e.g. Grari et al.2023) that seek to remove correlations. However, we would still clarify why VAE-based methods for our task can be problematic and why our proposed method is superior – both theoretically and numerically. 

*Why are VAE-based methods not optimal? *VAE-based methods learn a latent variable in non-trivial ways. More specifically, the inferred latent variable $U$ should be independent of sensitive attribute $A$ while representing all other useful information from the observation data. However, there are two main challenges: (1) The latent variable $U$ is not identifiable. (2) it is very **hard** to learn such $U$ to satisfy the above independence requirement, especially for high-dimensional or other more complicated settings. As a result, VAE-based methods act as heuristics, and, hence, there is no theoretical guarantee that VAE-based methods are actually effective. That means, there is **no theoretical guarantee** on the fairness level in the final prediction.

Because of (1) and (2), there are **no** theoretical guarantees for the VAE-based methods. Hence, it is mathematically **unclear** whether they actually learn the correct counterfactual fair predictions. In fact, there is even rich empirical evidence that VAE-based methods are often **suboptimal**. VAE-based methods use the estimated variable $U$ in the first step to learn the counterfactual outcome $\mathbb{P}\left(\hat{Y}_{ a'}(\mathbf{U}) \mid X=x, A=a, M=m \right).$ The inferred, non-identifiable latent variable can be correlated with the sensitive attribute which may harm fairness, or it might not fully represent the rest of the information from data and harm prediction performance.  

How our method overcomes the above challenges: We address the above challenges by learning the counterfactuals directly. Thus, our method eliminates the need for a two-step process that learns $U$ but, instead, we learn $U$ directly in a single step through our GAN. To this end, we avoid the complexities and potential inaccuracies of inferring and then using latent variables. More formally, we generate counterfactual samples from the learned counterfactual distribution. For each specific input data $(X=x, A=a,M=m)$, we then generate the counterfactual mediator from the distribution $\mathbb{P}(M_{a'} \mid X=x, A=a, M=m)$. This results in overall more accurate and robust predictions. Further, our **new Lemma 2** even shows that we correctly learn the counterfactual mediators and, unlike VAE-based methods, **we thereby prove that our method is effective in achieving counterfactual fairness.**

Reviewer comment (Theory):
One mentioned limitation of VAE is "It is commonly assumed that the prior distribution of latent variables follows a standard Gaussian in VAEs", that would hinder the prediction ability. While I agree that VAE is more constrained than GAN since there is a need for choosing a distribution family that strongly affects the results if it does not well fit the data, this problem is about the decoding distribution, not the encoding one, as having a latent space structured using a Gaussian is something usually desirable. Note that GAN also use a sampling from a standard Gaussian in the latent space... What do you think?

Author response:
Thank you. Although a standard Gaussian is a common choice for the prior in VAEs, recent research, such as [2,3], has highlighted that this choice can be **suboptimal**. The standard Gaussian prior can lead to over-regularization, contributing to poorer density estimation performance. This issue is often referred to as the posterior-collapse phenomenon, as discussed by [4].

Regarding GANs, it is true that they often utilize sampling from a standard Gaussian in the latent space. However, this is not a strict requirement. Various studies have demonstrated effective GAN models that operate without sampling from a Gaussian distribution [5]. Our method diverges from the standard practice as well; in our GAN model, we do not rely on sampling from a standard Gaussian. Instead, we focus on generating counterfactuals based on the learned counterfactual distribution. Thus, our method is more robust by directly learning the transformation.

Motivated by your question, we **added a new Lemma 2**, which provides **theoretical justification for our method**. Therein, we prove that our method allows for **consistent estimation of the counterfactual distribution**. This is important for two reasons. First, it provides a theoretical justification behind the design of our GAN method. Second, it ensures that we correctly learn counterfactual fairness. To the best of our knowledge, ours is the **first** neural method for counterfactual fairness that offers such guarantees. Importantly, this is a major difference to the VAE-based baselines, which do **not** have similar guarantees.

Reviewer comment (Theory):
In appendix B3, authors point out that one of the main differences with CFGAN is that this approach only achieves interventional fairness, not counterfactual. From my point of view this is not true since, as explained in their section 3.5, counterfactual samples are generated by 1) generating samples from the causal model  2) selecting the z that led to the generation of a given class of the sensitive and finally 3) generating a new sample for each selected z, by intervening on the sensitive, to get a counterfactual sample for each of them. Thus, a predictor can be learned on that data, with a regularization that ensures that both versions of the individual lead to similar outputs. It is counterfactual fairness as every variable depending on the sensitive can be impacted. That is not only P(Y|X,do(A=a))=P(Y|X,do(A=a')) since X and Y are regenerated after intervention (using the same z in factual and interventional world allows to follow the counterfactual fairness objective that is mentioned in the paper).

Author response:
Thank you. In response to the query regarding CFGAN and its relation to interventional versus counterfactual fairness, we would like to direct the reviewer's attention to the paper [6]. Therein, the authors show that CFGAN actually satisfies the definition of Discrimination avoiding through causal reasoning. This means: a generator is said to be fair if the following equation holds  $P(Y=y \mid X=x, d o(A=a))=P\left(Y=y \mid X=x, d o\left(A=a^{\prime}\right)\right)$. This is **different from counterfactual fairness**. In counterfactual fairness, a generator producing samples $(X, A, Y)$ with distribution $P$ is said to be counterfactually fair if: $P\left(Y_{a}=y \mid X=x, A=a\right)=P\left(Y_{a’ }=y \mid X=x, A=a\right),$ for all $y \in \mathcal{Y}, x \in \mathcal{X}, a, a’ \in \mathcal{A}$. As such, CFGAN actually considers **interventional queries** (=**level 2** in Pearl’s causality ladder), while counterfactual fairness involves **counterfactual queries** (=**level 3** in Pearl’s causality ladder).

For details of the above, we kindly refer to paper [6], which provides a comprehensive explanation of the actual distribution CFGAN learns and the distinction between counterfactual fairness, along with detailed proofs. 

Reassuringly, we remind that CFGAN is **vastly different from our method** (see our discussion in **Appendix B.2**). (1) Different tasks:  CFGAN is designed for fair data generation tasks, while our model is designed for learning predictors to be counterfactual fairness. Hence, both address **different tasks**. (2) Different architectures: CFGAN employs two generators, while our method has a single generator and discriminator. Further, fairness enters both architectures at **different** places. In CFGAN, fairness is ensured through the GAN setup, whereas our method ensures fairness in a second step through our counterfactual mediator regularization. (3) Different training objectives: The training objectives are **different**: CFGAN learns to mimic factual data. In our method, the generator learns the counterfactual distribution of the mediator through the discriminator distinguishing factual from counterfactual mediators. (4) No theoretical guarantee for CFGAN: Unlike our method, CFGAN does not have theoretical guarantees to correctly learn counterfactual fair predictions. **Only our method** offers theoretical guarantees for the task at hand. In sum, even though CFGAN also employs GANs, it is vastly different from our method.

Reviewer comment (Theory):
Authors consider a causal graph where X->A, but suggest in fig1 that there can exist some correlations between X and A, implying some confounder that causes both. If there are in the data distribution for instance more old women than old men, and assuming Y is lower for women than for men, then I suspect that the regularization term in (7) cannot have any strong impact on that bias. X remains the same for factual and counterfactual, only M changes, which can be ignored by h if most of the information for outputting Y is in X. Please discuss that remark.

Author response:
Thank you for asking questions about the potential spurious effects in the correlation between $X$ and $A$, which can have an impact on $Y$ We welcome the opportunity to provide a clarification. It is true that if $X$ and $A$ are correlated, there would occur a spurious effect ($A$->$X$->$Y$) in our causal graph. However, note that the counterfactual fairness notion [8] only addresses direct effect ($A$->$Y$) and indirect effect ($A$->$M$->$Y$), but does not include the spurious effect ($A$->$X$->$Y$). This is because the spurious effect ($A$->$X$->$Y$) does not influence the counterfactual fairness in the prediction. 

We kindly refer to paper [9], which provides an in-depth and detailed discussion of the difference between various fairness notions and causal effects. Figure 4.5 in paper [9] explains clearly that counterfactual fairness is the unit-level fairness notion and, thus, does not include spurious effects. This makes counterfactual fairness different from other fairness notions (such as causal fairness). 
To illustrate the above, let us draw upon your example. In the given scenario, $X$ represents age, and $A$ represents gender. We further assume that there is correlation between them ( typically, women are older than men). A company aiming for gender fairness, thus chooses not to use gender directly in its hiring decisions. Since age is not a sensitive attribute, they use age for making decisions, preferring younger candidates. This method, although seemingly unbiased w.r.t gender, inadvertently leads to a higher number of male employees than female employees due to the correlation between age and gender. This example points to the reviewer's concern: such correlations do indeed influence outcomes at the population level, creating an average effect.

However, from the perspective of counterfactual fairness, the focus is on the individual level. For each person, it examines the situation where altering an individual's gender (e.g., from male to female) wouldn't change the employment outcome of this person. Thus, even though a correlation between age and gender exists, it does not affect each individual's final employment decision. 
Therefore, having correlations between $X$ and $A$ does not affect the counterfactual level in our prediction in Y, which is consistent with our setting.

Reviewer comment (Theory):
I am surprised to see that the proposed adversarial objective is greatly asymmetric, as it never considers counterfactuals produced for individuals from the A=1 class. The adversarial loss is indeed weighted by A for the factual part and 1-A for the counterfactual one (which is 0 in the case A=1). Denoting as M_{i,j} the output of the generator for an individual from class i and intervention using j as the sensitive value, we have M_1,1 steered toward M from Lf and far from M from Ladv; M_0,1 steered toward M from Ladv; M_1,0 steered toward M from Lf; and M_1,0 is totally free. Isn't it a problem? I suspect that it can report most of the fairness effort on the A=0 class. Also, I am not sure if this does correspond to a well-defined optimization problem since there may exist many equivalent optima, no? Having M_1,1 = M looks very likely at the end of the optimization (with G outputting a very different value for M_1,0 which is unconstrained).

Author response:
Thank you. We would like to clarify that our adversarial objective is indeed **symmetric**, addressing counterfactual scenarios for both $A=1$ and $A=0$ classes. There is no preference for the class and the loss formula is correct. Since the sum of the discriminator output is 1 (i.e., a sum of the probability), we merge the two items in the original version of the loss equation into one (see our updated Eq. 6 for the loss). If you view $A$ as the true label, it is exactly how cross-entropy loss is computed. The counterfactual output of the generator is always fed into the discriminator. The generator of the GAN then minimizes the conditional propensity-weighted Jensen–Shannon divergence (JSD). 
To show the above more explicitly, we also added a new Lemma 2 and a corresponding proof. We kindly refer the reviewer to our proof, which should make the above more clear.  (see Eq. (31) in Appendix D.2).

Reviewer comment (Experiments):
Comparative experiments are performed on semi-synthetic datasets, where we can get both factual and counterfactual versions of the data. However, I feel that the generative processes that are considered are too easy to fully analyze, as 1) there is no correlation between X and A (which can be unfair regarding the previous remarks above) and 2) M is deterministically deduced from X and A, which appears as a really easy setting: First, authors show in table 1 that counterfactual M can be generated accurately from their generator. However, this is not fully convincing (and does not reassure me about the asymmetry issue mentioned above), as it is easy to fully understand the relation between (X,A) and M only from samples from the 0 class (A=0). M_A' is well generated for the class A=1 thanks to this, but I am really not sure that this would apply in more difficult settings. Second, for such a setting we could design a much simpler approach that learns h(X,A) to be close to Y while limiting the distance between h(X,A) and h(X,A'), which would be at least as effective.

Author response:
Thank you. We followed your suggestions and included several new experiments (see **new Appendix X.1 and X.2**).

**1**.
*(a). Correlation Between $X$ and $A$:*

We added a new experiment where we included correlation between $X$ and $A$. The experiment results show again that we achieved the best performance (see our **new Appendix H.1**). Importantly, these results confirm that introducing a correlation between $X$ and $A$ does not adversely affect the counterfactual level of our predictions for $Y$. This finding aligns with our above response to the initial concern on spurious effects, showing that having correlation between X and A does not affect the counterfactual fairness level in our prediction in Y. 

*(b). Generation of M from X and A*:

Thank you for asking the questions. We would like to clarify that $M$ is **not** deterministically deduced from $X$ and $A$. In our dataset, the generation of $M$ incorporates stochastic elements, specifically through the inclusion of noise $U_M$, which makes the process non-deterministic. We have thus revised our paper to spell out explicitly that the generation of $M$ is non-deterministically. 
In response to your query regarding the evaluation of counterfactual fairness: This limitation is widely recognized in the field, and as a result, the use of synthetic or semi-synthetic datasets for such evaluations is a well-established norm, as is the quasi-standard in the literature [7,8,10]. 

Regarding the simplicity of the setting: our setting is intentionally designed **analogous to prior research** [8, 10] and especially [7]. Therein, the setting for modeling fairness violations is similar to ours, so that we allow for better comparability. 
Lastly, it is crucial to note that our prediction model **does** not explicitly utilize the sensitive attribute. The inputs for our predictor $h$ are $X$ and $M$. This is done to adhere to ethical guidelines in practice and to reduce the risk of biased outcomes. We have revised our paper to spell out clearly that **we follow your comment and do not use the sensitive attribute in our predictor**.

Reviewer comment (Experiments):
Comparison with competitors is only performed on semi-synthetic, not fully convincing, datasets. I know that counterfactual fairness is difficult to fully evaluate, but wouldn't it be possible to conduct some analysis on the results of some competitors also, to see if there is impact of the improvements observed on synthetic data?

Author response:
**2**.  We followed your suggestion and **added new performance comparisons** for our real-world dataset (see our **new Appendix H.2**). Due to the unavailability of counterfactuals for real-world data, we use our generated counterfactual as the ground-truth counterfactual and show the utility function value as on synthetic datasets. As a result, we find that our proposed method is highly effective.

Reviewer comment (Theory):
The theoretical analyses in 4.3 does not provide much insight or guarantee. The lemma states that the level of counterfactual fairness is upper-bounded by the performance of the counterfactual mediator generation and the counterfactual mediator regularization. This does not really takes an equation to be concluded, and it cannot say anything about whether the method would be effective or not.

Author response:
Thank you for your suggestion. We have **entirely reworked our theoretical analyses**: 

We now added a new theoretical analysis to show our method’s effectiveness (see our **new Lemma 2**). Our new Lemma 2 states that our method correctly identifies the counterfactual mediators. Specifically, we prove that our method allows for **consistent estimation of the counterfactual distribution**, $\mathbb{P}(M_{a'} \mid X=x, A=a, M=m)$. Lemma 2 thus gives a guarantee on the correctness of the generated counterfactual mediators and, therefore, also a guarantee on the upper bound in Lemma 1, which thus confirms the effectiveness of our method. 

We added a new **Corollary 1** to show that the above theoretical results also **generalize to high-dimensional settings**. 
Our new theoretical analysis is important for two reasons. First, it provides a **theoretical justification behind the design of our method**. Second, it ensures that we correctly learn counterfactual fairness. To the best of our knowledge, ours is the **first** neural method for counterfactual fairness that offers such guarantees.

Reviewer comment (Theory):
Following the above point, the method does not have guarantee in achieving counterfactual fairness.

Author response:
Thank you for your helpful comment. We added a **new Lemma 2** to give a guarantee on the error of the generated counterfactual ($||M_{A'} - \hat M_{A'}||^2_2$), which is the first term of upper bound terms in Lemma 1. Therefore, when the counterfactual mediator regularization ${R}_\mathrm{{cm}}$ (=the second term of the upper bound), is minimized, the counterfactual fairness level is guaranteed through Lemma1. As such, we achieve a **theoretical guarantee that our method is effective in achieving counterfactual fairness**. To the best of our knowledge, ours is the **first** neural method for counterfactual fairness that offers such guarantees.

Reviewer comment (Novelty):
Though the authors compare this work with CFGAN, the use of GAN for generation-based counterfactual fairness makes the technical contributions largely alike, which impairs the the novelty of the proposed method.

Author response:
We appreciate the opportunity to clarify that our method is **significantly different** from CFGAN (in terms of task, architecture, learning objectives, etc.). We highlight these differences below:

**Different tasks**:  

CFGAN is designed for fair data generation tasks, while our model is designed for learning predictors to be counterfactual fairness. Hence, both address **different tasks**. 

**Different architectures**: 

CFGAN employs **two** generators, each aimed at simulating the original causal model and the interventional model, and two discriminators, which ensure data utility and causal fairness. We only employ a streamlined architecture with a **single** generator and discriminator. Further, fairness enters both architectures at **different places**. In CFGAN, fairness is ensured through the GAN setup, whereas our method ensures fairness in a second step through our counterfactual mediator regularization.

**Different training objectives**: 

The training objectives are **different**: CFGAN learns to **mimic factual data**. In our method, the generator **learns the counterfactual distribution of the mediator** through the discriminator distinguishing factual from counterfactual mediators. 

**No theoretical guarantee for CFGAN**: 

CFGAN is proposed to synthesize a dataset that satisfies counterfactual fairness. However, a recent paper [2] has shown that CFGAN is actually considering interventions (=level 2 in Pearl’s causality ladder) and **not** counterfactuals (=level 3). Hence, CFGAN does not fulfill the counterfactual fairness notion, but a different notion based on do-operator (intervention). For details, we refer to reference [2], Definition 5 therein, called ``Discrimination avoiding through causal reasoning''): A generator is said to be fair if the following equation holds: for any context $A=a$ and $X=x$, for all value of $y$ and $a' \in \mathcal{A}$, $P(Y=y \mid X=x, d o(A=a))=P\left(Y=y \mid X=x, d o\left(A=a' \right)\right)$, which is different from the counterfactual fairness 
$P(Y_a=y \mid X=x, A=a)=P\left(Y_{a'}=y \mid X=x, A=a\right)$. (We also discuss CFGAN considers interventions not counterfactual in our paper see **Appendix. I.1**) Moreover, **CFGAN lacks theoretical support** for its methodology (no identifiable guarantee or counterfactual fairness level). In contrast, our method strictly satisfies the principles of counterfactual fairness and provides theoretical guarantees on the counterfactual fairness level. In sum, **only our method offers theoretical guarantees** for the task at hand. 

**Suboptimal performance of CFGAN**: 

Even though CFGAN can, in principle, be applied to counterfactual fairness prediction, it is **suboptimal**. The reason is the following. Unlike CFGAN, which generates complete synthetic data under causal fairness notions, our method only generates counterfactuals of the mediator as an intermediate step, resulting in minimal information loss and better inference performance than CFGAN. Furthermore, since CFGAN needs to train the dual-generator and dual-discriminator together and optimize two adversarial losses, it is more difficult for stable training, and thus its method is less robust than ours.

In sum, even though CFGAN also employs GANs, it is **vastly different from our method**.

**Action**: We carefully discuss the differences between CFGAN and our method in our revised paper (see **Appendix B.2 and I.1**). Therein, we spell out clearly that CFGAN is different in terms of task, architecture, and theoretical guarantees.  

References

[1] Depeng Xu, Yongkai Wu, Shuhan Yuan, Lu Zhang, and Xintao Wu. Achieving causal fairness through generative adversarial networks. In IJCAI, 2019.

[2] Mahed Abroshan, Mohammad Mahdi Khalili, and Andrew Elliott. Counterfactual fairness in synthetic data generation. In Neurips 2022 SyntheticData4ML Research, 2022.

Reviewer comment (Theory):
There is no discussion on the identification of counterfactual mediators. The authors need to show this before developing estimators for counterfactual mediators.

Author response:
**Identification of counterfactual mediators**

Thank you. We recognize the importance of discussing the identification of counterfactual mediators. To address your point, we have added a **new theoretical analysis**. Specifically, we have revised our manuscript in the following ways: 
* We added a **new Lemma 2** to show that our method correctly identifies the counterfactual mediators. Specifically, we prove that our method allows for **consistent estimation of the counterfactual distribution**. The lemma thus gives a guarantee on the correctness of the generated counterfactual mediators and, therefore, also a guarantee on the upper bound in Lemma 1.

* We added a new **Corollary 1** to show that the above theoretical results also **generalize to high-dimensional settings**. 
Our new theoretical analysis is important for two reasons. First, it provides a **theoretical justification behind the design of our method**. Second, it ensures that we correctly learn counterfactual fairness. To the best of our knowledge, ours is the **first** neural method that offers such guarantees.

Reviewer comment (Theory):
The generator is trained on factual data only, there is no guarantee on the error of its generated counterfactuals. This would further lead to ineffectiveness of the discriminator as it is trained on generated counterfactuals. Similarly, In Lemma 1, the upperbound has a term ||M_{A'},\hat{M}_{A'}|| which is not computable, so, minimizing the loss function Eq.(8) cannot guarantee the LHS of Eq.(9) is minimized.

Author response:
**Theoretical Guarantee and Counterfactual Estimation**

Thank you. We address your comment point-by-point。

*Response to: No theoretical guarantee*

To address your point, we now provide **new theoretical guarantees** of the correctness of the generated counterfactual mediators (see our **new Lemma2**). Our new Lemma 2 shows that our generator consistently estimates the counterfactual distribution of the mediator. It gives a guarantee on the correctness of the generated counterfactual mediators. Together with Lemma 1, it provides theoretical results that our method is effective. 

*Response to: Correctness of the generated counterfactual mediator*

Our **new Lemma 2** states that our GAN-based approach consistently estimates the counterfactual distribution of mediators. By converging to the counterfactual distribution (point mass distribution), our generator actually learns a deterministic function that transforms from factual to counterfactual: $\mathbb{P}(M_{a'} \mid X=x, A=a, M=m)$. Under consistency, the generated counterfactual can converge to the ground-truth counterfactual.  This confirms the effectiveness and validity of the generated counterfactual mediators.

*Response to: Addressing the upper bound in Lemma 1*

We acknowledge that Lemma 1 was not sufficient to show the effectiveness of our method. As a remedy, our new Lemma 2 gives a guarantee on the error of the generated counterfactual ($||M_{A'} - \hat M_{A'}||^2_2$), which is the first term of upper bound terms in Lemma 1. Then, by minimizing the loss function ${L}(h)=L_{ce}(h)+\lambda R_{cm}(h)$
, the counterfactual mediator regularization $R_{cm}$ is minimized accordingly, which is the second term in the of upper bound terms in Lemma 1. As a result, we can successfully address your comment: by minimizing the loss, we can guarantee that the counterfactual fairness level is minimized.

Reviewer comment (Theory):
It is vague in Fig. 1 whether the authors allow just correlation between X and A or there has to be a causal relationship X->A.

Author response:
* **Fig.1 Interpretation:**

 The dashed line in Fig.1 illustrates that a correlation between $X $ and $A$ is permissible/allowed in our framework, but a direct causal relationship $X$->$A$ is not a necessity. Note that, if there is no dashed edge between $X$ and $A$, it is actually a stronger assumption, because it forbids the edge between $X$ and $ A$ to have any hidden confounders. However, our setting is more general and allows the existence of the confounders. Notwithstanding, we added new experimental results (see new results in Appendix H.1), where we analyze the performance of our method in the presence of confounders, finding that our method is highly effective.

Reviewer comment (Writing):
Inconsistent notations: If M_a is the potential outcome, why do we need M_{A-\leftarrow a}?

Author response:
* **Inconsistent notation:** 

Thank you! The notation $M_{A-\leftarrow a}$ was an error. We have streamlined our notation so that we now consistently use $M_a$ as the potential outcome in the updated manuscript.

Reviewer comment (Evaluation):
For Adult, how do the authors know marital status, education level, occupation, hours per week, and work class are mediators? How is the counterfactual fairness metric computed without knowing ground truth counterfactuals?

Author response:
* **Adult dataset:**

Thank you for your suggestions. We added a more detailed discussion of our setting to **Appendix E.3**. Below, we discuss how we selected mediators and the counterfactual fairness metric. 

*Mediator selection*: 

We follow common choices in prior research (such as [3, 4, 5, 6]). We consider 'gender' as a sensitive attribute. Mediators are variables that can potentially be influenced by the sensitive attribute. The  'marital status', 'education level', 'occupation', 'hours per week', and 'work class' are all known to be influenced by ‘gender’, and, therefore, we treat them as ‘mediators’. We classified all other variables as covariates. 

*Counterfactual fairness metric*: 

We use the Adult dataset to demonstrate the applicability of our method to real-world data, where ground-truth counterfactuals are unavailable. Nevertheless, to understand the implications for counterfactual fairness empirically, we use the generated counterfactuals to measure counterfactual fairness on the test dataset. This allows us to explore the accuracy-fairness trade-off. We have revised our paper to spell out clearly how we computer the counterfactual fairness metric for real-world data. Thereby, we further highlight that our choice is in line with other works from causal fairness as the purpose of the Adult dataset is to demonstrate real-world applicability (and not benchmarking). 


Reference

[3] Razieh Nabi and Ilya Shpitser. Fair inference on outcomes. In AAAI, 2018.

[4] Hyemi Kim, Seungjae Shin, JoonHo Jang, Kyungwoo Song, Weonyoung Joo, Wanmo Kang, and Il.Chul Moon. Counterfactual fairness with disentangled causal effect variational autoencoder. In AAAI, 2021.

[5] Depeng Xu, Yongkai Wu, Shuhan Yuan, Lu Zhang, and Xintao Wu. Achieving causal fairness through generative adversarial networks. In IJCAI, 2019.

[6] Francesco Quinzan, Cecilia Casolo, Krikamol Muandet, Niki Kilbertus, and Yucen Luo. Learning counterfactually invariant predictors. arXiv preprint, 2022.

[7] Drago Plecko and Elias Bareinboim. Causal fairness analysis. In arXiv preprint, 2022.