CAGE: Probing Causal Relationships in Deep Generative Models
Authors: Joey Bose
Ricardo Pio Monti
Aditya Grover
Venue: ICLR 2022 Submitted (2022)
Keywords: Generative Models
Causality

Abstract: Deep generative models excel at generating complex, high-dimensional data, often exhibiting impressive generalization beyond the training distribution. The learning principle for these models is however purely based on statistical objectives and it is unclear to what extent such models have internalized the causal relationships present in the training data, if at all. With increasing real-world deployments, such a causal understanding of generative models is essential for interpreting and controlling their use in high-stake applications that require synthetic data generation. We propose CAGE, a framework for inferring the cause-effect relationships governing deep generative models. CAGE employs careful geometrical manipulations within the latent space of a generative model for generating counterfactuals and estimating unit-level generative causal effects. CAGE does not require any modifications to the training procedure and can be used with any existing pretrained latent variable model. Moreover, the pretraining can be completely unsupervised and does not require any treatment or outcome labels. Empirically, we demonstrate the use of CAGE for: (a) inferring cause-effect relationships within a deep generative model trained on both synthetic and high resolution images, and (b) guiding data augmentations for robust classification where CAGE achieves improvements over current default approaches on image datasets.

Under review as a conference paper at ICLR 2022
CAGE: PROBING CAUSAL RELATIONSHIPS IN DEEP GENERATIVE MODELS
Anonymous authors Paper under double-blind review
ABSTRACT
Deep generative models excel at generating complex, high-dimensional data, often exhibiting impressive generalization beyond the training distribution. The learn- ing principle for these models however purely based on statistical objectives and it is unclear to what extent such models have internalized the causal relationships present in the training data, if all. With increasing real-world deployments. such causal understanding of generative models is essential for interpreting and controlling their use in high-stake applications that require synthetic data genera- tion. We propose CAGE, a framework for inferring the cause-effect relationships governing deep generative models. CAGE employs careful geometrical manipula- tions within the latent space generative model for generating counterfactuals and estimating unit-level generative causal effects. CAGE does not require any modifications to the training procedure and can be used with any existing pre- trained latent variable model. Moreover, the pretraining pervised and does not require any treatment or outcome labels. Empirically, we demonstrate the use of CAGE for: (a) inferring cause-effect relationships within a deep generative model trained on both synthetic and high resolution images, and (b) guiding data augmentations for robust classification where CAGE achieves improvements over current default approaches on image datasets.
be completely unsu-
INTRODUCTION
Causal models play fundamental role in analyzing real-world datasets, many of the questions underlying scientific research require reasoning beyond simply associations (Pearl, 2009; Rubin, 2005). Fundamentally, a causal model characterizes the generative process of the observed data via establishing cause-effect relationships between attributes: for example, a disease causes a symptom effect (and not vice versa). Consequently, a causal analysis is concerned with data generated and collected in the real world via natural processes and biological agents (Glymour et al., 2019).
In contrast, a major series of advancements in machine learning in the last decade concerns deep generative models that are learned via statistical objectives to artificially generate high-dimensional data. The widespread use of these models across the artificial intelligence spectrum, from vi- sion (Karras al., 2020) and language (Brown et al., 2020) to scientific discovery (Sanchez- Lengeling & sspuru-Gzzk,, 2018) and decision making (Chen et al., 2021), raises an important question: What are the causal mechanisms governing deep generative model? With statistical training objective, it is unclear to what extent (if any) the causal relationships from the observed dataset are retained within generative model and consequently, the outputs expected from the model under interventions and counterfactuals, In addition to controlling and interpreting these black-box models, such fine-grained understanding can be paramount for formally characterizing their biases and gencralization capabilities prior to high-stake deployments.
Present Work. We propose CAGE, framework for inferring implicit eafse-effect relationships in the latent space of deep generative models. Our framework builds off the potential outcomes frame- work of Neyman-Ruul -ubiin causal model (Neyman, 1923; Rubin, 1974) and defines new notion of generative average treatment effects (GATE). fundamental problem of causal inference is that, by construction, we cannot observe the potential outcomes under all treatments (Holland, 1986) i.e., at any given time, any individual can be assigned only one treatment (a.k.a. the factual) but not both. However, when studying treatment effects for deep generative models, CAGE exploits the genera- tive nature of such models overcome this challenge and explicitly generate the counterfactual. In

---

Under review as a conference paper at ICLR 2022
Figure 1: Counterfactual generation of Blonde Males using a deep generative model (Karras et al., 2020). CAGE infers the implicit causal structure as Gender - Blonde Hair. Top: The left panel contains the original image of a blond female, other panels display counterfactual samples where gender (treatment) is changed blond male (left panel) and counterfactually changing hair color (treatment) to blond. Generating counterfactual samples that respect the implicit causal structure yields subjectively better samples.
male. Bottom: Equivalent visualizations starting from non-
particular, our approach utilizes probabilistic classifiers for characterizing the axis of variations for relevant attributes in the latent space of deep generative model. Given the axis for the treatment attribute classifier, we develop a geometric manipulation scheme for simulating the assignment of specific treatments (in particular, the counterfactual) to an individual. Thereafter, we use an out- come attribute classifier to quantify the difference in outcomes for the factual and counterfactual generations and thus, estimate GATE, We refer to our overall framework for causal probing of deep generative models as CAGE. Figure shows illustrative samples generated from our approach.
While there is body of existing work enforcing causal structure on deep generative models e.g., (Kocaoglu et al., 2017; Yang et al., 2021; Suter et al., 2019) or using generative models as tools to aid causal inference e.g., (Louizos al., 2017; Yoon et al., 2018; Sauer & Geiger, 2021), our work stands out in extracting the causal structure inherent in existing generative models. As such, CAGE applies readily to any pretrained latent variable model, without any changes to their training procedure that can introduce any undesirable trade-offs learning (Locatello et al., 2019).
We further leverage the treatment effects estimated via CAGE to define a natural measure of causal direction over a pair of variables associated with deep generative model. Our score is simply defined as the difference in magnitudes of GATE when considering each variable as treatment. The intuition behind such score is that the ATE when considering the effect treatment should be approximately zero. In contrast, we expect the magnitude of the ATE when considering the cause treatment to be large. We study the consistency of the inferred causal directions for two high- dimensional image datasets, MorphoMNIST (Pawlowski et al., 2020) and CelebaHQ (Karras et al., 2017), with known or biologically guessed prior cause-effect relationships.
Finally, we use these inferred causal directions to guide counterfactual generation for data augmen- tations. Data augmentations from generative models are immensely useful for dealing with class and subgroup imbalance (Ramaswamy et al., 2021; Xu et al., 2018; Sattigeri et al., 2018). We show that augmentations generated by respecting the causal directions inferred via CAGE improve clas- sification accuracy by over 2.7% over the baseline and 11.7% over the anti causal direction on the CelebaHQ dataset for the worst subgroup in the challenging group DRO task. Our main contribu- tions are summarized as follows:
1. We introduce the notion of generative average treatment effects (GATE) for probing cause- effect relationships in the latent space of deep generative models.
2. We propose CAGE, a GATE estimation framework for deep generative models based on latent counterfactual manipulations.
3. Finally, as a practical application, we use the ATES infer causal direction over pairs of attributes within deep generative models and employ CAGE for generating counterfactual data augmentations with an application distributionally robust optimization.
2

---

Under review as a conference paper at ICLR 2022
2 BACKGROUND AND PRELIMINARIES
2.1 THE POTENTIAL OUTCOMES FRAMEWORK
We briefty overview the potential outcomes framework of Neyman (1923) and Rubin (1974), upon which we base our proposed method in the next section. In its simplest form, this framework con- siders the causal effect of assigning a binary treatment, T E {0, 1}. Such framework posits the existence of potential outcomes for the ith individual both whilst receiving treatment, (t), and when treatment is withheld, ot)) The causal effect for given individual, i, is defined as the difference in these potential outcomes.
The "fundamental problem of causal inference" is that whilst we may posit the existence of both potential outcomes. (i)
(i) and Yi= we only ever observe the outcome under one treatment (Holland, 1986). For this reason, causal inference is often performed at the population level, by considering quantities such as the average treatment effect (ATE):
T = E, (1) Yr=o(i))-
(1)
Equation (1) is the expected difference in potential outcomes of individuals receiving treatment T= 1 and T = 0. Under standard assumptions of unconfoundedness, positivity, and stable unit treatment value assumption, the ATE is identifiable and can be estimated by statistical estimate of the associational difference expectations (Rubin, 1978).
2.2 DEEP LATENT VARIABLE GENERATIVE MODELS
The goal of generative modeling is to learn underlying data distribution given training dataset. For high-dimensional data, this can be done effectively via deep neural networks by learning a mapping G' from unobserved factors of variation Z (i.e., latent variables) to observed variables X (e.g., raw pixels). The mapping G parameterized using deep neural networks, and can be learned via variety of training objectives, such as adversarial training (e.g., generative adversarial networks (GAN; Goodfellow al. (2014)), exact maximum likelihood estimation (e.g., Normalizing Flows (Dinh et al., 2017)), and variational Bayes (e.g.. Variational Autoencoders (VAE; Kingma & Welling (2013): Rezende Mohamed (2015)). For our current work, we can use any such latent variable generative model. Our experiments will exhibit this generality by considering state-of-the- art flows (Papamakarios al., 2017; Song et al., 2019) and GANs (Karras et al., 2020).
In addition to G (i.e., the decoder), we will assume the existence of an encoder ENC : X 2 that can map any observed datapoint to its latent vector representation. For instance, for flows, the encoder is given by the inverse of the generator mapping, ENC = G-1. For VAEs, the encoder is the variational posterior distribution trained alongside G. For GANs, either the encoder during training (e.g., Donahue et al. (2016); Dumoulin et al. (2016)), after training (e.g.. Richardson et al. (2021)), or implicitly learned by backpropogating through G to find a latent vector = E Z that best represents a target input x, as measured via a reconstruction loss (e.g., Lipton & Tripathi (2017); Bora et al. (2017)) or pretrained domain classifier (e.g., (Karras et al., 2020)).
be trained
3 ESTIMATING CAUSAL EFFECTS IN DEEP GENERATIVE MODELS
Our goal is to interrogate deep generative model with a view to better understanding which-if mny-causal associations have been implicitly encoded. We therefore look to answer the question:
In the context of a generator, G. does considering the counterfactual over a given "causal" attribute (e.g., gender) lead to significant changes in a "effect" attribute (e.g., hair color)?
Formally, we assume whitebox access to a pretrained latent variable deep generative model G G 2 - X. In addition, we further assume a finite dataset of n annotated observations, D D= (xD((x>(()) mi (i), m²(i)). Here, the examples (xx(1)... x...xxx(NN are drawn from the model's 's training distribution and we annotate each example xi(i) with binary metadata for two variables m1) E {0, 1} and my (i) {0, 1). These two annotated variables can be drawn from a larger unobserved (w.r.t. G) causal process. For example, xD(i) could correspond to a high- dimensional image and mi (i) and m²(i) could be any two attributes of the image, such gender expression and hair color in Figure 1. Apriori, we do not know which of the two variables (if any) is cause effect but through D and G, we seek to identify the nature of their relationship within G.
3

---

Under review as a conference paper at ICLR 2022
We note that any causal conclusions obtained under our proposed framework only reflect implicit properties of generator G, as opposed to properties of the data on which the generator was trained. That is to say, it is perfectly permitted, for G to have learned causal relationship that is inconsistent with the observational data used for training. As we shall see in $4, shedding light on the implicit causal relationship learned by G' is abundantly useful for pinpointing shortcomings in the model and informing best practices for counterfactual generations. As a result, this work-by design- is in sharp contrast with the majority of causal inference literature that focuses on identifying the generative mechanisms of fixed dataset as opposed to our focus on the generative model itself.
3.1 OVERVIEW OF THE CAGE FRAMEWORK
For answering the above question, we propose to extend the potential outcomes framework described in $2.1 accommodate latent variable deep generative models. Our approach is premised on com- puting a generative average treatment effect for a candidate causal attribute, me. on given effect attribute, Me, for a given generator, G. Unlike traditional approaches to treatment effect estimation, the key observation in CAGE is that we can simulate the counterfactuals under a given treatment. We refer our overall framework for causal probing of generative models as CAGE.
For example, in order to investigate the cause-effect relationship between gender and hair color, let us initially arbitrarily assign gender to be the treatment m. = me (cause) and hair color to be the outcome m2 = m. (effect). We note this choice is arbitrary and the overall algorithm will also con- sider the reverse assignment (i.e., mi m. and m2 = m²) and if needed, also reveal independence between the variables. Then we may simulate the effects of treatment assignments by manipulating the gender attribute in the latent space and measuring the corresponding change in outcomes. We next discuss our strategies for counterfactual manipulation and outcome quantification.
3.2 SIMULATING TREATMENTS VIA LATENT COUNTERFACTUAL MANIPULATIONS
In order to simulate the assignment of counter- factuals, we follow three-step procedure.
m.
mn 0
Our first step is to train a latent space classifier for the attributes using D. Here, use the encoder put (i) in D to its latent encoding (t) = ENC(xD(i)).
Step 1:
first project every in-
m.
Given the latent encodings (i) and their annotations for m. and m. at- tributes, we train a (probabilistic) linear classi- fier, o. Z + [0. 1], to discriminate between binary causal attribute values given latent repre- sentations. Concretely, by restricting ourselves to linear classifiers we obtain unit hyperplane that encodes the classification boundary. We use h. denote the normal vector the hy- perplane for attribute m.-
me
Outcome Hyperplane
z(i; = 1))
he
Treatment Hyperplane
Figure 2: Counterfactual Manipulation in the La-
Step 2: Since we are interested in casual dis- covery for the generative model, in the see- ond step, use G to create a dataset of annotated examples by sampling k latent vectors
tent Space of Generative Models CAGE.
Z = U { from the prior of the generative model. Let X = U (x(i) G(z(i))) denote the corresponding generations. Since sampling latents from the prior generative model are typically inexpensive, dataset size can be fairly large. For each generated example x(i) E X, we obtain its factual treatment by simply using the latent space classifier as m²(i) 1 (1))) > O).
Step 3: For given generated sample, x(i) E X, assume without loss of generality, that m. 0 is the factual treatment obtained via Step 2. We can derive analogous expressions for factual treatments m. = 1, but we skip those for brevity. Finally, we define the counterfactual latent with respect to setting the treatment attribute m. as using the do operator as:
z do 1)) z(i) + ah,
For stochastic encoders such in VAFs, we consider the mean of the encoding distribution.
4

---

Under review as a conference paper at ICLR 2022
where R4 is positive scalar that controls the extent to which manipulate. Equation (3.2) corresponds to moving linearly along the hyperplane normal, he which encodes attribute me for simulating the counterfactual. Such an approach is premised on the assumption that 2 is linearly separable with respect to a semantically meaningful latent attribute, which was first observed and empirically validated for GANs (Denton et al., 2019). A counterfactual sample can subsequently be obtained by simply pushing forward the counterfactual latent through G:
x(i;; do = 1)) = Giz(i; do(m, = 1))).
(2)
Figure shows an illustration of our counterfactual manipulation strategy.
3.3 QUANTIFYING TREATMENT EFFECTS VIA PROXY CLASSIFIERS
Equations (3.2-2) define the geometric manipulations required to obtain interventional samples ((; do(m. = 1)) from a generative model, G. However, in order to estimate treatment effects, require estimate of the presence absence of the effect attribute, m.. for the counterfactuals. To this end, we propose the use of binary classifiers trained to detect the presence of an effect vari- able. These classifiers can be trained directly in the latent space and serve to measure the effect of intervening on the treatment attribute m, for an individual x(i) be quantified as:
m do = 1)) = 6e (z(i; dm = 1)))
(3)
Alternatively, we can train another probabilistic classifier vee : X + [0, 1] that classifies the coun- terfactual generations in Equation (2). In this manner, we can then quantify the effect of intervening on the treatment attribute me for an individual x(i) as:
me (i; do = 1)) v/e (x(i; (oomm==))
=
(4)
For simplicity, we use latent space classifiers for quantifying treatment effects, in Equation (3). We can define the generative individual treatment effect (GITE) estimate TGITE as:
TOME (m. + m.) m. (i: do = 1)) me do = 0))-
(5)
Taking an expectation over the generated examples, we get an estimate for the generative average treatment effect (GATE) of m. me as:
TOATE (me + m.) E, [me do(m. = 1)) - m. (é; do 0))
(6)
As we can see from Equation (6), the correctness of our estimate relies on a number of assumptions. In addition to standard assumptions from causality (unconfoundeeness,, positivity, SUTVA), the quality of the generative model and classifiers play an important role. For the generative model, we designed our counterfactual manipulation scheme assuming that the latent space is linearly separable in the attributes of interest. Further, implicit in our framework the assumption that the generative model can generalize outside the training set to include the support of the counterfactual distribution. On the use of classifiers, we need accurate and calibrated classifiers (ideally, Bayes optimal) for both manipulating latent vectors and quantifying treatment effects. While it is impossible to test in-full veracity- the above assumptions on real-world distributions, there is significant empirical evidence in the last few years that suggest that modern deep generative models and classifiers can indeed satisfy the above requirements for many practical usecases (Denton et al., 2019; Brown al., 2020). The theoretical properties and these necessary assumptions of CAGE are further discussed in SA.
AT measure of causal direction. Finally, note that the preceding sections have focused on the challenge of guantifying if a variable, mes has a causal effect on second variable, m This assumes knowledge of the causal ordering over variables and maybe considered special case of the more general causal discovery problem. As such, we can extend our approach to define a measure of causal direction over any pair of variables by considering the difference in absolute generative ATE scores when either variable is considered as the treatment:
AF TEATE(m. - me) - TOATE + m²)
The AT score determines the magnitude of the difference in outcomes when either attribute is pre- scribed as the treatment. Intuitively, when using the true causal attribute, according to G, as the
5

---

Under review as a conference paper at ICLR 2022
fanp citred Fyckus aethile
Crompted ACE scets (p-
Etteter sormaprr
Figure 3: Synthetic example of CAGE applied to toy dataset. Left: A scatterplot with points col- ored by the value of causal attribute, m.- Center: Histogram of GATE values under null hypothesis, Ho. and vertical line denoting estimated GATE. Right: Plot of ÂT as a function of a.
treatment we expect signature of the interventions to be large in magnitude. Conversely, the magnitude of disturbance measured when manipulating the true effect variable should be markedly smaller. Thus AT > corroborates that the chosen causal ordering is indeed the correct one as supported by G, while a Ar < O implies that the chosen causal ordering may in fact be reversed.
A null distribution for treatment effects. A further important consideration relates to how might determine whether an estimated GATE is statistically significant. To address this, we can obtain an empirical sample of GATE scores under the null hypothesis where the attribute me has no causal association with my- A simple manner through which this can be obtained is via ran- domization and permutation testing. In particular, attribute, mes thereby removing any potential causal association. This corresponds to performing interventions over the latent space of G which are effectively random projections. This process is repeated many times to obtain an empirical distribution for GATE under the null hypothesis. Given an empirical distribution of GATEs under the null, we can obtain p-value for our observed GATE.
randomly shuffle the values of causal
4 EXPERIMENTS
We evaluate the ability CAGE towards inferring causal relationships in pretrained deep generative models on both synthetic and lighddmmessional datasets such high-resolution images of faces.
4.1 SYNTHETIC MIXTURE OF GAUSSIANS
We consider the following toy setup: data is generated according to two distinct mixture distributions as shown in the left panel of Figure 3 where each color denotes mixture. We define the causal attribute, m.. to be which mixture each sample is drawn from (i.e., from the mixture of 8 Gaussians, in blue, or the mixture of 3 Gaussians, in orange). We further define an effect variable, me. to be defined as one, the mean of the (z,, -ooordiiins is less than 2.5 and zero otherwise. In this manner, we can see that m. has a causal influence over m. by determining which mixture each sample drawn from. We employ a Masked Autoregressive Flow (Papamakarios al., 2017) as the deep generative model. The middle panel of Figure 3 visualises the distribution of TGATE under the null as well as the estimated GATE, TGATE > m.), which significantly larger in magnitude. Finally, the right panel plots AT as a function of a. positive values corrobrate that m. + mm.
4.2 IMAGE DATASETS
Morphomnist. We evaluate the causal relationships learned by powerful deep normalizing flow models on a synthetic dataset based on MNIST dubbed MorphoMNIST as introduced by Pawlowski
4
5
#
2
4
9 4
5
4
9 5
4
q
0
T
5 5
f
5
7
7 L 4
7
5
7
4
9
&
9
0 6
0
0 6
6 2
J
1
7
9
9 7 4
2 4
9
A
Figure 4: Generating counterfactuals of MorphoMNIST Digits by reducing the thickness of each digit without changing the average intensity. Right: Plot of At as a function of a.

---

Under review as a conference paper at ICLR 2022
Table 1: Causal Discovery over G for various pairs of attributes, (m1, m2). For each pair, the top row corresponds to taking as the treatment whilst the bottom utilizes as the treatment. Plese see appendix $D contains additional generated samples and qualitative description of visual fidelity for each pair of attributes.
Attributes
Counterfactual samples
p-value
Methods
ANM: my 122
Gender Wig: Mustache
LinGAM: my mg
No Tears: my - mg
Ar mm + m2
Prior am
ANM: MIL - 1782
Gender
LinGAM: my 1. m22
mg: Bald
No Tears:
AT: 170
Prior: 192
ANM: my f- 12g
mi::
LinGAM: ml +-
mg: Gontee
No Tears:
AT: my mg
Prior: my m2
ANM: +-
mi Gender
LinGAM: +-
maz Rasy
No Tears: my
my 722
Prior: my + m2
20
ANM:
mi: Age
LinGAM: m. m2
My. Bald
my - mg
Ar: mi +- 1762
Prior: mi + m/2
ANM: m. m2
My. Pointy Nosc
my mg
mg: Brown Hair
No Tears: mi 6- m2
Ar: mi + 722
Prior: my
my 172
my: Gender Smiling
1.nGAAM: mm 1 mg2
No Tears: my +
Ar: 1
Prior:
et al. (2020). Here, the original MNIST digits are modified to respect causal structure whereby the stroke thickness of the digits is cause to the brightness (i.e. T I). Specifically, thicker digits are brighter while thinner digits are dimmer under the prescribed causal graph. We train powerful normalizing flow Mintnet (Song et al., 2019) and interrogate the direction of causality- any- between thickness and intensity by first projecting all test set samples to their corresponding latent vectors. Fig shows qualitative examples of counterfactuals well AT curve as function of a. Here the generated counterfactuals reduce the thickness while maintaining the average intensity. As observed, the model generates digits that contain holes but to compensate for the drop in intensity

---

Under review as a conference paper at ICLR 2022
100
Aug. Strategy
No Aug
G - H
H
G
Avg Group Train
92.5
86.1
90.5
94
Avg Group Val
89.0
89.2
90.4
Avg Group Test
89.6
90.7
88.0
05
Worst Group Train
97.9
68.5
87.4
Suug
Worst Group Val
85.2
86.3
88.5
Worst Group Test
86.7
89.4
75.0
Gunder--taal
G-0
HwO
G-1
Table 2: Data Augmentation for Group Distribution- ally Robust Optimization on CelebA. In each DAG counterfactuals are generated by intervening the causal parent while interpolating the effect attribute.
Figure 5: Subgroup classification accuracies for causal and anti-causal data augmentation and the baseline with no augmentation.
the model instead increases the intensity of the background pixels. Such generated samples are in line with expectations as we notice that the Ar score indicates that the model has learned that thickness causes intensity and as such manipulating the causal variable propagates influence to the effect variable which manifests itself as an increase background intensity.
We perform causal discovery over pair of binary attributes in photo-realistic HD im- ages found in the CelebaHQ dataset (Karras et al., 2017). For our G we employ powerful gen- erative model in StyleGAN2 (Karras et al., 2020) which is pretrained on the FlickrFacesHQ (Karras al., 2019). To align the latent spaces between our desired causal discovery and FlickrFaces we finetune the pretrained model using 10% of CelebaHQ. In table 1, we report the direction of causality found by each of the baselines and our approach using Ar. For each DAG considered we also gen- erate counterfactual samples by manipulating one attribute and qualitatively observing downstream effects the other. To diagnose independence between attributes, scores under 100 random latent projections which allow us to reject the null hypothesis if the true posit Ar (black line) is significant. In the absence of ground truth labels for causal associations, a plausible causal relationship between each pair attributes (e.g. Gender + Mustache) which we accept as non-controversial biological prior. We observe that AT in all but one case -aneeeuukkke each baseline- -is consistently capable of diagnosing the causal relationship implicit to G. For example, for the causal relationship: Gender + Mustache, we observe counterfactual samples where gender (top row) is manipulated -.c. from male to female- the mustache attribute also changes. In contrast, when the effect variable (bot row) is manipulated there is a reduced impact on the perceived gender. We also consider three causal discovery baselines: 1. LiNGAM (Shimizu et al., 2006) 2. Addi- tive Noise Model (Hoyer et al., 2008), and 3. DAGs with No Tears (Zhang et al., 2018). For a fair comparison, and to be able make causal statements about a generator as opposed to observed data, the causal discovery baselines operate on the class probabilities learned by the proxy classifiers described in $3.3 (see $B for further information implementation details).
C.
also plot a histogram of Ar
4.3 CAUSAL DATA AUGMENTATION
We now turn to a practical downstream application of generative modeling in the data augmentation of rare groups within a supervised learning task. Specifically, we consider the experimental setup in Sagawa et al. (2019) and perform group Distributionally Robust Optimization (DRO) over rare groups in CelebA. For fair comparison with Sagawa et al. (2019) we choose to classify person's hair color (H) which maybe is causally related with gender (G) (Hysi et al., 2018). In this case, the 11377
smallest group are blonde males that constitute only 102770 0.85% of training examples. We use finetuned StyleGAN2 to augment the total number of blonde males by a factor of 10 in two separate ways. First, we manipulate the hair color of all non-blonde males which we hypothesize corresponds to changing only the effect variable. The second approach seeks to generate additional samples of blond males by manipulating the gender of blond females in CelebA. For both approaches, we generate images of dimensions 1024 1024 which are then downsampled via bilinear interpolation to resolution of 224 x 224 which is then consumed by a Resnet50 classifier.
In table we report train, validation, and test accuracies on average across all subgroups and the worst-group (Blonde Males, i.e., G=1, H=1), while in figure 5 we report all subgroup accuracies for both the baseline approach and with data augmentation with determined using the validation set. Additionally, we perform early stopping using the worst subgroup validation accuracy for all approaches. Fig 1, illustrates samples when gender for blonde females are manipulated to males (the
8

---

Under review as a conference paper at ICLR 2022
causal variable) versus manipulating the hair color of non-blonde males blonde. Qualitatively, it clear that if the end goal is to generate more blonde males the generative model must manipulate the effect variable. Quantitatively, we compute a bootstrapped FID score over 10 trials for each setup's generated samples, using their respective against the true distribution of blonde males. We find that the FIDs for the counterfactuals in the inferred causal direction (G - H) improve over the anticausal direction by 19.5% revealing that using G's learned causal relationship yields semanti- cally better samples. Finally, we find that augmentation by manipulating the effect, hair color, in this case, leads 2.7% gain in test aceuracy comparison to a 1.6% decrease when manipulating gender. Moreover, we observe the largest drop in test worst group accuracy when we generate syn- thetic samples without respecting the implicit causal associations in G. with classification accuracy dropping to 75%-servin as an important example for the need for a causal understanding of G.
RELATED WORK
CAGE is conceptually related to several methods, both within the generative modeling literature as well as the causal inference literature in general. With regards to the generative models, there is a rich line of work exploring the use of causal models to learn disentangled representations as advocated by Schölkopf et al. (2021) and Gresele al. (2021). Both Sauer & Geiger (2021) and Besserve et al. (2018) leverage to notion of independent mechanisms, encoded as structural equation models, to obtain disentangled generative models which are subsequently employed to generate counterfactual samples. Pawlowski al. (2020) propose a framework which incorporates deep probabilistic models as components within a structural equation model. In contrast with this work, CAGE instead focuses on quantifying when such causal biases have been internalized by a generator. In this sense, CAGE can be seen as solving the reverse problem to CausalGAN (Kocaoglu et al., 2017), which trains generative models such that they are consistent with a given causal graph.
Concurrently, there is a body of related work which leverages deep generative models to solve causal inference tasks. Louizos et al. (2017) and Yoon et al. (2018) employ generative models estimate individual treatment effects by generating counterfactuals under alternative treatment regimes. Tran & Blei (2017) and Wang & Blei (2019) synthesize ideas from causality and generative modeling to address challenges associated with unobserved confounding. Finally, deep generative models have also been used for causal discovery tasks, examples include Kalainathan et al. (2018); Lopez-Paz & Oquab (2016) and Khemakhem et al. (2021), which is in sharp contrast with this work which focuses uncovering causal structure within G, as opposed to the training data.
CONCLUSION
We proposed CAGE, a framework for inferring cause-effect relationships within the latent space of deep generative model via geometric manipulations. CAGE is well suited to a wide family of modern deep generative models trained on complex high-dimensional data and does not require any altering of the original training objective nor hard obtain counterfactual data. Empirically, we find CAGE reliably extracts correct cause-effect relationships in controlled settings like MorphoM- NIST. On high-resolution image data such as CelebAHQ, CAGE -cccasoall contrary to biological prior-cause-efirnn efffccteeeeeettteeo relationships that are best supported by generated counterfactual sam- ples. Finally, using causal insights supplied by CAGE also perform guided data augmentations and power a supervised distributionally robust optimization task, obtaining a 2. 2.7% improvement over the ofate-of-the-art art in rare subgroup classification.
Limitations. Despite CAGE's broad applicability to deep generative models, one important limi- tation is the requirement of a latent space. Fully observed generative models (e.g., autoregressive modes) do not have an explicit latent space and we will need adapt their internal representations for probing via CAGE. In addition, the notion of GATE in CAGE, while being novel and tested rig- orously empirically, does not entirely follow the same analysis as ATE. We implicitly borrow some key assumptions regarding unconfoundedness and introduce new ones such as linear separability in semantic attributes of the latent space in designing our estimator. These assumptions may not always hold in practice and future work can investigate both theoretically and empirically if and when mitigation strategies are needed. Finally, as consider only binary attributes in this work, the extension of our framework to richer non-binary attributes and more than two variables (as in structural causal models) an interesting direction for future work.

---

Under review as a conference paper at ICLR 2022
ETHICS STATEMENT
As deep generative models grow in their practicality and deployment in high-stake applications, important to take a critical view of the inherent biases implicitly encoded in these models (Sheng et al., 2019; Choi et al., 2020; Bender et al., 2021). Our framework allows for principled study of such biases through causal analysis, potentially paving the way mitigate the undesirable harms of deep generative models.
For example, our approach highlights important failings of the generative model itself e.g. when cause-effect relationships are inconsistent with biological priors for human subjects or with physical relationships for scientific applications. In such cases, the use of these models in any high-stakes downstream application can be very costly without any intervention. Examples range from the current use of generative models for accelcrating scientific discovery as well as societal applications in training fair classifiers. Ironically, all such applications, the use of generative models can worsen the problem at hand by introducing new blindspots through the use of generated data that does not conform to the desired cause-effect relationship. Explicitly inferring these failings provides researchers and practitioners with an opportunity to develop algorithms and evaluation metrics that go beyond the current focus visual fidelity likelihoods well as derive better data acquisition strategies for finetuning generative models.
On the other hand, we acknowledge that like many other efforts in generative modeling, our en- deavors for better understanding these models can potentially be exploited by malicious actors for generating fake content, commonly known Deepfakes (Korshunov & Marcel, 2018). Finally, causality has proven learning models with regards to fairness, robustness, and interpretability. However, as highlighted in our limitations, any causal framework including ours itself implicitly encodes some assumptions that may not hold in practice. Hence, researchers and practitioners should exercise due caution and appropriate judgment in interpreting the findings.
a highly powerful tool for formalizing important concerns of machine
REPRODUCIBILITY STATEMENT
Throughout the paper, we tried provide many details possible in order for the results of the main paper to be reproducible. In particular, we provide implementation details in Appendix for all the main models used. To ensure, the estimated AT values significant we compute p-values under random projections in the latent space for CAGE. All the baseline approaches are additionally run over multiple trials. Furthermore, we provide additional generated samples in Appendix D to supplant all counterfactual samples provided in the main text. Finally, code to reproduce all experiments will be made public after the review process.
10

---

Under review as a conference paper at ICLR 2022
REFERENCES
Emily M Bender, Timnit Gebru, Angelina McMillan-Major and Shmargaret Shmitchell. On the dangers of stochastic parrots: Can language models be too big?. In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency, pp. 610-623, 2021.
Michel Besserve, Arash Mehrjou, Rémy Sun, and Bernhard Schölkopf. Counterfactuals uncover the modular structure of deep generative models. arXiv preprint arXiv: 11Xxv:/8/2.03253, 2018.
Ashish Bora, Ajil Jalal, Eric Price, and Alexandros G Dimakis. Compressed sensing using genera- tive models. In International Conference on Machine Learning, pp. 537-546. PMLR, 2017.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005. 14165, 2020.
Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Michael Laskin, Pieter Abbeel, Aravind Srinivas, and Igor Mordatch. Decision transformer: Reinforcement learning via sequence modeling. arXiv preprint arXiv:210600345, 2021.
Kristy Choi, Aditya Grover, Trisha Singh, Rui Shu, and Stefano Ermon. Fair generative modeling via weak supervision. In International Conference on Machine Learning, pp. 1887-1898. PMLR, 2020.
Emily Denton, Ben Hutchinson, Margaret Mitchell, Timnit Gebru, and Andrew Zaldivar. Image counterfactual sensitivity analysis for detecting unintended bias. arXiv preprint arXiv:1906.06433. 2019.
Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real nvp. In The 5th International Conference on Learning Representations (ICLR), Toulon, 2017.
Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. arXiv preprint arXiv:1605.09782. 2016.
Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Olivier Mastropictro, Alex Lamb, Martin Ar- jovsky, and Aaron Courville. Adversarially learned inference. arXiv preprint arXiv:1606 00704, 2016.
Clark Glymour, Kun Zhang, and Peter Spirtes. Review of causal discovery methods based on graph- ical models. Frontiers in genetics, 10:524, 2019.
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farled Farlee.aaaeeaaa Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
Luigi Gresele, Julius von Kügelgen, Vincent Stimper, Bernhard Schölkopf, and Michel Besserve. Independent mechanism analysis, new concept? arXiv preprint 10Xiv:2006.05000, 2021.
Paul W Holland. Statistics and causal inference. Journal of the American statistical Association, 81 (396):45-960, 1986.
Patrik O Hoyer, Dominik Janzing, Joris M Mooij, Jonas Peters, Bernhard Schölkopf, et al. Nonlinear causal discovery with additive noise models. In NIPS, volume 21, pp. 689-696. Citeseer, 2008.
Pirro G Hysi, Ana M Valdes, Fan Liu, Nicholas Furlotte, David M Evans, Veronique Bataille, Alessia Visconti, Gibran Hemani, George McMahon, Susan M Ring, et al. Genome-wide associ- ation meta-analysis of individuals of european ancestry identifies loci explaining substantial fraction of hair color variation and heritability. Nature genetics, 50(5))652-655 2018.
Diviyan Kalainathan, Olivier Goudet, Isabelle Guyon, David Lopez-Paz, and Michèle Sebag. Sam Structural agnostic model, causal discovery and penalized adversarial learning. 2018.
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for im- proved quality, stability, and variation. arXiv preprint 17001199,. 2017.

---

Under review as a conference paper at ICLR 2022
Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. Pruceedings of the IÉEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4401-4410, 2019.
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyz- ing and improving the image quality of stylegan. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 81 8110-8119, 2020.
llyes Khemakhem, Ricardo Monti, Robert Leech, and Aapo Hyvarinen. Causal autoregressive flows. In International Conference on Artificial Intelligence and Statistics, pp. 3520-3528, PMLR, 2021.
Diederik P Kingma and Max Welling.
Auto-encoding variational bayes.
arXiv preprint
131iv:1312.6114 2013.
Murat Kocaoglu, Christopher Snyder, Alexandros G Dimakis, and Sriram Vishwanath. Causal- gan: Learning causal implicit generative models with adversarial training. arXiv preprint 02090003 2017.
Pavel Korshunov and Sébastien Marcel. Deepfakes: new threat to face recognition? assessment and detection. arXiv preprint 10Xiv:18/2.08800 18/2.08685, 2018.
Zachary C Lipton and Subarna Tripathi. Precise recovery of latent vectors from generative adver- sarial networks. arXiv preprint a 2017.
Francesco Locatello, Stefan Bauer, Mario Lucie, Gunnar Raetsch, Sylvain Gelly, Bernhard Schölkopf, and Olivier Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. international conference on machine learning, pp. 4124 PMLR, 2019.
David Lopez-Paz and Maxime Oquab. Revisiting classifier two-sample tests. arXiv: 06.40, 2016.
arXiv preprint
Christos Louizos, Uri Shalit, Joris Mooij, David Sontag, Richard Zemel, and Max Welling, Causal effect inference with deep latent-variable models. arXiv preprint arXiv:1705.0888 2017.
Jersey Neyman. Sur les applications de la théorie des probabilités aux experiences agricoles: Essai des principes. Roczniki Nauk Roiniczych, 10:1-51, 1923.
George Papamakarios, Theo Pavlakou, and lain Murray. Masked autoregressive flow for density estimation. arXiv preprint /rXiv::705.0777
2017.
Nick Pawlowski, Daniel C Castro, and Ben Glocker. Deep structural causal models for tractable counterfactual inference. arXiv preprint arXiv:2006.06488 2020.
Judea Pearl. Causality. Cambridge university press, 2009.
Vikram V Ramaswamy, Sunnie SY Kim, and Olga Russakovsky. Fair attribute classification through latent space diabingi Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9301-9310, 2021.
Danilo Jimenez. Rezende and Shakir Mohamed. Variational inference with normalizing flows. In Proceedings of the 32nd international conference on Machine learning. ACM, 2015.
Elad Richardson, Yuval Alaluf, Or Patashník, Yotam Nitzan, Yaniv Azar, Stav Shapiro, and Daniel Cohen-Or. Encoding in style: stylegan encoder for image-to-image translation. In Proceedings the the IEEF/VV Conference on Computer Vision and Pattern Recognition, pp. 2287-2296, 2021.
Donald B Rubin. Estimating causal effects of treatments randomized and nonrandomized studies. Journal of educational Psychology, 66(5):688, 1974.
Donald B Rubin. Bayesian inference for causal effects: The role of randomization. The Annals of statistics, pp. 34-58, 1978.
Donald B Rubin. Causal inference using potential outcomes: Design, modeling, decisions. Journal of the American Statistical Association, 100(469):322-331 2005.
12

---

Under review as a conference paper at ICLR 2022
Shiori Sagawa, Pang Wei Koh, Tatsunori B Hashimoto, and Percy Liang. Distributionally robust neural networks for group shifts: On the importance of regularization for worst-case generaliza- tion. arXiv preprini arXiv:1911.088 1911.0831, 2019.
Benjamin Sanchez-Lengelingg and Alán Aspuru-Guzik. Inverse molecular design using machine learning: Generative models for matter engineering. Science, 361(6400)360-365,, 2018.
Prasanna Sattigeri, Samuel C Hoffman, Vijil Chenthamarakshan, and Kush R Varshney. Fairness gan. arXiv preprint urXiv:1805.09910 2018.
Axel Sauer and Andreas Geiger. Counterfactual generative networks. arXiv preprint arXiv:2101.06046. 2021.
Bernhard Schölkopf, Francesco Locatello, Stefan Bauer, Nan Rosemary Ke, Nal Kalchbrenner, Anirudh Goyal, and Yoshua Bengio. Toward causal representation learning. Proceedings of the IEEE, 10965)612-634, 2021.
Emily Sheng, Kai- Wei Chang, Premkumar Natarajan, and Nanyun Peng. The woman worked as a babysitter: On biases in language generation. arXiv preprint 1909.0190..0133 2019.
Shohei Shimizu, Patrik O Hoyer, Aapo Hyvärinen, Antti Kerminen, and Michael Jordan. A linear non-gaussian acyclic model for causal discovery. Journal of Machine Learning Research, 7(10), 2006.
Yang Song, Chenlin Meng, and Stefano Ermon. Mintnet: Building invertible neural networks with masked convolutions. arXiv preprint arXiv:1907.0794: 2019.
Raphael Suter, Djordje Miladinovic, Bernhard Schölkopf, and Stefan Bauer. Robustly disentangled causal mechanisms: Validating deep representations for interventional robustness. In Interna- tional Conference on Machine Learning, pp. 6056-6065. PMLR, 2019.
Dustin Tran and David M Blei. Implicit causal models for cenome-wide association studies. arXiv 2017.
preprint arXiv:1710.
Yixin Wang and David M Blei. The blessings of multiple causes. Journal the American Statistical Association, 114(529):154--159 2019.
Depeng Xu, Shuhan Yuan, Lu Zhang, and Xintao Wu. Fairgan: Fairness-aware generative adver- sarial networks. In 2018 IEEE International Conference on Big Data (Big Data), pp. 570-575. IEEE, 2018.
Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang. Causalvae: disentangled representation learning via neural structural causal models. In Proceedings of the JEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 9593-9602, 2021.
Jinsung Yoon, James Jordon, and Mihacla Van Der Schaar. Ganite: Estimation of individualized treatment effects using generative adversarial nets. In International Conference Learning Rep- resentations, 2018.
Kun Zhang, Bernhard Schölkopf, Peter Spirtes, and Clark Glymour. Learning causality and causality-related learning: some recent progress. National science review, 5(1):26-29, 2018.
13

---

Under review as a conference paper at ICLR 2022
A EXTENDING AVERAGE TREATMENT EFFECTS TO GENERATIVE MODELS
For average treatment effects, we are interested in computing
T= E& (1) (=)=
There are two important distinctions between the use of GATE in CAGE and a traditional ATE computation:
First, as we are interrogating a generative model, we can observe both mm)=1(1) and (1). This is significant difference to standard ATE calculations, which can only observe one outcome.
interested in understanding implicit causal structure in the generator, G, the expectation over samples from the prior of G as opposed to over samples from an observational dataset. This an important distinction ture present in an observation dataset, which is the focus of traditional causal discovery methodology, with any causal structure implicit within the generator, which is our primary concern.
Second,
disambiguates the causal struc-
For unbiased estimation of ATE (a causal quantity) via statistical quantities, it is standard to assume unconfoundedness, positivity, and SUTVA. For the use of GATE in CAGE, we implicitly make further assumptions such as:
1. Counterfactual parameterization: The latent space of a generator, G, must be linearly separable with respect to the attributes of interest. This assumption is required CAGE parameterizes the assignment of counterfactual treatments as linear manipulations over the latent space of generator. We note that such assumption has been shown to hold in practice for deep generative models (Denton et al., 2019; Ramaswamy et al., 2021).
2. Complete support of the generator: The generator, G. can generate high quality samples over the entire support of its latent space, Z. This assumption is required to guarantee that linear manipulations over the latent space of generator continue produce high quality images, such that our resulting conclusions are not the result of e.g., image artefacts.
3. Sufficiently expressive and accurate classifiers: CAGE is premised on the use of proba- bilistic classifiers in order to quantify the presence/absence of an effect variable on coun- terfactual examples and thus compute treatment effects as specified in equations (5-6). We require accurate and calibrated classifiers (ideally, Bayes optimal) for computing GATE.
B MODEL DETAILS
For our experiments, whenever possible, we used the default settings found in the original papers of all chosen models. In particular, we used the default settings for both Mintnet (Song et al., 2019) and StyleGAN2 (Karras et al., 2020) which were pretrained on MNIST and FlickrFacesHQ respectively. For Mintnet we finetuned on a MorphoMnist dataset for 250 epochs using the Adam optimizer with default settings. Similarly, we also finetuned StyleGAN2 on CelebAHQ for 2000 iterations using 10% of CelebAHQ. Our synthetic experiments on the other required us to train Masked AutoRegressive Flow (Papamakarios et al., 2017) that consisted of 10 layers with 4 blocks per layer. The Masked AetoRegressive Flow was trained for 5000 iterations using 5000 data samples.
For aagtntttgmnntoionn we train ResNet50 classifier from scratch using weight decay of le 3 as well as the default hyperparams for group DRO suggested in Sagawa et al. (2019). We also search a in the range of 1 20 while perorming early stopping using the worst subgroup validation accuracy. Note that the worst subgroup need not be blonde males throughout the entire optimization procedure.
A NOTE ON BASELINE METHODS FOR CELEBHQ
We compared CAGE to well-established causal discovery algorithms when looking to infer structure over a deep generative model, G. As noted in $4.2, the causal discovery baselines considered operate over the class probabilities output by probabilistic classifiers trained as $3.3. We note that while it would be possible learn causal structure using baseline methods, such as LiNGAM,
14

---

Under review as a conference paper at ICLR 2022
the metadata (e.g.. hair color and gender), this would not necesarly provide any insights into the causal structure implicit within the generator, For this reason, we instead focus on applying causal discovery methods over the output of proxy classifiers.
C ADDITIONAL BASELINE EXPERIMENTS
In this section we perform series of ablation studies that stress test our framework CAGE under various experimental settings.
Hard vs. Soft. As we have access to ground truth labels is tempting to consider whether using hard labels opposed to the classifiers probability is better suited to computing Ar metric. In the table below we repeat our causal discovery experiment over CelebAHQ. As observed, all baselines provide unreliable estimates to the causal relationship between variables when compared to the main table which is computed using soft labels. Finally, we found it useful to assign soft labels provided by the classifiers used in the ATE computations for all augmented images during group DRO training.
Method
ANM
DAGs with No Tears
LinGAM
Gender, Mustache
Gender, Bald
Gender, Goatee
Gender, Rosy Cheeks
Age, Bald
I
Pointy Nose, Brown Hair Gender, Smiling
1
Baselines without using CounterFactuals. We now the use of Counterfactuals when com- puting our baseline scores. Specifically, we attempt causal discovery purely using observation data and labels with both hard and soft labels, which is in contrast to the main paper which considered baselines which had access to classifier probabilities on counterfactual data. The table below shows this result of this ablation.
Method
ANM
DAGs with Tears LinGAM
Gender, Mustache Gender, Bald
Gender, Goatee
Gender, Rosy Cheeks
Age, Bald
Pointy Nose, Brown Hair Gender, Smiling
D ADDITIONAL GENERATED SAMPLES
We now provide additional qualitiative examples of the generated counterfactuals on the same set of DAG's as considered in the main text. In the first row of all settings we generate counterfactu- als by manipulating the first attribute variable (e.g. Gender) while the second row corresponds to counterfactuals where the second attribute is manipulated. The third row can either be the first or context. We note that the generated samples may expose unintended
second attribute depending biases that may be present in CelebAHQ and can be learned by the generator. While CAGE does not introduce any new sources of biases it should be noted that generating counterfactuals in this manner can further exacerbate these initially hidden biases. As result, CAGE can serve as an important aid in empirically illuminating important ethical concerns that should be taken into account for any purposeful uses of generative models.
15

---

Under review as a conference paper at ICLR 2022
Gender, Mustache.
We consider generating samples by either manipulating the mustache attribute (top two rows) and then manipulating gender. As preserve the gender as we increase the presence of mustache (top row). Similarly, we find that when the gender is female manipulate the mustache attribute (middle row). Finally, in the third row we change the gender of not explicitly manipulated
see, when the Gender is male are able to semantically
still able to semantically preserve the (subjective) gender
from female to male and notice that although the mustache attribute appears as we manipulate gender more aggressively to male (bottom row), These results suggests that the generative models learned causal relationship is that gender causes mustache.
16

---

Under review as a conference paper at ICLR 2022
Gender, Goatee.
We consider generating samples by either manipulating the goatee attribute (top two rows) and manipulating gender. In the first and subjective change the samples perceived gender (top row). Similarly, we find that when the gender is already male increasing the presence of goatee does not reverse the gender to female as expected (middle row). Finally, in the third row we change the gender of from female to male and notice that there is no increase in goatee in the generated samples. These results suggests that the generative models learned causal relationship is that gender is independent of goatee.
that manipulating the goatee attribute leads visual
17

---

Under review as a conference paper at ICLR 2022
Gender, Smiling.
We consider generating samples by either manipulating the smiling attribute (top two rows) and manipulating gender. the first two rows we see that increasing the smiling attribute does not cause a (subjective) change the samples perceived gender. Conversely, in the last row manipulating samples gender from female male preserves the smiling attribute (or lack thereof) in the generated samples. These results suggests that the generative models learned causal relationship is that gender independent of smiling.
18

---

Under review as a conference paper at ICLR 2022
Age, Bald.
We consider generating samples by either manipulating the baldness attribute (top two rows) and then manipulating age (last row). In the first two row we see that increasing the baldness attribute does considerably change the age of the generated sample. On the other hand, in the last row we increase the age of the candidate and observe that while the baldness attribute increases it is the extent as samples found in the first two rows. These results suggests that the generative models learned causal relationship, in contrast to our biological prior, is that baldness is the cause of age.
19

---

Under review as a conference paper at ICLR 2022
Pointy Nose, Brown Hair.
We consider generating samples by either manipulating the pointy nose attribute (top two rows) and manipulating brown hair. In the first rows we see that increasing the pointy nose attribute does cause a change in the samples hair color from dark brown to more blonde. Conversely, in the last manipulating samples hair color be more brown does appear to significantly change the pointy nose attribute in the generated samples. These results suggests that the generative models learned causal relationship is that pointy nose causes brown hair.
20

---

Under review as a conference paper at ICLR 2022
Gender, Rosy Cheeks.
We consider generating samples by either manipulating the rosy cheek attribute (top two rows) and manipulating gender. the first two rows we see that increasing the rosy check attribute does not cause a change in the samples (subjective) gender-i.e. both females and males retain their gender increase their rosy cheeks. On the other hand, in the last row manipulating samples gender from female to male appears to slighltly decrease the rosy cheek attribute in the generated samples. These results suggests that the generative models learned causal relationship is that gender causes rosy cheeks.
21

---

Under review as a conference paper at ICLR 2022
Gender, Blonde Hair.
We consider generating samples by either manipulating the blonde hair attribute (top two rows) and manipulating gender. As observed in the first two increasing the blondeness of samples hair does not change the perceived gender from female to male. In sharp contrast, the last row we see that manipulating the gender from male to female leads to the samples hair color changing towards being more blonde. These results suggests that the generative models learned causal relationship is that gender causes blonde hair.
22

---

Under review as a conference paper at ICLR 2022
E MMD DISTANCE BETWEEN CONDITIONAL AND COUNTERFACTUAL DISTRIBUTIONS
In this appendix plot the Maximum Mean Discrepancy distance between the conditional distri- bution on the latent space of an attribute and the counterfactual distribution realized through our CAGE framework. Specifically, we plot the MMD distance as function of the interpolant strength and we observe that the two distributions grow further apart the further we interpolate past the linear classifiers hyperplane expected.
Navn Nustacho
Mavi Beid
0.08
0.08
WWD
0.05
0.06
0.04
0.03
0.00
0.02
25
5.0
7.5
10.0
12.5
15.0
37.5
0.0
2.5
5.0
7.5
36.0
12.5
15.0
17.5
sipha
atena
Male
Male
0:30
0.04
0.02
0.02
25
155
17.5
0.0
17.
Hale-Rusg, Chassis
Mole-Smiing
0.10
0.08
0.08
0.02
0.00
25
15
10.3
11.5
15.0
17.
010
3.3
1.5
10.0
12.5
175
aipha
alpha
Painty,
0.08
0.06
NMD
0.05
0.00
0.04
0.2
6.1
25
25
23


Reviews:
[{"review_id": "dvipz4M5cxX", "reviewer": "Reviewer_xP5d", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "PROS:\n\nThe goal of the paper is fresh, I am not aware of other works trying infer causalities from the latent space in a similar way as done here.\n\nThe use of the method for data augmentation seems promising.\n\nThe presentation is clear and technically correct, although some more theoretical justification for calling the relationships causal, and not just statistical, would be beneficial.\n\nCONS/QUESTIONS:\n\nMy main concern is that this paper appears to be more about the statistical dependences of two variables in the latent space - and while some of the results seem promising - it is not clear to what extent these findings have to do with causality, and to what extent they are just conditional probabilities. It is quite possible that causality leaves some trace that can be detected in the latent space, but it is not clear what that trace could be.\n\nI would suggest the following, at least, to improve this:\n1) Visualizations of the latent space and the decision boundaries to provide intuition about what's happening in the latent space, and where does the causal signal come from.\n2) Many more experiments with pairs of variables, including (but not limited to) such variables that are correlated but not causally related. This would allow the reader to see whether the method can truly distinguish causality from association.\n\nPermutation removes not only causality, but any association altogether. Therefore, it can not be used to test the statistical significance of \"causality\".\n\nThe results regarding pairs of variables are too limited to convince a reader about the ability of the method to infer causal relationships in general (and not just statistical). Many of the pairs appear to be of the kind where the putative effect is present in a subset of data items where the putative cause is present (e.g. gender->mustache, those who have mustache are a subset of male) - I'm wondering what role this asymmetry plays in the results? With the current results, the reader is left to wonder if there are other similar asymmetries that could lead to a (potentially non-causal) signal that can be picked by the method?\n", "summary_of_the_paper": "The goal of this paper is to inspect causal relationships learned by a generative model. In particular, the paper studies how moving in the latent space with respect to a putative cause variable (e.g. age) affects the probability of the putative effect variable (e.g. baldness). This is done by training two linear classifiers in the latent space, one for each variable. The counterfactual for a given cause variable and datapoint is defined by changing the location of the data point in the latent space in the direction perpendicular to the linear classification boundary for the cause variable. Then, the paper inspects what happens to the putative effect variable, using its respective decision boundary. A null distribution is defined using permutation. The usefulness of techniques is demonstrated for inferring the causal relationships (including direction) for pairs of variables and for generating data augmentations for robust classification.\n", "summary_of_the_review": "The paper presents interesting ideas to investigate the relationships between variables learned by a deep generative model, but to make the claim that these relationships are causal, more theoretical justification, intuition, and experiments would be needed.\n\nPOST-REBUTTAL UPDATE:\n\nI thank the authors for their attempt to improve the paper. Nonetheless, I don't find my original concerns resolved, nor answers to my suggestions. Especially the framing of the approach using causal concepts remains obscure and unconvincing.\n\nAs a reply to the authors' specific question on permutation: if two variables are strongly associated but not causal, and the method incorrectly detects a causal signal between the variables (based on the presented experiments it is not inconceivable that this may happen in some cases), then the permutation test will highlight this as highly significant (because the association is removed in the permuted dataset).\n", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "2: Several of the paper’s claims are incorrect or not well-supported.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "Zv525_OalF2", "reviewer": "Reviewer_Ak2p", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "A strength of this paper is that it clearly presents the methodological ideas and formulations.  If you have a background in causal inference, the approach is relatively straightforward to apply in the latent space, as the methodology is well-laid out in Section 3.  The visualization in Figure 2 is quite nice to illustrate the idea and the utility of the linear classifier.  There are many results and visualizations, allowing the reader to do a great deal of visual evaluation.  The ideas are highly relevant to ethical considerations in modern applications of deep learning (although I would like to see this expanded further in the discussion!).\n\nWhere this becomes tricky is on the interpretation of the results. 4.1 and 4.2 are relatively straightforward to evaluate, but on a small and simplistic scale. It is very difficult to evaluate whether the results from this model are good or not on the real data (4.3), which is a common problem in the evaluation of causal models.  In particular, the different results between the different models are very challenging to evaluate, and they need to be discussed at length.  Why do the 3 baselines and the proposed method differ at times?  They are all analyzing the same data, and the \"prior\" relationship is not necessarily true for the generative model (as is noted by the authors). The authors should discuss at greater length their rationale for the proposed causal relationship, and whether that appears true in the system.  Additionally, I would like greater discussion of the visual samples, which don't always match what I would expect from the system.  For example, adding a mustache to a female example without changing the gender seems like a strange example, as essentially no similar samples exist in the training database.\n\nMany of these causal relationships are evaluated with semi-synthetic data setups, as was done in 4.1 and 4.2.  It does seem like you selectively choose the training images in Section 4.3 to imply specific causal relationships and see if you method picks them up in the latent space, rather than subjectively choosing priors, which may or may not be true in the generative latent space.\n\nThe results presented in Table 2 are strange.  Notably, the $G\\rightarrow H$ strategy is significantly better on test but significantly worse on validation than $H\\rightarrow G$.  Any idea why there is this discrepancy?  Given these results, it is unclear how strong the evidence is for the claim that using the causal direction is better than the anticausal direction or if it is just statistical fluctuation.\n\n", "summary_of_the_paper": "This manuscript proposes CAGE, a method for determining causal relationships between attributes based on the learned representations of deep causal models.  The method is based upon relatively standard causal inference methods after structuring the deep latent representations between them.  The method is straightforward to apply and estimate the Generative Average Treatment Effect (GATE).  Results are shown on both synthetic and real datasets, and are used to infer relationships.", "summary_of_the_review": "Interesting and potentially useful method in a relevant topic area.  The evaluation approach could be improved.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "IQrKFuX5DR", "reviewer": "Reviewer_AcYm", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Pros: The paper is well-structured. The idea is novel. The authors established a new method for both counterfactual manipulation and treatment evaluation. The paper also designs corresponding experiments and evaluation methods. The generated counterfacual images and the causal-effect relationship seem reasonable. \n\nCons: Since the hyperplane that encodes the classification boundary is obtained by linear classifier, it means that the learned attributes should be linearly separable in the latent space. How to guarantee or to proof this, like some theoretical analysis or qualitative feature visualization?\n\nOther comments:  \n1)  The CAGE performs the binary treatment, i.e., manipulating attributes with binary labels. Is it possible to extend to other attributes on multi-category situations or even continuous situations?\n2)  How to obtain the normal vector to the hyperplane given the high-dimensional latent encoding z?\n3)  The text of histograms in Table 1 is not clear enough, please check.\n4)  Some typos, please check.\n", "summary_of_the_paper": "This paper proposes a novel framework CAGE (causal probing of deep generative models) for inferring the causal-effect relationship in deep generative models. The treatment is implemented by moving linearly along the hyperplane normal. Then the attribute treatment effect can be quantified via a proxy classifier. The authors evaluated the CAGE on low-dimensional synthetic and high-dimensional datasets. Results show the ability to infer causal relationships of the proposed CAGE.\n", "summary_of_the_review": "This paper is novel on the interpretability by diving into the deep generative models. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works.", "empirical_novelty_and_significance": "4: The contributions are significant, and do not exist in prior works."}, "extra_text": {}}, {"review_id": "HOXGEslemds", "reviewer": "Reviewer_TgM5", "summary": "", "questions": "", "limitations": "", "rating": 3, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "I would like to thank the authors for the interesting work they proposed, and tried to explain my concerns below. \n\n1. My first concern is that the authors try to probe causality in a trained model, instead from the data. The trained model may not represent the data well nor capture the causality in the true underlying process that generates the data. In fact, the styleGAN model used is not even designed to capture causality. It is unclear why probing causality in such a trained model is useful at all. \n\n2. Even for a causal discovery model that aims to estimate causality for latent variables from the data, they often reply on heavy assumptions. Whether recovering the true parameter or the causal structure is possible is known as identifiability problem. I suggest that the authors to check some particular identifiable generative models, e.g., CausalGAN (Kocaoglu, Murat, et al. \"Causalgan: Learning causal implicit generative models with adversarial training.\" arXiv preprint arXiv:1709.02023 (2017).), not “any existing pre- trained latent variable model” shown in the abstract. In addition, I recommend the authors read some papers relevant to identifiability in latent space, e.g., Khemakhem, Ilyes, et al. \"Variational autoencoders and nonlinear ICA: A unifying framework.\" International Conference on Artificial Intelligence and Statistics. PMLR, 2020. \n\n3. The term 'latent' variables used in this manuscript is misleading. My understanding is that the authors used StyleGAN which produces style vectors. Once produced, these vectors are observed, thus are not really latent. Discovery causal relationship among observed variables have been well studied in the existing literature.   \n\n4. I am curious about the definition on the equation in ‘step 3, page4’. In causality, do’ operator has strict mathematical definition, it is unclear whether ‘do’ operator can be replaced by the RHS in the equation in theory. Or what the different between the RHS and the true ‘do’ operator. What is more, by using this definition, is the true potential outcomes equal to the ‘potential outcomes’ obtained by the equation? This is a very strange equation, it would be better if the authors can show that the potential outcomes obtained by the equation is consistent with the true outcomes in theory. \n\n5. Counterfactuals require to recover the exogenous noise variables first, which is different from intervention. I don't see the noise variables were recovered in the manuscript.  \n\n---Post-rebuttal review----\nThe counterfactual is different from intervention. What the authors did in the paper is intervention, but claimed as counterfactuals. The authors seem to point out that they followed \"section 4.1 of [9]\", where I didn't find the support. Counterfactual reasoning requires recovering the exogenous variables (a.k.a. disturbance/noise variables) first, and then performs intervention. \n\nIt remains unclear what is the benefit of probing causality in a pre-trained model which is not designed to capture causality. \n\nI am happy with the rest of the responses, thus have lifted up the score from strong rejection to rejection. ", "summary_of_the_paper": "The authors propose to discover causality for a trained man-made model. This is very unusual, as normally we would be interested in discovering causality the true underlying process that generates the true data.    \n\nMore specifically, they propose a framework called CAGE to estimate generative average treatment effects (GATEs) for probing cause-effect relationships in the so called latent space of deep generative models. They use the average treatment effects (ATEs) to infer causal directions for deep generative models' attributes and use CAGE to generate counterfactual data. They evaluate the ability of CAGE both synthetic (a variant of MNIST called MorphoMNIST) and high-resolution face dataset (CelebaHQ).\n", "summary_of_the_review": "The task is not well motivated. There are several technical issues mentioned above. I think this paper is not ready to publish. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "1: The contributions are neither significant nor novel.", "empirical_novelty_and_significance": "Not applicable"}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper proposes the framework CAGE (causal probing of deep generative models) for estimating counterfactuals and unit-level causal effects in deep generative models. CAGE employs geometrical manipulations within the latent space of a generative model to estimate the counterfactual quantities. The estimator is written in potential outcome language and assumes unconfoundedness, positivity, stable unit treatment value assumption (SUTVA), and linear separability in semantic attributes of the latent space. Furthermore, the framework considers only the case of binary treatments.  

One major concern raised by reviewers TgM5 and xP5d is that the method is based on a trained generative model, which may not be the true data-generating model. In this case, the paper appears to address statistical dependencies instead of the actual causal relationships in the real world. The authors claim to empirically show that their framework can probe unit-level (individual) causal effects. However, the reviewers are concerned that no theoretical support for the correctness of the method is provided. In other words, the problem is assumed away once a probabilistic model is assumed to be equal to the true generative model, which is almost never the case in practice and is well-known in the field. We want to encourage the authors to provide a more detailed theoretical justification, perhaps with proofs and/or references, that the proposed method can infer causal and counterfactual relationships given the underlying assumptions. 

After all, reviewers were interested but somewhat skeptical about the method's ability to learn causal and counterfactual relationships. Unfortunately, the paper is not ready for publication yet. Still, we would like to encourage the authors to take the reviews seriously and try to improve the manuscript accordingly.
Decision: Reject