# DECAF: Generating Fair Synthetic Data Using Causally-Aware Generative
Networks

Boris van Breugel∗
University of Cambridge
<EMAIL_ADDRESS>
&Trent Kyono
University of California, Los Angeles
<EMAIL_ADDRESS>
&Jeroen Berrevoets
University of Cambridge
<EMAIL_ADDRESS>
&Mihaela van der Schaar
University of Cambridge
University of California, Los Angeles
The Alan Turing Institute
<EMAIL_ADDRESS>
Equal contribution

###### Abstract

Machine learning models have been criticized for reflecting unfair biases in
the training data. Instead of solving for this by introducing fair learning
algorithms directly, we focus on generating fair synthetic data, such that any
downstream learner is fair. Generating fair synthetic data from unfair data—
_while remaining truthful to the underlying data-generating process (DGP)_ —is
non-trivial. In this paper, we introduce DECAF: a GAN-based fair synthetic
data generator for tabular data. With DECAF we embed the DGP explicitly as a
structural causal model in the input layers of the generator, allowing each
variable to be reconstructed conditioned on its causal parents. This procedure
enables inference-time debiasing, where biased edges can be strategically
removed for satisfying user-defined fairness requirements. The DECAF framework
is versatile and compatible with several popular definitions of fairness. In
our experiments, we show that DECAF successfully removes undesired bias and—
in contrast to existing methods —is capable of generating high-quality
synthetic data. Furthermore, we provide theoretical guarantees on the
generator’s convergence and the fairness of downstream models.

##  1 Introduction

Generative models are optimized to approximate the original data distribution
as closely as possible. Most research focuses on three objectives [1]:
fidelity, diversity, and privacy. The first and second are concerned with how
closely synthetic samples resemble real data and how much of the real data’s
distribution is covered by the new distribution, respectively. The third
objective aims to avoid simply reproducing samples from the original data,
which is important if the data contains privacy-sensitive information [2, 3].
We explore a much-less studied concept: synthetic data fairness.

Motivation. Deployed machine learning models have been shown to reflect the
bias of the data on which they are trained [4, 5, 6, 7, 8]. This has not only
unfairly damaged the discriminated individuals but also society’s trust in
machine learning as a whole. A large body of work has explored ways of
detecting bias and creating fair predictors [9, 10, 11, 12, 13, 14, 15], while
other authors propose debiasing the data itself [9, 10, 11, 16]. This work’s
aim is related to the work of [17]: to generate fair synthetic data based on
unfair data. Being able to generate fair data is important because end-users
creating models based on publicly available data might be unaware they are
inadvertently including bias or insufficiently knowledgeable to remove it from
their model. Furthermore, by debiasing the data prior to public release, one
can guarantee any downstream model satisfies desired fairness requirements by
assigning the responsibility of debiasing to the data generating entities.

Goal. From a biased dataset $\mathcal{X}$, we are interested in learning a
model $G$, that is able to generate an equivalent synthetic unbiased dataset
$\mathcal{X}^{\prime}$ with minimal loss of data utility. Furthermore, a
downstream model trained on the synthetic data needs to make not only unbiased
predictions on the synthetic data, but also on real-life datasets (as
formalized in Section 4.2).

Solution. We approach fairness from a causal standpoint because it provides an
intuitive perspective on different definitions of fairness and discrimination
[11, 13, 14, 18, 15]. We introduce DEbiasing CAusal Fairness (DECAF), a
generative adversarial network (GAN) that leverages causal structure for
synthesizing data. Specifically, DECAF is comprised of $d$ generators (one for
each variable) that learn the causal conditionals observed in the data. At
inference-time, variables are synthesized topologically starting from the root
nodes in the causal graph then synthesized sequentially, terminating at the
leave nodes. Because of this, DECAF can remove bias at inference-time through
targeted (biased) edge removal. As a result, various datasets can be created
for desired (or evolving) definitions of fairness.

Contributions. We propose a framework of using causal knowledge for fair
synthetic data generation. We make three main contributions: i) DECAF, a
causal GAN-based model for generating synthetic data, ii) a flexible causal
approach for modifying this model such that it can generate fair data, and
iii) guarantees that downstream models trained on the synthetic data will also
give fair predictions in other settings. Experimentally, we show how DECAF is
compatible with several fairness/discrimination definitions used in literature
while still maintaining high downstream utility of generated data.

##  2 Related Works

Here we focus on the related work concerned with data generation, in contrast
to fairness definitions for which we provide a detailed overview in Section 4
and Appendix C. As an overview of how data generation methods relate to one
another, we refer to Table 1 which presents all relevant related methods.

Table 1: Overview of related work for synthetic data. We organize related work according to our key areas of interest: (1) Allows post-hoc distribution changes, (2) provides fairness, (3) supports causal notion of fairness, (4) allows inference-time fairness, (5) requires minimal assumptions. We highlight the key contribution, and identify non-neural approaches with “†”. Model |  Reference | (1) | (2) | (3) | (4) | (5) | Goal
---|---|---|---|---|---|---|---
Standard synthetic data generation
VAE |  [19] |  ✗ |  ✗ |  ✗ |  ✗ | ✓ | Realistic synth. data.
GANs |  [20, 21, 3, 2] |  ✗ |  ✗ |  ✗ |  ✗ | ✓ | Realistic synth. data.
Methods that detect and/or remove bias
PSE-DD/DR† |  [11] | ✓ | ✓ | ✓ |  ✗ |  ✗ | Discover/Remove bias.
OPPDP† |  [16] |  ✗ | ✓ |  ✗ |  ✗ |  ✗ | Remove bias.
DI† |  [10] |  ✗ | ✓ |  ✗ |  ✗ |  ✗ | Discover/Remove bias.
LFR |  [22] |  ✗ | ✓ |  ✗ |  ✗ | ✓ | Learn fair representation.
FairGAN |  [17] |  ✗ | ✓ |  ✗ |  ✗ | ✓ | Realistic and fair synth. data.
CFGAN |  [23] |  ✗ | ✓ | ✓ |  ✗ | ✓ | Realistic and fair synth. data.
DECAF |  (ours) | ✓ | ✓ | ✓ | ✓ | ✓ | Realistic and fair synth. data.

Non-parametric generative modeling. The standard models for synthetic data
generation are either based on VAEs [19] or GANs [20, 21, 3, 2]. While these
models are well known for their highly realistic synthetic data, they are
unable to alter the synthetic data distribution to encourage fairness (except
for [17, 23], discussed below). Furthermore, these methods have no causal
notion, which prohibits targeted interventions for synthesizing fair data
(Section 4). We explicitly leave out CausalGAN [24] and CausalVAE [25], which
appear similar by incorporating causality-derived ideas but are different in
both method and aim (i.e., image generation).

Fair data generation. In the bottom section of Table 1, we present methods
that, in some way, alter the training data of classifiers to adhere to a
notion of fairness [11, 16, 17, 23, 10, 22]. While these methods have proven
successful, they lack some important features. For example, none of the
related methods allow for post-hoc changes of the synthetic data distribution.
This is an important feature, as each situation requires a different
perspective on fairness and thus requires a flexible framework for selecting
protected variables. Additionally, only [11, 23] allow a causal perspective on
fairness, despite causal notions underlying multiple interpretations of what
should be considered fair [13]. Furthermore, only [17, 23, 22] offer a
flexible framework, while the others are limited to binary [11, 10] or
discrete [16] settings. Xu et al. [23] also use a causal architecture for the
generator, however their method is not as flexible—e.g. it does not easily
extend to multiple protected attributes. Finally, in contrast to other methods
DECAF is directly concerned with fairness of the downstream model—which is
dependent on the setting in which the downstream model is employed (Section
4.2). In essence, from Table 1 we learn that DECAF is the only method that
combines all key areas of interest. At last, we would like to mention [26],
who aim to generate data that resembles a small unbiased reference dataset, by
leveraging a large but biased dataset. This is very different to our aim, as
we are interested in the downstream model’s fairness and explicit notions of
fairness.

##  3 Preliminaries

Let $X\in\mathcal{X}\subseteq\mathbb{R}^{d}$ denote a random variable with
distribution $P_{X}(X)$, with protected attributes
$A\in\mathcal{A}\subset\mathcal{X}$ and target variable
$Y\in\mathcal{Y}\subset\mathcal{X}$, let $\hat{Y}$ denote a prediction of $Y$.
Let the data be given by $\mathcal{D}=\\{\mathbf{x}^{(k)}\\}_{k=1}^{N}$, where
each $\mathbf{x}^{(k)}\in\mathcal{D}$ is a realization of $X$. We assume the
data generating process can be represented by a directed acyclic graph
(DAG)—such that the generation of features can be written as a structural
equation model (SEM) [27]—and that this DAG is causally sufficient. Let
$X_{i}$ denote the $i$th feature in $X$ with causal parents
$\operatorname{Pa}(X_{i})\subset\\{X_{j}:j\neq i\\}$, the SEM is given by:

$X_{i}=f_{i}(\operatorname{Pa}(X_{i}),Z_{i}),\forall i$ (1)

where $\\{Z_{i}\\}_{i=1}^{d}$ are independent random noise variables, that is
$\operatorname{Pa}(Z_{i})=\emptyset,\ \forall i$. Note that each $f_{i}$ is a
deterministic function that places all randomness of the conditional
$P(X_{i}|\operatorname{Pa}(X_{i}))$ in the respective noise variable, $Z_{i}$.

##  4 Fairness of Synthetic Data

Algorithmic fairness is a popular topic (e.g., see [28, 13]), but fair
synthetic data has been much less explored. This section highlights how the
underlying graphs of the synthetic and downstream data determine whether a
model trained on the synthetic data will be fair in practice. We start with
the two most popular definitions of fairness, relating to the legal concepts
of direct and indirect discrimination. We also explore conditional fairness
[29], which is a generalization of the two. In Appendix C we discuss how the
ideas in this section transfer to other independence-based definitions [30].
Throughout this section, we separate $Y$ from $X$ by defining
$\bar{X}=X\backslash Y$, and we will write $X\leftarrow\bar{X}$ for ease of
notation.

###  4.1 Algorithmic fairness

The first definition is called Fairness Through Unawareness (e.g. [31]).

######  Definition 1.

(Fairness Through Unawareness (FTU): algorithm). A predictor
$f:X\mapsto\hat{Y}$ is fair iff protected attributes $A$ are not explicitly
used by $f$ to predict $\hat{Y}$.

This definition prohibits disparate treatment [28, 32], and is related to the
legal concept of direct discrimination, i.e., two equally qualified people
deserve the same job opportunity independent of their race, gender, beliefs,
among others.

Though FTU fairness is commonly used, it might result in indirect
discrimination: covariates that influence the prediction $\hat{Y}$ might not
be identically distributed across different groups $a,a^{\prime}$, which means
an algorithm might have disparate impact on a protected group [10]. The second
definition of fairness, demographic parity [32], does not allow this:

######  Definition 2.

(Demographic Parity (DP): algorithm) A predictor $\hat{Y}$ is fair iff
$A\perp\\!\\!\\!\perp\hat{Y}$, i.e. $\forall
a,a^{\prime}:P(\hat{Y}|A=a)=P(\hat{Y}|A=a^{\prime})$.

Evidently, DP puts stringent constraints on the algorithm, whereas FTU might
be too lenient. The third definition we include is based on the work of [29],
related to unresolved discrimination [14]. The idea is that we do not allow
indirect discrimination unless it runs through explanatory factors $R\subset
X$. For example, in Simpson’s paradox [33] there seems to be a bias between
gender and college admissions, but this is only due to women applying to more
competitive courses. In this case, one would want to regard fairness
conditioned on the choice of study [14]. Let us define this as conditional
fairness:

######  Definition 3.

(Conditional Fairness (CF): algorithm) A predictor $\hat{Y}$ is fair iff
$A\perp\\!\\!\\!\perp\hat{Y}|R$, i.e. $\forall
r,a,a^{\prime}:P(\hat{Y}|R=r,A=a)=P(\hat{Y}|R=r,A=a^{\prime})$.

CF generalizes FTU and DP Note that conditional fairness is a generalization
of FTU and DP, by setting $R=X\backslash A$ and $R=\emptyset$, respectively.
In Appendix C we elaborate on the connection between these, and more,
definitions.

###  4.2 Synthetic data fairness

Algorithmic definitions can be extended to distributional fairness for
synthetic data. Let $P(X),P^{\prime}(X)$ be probability distributions with
protected attributes $A\subset X$ and labels $Y\subset X$. Let
$\mathcal{I}(A,Y)$ be a definition of algorithmic fairness (e.g., FTU). Note,
that under CF, $\mathcal{I}(A,Y)$ is a function of $R$ as well. We propose
$(\mathcal{I}(A,Y),P)$-fairness of distribution $P^{\prime}(X)$:

######  Definition 4.

(Distributional fairness) A probability distribution $P^{\prime}(X)$ is
$(\mathcal{I}(A,Y),P)$-fair, iff the optimal predictor $\hat{Y}=f^{*}(X)$ of
$Y$ trained on $P^{\prime}(X)$ satisfies $\mathcal{I}(A,Y)$ when evaluated on
$P(X)$.

In other words, when we train a predictor on $(\mathcal{I}(A,Y),P)$-fair
distribution $P^{\prime}(X)$, we can only reach maximum performance if our
model is fair. Note the explicit reference to $P(X)$, the distribution on
which fairness is evaluated, which does not need to coincide with
$P^{\prime}(X)$. This is a small but relevant detail. For example, when
training a model on data $\mathcal{D}^{\prime}\sim P^{\prime}(X)$ it could
seem like the model is fair when we evaluate it on a hold-out set of the data
(e.g., if we simply remove the protected attribute from the data). However,
when we use the model for real-world predictions of data $\mathcal{D}\sim
P(X)$, disparate impact is possibly observed due to a distributional shift.

By extension, we define synthetic data as $(\mathcal{I}(A,Y),P)$-fair, iff it
is sampled from an $(\mathcal{I}(A,Y),P)$-fair distribution. Defining
synthetic data as fair w.r.t. an optimal predictor is especially useful when
we want to publish a dataset and do not trust end-users to consider anything
but performance.111Finding the optimal predictor is possible if we assume the
downstream user employs any universal function approximator (e.g., MLP) and
the amount of synthetic data is sufficiently large.

Choosing $\mathbf{P(X)}$. The setting $P(X)=P^{\prime}(X)$ corresponds to data
being fair with respect to itself. For synthetic data generation, this setting
is uninteresting as any dataset can be made fair by randomly sampling or
removing $A$; if $A$ is random, the prediction should not directly or
indirectly depend on it. This ignores, however, that a downstream user might
use the trained model on a real-world dataset in which other variables $B$ are
correlated with $A$, and thus their model (which is trained to use $B$ for
predicting $Y$) will be biased. Of specific interest is the setting where
$P(X)$ corresponds to the original data distribution $P_{X}(X)$ that contains
unfairness. In this scenario, we construct $P^{\prime}(X)$ by learning
$P_{X}(X)$ and removing the unfair characteristics. The data from
$P^{\prime}(X)$ can be published online, and models trained on this data can
be deployed fairly in real-life scenarios where data follows $P_{X}(X)$.
Unless otherwise stated, henceforth, we assume $P(X)=P_{X}(X)$.

###  4.3 Graphical perspective

Figure 1: Edge removal for fairness. FTU: ✗ ; DP: ✗ ✗ ✗ ; CF when $R=C$: ✗ ✗ ;
CF when $B\in R$: ✗ .

As reflected in the widely accepted terms direct versus indirect
discrimination, it is natural to define distributional fairness from a causal
standpoint. Let $\mathcal{G}^{\prime}$ and $\mathcal{G}$ respectively denote
the graphs underlying $P^{\prime}(X)$ (the synthetic data distribution which
we can control) and $P(X)$ (the evaluation distribution that we cannot
control). Let $\partial_{\mathcal{G}}Y$ denote the Markov boundary of $Y$ in
graph $\mathcal{G}$. We focus on the conditional fairness definition because
it subsumes the definition of DP and FTU (Section 4.1). Let $R\subset X$ be
the set of explanatory features.

######  Proposition 1.

(CF: graphical condition) If for all $B\in\partial_{\mathcal{G}^{\prime}}Y$,
$A\perp\\!\\!\\!\perp_{\mathcal{G}}B|R$,222Where
$\perp\\!\\!\\!\perp_{\mathcal{G}}$ denotes d-separation in $\mathcal{G}$.
Here we define $A\perp\\!\\!\\!\perp_{\mathcal{G}}B|R$ to be true for all
$B\in R$. then distribution $P^{\prime}(X)$ is CF fair w.r.t $P(X)$ given
explanatory factors $R$.

###### Proof.

Without loss of generality, let us assume the label is binary.333If $Y$ is
continuous the same result holds, though the “optimal” predictor will depend
on the statistic of interest, e.g. mode, mean, median or the entire
distribution $f(X,Y)\approx P(Y|X)$. The optimal predictor
$f^{*}(X)=P(Y|X)=P(Y|\partial_{\mathcal{G}^{\prime}}Y)$. Thus, if
$\partial_{\mathcal{G}^{\prime}}Y$ is d-separated from $A$ in $\mathcal{G}$
given $R$, prediction $\hat{Y}=f^{*}(X)$ is independent of $A$ given $R$ and
CF holds. ∎

######  Corollary 1.

(CF debiasing) Any distribution $P^{\prime}(X)$ with graph
$\mathcal{G}^{\prime}$ can be made CF fair w.r.t. $P(X)$ and explanatory
features $R$ by removing from $\mathcal{G}^{\prime}$ edges
$\tilde{E}=\\{(B\rightarrow Y)$ and $(Y\rightarrow B):\forall
B\in\partial_{\mathcal{G}^{\prime}}Y$ with
$B\not\perp\\!\\!\\!\perp_{\mathcal{G}}A|R$}.

###### Proof.

First note $\tilde{E}$ is the necessary and sufficient set of edges to remove
for $(\forall B\in\partial_{\mathcal{G}^{\prime}}Y$,
$A\perp\\!\\!\\!\perp_{\mathcal{G}}B|R)$ to be true, subsequently the result
follows from Proposition 1. ∎

For FTU (i.e. $R=X\backslash A$) and DP (i.e. $R=\emptyset$), this corollary
simplifies to:

######  Corollary 2.

(FTU debiasing) Any distribution $P^{\prime}(X)$ with graph
$\mathcal{G}^{\prime}$ can be made FTU fair w.r.t. any distribution $P(X)$ by
removing, if present, i) the edge between $A$ and $Y$ and ii) the edge
$A\rightarrow C$ or $Y\rightarrow C$ for all shared children $C$.

######  Corollary 3.

(DP debiasing) Any distribution $P^{\prime}(X)$ with graph
$\mathcal{G}^{\prime}$ can be made DP fair w.r.t. $P(X)$ by removing, if
present, the edge between $B$ and $Y$ for any
$B\in\partial_{\mathcal{G}^{\prime}}Y$ with
$B\not\perp\\!\\!\\!\perp_{\mathcal{G}}A$.

Figure 1 shows how the different fairness definitions lead to different sets
of edges to be removed.

Faithfulness. Usually one assumes distributions are faithful w.r.t. their
respective graphs, in which case the if-statement in Proposition 1 become
equivalence statements: fairness is only possible when the graphical
conditions hold.

######  Theorem 1.

If $P(X)$ and $P^{\prime}(X)$ are faithful with respect to their respective
graphs $\mathcal{G}$ and $\mathcal{G}^{\prime}$, then Proposition 1 becomes an
equivalence statement and Corollaries 1, 2 and 3 describe the necessary and
sufficient sets of edges to remove for achieving CF, FTU and DP fairness,
respectively.

###### Proof.

Faithfulness implies $A\perp\\!\\!\\!\perp_{P(X)}B|R\implies
A\perp\\!\\!\\!\perp_{\mathcal{G}}B|R$, e.g. [34]. Thus, if $\exists
B\in\partial_{\mathcal{G}^{\prime}}Y$ for which
$A\not\perp\\!\\!\\!\perp_{\mathcal{G}}B|R$, then $A\not\perp\\!\\!\\!\perp
B|R$. Because $B\in\partial_{\mathcal{G}^{\prime}}Y$ and $P^{\prime}(X)$ is
faithful to $\mathcal{G}^{\prime}$, $\hat{Y}=f^{*}(X)$ depends on $B$, and
thus $\hat{Y}\not\perp\\!\\!\\!\perp A|R$: CF does not hold. ∎

Other definitions. Some authors define similar fairness measures in terms of
directed paths (cf. d-separation) [11, 14, 18], which is a milder requirement
as it allows correlation via non-causal paths. In Appendix C we highlight the
graphical conditions for these definitions.

##  5 Method: DECAF

The primary design goal of DECAF is to generate fair synthetic data from
unfair data. We separate DECAF into two stages. The training stage learns the
causal conditionals that are observed in the data through a causally-informed
GAN. At the generation (inference) stage, we intervene on the learned
conditionals via Corollaries 1-3, in such a way that the generator creates
fair data. We assume the underlying DGP’s graph $\mathcal{G}$ is known;
otherwise, $\mathcal{G}$ needs to be approximated first using any causal
discovery method, see Section 6.

###  5.1 Training

Overview. This stage strives to learn the causal mechanisms
$\\{f_{i}(\operatorname{Pa}(X_{i}),Z_{i})\\}$. Each structural equation
$f_{i}$ (Eq. 1) is modelled by a separate generator
$G_{i}:\mathbb{R}^{|Pa(X_{i})|+1}\rightarrow\mathbb{R}$. We achieve this by
employing a conditional GAN framework with a causal generator. This process is
illustrated in Figure 2 and detailed below.

Figure 2: Architecture. Training phase— Each component in $\hat{\mathbf{X}}$
is generated sequentially as a function (where the function is that
component’s generator $G_{i}$) of the component’s parents. Parental knowledge
is provided by the DAG governing the data. Inference phase— As the component-
wise generation of the generator network is independent of the DAG governing
the data, we can easily replace (or intervene on) the DAG governing parental
information. The resulting synthetic data (right) will be governed by the
intervened DAG. FTU is achieved by removing: ✗ ; DP: ✗ ✗ ✗ ; e.g. CF when
$R=C$: ✗ ✗ .

Features are generated sequentially following the topological ordering of the
underlying causal DAG: first root nodes are generated, then their children
(from generated causal parents), etc. Variable $\hat{X}_{i}$ is modelled by
the associated generator $G_{i}$:

$\hat{X}_{i}=G_{i}(\hat{\operatorname{Pa}}(X_{i}),Z_{i})\quad\forall i,$ (2)

where $\hat{\operatorname{Pa}}(X_{i})$ denotes the generated causal parents of
$X_{i}$ (for root nodes the empty set), and each $Z_{i}$ is independently
sampled from $P(Z)$ (e.g. standard Gaussian). We denote the full sequential
generator by $G(Z)=[G_{1}(Z_{1}),...,G_{d}(\cdot,Z_{d})]$.

Subsequently, the synthetic sample $\hat{\mathbf{x}}$ is passed to a
discriminator $D:\mathbb{R}^{d}\rightarrow\mathbb{R}$, which is trained to
distinguish the generated samples from original samples. A typical minimax
objective is employed for creating generated samples that confuse the
discriminator most:

$\underset{\\{G_{i}\\}_{i=1}^{d}}{\max}\underset{D}{\min}\ \mathbb{E}[\log
D(G(Z))+\log(1-D(X)],$ (3)

with $X$ sampled from the original data. We optimize the discriminator and
generator iteratively and add a regularization loss to both networks. Network
parameters are updated using gradient descent.

If we assume $P_{X}(X)$ is compatible with graph $\mathcal{G}$, we can show
that the sequential generator has the same theoretical convergence guarantees
as standard GANs [20]:

######  Theorem 2.

(Convergence guarantee) Assuming the following three conditions hold:

  1. (i)

data generating distribution $P_{X}$ is Markov compatible with a known DAG
$\mathcal{G}$;

  2. (ii)

generator $G$ and discriminator $D$ have enough capacity; and

  3. (iii)

in every training step the discriminator is trained to optimality given fixed
$G$, and $G$ is subsequently updated as to maximize the discriminator loss
(Eq. 3);

then generator distribution $P_{G}$ converges to true data distribution
$P_{X}$

###### Proof.

See Appendix B ∎

Condition (i), compatibility with $\mathcal{G}$, is a weaker assumption than
assuming perfect causal knowledge. For example, suppose the Markov equivalence
class of the true underlying DAG has been determined through causal discovery.
In that case, any graph $\mathcal{G}$ in the equivalence class is compatible
with the data and can thus be used for synthetic data generation. However, we
note that debiasing can require the correct directionality for some
definitions of fairness, see Discussion.

Remark. The causal GAN we propose, DECAF, is simple and extendable to other
generative methods, e.g., VAEs. Furthermore, from the post-processing theorem
[35] it follows that DECAF can be directly used for generating private
synthetic data by replacing the standard discriminator by a differentially
private discriminator [2, 36].

###  5.2 Inference-time Debiasing

The training phase yields conditional generators $\\{G_{i}\\}_{i=1}^{d}$,
which can be sequentially applied to generate data with the same output
distribution as the original data (proof in Appendix B). The causal model
allows us to go one step further: when the original data has characteristics
that we do not want to propagate to the synthetic data (e.g., gender bias),
individual generators can be modified to remove these characteristics. Given
the generator’s graph $\mathcal{G}=(X,E)$, fairness is achieved by removing
edges such that the fairness criteria are met, see Section 4. Let
$\tilde{E}\in E$ be the set of edges to remove for satisfying the required
fairness definition. For CF, FTU and DP,444Just like in Corollaries 1 and 3,
we assume the downstream evaluation distribution is the same as the biased
training data distribution: a predictor trained on the synthetic debiased
data, is required to give fair predictions in real-life settings with
distribution $P_{X}(X)$. the sets $\tilde{E}$ are given by Corollaries 1, 2
and 3, respectively.

Removing an edge constitutes to what we call a “surrogate” $do$-operation [27]
on the conditional distribution. For example, suppose we only want to remove
$(i\rightarrow j)$. For a given sample, $X_{i}$ is generated normally (Eq. 2),
but $X_{j}$ is generated using the modified:

$\hat{X}_{j}^{do(X_{i})=\tilde{x}_{ij}}=G_{j}(...,X_{i}=\tilde{x}_{ij}),$ (4)

where $X_{i}=\tilde{x}_{ij}$ is the surrogate parent assignment. Value
$\hat{X}_{j}^{do(X_{i})}$ can be interpreted as the counterfactual value of
$\hat{X}_{j}$, had $X_{i}$ been equal to $\tilde{x}_{ij}$ (see also [15]).

Choosing the value of surrogate variable $\tilde{x}_{ij}$ requires background
knowledge of the task and bias at hand. For example, surrogate variable
$\tilde{x}_{ij}$ can be sampled independently from a distribution for each
synthetic sample (e.g., the marginal $P(X_{i})$), be set to a fixed value for
all samples in the synthetic data (e.g., if $X_{i}$: gender, always set
$\tilde{x}_{ij}=male$ when generating feature $X_{j}$: job opportunity) or be
chosen as to maximize/minimize some feature (e.g.
$\tilde{x}_{ij}=\arg\max_{x}\hat{X}_{j}^{do(X_{i})=x}$). We emphasize that we
do not set $X_{i}=\tilde{x}_{ij}$ in the synthetic sample;
$X_{i}=\tilde{x}_{ij}$ is only used for substitution of the removed
dependence. We provide more details in Appendix E.

More generally, we create surrogate variables for all edges we remove,
{$\tilde{x}_{ij}:(i\rightarrow j)\in\tilde{E}\\}$. Each sample is sequentially
generated by Eq. 4, with a surrogate variable for each removed incoming edge.

Remark. Multiple datasets can be created based on different definitions of
fairness and/or different downstream prediction targets. Because debiasing
happens at inference-time, this does not require retraining the model.

##  6 Experiments

In this section, we validate the performance of DECAF for synthesizing bias-
free data based on two datasets: i) real data with existing bias and ii) real
data with synthetically injected bias. The aim of the former is to show that
we can remove real, existing bias. The latter experiment provides a ground-
truth unbiased target distribution, which means we can evaluate the quality of
the synthetic dataset with respect to this ground truth. For example, when
historically biased data is first debiased, a model trained on the synthetic
data will likely create better predictions in contemporary, unbiased/less-
biased settings than benchmarks that do not debias first.

In both experiments, the ground-truth DAG is unknown. We use causal discovery
to uncover the underlying DAG and show empirically that the performance is
still good.

Benchmarks. We compare DECAF against the following benchmark generative
methods: a GAN, a Wasserstein GAN with gradient penalty (WGAN-GP) [21] and
FairGAN [17]. FairGAN is the only benchmark designed to generate synthetic
fair data,555The works of [11, 16] are not applicable here, as these methods
are constrained to discrete data. whereas GAN and WGAN-GP only aim to match
the original data’s distribution, regardless of inherent underlying bias. For
these benchmarks, fair data can be generated by naively removing the protected
variable – we refer to these methods with the PR (protected removal) suffix
and provide more experimental results and insight into PR in Appendix A. We
benchmark DECAF debiasing in four ways: i) with no inference-time debiasing
(DECAF-ND), ii) under FTU (DECAF-FTU), iii) under CF (DECAF-CF) and iv) under
DP fairness (DECAF-DP). We provide DECAF666PyTorch Lightning source code at
https://github.com/vanderschaarlab/DECAF. implementation details in Appendix
D.1.

Evaluation criteria. We evaluate DECAF using the following metrics:

  * •

Data quality is assessed using metrics of precision and recall [37, 38, 39].
Additionally, we evaluate all methods in terms of AUROC of predicting the
target variable using a downstream classifier (MLP in these experiments)
trained on synthetic data.

  * •

FTU is measured by calculating the difference between the predictions of a
downstream classifier for setting $A$ to 1 and 0, respectively, such that
$|P_{A=0}(\hat{Y}|X)-P_{A=1}(\hat{Y}|X)|$, while keeping all other features
the same. This difference measures the direct influence of $A$ on the
prediction.

  * •

DP is measured in terms of the Total Variation [15]: the difference between
the predictions of a downstream classifier in terms of positive to negative
ratio between the different classes of protected variable $A$, i.e.,
$|P(\hat{Y}|A=0)-P(\hat{Y}|A=1)|$.

Table 2: Bias removal experiment on the Adult dataset [40]. The full table
with protected attribute removal can be found in Appendix A.

| Data Quality | Fairness
---|---|---
Method | Precision$\uparrow$ | Recall$\uparrow$ | AUROC$\uparrow$ | FTU$\downarrow$ | DP$\downarrow$
Original data $\mathcal{D}$ | $0.920\pm 0.006$ | $0.936\pm 0.008$ | $0.807\pm 0.004$ | $0.116\pm 0.028$ | $0.180\pm 0.010$
GAN | $0.607\pm 0.080$ | $0.439\pm 0.037$ | $0.567\pm 0.132$ | $0.023\pm 0.010$ | $0.089\pm 0.008$
WGAN-GP | $0.683\pm 0.015$ | $0.914\pm 0.005$ | $0.798\pm 0.009$ | $0.120\pm 0.014$ | $0.189\pm 0.024$
FairGAN | $0.681\pm 0.023$ | $0.814\pm 0.079$ | $0.766\pm 0.029$ | $0.009\pm 0.002$ | $0.097\pm 0.018$
DECAF-ND | $0.780\pm 0.023$ | $0.920\pm 0.045$ | $0.781\pm 0.007$ | $0.152\pm 0.013$ | $0.198\pm 0.013$
DECAF-FTU | $0.763\pm 0.033$ | $0.925\pm 0.040$ | $0.765\pm 0.010$ | $0.004\pm 0.004$ | $0.054\pm 0.005$
DECAF-CF | $0.743\pm 0.022$ | $0.875\pm 0.038$ | $0.769\pm 0.004$ | $0.003\pm 0.006$ | $0.039\pm 0.011$
DECAF-DP | $0.781\pm 0.018$ | $0.881\pm 0.050$ | $0.672\pm 0.014$ | $0.001\pm 0.002$ | $0.001\pm 0.001$

###  6.1 Debiasing Census Data

In this experiment, we are given a biased dataset $\mathcal{D}\sim P(X)$ and
wish to create a synthetic (and debiased) dataset $\mathcal{D}^{\prime}$, with
which a downstream classifier can be trained and subsequently be rolled out in
a setting with distribution $P(X)$. We experiment on the Adult dataset [40],
with known bias between gender and income [10, 11]. The Adult dataset contains
over 65,000 samples and has 11 attributes, such as age, education, gender,
income, among others. Following [11], we treat gender as the protected
variable and use income as the binary target variable representing whether a
person earns over $50K or not. For DAG $\mathcal{G}$, we use the graph
discovered and presented by Zhang et al. [11]. In Appendix D.2, we specify
edge removals for DECAF-DP, DECAF-CF, and DECAF-FTU.

Synthetic data is generated using each benchmark method, after which a
separate MLP is trained on each dataset for computing the metrics; see
Appendix D.2 for details. We repeat this experiment 10 times for each
benchmark method and report the average in Table 2. As shown, DECAF-ND (no
debiasing) performs amongst the best methods in terms of data utility. Because
the data utility in this experiment is measured with respect to the original
(biased) dataset, we see that the methods DECAF-FTU, DECAF-CF, and DECAF-DP
score lower than DECAF-ND because these methods distort the distribution –
with DECAF-DP distorting the label’s conditional distribution most and thus
scoring worst in terms of AUROC. Note also that a downstream user who is only
focused on performance would choose the synthetic data from WGAN-GP or DECAF-
ND, which are also the most biased methods. Thus, we see that there is a
trade-off between fairness and data utility when the evaluation distribution
$P(X)$ is the original biased data.

###  6.2 Fair Credit Approval

In this experiment, direct bias, which was not previously present, is
synthetically injected into a dataset $\mathcal{D}$ resulting in a biased
dataset $\tilde{\mathcal{D}}$. We show how DECAF can remove the injected bias,
resulting in dataset $\mathcal{D}^{\prime}$ that can be used to train a
downstream classifier. This is a relevant scenario if the training data
$\tilde{D}$ does not follow real-world distribution $P(X)$, but instead a
biased distribution $\tilde{P}(X)$ (due to, e.g., historical bias). In this
case, we want downstream models trained on synthetic data
$\mathcal{D}^{\prime}$ to perform well on the real-world data $\mathcal{D}$
instead of $\tilde{\mathcal{D}}$. We show that DECAF is successful at removing
the bias and how this results in higher data utility than benchmarks methods
trained on $\tilde{D}$.

We use the Credit Approval dataset from [40], with graph $\mathcal{G}$ as
discovered by the causal discovery algorithm FGES [41] using Tetrad [42]
(details in Appendix D.3). We inject direct bias by decreasing the probability
that a sample will have their credit approved based on the chosen $A$.777We
let $A$ equal (anonymized) ethnicity [43, 44, 45, 46], with randomly chosen
$A=4$ as the disadvantaged population. The credit_approval for this population
was synthetically denied (set to 0) with some bias probability $\beta$, adding
a directed edge between label and protected attribute.

In Figure 3, we show the results of running our experiment 10 times over
various bias probabilities $\beta$. We benchmark against FairGAN, as it is the
only benchmark designed for synthetic debiased data. Note that in this case,
the causal DAG has only one indirect biased edge between the protected
variable (see Appendix D), and thus DECAF-DP and DECAF-CF remove the same
edges and are the same for this experiment. The plots show that DECAF-FTU and
DECAF-DP have similar performance to FairGAN in terms of debiasing; however,
all of the DECAF-* methods have significantly better data quality metrics:
precision, recall, and AUROC. DECAF-DP is one of the best performers across
all 5 of the evaluation metrics and has better DP performance under higher
bias. As expected, DECAF-ND (no debiasing) has the same data quality
performance in terms of precision and recall as DECAF-FTU and DECAF-DP and has
diminishing performance in terms of downstream AUROC, FTU, and DP as bias
strength increases. See Appendix D for other benchmarks, and the same
experiment under hidden confounding in Appendix G.

(a) Precision$\uparrow$

(b) Recall$\uparrow$

(c) AUROC$\uparrow$

(d) FTU$\downarrow$

(e) DP$\downarrow$

Figure 3: Plot of precision (a), recall (b), AUROC (c), FTU (d), and DP (e)
over bias strength $\beta$. FairGAN performs similarly in terms of DP and FTU,
but DECAF-FTU and DECAF-DP have significantly better data quality as well as
down stream prediction capability (AUROC).

##  7 Discussion

We have proposed DECAF, a causally-aware GAN that generates fair synthetic
data. DECAF’s sequential generation provides a natural way of removing these
edges, with the advantage that the conditional generation of other features is
left unaltered. We demonstrated on real datasets that the DECAF framework is
both versatile and compatible with several popular definitions of fairness.
Lastly, we provided theoretical guarantees on the generator’s convergence and
fairness of downstream models. We next discuss limitations as well as
applications and opportunities for future work.

Definitions. DECAF achieves fairness by removing edges between features, as we
have shown for the popular FTU and DP definitions. Other independence-based
[30] fairness definitions can be achieved by DECAF too, as we show in Appendix
C. Just like related debiasing works [10, 16, 11, 17], DECAF is not compatible
with fairness definitions based on separation or sufficiency [30], as these
definitions depend on the downstream model more explicitly (e.g. Equality of
Opportunity [12]). More on this in Appendix C.

Incorrect DAG specification. Our method relies on the provision of causal
structure in the form of a DAG for i) deciding the sequential order of feature
generation and ii) deciding which edges to remove to achieve fairness. This
graph need not be known a priori and can be discovered instead. If discovered,
the DAG needs not equal the true DAG for many definitions of fairness,
including FTU and DP, but only some (in)dependence statements are required to
be correct (see Proposition 1). This is shown in the Experiments, where the
DAG was discovered with the PC algorithm [47] and TETRAD [42]. Furthermore, in
Appendix B we prove that the causal generator converges to the right
distribution for any graph that is Markov compatible with the data. We
reiterate, however, that knowing (part of) the true graph is still helpful
because i) it often leads to simpler functions $\\{f_{i}\\}_{i=1}^{d}$ to
approximate,888Specifically, this is the case if modeling the causal direction
is simpler than modeling the anti-causal direction. For many classes of models
this is true when algorithmic independence holds, see [34]. and ii) some
causal fairness definitions do require correct directionality—see Appendix C.
In Appendix F, we include an ablation study on how errors in the DAG
specification affect data quality and downstream fairness.

Causal sufficiency. We have focused on just one type of graph: causally-
sufficient directed graphs. Extending this to undirected or mixed graphs is
possible as long as the generation order reflects a valid factorization of the
observed distribution. This includes settings with hidden confounders. We note
that for some definitions of bias, e.g., counterfactual bias, directionality
is essential and hidden confounders would need to be corrected for (which is
not generally possible).

Time-series. We have focused on the tabular domain. The method can be extended
to other domains with causal interaction between features, e.g., time-series.
Application to image data is non-trivial, partly because, in this instance,
the protected attribute (e.g., skin color) does not correspond to a single
observed feature. DECAF might be extended to this setting in the future by
first constructing a graph in a disentangled latent space (e.g., [24, 25]).

Social implications. Fairness is task and context-dependent, requiring careful
public debate. With that being said, DECAF empowers data issuers to take
responsibility for downstream model fairness. We hope that this progresses the
ubiquity of fairness in machine learning.

## Acknowledgements

We would like to thank the reviewers for their time and valuable feedback.
This research was funded by the Office of Naval Research and the WD Armstrong
Trust.

## References

  * Alaa et al. [2021] Ahmed M Alaa, Boris van Breugel, Evgeny Saveliev, and Mihaela van der Schaar.  How faithful is your synthetic data? sample-level metrics for evaluating and auditing generative models.  _arXiv preprint arXiv:2102.08921_ , 2021.
  * Xie et al. [2018] Liyang Xie, Kaixiang Lin, Shu Wang, Fei Wang, and Jiayu Zhou.  Differentially private generative adversarial network.  _CoRR_ , abs/1802.06739, 2018.  URL http://arxiv.org/abs/1802.06739.
  * Yoon et al. [2020] Jinsung Yoon, L. Drumright, and M. van der Schaar.  Anonymization through data synthesis using generative adversarial networks (ads-gan).  _IEEE Journal of Biomedical and Health Informatics_ , 24:2378–2388, 2020.
  * Tashea [2017] Jason Tashea.  Courts are using ai to sentence criminals. that must stop now.  _WIRED_ , Apr 2017.  URL https://www.wired.com/2017/04/courts-using-ai-sentence-criminals-must-stop-now/.
  * Dastin [2018] Jeffrey Dastin.  Amazon scraps secret AI recruiting tool that showed bias against women.  _Reuters_ , 2018.
  * Lu et al. [2018] Kaiji Lu, Piotr Mardziel, Fangjing Wu, Preetam Amancharla, and Anupam Datta.  Gender bias in neural natural language processing.  _CoRR_ , abs/1807.11714, 2018.  URL http://arxiv.org/abs/1807.11714.
  * de Vassimon Manela et al. [2021] Daniel de Vassimon Manela, David Errington, Thomas Fisher, Boris van Breugel, and Pasquale Minervini.  Stereotype and skew: Quantifying gender bias in pre-trained and fine-tuned language models.  In _Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume_ , pages 2232–2242, Online, April 2021. Association for Computational Linguistics.  URL https://www.aclweb.org/anthology/2021.eacl-main.190.
  * Kadambi [2021] Achuta Kadambi.  Achieving fairness in medical devices.  _Science_ , 372(6537):30–31, 2021.
  * Kamiran and Calders [2009] Faisal Kamiran and Toon Calders.  Classifying without discriminating.  In _2009 2nd International Conference on Computer, Control and Communication_ , pages 1–6. IEEE, 2009.
  * Feldman et al. [2015] Michael Feldman, Sorelle A Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkatasubramanian.  Certifying and removing disparate impact.  In _proceedings of the 21th ACM SIGKDD international conference on knowledge discovery and data mining_ , pages 259–268, 2015.
  * Zhang et al. [2017] Lu Zhang, Yongkai Wu, and Xintao Wu.  A causal framework for discovering and removing direct and indirect discrimination.  In _Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI-17_ , pages 3929–3935, 2017.  doi: 10.24963/ijcai.2017/549.  URL https://doi.org/10.24963/ijcai.2017/549.
  * Hardt et al. [2016] Moritz Hardt, Eric Price, and Nathan Srebro.  Equality of opportunity in supervised learning.  In _Proceedings of the 30th International Conference on Neural Information Processing Systems_ , NIPS’16, page 3323–3331, Red Hook, NY, USA, 2016. Curran Associates Inc.  ISBN 9781510838819.
  * Kusner et al. [2017] Matt J Kusner, Joshua Loftus, Chris Russell, and Ricardo Silva.  Counterfactual fairness.  In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017.  URL https://proceedings.neurips.cc/paper/2017/file/a486cd07e4ac3d270571622f4f316ec5-Paper.pdf.
  * Kilbertus et al. [2017] Niki Kilbertus, Mateo Rojas Carulla, Giambattista Parascandolo, Moritz Hardt, Dominik Janzing, and Bernhard Schölkopf.  Avoiding discrimination through causal reasoning.  In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017.  URL https://proceedings.neurips.cc/paper/2017/file/f5f8590cd58a54e94377e6ae2eded4d9-Paper.pdf.
  * Zhang and Bareinboim [2018] Junzhe Zhang and Elias Bareinboim.  Fairness in decision-making—the causal explanation formula.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 32, 2018.
  * Calmon et al. [2017] Flavio P. Calmon, Dennis Wei, Karthikeyan Natesan Ramamurthy, and Kush R. Varshney.  Optimized data pre-processing for discrimination prevention, 2017.
  * Xu et al. [2018] Depeng Xu, Shuhan Yuan, Lu Zhang, and Xintao Wu.  Fairgan: Fairness-aware generative adversarial networks.  In _2018 IEEE International Conference on Big Data (Big Data)_ , pages 570–575. IEEE, 2018.
  * Nabi and Shpitser [2018] Razieh Nabi and Ilya Shpitser.  Fair inference on outcomes.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 32, 2018.
  * Kingma and Welling [2014] Diederik P. Kingma and M. Welling.  Auto-encoding variational bayes.  _ICLR_ , abs/1312.6114, 2014.
  * Goodfellow et al. [2014] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Y. Bengio.  Generative adversarial networks.  _Advances in Neural Information Processing Systems_ , 3, 06 2014.  doi: 10.1145/3422622.
  * Gulrajani et al. [2017] Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville.  Improved training of wasserstein gans.  In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 30. Curran Associates, Inc., 2017.  URL https://proceedings.neurips.cc/paper/2017/file/892c3b1c6dccd52936e27cbd0ff683d6-Paper.pdf.
  * Zemel et al. [2013] Rich Zemel, Yu Wu, Kevin Swersky, Toni Pitassi, and Cynthia Dwork.  Learning fair representations.  In _International conference on machine learning_ , pages 325–333. PMLR, 2013.
  * Xu et al. [2019] Depeng Xu, Yongkai Wu, Shuhan Yuan, Lu Zhang, and Xintao Wu.  Achieving causal fairness through generative adversarial networks.  In _Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence_ , 2019.
  * Kocaoglu et al. [2017] Murat Kocaoglu, Christopher Snyder, Alexandros G Dimakis, and Sriram Vishwanath.  Causalgan: Learning causal implicit generative models with adversarial training.  _arXiv preprint arXiv:1709.02023_ , 2017.
  * Yang et al. [2021] Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang.  Causalvae: Disentangled representation learning via neural structural causal models, 2021.
  * Choi et al. [2020] Kristy Choi, Aditya Grover, Trisha Singh, Rui Shu, and Stefano Ermon.  Fair generative modeling via weak supervision.  In _International Conference on Machine Learning_ , pages 1887–1898. PMLR, 2020.
  * Pearl [2009] Judea Pearl.  _Causality_.  Cambridge university press, 2009.
  * Barocas and Selbst [2016] Solon Barocas and Andrew D Selbst.  Big data’s disparate impact.  _Calif. L. Rev._ , 104:671, 2016.
  * Kamiran et al. [2012] Faisal Kamiran, Indrė Žliobaitė, and Toon Calders.  Quantifying explainable discrimination and removing illegal discrimination in automated decision making.  _Knowledge and Information Systems_ , 1:in press, 06 2012\.  doi: 10.1007/s10115-012-0584-8.
  * Barocas et al. [2017] Solon Barocas, Moritz Hardt, and Arvind Narayanan.  Fairness in machine learning.  _Nips tutorial_ , 1:2, 2017.
  * Grgic-Hlaca et al. [2016] Nina Grgic-Hlaca, Muhammad Bilal Zafar, Krishna P Gummadi, and Adrian 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 2, 2016.
  * Zafar et al. [2017] Muhammad Bilal Zafar, Isabel Valera, Manuel Gomez Rogriguez, and Krishna P Gummadi.  Fairness constraints: Mechanisms for fair classification.  In _Artificial Intelligence and Statistics_ , pages 962–970. PMLR, 2017.
  * Simpson [1951] Edward H Simpson.  The interpretation of interaction in contingency tables.  _Journal of the Royal Statistical Society: Series B (Methodological)_ , 13(2):238–241, 1951.
  * Peters et al. [2017] Jonas Peters, Dominik Janzing, and Bernhard Schölkopf.  _Elements of causal inference: foundations and learning algorithms_.  The MIT Press, 2017.
  * Dwork et al. [2014] Cynthia Dwork, Aaron Roth, et al.  The algorithmic foundations of differential privacy.  _Foundations and Trends in Theoretical Computer Science_ , 9(3-4):211–407, 2014.
  * Jordon et al. [2019] James Jordon, Jinsung Yoon, and M. Schaar.  Pate-gan: Generating synthetic data with differential privacy guarantees.  In _ICLR_ , 2019.
  * Sajjadi et al. [2018] Mehdi S. M. Sajjadi, Olivier Bachem, Mario Lucic, Olivier Bousquet, and Sylvain Gelly.  Assessing generative models via precision and recall.  In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 31. Curran Associates, Inc., 2018.
  * Kynkäänniemi et al. [2019] Tuomas Kynkäänniemi, Tero Karras, Samuli Laine, Jaakko Lehtinen, and Timo Aila.  Improved precision and recall metric for assessing generative models.  In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 32. Curran Associates, Inc., 2019.
  * Flach and Kull [2015] Peter Flach and Meelis Kull.  Precision-recall-gain curves: Pr analysis done right.  In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, _Advances in Neural Information Processing Systems_ , volume 28. Curran Associates, Inc., 2015.
  * Dua and Graff [2020] Dheeru Dua and Casey Graff.  UCI machine learning repository, 2020.  URL http://archive.ics.uci.edu/ml.
  * Ramsey et al. [2017] Joseph Ramsey, Madelyn Glymour, Ruben Sanchez-Romero, and Clark Glymour.  A million variables and more: the fast greedy equivalence search algorithm for learning high-dimensional graphical causal models, with an application to functional magnetic resonance images.  _International Journal of Data Science and Analytics_ , 3(2):121–129, Mar 2017.  ISSN 2364-4168.  doi: 10.1007/s41060-016-0032-z.
  * Glymour et al. [2019] Clark Glymour, Richard Scheines, Peter Spirtes, and Joseph Ramsey.  Tetrad, 2019.  URL http://www.phil.cmu.edu/tetrad/index.html.
  * Avery et al. [2009] Robert B. Avery, Kenneth P. Brevoort, and Glenn Canner.  Credit scoring and its effects on the availability and affordability of credit.  _Journal of Consumer Affairs_ , 43(3):516–537, 2009.  doi: https://doi.org/10.1111/j.1745-6606.2009.01151.x.
  * Avery et al. [2012] Robert B. Avery, Kenneth P. Brevoort, and Glenn Canner.  Does credit scoring produce a disparate impact?  _Real Estate Economics_ , 40(s1):S65–S114, 2012\.  doi: https://doi.org/10.1111/j.1540-6229.2012.00348.x.
  * Dobbie et al. [2018] Will Dobbie, Andres Liberman, Daniel Paravisini, and Vikram Pathania.  Measuring bias in consumer lending.  Working Paper 24953, National Bureau of Economic Research, August 2018\.  URL http://www.nber.org/papers/w24953.
  * Lohia et al. [2019] P. K. Lohia, K. Natesan Ramamurthy, M. Bhide, D. Saha, K. R. Varshney, and R. Puri.  Bias mitigation post-processing for individual and group fairness.  In _ICASSP 2019 - 2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP)_ , pages 2847–2851, 2019.  doi: 10.1109/ICASSP.2019.8682620.
  * Spirtes et al. [2000] Peter Spirtes, Clark N Glymour, Richard Scheines, and David Heckerman.  _Causation, prediction, and search_.  MIT press, 2000.
  * Alessandra [1988] Anita M Alessandra.  When doctrines collide: Disparate treatment, disparate impact, and watson v. fort worth bank & trust.  _U. Pa. L. Rev._ , 137:1755, 1988.

##  Appendix A Protected variable removal

A trivial method for satisfying FTU fairness, is to remove the protected
attribute from downstream learners. We first provide a motivating example
explaining why this is sub-optimal. We then follow this with an experiment on
the Adult dataset.

###  A.1 Example

Defining fairness is task and data dependent. For example, let us assume two
datasets are generated by the graphical models in Figure
LABEL:fig:two_examples. Data generated by the top graph is considered fair:
$Education$ affects past experience ($Resume$), which together affect future
job prospects ($Job$). The bottom graph is a historical example of unfairness:
even if there would be no bias between $Loan$ and $Race$, redlining (i.e. the
practice of refusing a loan to people living in certain areas) would
discriminate indirectly based on race [43, 44, 45, 46]. Human knowledge is
thus essential for defining fairness correctly, and making sure (e.g.,
historical) bias is not propagated by the models we deploy. This example also
shows why simply removing or not measuring a sensitive attribute does not
suffice: not only does this ignore indirect bias, but hiding the protected
attribute leads to an (additional) correlation between $Postcode$ and $Loan$
due to confounding. A smart debiasing method is required that can distinguish
fair from unfair relations.

###  A.2 Experiment

As explained in the previous example, simply removing the protected attribute
is a naive and sub-optimal solution to FTU fairness due to confounding. Let us
test this experimentally. We use the same experimental setup described in
Section 6 for the Adult dataset, but we include additional metrics for
protected attribute removal. We denote protected attribute removal by the *-PR
suffix. In Table 3, we observe that naively removing the protected attribute
only ensures FTU fairness, as shown by: GAN-PR, WGAN-GP-PR, and DECAF-PR.
Furthermore, we observe that synthetic data quality diminishes as well for
WGAN-GP-PR and DECAF-PR across precision, recall, and AUROC. For GAN-PR we see
a slight improvement in data quality over GAN, however this improvement is
very minimal in comparison to DECAF.

Table 3: Full table of bias removal experiment on Adult dataset [40] including
protected removal (PR) metrics. For methods *-PR, we remove the protected
attribute from the dataset before synthesizing data. $\ddagger$Note that the
FTU values for the *-PR values will be zero since they are removed from the
data generation method.

| Data Quality | Fairness
---|---|---
Method | Precision$\uparrow$ | Recall$\uparrow$ | AUROC$\uparrow$ | FTU$\downarrow$ | DP$\downarrow$
Original data $\mathcal{D}$ | $0.920\pm 0.006$ | $0.936\pm 0.008$ | $0.807\pm 0.004$ | $0.116\pm 0.028$ | $0.180\pm 0.010$
GAN | $0.607\pm 0.080$ | $0.439\pm 0.037$ | $0.567\pm 0.132$ | $0.023\pm 0.010$ | $0.089\pm 0.008$
WGAN-GP | $0.683\pm 0.015$ | $0.914\pm 0.005$ | $0.798\pm 0.009$ | $0.120\pm 0.014$ | $0.189\pm 0.024$
FairGAN | $0.681\pm 0.023$ | $0.814\pm 0.079$ | $0.766\pm 0.029$ | $0.009\pm 0.002$ | $0.097\pm 0.018$
GAN-PR | $0.632\pm 0.077$ | $0.509\pm 0.110$ | $0.612\pm 0.106$ | $\ddagger 0.0\pm 0.0$ | $0.120\pm 0.012$
WGAN-GP-PR | $0.640\pm 0.019$ | $0.848\pm 0.028$ | $0.739\pm 0.034$ | $\ddagger 0.0\pm 0.0$ | $0.078\pm 0.014$
DECAF-PR | $0.717\pm 0.021$ | $0.839\pm 0.033$ | $0.769\pm 0.020$ | $\ddagger 0.0\pm 0.0$ | $0.044\pm 0.013$
DECAF-ND | $0.780\pm 0.023$ | $0.920\pm 0.045$ | $0.781\pm 0.007$ | $0.152\pm 0.013$ | $0.198\pm 0.013$
DECAF-FTU | $0.763\pm 0.033$ | $0.925\pm 0.040$ | $0.765\pm 0.010$ | $0.004\pm 0.004$ | $0.054\pm 0.005$
DECAF-CF | $0.743\pm 0.022$ | $0.875\pm 0.038$ | $0.769\pm 0.004$ | $0.003\pm 0.006$ | $0.039\pm 0.011$
DECAF-DP | $0.781\pm 0.018$ | $0.881\pm 0.050$ | $0.672\pm 0.014$ | $0.001\pm 0.002$ | $0.001\pm 0.001$

##  Appendix B Convergence guarantees DECAF GAN

Assuming the correct underlying data generating DAG is known, well-known
theoretical results for GANs transfer to DECAF. We highlight the main results.
The typical GAN minimax objective (Eq. 3 paper) is optimized by iteratively
updating the discriminator and generator, with respective losses:

$\displaystyle\mathcal{L}_{D}(\hat{X},X)$ $\displaystyle=\log
D(\hat{X})+\log(1-D(X))$ (5) $\displaystyle\mathcal{L}_{G}(\hat{X})$
$\displaystyle=-\log D(\hat{X})$ (6)

First, we reiterate the following theorem from [20]. Let $P_{G}$ and $P_{X}$
denote generator and original data distributions, respectively.

######  Theorem 3.

Given fixed optimal discriminator $D^{*}$, the global minimum of the generator
loss (Eq. 6) is achieved if and only if $P_{G}=P_{X}$.

###### Proof.

Noting that we have made no changes to the GAN discriminator, we refer to
Theorem 1 of [20]. ∎

######  Theorem 4.

(Convergence guarantee) Assuming the following three conditions hold:

  1. (i)

data generating distribution $P_{X}$ is Markov compatible with a known DAG
$\mathcal{G}=(V,E)$;

  2. (ii)

generator $G$ and discriminator $D$ have enough capacity; and

  3. (iii)

in every training step the discriminator is trained to optimality given fixed
$G$, and $G$ is subsequently updated as to maximise the discriminator loss
(Eq. 3 paper);

then generator distribution $P_{G}$ converges to true data distribution
$P_{X}$

###### Proof.

This is the direct result of the construction of generator $G$ and follows a
similar argument as Proposition 2 of [20]. Note that by the definition of
compatibility of $P_{X}$ and $\mathcal{G}=(V,E)$, we can write:

$P_{X}(X)=\prod_{X_{i}\in V}P(X_{i}|\\{X_{j}:(X_{j}\rightarrow X_{i})\in
E\\})$

Given each $G_{i}$ (see Eq. 2 paper) has enough capacity, $G$ can thus express
the full distribution $P_{X}(X)$. By convexity of the loss functions and the
existence of a unique global optimum (Theorem 3), gradient descent is
theoretically guaranteed to converge, $P_{G}\rightarrow P_{X}$ [20]. ∎

Note that for condition (i) of Theorem 4 to be valid, we do not require that
graph $\mathcal{G}$ equals the true underlying DAG of the data generating
distribution $P_{X}$; $P_{G}$ is only required to disentangle into the causal
factors implied by $\mathcal{G}$. This is highly beneficial, as it enables
generation of perfect synthetic data without perfect causal knowledge. For
example, if the Markov equivalence class of the true underlying DAG has been
determined through causal discovery, any graph $\mathcal{G}$ in the
equivalence class satisfies condition (i) of Theorem 4.

Remarks The convergence guarantees do not necessarily hold in practice. First,
finite data means there there is no guarantee the algorithm converges to the
true underlying data distribution instead of, for example, the observed
empirical data distribution. Second, in practice each generator $G_{i}$ will
have limited capacity and $P(X_{i}|\operatorname{Pa}(X_{i}))$ might not lie in
its support. On a more positive note, these limitations are not specific for
DECAF and generally GANs have done well in the past. Additionally, our method
is directly extendable to the more stable WGAN-GP [21] and other generative
models.

##  Appendix C Compatibility different fairness definitions

Related definitions In the paper we have discussed FTU, DP and CF, which are
independence-based definitions and do not take directionality explicitly into
account when defining fairness. Some authors use similar definitions, but
instead of looking at (conditional) independencies of $A$ and $Y$, they
consider (blocked) directed paths from protected attribute $A$ to $Y$. These
definitions are compatible with DECAF, but mean less edges need to be removed.
See Table 4 and Figure 5. Zhang et al. [11] consider direct and indirect
discrimination, which can be understood as the “directed path” equivalents of
FTU and DP.999Note: the legal definitions of direct and indirect
discrimination are in fact defined as FTU and DP. Assuming faithfulness and
not allowing any discrimination—i.e. $\tau=0$ in [11]—direct and indirect
discrimination prohibit the existence of edge $A\rightarrow Y$ and directed
path $A$ to $Y$, respectively. Zhang and Bareinboim [15] disentangle the total
effect of $A$ on $Y$ into direct, indirect and spurious relations. This leads
to the same definition for direct discrimination as [11], but a different
definition of indirect discrimination as it _does_ allow for direct influence
of $A$ on $Y$. A very similar definition, coined counterfactual fairness, is
proposed by [13]. Kilbertus et al. [14] introduce unresolved discrimination
(UD) as the path-equivalent version of conditional fairness. They define proxy
discrimination as well, which can be considered the dual of UD [14].

Incompatible definitions Some definitions are not compatible with fair
synthetic data generation because they rely on the final prediction, e.g.
equality of opportunity [12] and calibration (e.g. see [30]). As a
consequence, DECAF cannot be used for these. Furthermore, we note that all our
fairness definitions are binary: a distribution is fair or unfair. In practice
some level of unfairness might be tolerated. For example, the US Supreme
Court’s 80% rule [48] essentially states that a prediction has disparate
impact if for disadvantaged group $A=1$ and positive outcome $\hat{Y}=1$,
$\frac{P(\hat{Y}=1|A=1)}{P(\hat{Y}=1|A=0)}<0.8$ [10]. Some authors (e.g.
Feldman et al. [10]) have explored this continuous definition, but because it
requires quantification of path-specific effects work is limited by a
linearity assumption. Extending this to nonlinear path-specific effects is an
interesting direction for future work, with great relevance for real-life
applications.

Table 4: Different definitions of fairness that are compatible with DECAF and
which edges need removal when evaluation distribution $P(X)=P_{X}(X)$. The
first three definitions are non-causal, the others only prohibit causal paths.
$A,Y,P,R$ denote respectively the protected attribute, label, proxy variables
and explanatory variables. Let $\pi_{A\rightarrow Y}$ denote a directed path
from $A$ to $Y$ that ends with $B\rightarrow Y$ for some $B$.

Definition | Edges to remove
---|---
Demographic Parity (DP) [32] |  $B\leftrightarrow Y:\forall B\in Bl_{\mathcal{G}^{\prime}}(Y)$ with $A\not\perp\\!\\!\\!\perp B$
Conditional Fairness (CF) |  $B\leftrightarrow Y:\forall B\in Bl_{\mathcal{G}^{\prime}}(Y)$ with $A\not\perp\\!\\!\\!\perp B|R$
Fairness through Unawareness (FTU) |  $A\leftrightarrow Y$ and ($A\rightarrow C$ or $Y\rightarrow C:\forall C$ with $A\rightarrow C\leftarrow Y$)
No Indirect Discrim. ($\neg$ ID) [11] |  $B\rightarrow Y$ if there exists $\pi_{A\rightarrow Y}$
No Proxy Discrim. ($\neg$PD) [14] |  $B\rightarrow Y$ if there exists $\pi_{A\rightarrow Y}$ that is blocked by $P$
No Unresolved Discrim. ($\neg$UD) [14] |  $B\rightarrow Y$ if there exists $\pi_{A\rightarrow Y}$ that is not blocked by $R$
No Direct Discrim. ($\neg$ DD) [11, 15] | $A\rightarrow Y$

Figure 5: (Left) Typical strictness of different definitions. Note that the
strictness of CF, $\neg$ UD and $\neg PD$ depends on the choice of explanatory
variables/proxies. (Right) Example showing different definitions and required
edge removals. $\neg$ DD: ✗ ; FTU: ✗ ✗ ; $\neg$ ID: ✗ ✗ ; DP: ✗ ✗ ✗ ✗ . Note
that for FTU, $A\rightarrow X_{1}$ could have been removed instead of
$Y\rightarrow X_{1}$.

##  Appendix D Additional Details and Results

###  D.1 Implementation details.

We instantiate the generator of DECAF with $d$ sub-networks with shared hidden
layers. Both the generator and discriminator are constructed having 2 hidden
layers with $2d$ neurons and initialized with random uniform weights. Each
benchmark is initialized with the same random weights and published
hyperparameters. For preprocessing, all continuous variables are standardized.
We use the Adam optimizer with a learning rate of $0.001$ for up to 50 epochs.
We update the generator once for every 10 discriminator updates. We implement
DECAF using PyTorch Lightning101010Source code is available at
https://github.com/vanderschaarlab/DECAF.

#### Computational hardware.

All models were trained on an Ubuntu 18.04 OS with 64GB of RAM (Intel Core
i7-6850K CPU @ 3.60GHz) and 2 NVidia 1080 Ti GPUs.

Scalability Due to the sequential feature generation, DECAF’s run time scales
linearly with the number of variables. In practice—for the larger Communities
and Crime dataset—this comes down to an average training time of just about
35s per epoch when run on a machine with hexacore Intel i7-6850K CPU.
Practical improvements can be made to speed this up further: when the graph is
sparse one can parallelize calculations and often one can cluster (some)
variables and model clusters together using a single generator network.

#### Generating discrete variables

In both datasets the only non-binary discrete variable is the protected
attribute, which for simplicity we have binarised (discriminated vs non-
discriminated). All variables are generated in the same way, but binary
variables are rounded off after generation.

Table 5: Overview datasets | Credit | Census | Communities
---|---|---|---
Number of features | 15 | 10 | 128
\- Continuous | 3 | 4 | 120
\- Discrete | 12 | 6 | 8
Target type | Binary | Binary | Binary
Number of samples | 379 | 32,561 | 1994
Number of discovered edges | 40 | 22 | 1288

###  D.2 Census Dataset Details

DECAF supports both FTU and DP debiasing, i.e. respectively direct and
indirect discrimination removal. We use the DAG from [10, 11] as shown in
Figure 6. FTU is achieved by removing the directed edge between between sex
and income (see Corollary 3), DP is achieved by removing111111Specifically, we
focus on the scenario of $P(X)$ being the original biased data distribution;
we want a model trained on synthetic data $\mathcal{D}\sim P^{\prime}(X)$ to
be DP-fair when evaluated on $P(X)$, see remark Section 4.2. all incoming
edges into the target variable that have the protected variable as an ancestor
(Corollary 2)- these include edges between the target variable income and each
of occupation, hours_per_week, occupation, workclass, education, relationship,
marital_status, and sex. DP fairness is overly strict, so to satisfy CF
fairness, we allow the variables occupation, hours_per_week, workclass, and
education while removing the edges from sex, marital_status, and relationship.

We generate synthetic data from the ground truth dataset using each benchmark
generator. We randomly hold out a sample of 2000 samples as a test set. We
train an MLP using default scikit-learn hyperparameters on the generated
dataset to use as our downstream classifier. We use a hidden layer with 100
neurons and ReLU activation functions. For the output layer we use a softmax
activation and binary cross entropy loss. We use Adam as the optimizer with a
learning rate of 0.001.

Figure 6: Adult dataset DAG from [10, 11]. The target variable is in green,
the protected attribute in purple, and the allowed CF variables in blue. FTU
is achieved by removing: ✗ ; DP: ✗ ✗ ✗ ; CF: ✗ ✗ . In this particular
instance, we follow [17], and remove gender discrimination. However, our
method generalizes to removing the highly problematic variable race to income.

###  D.3 Fair Credit Details

We use the Credit Approval dataset from [40] as our GT dataset. We
synthetically add bias by decreasing the probability that a sample will be
have their credit approved based on the chosen $A$. We induce bias by choosing
$A$ to be ethnicity [43, 44, 45, 46], with a discriminated population having a
value of 4121212Note that the values have been anonymized in this dataset..
The credit_approval for this population was synthetically denied (set to 0)
with some bias probability $\beta$ – see Section 6.2 for more details.

The causal DAG used in this experiment is shown in Figure 7. This DAG was
found using the Fast Greedy Equivalence Search (FGES) [41] with the pycausal
library [42]. We provide the prior knowledge that age and ethnicity are root
nodes to the FGES algorithm.

We train an MLP using default scikit-learn hyperparameters on the generated
dataset to use as our downstream classifier. We use a hidden layer with 100
neurons and ReLU activation functions. For the output layer we use a softmax
activation and binary cross entropy loss. We use Adam as the optimizer with a
learning rate of 0.001.

In Table 6, we show the results of running this experiment 10 times over our
biased dataset. Note that our method was able to generate synthetic examples
that had the highest AUROC (demonstrating FTU fairness). Table 6 shows that
our method can perform debiasing without performance hits to the synthetic
data metrics – i.e., there are no significant difference (outside of a
standard deviation) between the top methods.

Figure 7: Credit Approval DAG discovered using FGES [41] and Tetrad [42]. The
target variable is in green, the protected attribute in purple, and the
allowed CF variables in blue. FTU is achieved by removing: ✗ ; DP: ✗ ✗ ✗ ; CF:
✗ ✗ . Also, note that in this case CF fairness and DP fairness are the same.
Table 6: Bias removal experiment on Credit Approval dataset. Here we train an
MLP on the listed dataset, and report the testing AUROC for credit approval
prediction on the ground truth (GT) dataset for the biased population. Methods
denoted *-PR represent modifications to the dataset by dropping the protected
variable (PR). Note that there the FTU is zero for *-PR methods since the
protected variable, P, has been removed.

| Data Quality | Fairness
---|---|---
Method | Precision$\uparrow$ | Recall$\uparrow$ | AUROC$\uparrow$ | DP$\downarrow$ | FTU$\downarrow$
GAN | $0.921\pm 0.036$ | $0.335\pm 0.029$ | $0.743\pm 0.047$ | $0.405\pm 0.077$ | $0.194\pm 0.058$
WGAN | $0.970\pm 0.007$ | $0.804\pm 0.057$ | $0.698\pm 0.009$ | $0.520\pm 0.036$ | $0.461\pm 0.029$
ADSGAN | $0.963\pm 0.009$ | $0.841\pm 0.052$ | $0.708\pm 0.009$ | $0.506\pm 0.013$ | $0.429\pm 0.059$
GAN-PR | $0.794\pm 0.117$ | $0.368\pm 0.080$ | $0.727\pm 0.047$ | $0.203\pm 0.196$ | $0.0\pm 0.0$
WGAN-PR | $0.941\pm 0.004$ | $0.880\pm 0.017$ | $0.814\pm 0.019$ | $0.406\pm 0.022$ | $0.0\pm 0.0$
ADSGAN-PR | $0.945\pm 0.008$ | $0.880\pm 0.019$ | $0.827\pm 0.008$ | $0.413\pm 0.029$ | $0.0\pm 0.0$
FairGAN | $0.951\pm 0.012$ | $0.663\pm 0.046$ | $0.680\pm 0.008$ | $0.510\pm 0.075$ | $0.474\pm 0.054$
DECAF | $0.954\pm 0.012$ | $0.601\pm 0.015$ | $0.713\pm 0.045$ | $0.511\pm 0.130$ | $0.432\pm 0.127$
DECAF-FTU | $0.936\pm 0.017$ | $0.901\pm 0.034$ | $0.877\pm 0.009$ | $0.099\pm 0.065$ | $0.014\pm 0.012$
DECAF-DP | $0.940\pm 0.007$ | $0.922\pm 0.024$ | $0.875\pm 0.010$ | $0.011\pm 0.029$ | $0.015\pm 0.017$

##  Appendix E Surrogate variables

Debiasing in DECAF relies on removing edges from a trained model. As
highlighted in Section 5.2, we need surrogate variables with which to replace
the removed edges (Eq. 4 paper). In this section, we compare two surrogate
variable mechanisms. The aim is show i) that debiasing is successful
independent of the choice of surrogate variables, and ii) how prior knowledge
helps in choosing surrogate variable mechanism, which leads to better data
quality.

Mechanisms Let $\tilde{X}_{ij}$ denote the surrogate variable used for the
removed edge $(i\rightarrow j)$, i.e. the surrogate variable that replaces the
influence of $X_{i}$ on $X_{j}$. Here, we compare two surrogate mechanisms for
this setting:

  1. 1.

$\tilde{X}_{ij}\sim P(X_{i})$, i.e. we sample from the parent’s marginal
distribution,

  2. 2.

$\tilde{X}_{ij}=\tilde{x}_{ij}$, where $\tilde{x}_{ij}$ is a fixed value.

Mechanism 1 is straightforward and most applicable when one does not know
anything about the bias of a particular edge. By sampling from the marginal,
each sample might use a different value of $\tilde{X}_{ij}$ when generating
feature $X_{j}$, which means the diversity of the generated $X_{j}$ is
retained better compared to mechanism 2. Mechanism 1 for all experiments in
Section 6.

On the other hand, mechanism 2 is more suitable when we know explicitly that
there is bias for some values of $X_{i}$, e.g. if $X_{i}$ is the protected
attribute we might know there is a group $A=0$ that is being discriminated. In
this case, sampling $\tilde{X}_{ij}$ from the marginal of $A$ is not desired:
even though this means we remove direct bias from $A$ to $Y$, it still means
we disadvantage some individuals randomly, i.e. every time we sample
$\tilde{x}_{ij}=0$. We can employ the second mechanism instead, i.e. set
$\tilde{x}_{ij}=1$ for all individuals. This corresponds to treating everyone
like they are from the advantaged group.

Experiments We repeat the experiment from Section 6.2, in which we insert
direct bias from $A$ to $Y$ by denying loans for a disadvantaged group $A=0$
with probability $\beta$. Our aim is to remove the direct bias from $A$ to $Y$
and we evaluate the synthetic data quality and bias with respect to the
original, unbiased dataset. As we will see, in this setting mechanism 2 is
more appropriate: we want to treat everyone from group $A=0$ like they are
from group $A=1$, thereby removing the bias we inserted. Meanwhile, we do not
want to change the way we generate data for the advantaged group. More
specifically, even though it would not be considered discrimination against a
protected group, randomly denying loans to individuals of any group should
still be considered unfair.

In Figure 8 we plot the quality metrics and FTU for three generation methods:
DECAF-ND (no debiasing), DECAF-FTU1 (DECAF-FTU with surrogate mechanism 1) and
DECAF-FTU2 (DECAF-FTU with mechanism 2). We plot three columns; on the left we
plot the metrics for all generated data, in the middle we plot the metrics as
computed on the discriminated group and on the right for the non-discriminated
group.

As we can see in the FTU plots (bottom), both debiasing mechanisms are equally
valid for removing the injected bias from $A$ to $Y$. However, the precision
metric tells a different story. Mechanism 1 disadvantages individuals randomly
whenever it samples $\tilde{x}_{ij}=0$, but this is not in line with what we
want the data to be like (no disadvantage like this at all). As a result, we
see that the quality of both the discriminated group goes down. The same
result can be observed in the recall and AUROC plot, though the overlapping
error bars prohibit strong conclusions.

In a nutshell, these results indicate that for different mechanisms for
surrogate variables, data fairness is guaranteed. However, knowledge about the
origins of the bias can help increase the data utility.

(a) All

(b) Discriminated

(c) Non-discriminated

Figure 8: Plot of precision, recall, AUROC, and FTU over various bias
strengths for (a) both populations (discriminated and non-discriminated), (b)
discriminated population, and (c) non-discriminated population.

##  Appendix F DAG Sensitivity

In this section, we investigate DECAF under imperfect knowledge. Here, we are
curious to understand what happens when our causal knowledge has: 1) has
missing edges, 2) has spurious edges, i.e., edges that we assumed falsely, and
3) edges that are reversed in directionality.

We perform this experiment on the credit approval dataset [40], with the known
DAG used in the manuscript. Using an identical experimental setup as described
in Section 6.2 and a bias of $\beta=0.8$, we run our experiment 10 times each
under random DAG perturbations. Starting with the baseline DAG used in our
credit approval experiment, we perform a sensitivity analysis to the following
DAG perturbations:

  * •

Edge removal is done by randomly edges from the baseline DAG.

  * •

Edge addition is done by randomly adding edges that are constrained by the
following two criteria: 1) it does not create any cycles, and 2) it does not
create any new indirect bias measures. For the second condition, we ensure
this by asserting that an edge is not added between the protected attribute
ethnicity and an ancestor of approved. We do this to ensure that the indirect
bias is held consistent across each DAG instantiation and experimental run.

  * •

Edge reversal is done by randomly reversing edges in the baseline DAG while
preserving acyclicity.

Results for this experiment are shown in Figure 9. As expected, we see that
edge removal degrades synthetic data quality (precision, recall, and AUROC) as
the number of edges removed increases; this is not the case for adding and
reversing edges – where stable synthetic data quality is preserved. In terms
of debiasing, we see that DECAF-FTU and DECAF-ND is still able to debias
consistently across all DAG perturbations.

(a) Edge removal

(b) Edge addition

(c) Edge reversal

Figure 9: Plot of precision, recall, AUROC, FTU, and DP over (a) edge removal,
(b) edge addition, and (c) edge reversal on the credit approval dataset.

##  Appendix G Hidden Confounders

(a) Precision$\uparrow$

(b) Recall$\uparrow$

(c) AUROC$\uparrow$

(d) FTU$\downarrow$

(e) DP$\downarrow$

Figure 10: Plot of precision (a), recall (b), AUROC (c), FTU (d), and DP (e)
over bias strength $\beta$ for experiments with hidden confounding. FairGAN
performs similarly in terms of DP and FTU, but DECAF-FTU and DECAF-DP have
significantly better data quality as well as down stream prediction capability
(AUROC).

In this section, we examine DECAF under hidden confounders on the Credit
Approval dataset. Assuming the DAG in Figure 7, we create a hidden confounder
by removing the variable for education_level from the dataset and DAG. We then
replicate the experimental setup for Section 6.2 under identical conditions.
We present the results in Figure 10.