Paper: Towards Characterizing Domain Counterfactuals for Invertible Latent Causal Models (ICLR-2024)

Reviewer comment (Presentation):
I think the writing and structure of the paper can be improved. A large fraction of space is used for many theorems, some of which are not that important. I suggest moving these theorems to the appendix and only keeping Theorem 2 in section 3.2.

Author response:
“I think the writing and structure of the paper can be improved. A large fraction of space is used for many theorems, some of which are not that important. I suggest moving these theorems to the appendix and only keeping Theorem 2 in section 3.2.”
 
Thank you for your feedback. We agree that the writing of the theoretical sections can be simplified and have substantially revised Section 2 accordingly. Regarding the importance of Theorem 1 and 4, we summarize how they play critical roles in our paper below.

**Theorem 1**: This theorem establishes both necessary and sufficient conditions for counterfactual equivalence. It forms the foundational basis for subsequent theorems in our paper as it allows for easy verification of counterfactual equivalence in ILDs and can facilitate the rapid construction of counterfactual equivalence models for any given ILD.

**Theorem 4**: Together with Corollary 5, Theorem 4 demonstrates that all counterfactually equivalent ILDs share the same sparsity in intervention. This insight is crucial as it shows that constraints on the intervention set size do not exclude any equivalent ILDs, and it significantly narrows the functional space in practical applications, which leads to our model design in practice.

Reviewer comment (Experiments):
The simulated experiments look very contrived. The data generation mechanism used for creating data in these experiments is too simplistic. It consists of linear transformations followed by a leaky relu (I had to dig into a very long appendix to find this).

Author response:
“The simulated experiments look very contrived to me. The data generation mechanism used for creating data in these experiments is too simplistic.”

We apologize for any lack of clarity regarding the data-generating process in the main paper, and we have revised the simulated experiment section to clarify the form of the observation function (marked in blue). To address the concern about the simplicity of our simulated experiments, we have added additional experiments where we use a more complicated normalizing flow (based on RealNVP) for the observation function in the ground truth dataset, and our model is misspecified as either a different normalizing flow structure or a VAE structure. More details and relevant figures can be found in Appendix J.2. In summary, we observe a similar trend as that in Figure 1, using the ILD-Relax-Can model results in lower counterfactual error than the ILD-Dense model, regardless of whether the structures of $g^*$ and $g$ match. 

> Motivation of the simulated experiment.

The primary aim of our experimental section is to demonstrate the practical utility of our theoretical framework. We begin with scenarios where all our assumptions are met, then progressively explore cases where these assumptions are not fully satisfied, such as model misspecifications in the intervention size. Following the reviewer's suggestion, we have further extended our investigation to include scenarios with misspecified functional classes of $g$. Finally, in Section 5.2, we test our model design in a more practical setting where we relax the invertibility assumption.

We also wish to highlight that our simulated experiments encompass a variety of distinct latent causal mechanisms. We have investigated 10 different SCMs for all of our experiments as discussed in Appendix G.1.

Reviewer comment (Presentation):
Authors can restructure the paper to provide more room for experiments in section 5.2, and explain the methodology in detail.

Author response:
“However, I can't find an explanation of how sparsity is enforced in these experiments. In summary, I think authors can restructure the paper to provide more room for experiments in 5.2., and explain the methodology in detail.”

In Section 5.2, sparsity is enforced by using the sparse $f_\cdot$ structure (i.e. only $k$ mechanisms in $f_d$ are allowed to change across different domains) as the final layer of the VAE encoder and the initial layer of the VAE decoder. Informally, this can be thought of as the encoder of the VAE generating the Gaussian parameters in a sparse fashion and the decoder of the VAE is sparse due to its initial layer being sparse. An overview of this VAE setup can be seen in the encoder/decoder graphics in Figure 17.

Reviewer comment (Theory):
*The idea of “intervention” and “counterfactual” in this paper is nonstandard and confusing*. As standard concepts in causal inference, an “intervention” roughly means setting a variable to a specific value but leaving any other things untouched, and “counterfactual” means imagining an intervention with the *past values* of exogenous variables untouched. In the above, *the structural functions are unchanged*. However, as indicated in my summary, the “intervention” and “counterfactual” in this paper refer to totally different things, in particular, the “counterfactual” does *not* consider the past values of exogenous variables which are the gist of “counterfactual”. Explanations regarding these are necessary, and I strongly suggest *not* using the terms “intervention” and “counterfactual” in this paper.

Author response:
Thanks for the question. 

*Intervention*: We would like to first clarify the intervention considered in this paper. Here, we mainly consider soft intervention which corresponds to the change of functions in the structural assignment [1] [2]. We note this is different than a perfect intervention (e.g., a *do* intervention), as this does not completely eliminate the causal effect of the parents.

*Counterfactual*: In this work, we are specifically interested domain counterfactual queries (i.e. what would $\mathbf{x}$ look like if it had come from domain $d’$ instead of domain $d$?), which are a specific type of the general counterfactual query. Similar to the general counterfactual query, a domain counterfactual query exactly follows the three steps: abduction, action, and prediction [3]. For example, given an image $\mathbf{x}$ from domain $d$, we want to answer the question what this image would look like if it is from domain $d’$. We first use the inverse of our observation function $g$ and our latent SCM for domain $d$ to recover the exogenous noise $\epsilon$ given the evidence (abduction) as follows: $\epsilon =  f^{-1}\_{d}\circ g^{-1}(\mathbf{x})$. Then, we perform the domain intervention (action) by exchanging the original $f_{d}$ with $f\_{d’}$. Finally, we use the recovered noise and intervened SCM to predict the counterfactual $\mathbf{x}\_{d\rightarrow d’}$ (prediction). Together this approach follows: $\mathbf{x}\_{d \rightarrow d’} = g\circ f\_{d’}\circ f^{-1}\_{d}\circ g^{-1}(\mathbf{x})$. Additionally, in our empirical analysis, we pay particular attention to the variables that should remain constant during counterfactual estimation. For instance, in our ColorRMNIST experiment, a key focus is on evaluating whether the color attribute is preserved when we alter the rotation aspect. 

[1] Schölkopf, B., Locatello, F., Bauer, S., Ke, N. R., Kalchbrenner, N., Goyal, A., & Bengio, Y. (2021). Toward causal representation learning. Proceedings of the IEEE, 109(5), 612-634.

[2] Peters, J., Janzing, D., & Schölkopf, B. (2017). Elements of causal inference: foundations and learning algorithms (p. 288). The MIT Press.

[3] Pearl J Glymour M Jewell NP. Causal Inference in Statistics : A Primer. Chichester West Sussex UK: John Wiley & Sons; 2016. , p96

Reviewer comment (Theory):
*The “generalized causal mechanisms” in Prop 2 are only a subclass of “invertible SCMs”*. There is no formal definition of “invertible SCMs” in this paper; I think the definition should be like: writing the whole system of SCMs as X=f(\epsilon) and function f is invertible. In the proof of Prop 2, it assumed that each $\hat{f}^{(j)}$ is invertible. But this is not implied by the general concept/definition of “invertible SCMs” I mentioned above, because there is no guarantee that the *subsystem* involving only $z_{<j}$ is invertible; information from other variables might be needed to invert the whole system, and missing any piece of information might render the subsystems non-invertible. Hereafter, I name this class of models *“invertible autoregressive SCM (IASCM)“*.

Author response:
Thanks for pointing this out. We agree that if we only assume the invertibility of $f$, we could not guarantee that the subsystem of $\widehat{f}^{(i)}$ is invertible to $\epsilon_i$ given only $z_{<i}$. However, without loss of generality, we could assume the partial order in $z$ such that parent nodes have smaller indices, then the overall function $f$ is invertible autoregressive. We believe the confusion is that we define the invertible SCM on the subfunction $\widehat{f}$, rather than on $f$ directly.

Reviewer comment (Theory):
*The claim on the generality of the model class (Prop 1) seems problematic*. First, here the model class is IASCM. In the proof of Prop 1, the Rosenblatt transformation should be constructed for a fixed *sample point* of p(X), because each conditional CDF F_j should depend on fixed x_{<j}. Thus, we need a Rosenblatt transformation for each sample point, and we cannot construct the F_p and F_q for the whole distributions p(X) and q(\epsilon).

Author response:
We might be misunderstanding this concern, please forgive any misinterpretation if that is the case. The Rosenblatt transformation is constructed based on a *joint distribution*, not a single fixed point [1]. But perhaps the concern stems from the fact that in prop 1, $\mathbf{x}$ represents a random vector rather than a specific instantiation. It is under this case, where $\mathbf{x}$) is a *random* vector, that the Rosenblatt transformation is well-defined. Additionally, we note that the conditional CDFs are invertible w.r.t. their first argument given previous values $x_{<j}$, but the whole function is invertible because it is autoregressive. Intuitively, this means that you can recover the first variable using the 1D invertible CDF, and then recover the 2nd variable given the first recovered value, etc. Thus, we believe our original proof is correct. Does this answer your concern (perhaps we misunderstood)?

[1] Rosenblatt, Murray. “Remarks on a Multivariate Transformation.” The Annals of Mathematical Statistics, vol. 23, no. 3, 1952, pp. 470–72. JSTOR, http://www.jstor.org/stable/2236692. Accessed 17 Nov. 2023.

Reviewer comment (Theory):
*Do we have any ideas on the identifiability of the model*? This is an important question because we discuss causality. Although the theory in the paper converts IASCMs on a set of domains into an easy-to-deal-with form that is the canonical ILD. There are no discussions on the identifiability of canonical ILDs, that is, when we really try to learn the canonical ILDs, can we identify the single eq class of canonical ILDs, which contains the true one? The practical application of the proposed idea depends critically on this question.

Author response:
The identification of the causal model will allow us to infer all causal queries, to do this in practice req. This paper’s goal, however, is to work on a special type of counterfactual query, where the two interventions associated with counterfactual queries are observable. That is true for canonical form as well. Inside the canonical form, the counterfactually equivalent models are not unique. Our theory 4 characterizes that these true ones must be in the class of canonical ILDs with intervention set $k$ equal to the ground truth model. 

Furthermore, Theorem 6 in Section 3.4 in the revised manuscript , shows that, although we could not find the counterfactual and distribution equivalent model, specifying $k$ would lower the risk.  As with many hyperparameters, there is a natural bias-variance tradeoff in choosing $k$. 
If $k > k^*$, then the space of distributionally equivalent models is very large and thus the variance in estimation will be high. If $k < k^*$, then the model will be biased, i.e., there does not exist a model that is distributionally and counterfactually equivalent to the true ILD. Using our new bound on the expected counterfactual error, we also suggest multiple methods for choosing $k$ in practice, with the least assuming option being to start with a small $k$ and then increase $k$ until distributional equivalence is achieved (i.e., the data fit term is optimal, which minimizes the first term of the counterfactual error bound). Empirically, we noticed that in our current simulated experiments (Figure 15) and additional simulated experiments (Figure 34), there is a clear gap if the choice of $k$ is smaller than the ground truth $k^*$.

Reviewer comment (Theory):
*How can we understand if a practical dataset satisfies the theoretical setting*? Both high-level discussions and examples are highly desirable. For example, for MNIST datasets, how can we understand that the observable (image) is related to the latent by an injective mapping? Why the latent variables in different domains are related by invertible mappings? And in the end, what are the latent variables? Note that I do not require any precise claims on the causal structure (it is latent anyway), but even reasonable “guesses” would be very helpful.

Author response:
**Practical Dataset Satisfies the theoretical setting**:
In practice, there are many settings that satisfy the theoretical setting (if we include the relaxation to pseudo invertibility). For example, in the image regime, it is reasonable to assume that there exists a semantically meaningful latent space that can define the observed data (e.g., for MNIST this can be the label of the digit, the width of the strokes, the writing style, etc.), which is similar to the manifold hypothesis. Furthermore, for datasets with unique domains, it is reasonable to assume the domain only directly affects a subset of these latent variables (e.g., how the digit is rotated) rather than each domain entirely changing the semantic information encoded in each image [1]. Thus, for a given dataset with unique domains, if we believe the observed data can be better characterized in a latent (i.e. semantic) manner *and* there is some semantic content preserved between domains, then that dataset likely satisfies our theoretical setting.

**Latent Variables**:
We discuss this in detail in Appendix H.3, which contains conjectures on what the latent variables in the image datasets could represent. For instance, for ColorRMNIST, we expect the latent variables to correspond to four semantically meaningful concepts: the rotation of the digit (which is domain-specific), information regarding the digit label(which is domain invariant), information regarding the color label (which is domain invariant), and information regarding the writing style of the digit (e.g., how thick/straight the strokes are) which we believe to be a child of the class node(s)  (e.g., one may have a unique style of writing a 4).

[1] Schölkopf, Bernhard, et al. "Toward causal representation learning." Proceedings of the IEEE 109.5 (2021): 612-634., Sec. III.C.(c).

Reviewer comment (Theory):
I think the 2nd equality of eq2 is also by definition?

Author response:
Yes, thanks for pointing this out. We have revised the paper accordingly.

Reviewer comment (Theory):
In Def 3, point 3, I am not sure Gaussian exogenous noises are without loss of generality, any references and/or reasonings?

Author response:
If the causal variables are also continuous, then we only need to assume the exogenous noise to be continuous random variables. This is because any continuous distribution could be transformed to another continuous distribution by a continuous bijective mapping (by inverse Rosenblatt transformation and Rosenblatt transformation). This follows from the proof of Proposition 1.

Reviewer comment (Theory):
The claim of “both counterfactually and distributionally equivalent” in Theorem 2 looks strange to me. Can’t we prove that counterfactual equivalence implies distributional equivalence?

Author response:
The distribution equivalence and counterfactual equivalence are two different concepts and they do not imply each other. We will use a counterexample of a linear model with two latent variables to illustrate that counterfactual equivalence does not imply distribution equivalence. If one ILD has $g=ID$, $f_1=ID$ and $f_2=2*ID$. Following the characterization in our Theorem 1, we choose $h_1=Id$ and $h_2=\begin{bmatrix}1 & 0 \\\\ 1 & 1 \\\\ \end{bmatrix}$. With this, we construct a counterfactual equivalent ILD where $g’=ID$, $f’_1=\begin{bmatrix}1 & 0 \\\\ 1 & 1 \\\\ \end{bmatrix}$ and $f_2=\begin{bmatrix}2 & 0 \\\\ 2 & 2 \\\\ \end{bmatrix}$. For any $\mathbf{x}$, we have $g\circ f_2 \circ f_1^{-1}\circ g^{-1}(\mathbf{x})=2\mathbf{x}$ and $g’\circ f_2 \circ f_1^{\prime-1}\circ g^{\prime-1}(\mathbf{x})=2\mathbf{x}$. This validates that two ILDs are counterfactually equivalent. But the induced distribution of the first domain of ILD 1, is still standard Gaussian, where the first domain of ILD 2, is not a standard Gaussian anymore.

Reviewer comment (Novelty):
There is a related work [1] that is worth mentioning; it also considers invertible causal mechanisms, shared function between domains, and transferability between domains. See Sec 2.3, 2.4 and 3.1 in that paper.

Author response:
Thanks for mentioning this relevant paper. We have added and discussed it in our revised manuscript (See Appendix A).

Reviewer comment (Writing):
Abstract, "all non-intervened variables have non-intervened ancestors": I suggest "... have no intervened ancestors". The current sentence can be interpreted as "have some intervened ancestors".

Author response:
Thanks for the suggestion. We rewrote this part in the revised manuscript marked in blue.

Reviewer comment (Writing):
Paragraph before C1-4, "Given our assumption ... distribution equivalence": This is apparently without assumptions (1) and (2), which were stated in the preceding sentence. Please make clearer in the text that you're now considering assuming *only* (3).

Author response:
This is based on Assumption 3. We have revised the paper accordingly.

Reviewer comment (Writing):
In corollary 3, "Prop. 8" should refer to definition 8.

Author response:
We have revised the paper accordingly.

Reviewer comment (Theory):
Section 3.3: "establish on" should be something else. These sentences should emphasize that you'll now be assuming continuity of \( f \) and \( g \) (so remove "the" and rewrite). In corollary 5, no requirement of continuity is currently stated, but I think it is needed. Also, just above the corollary, what do you mean with "and not ill-defined"?

Author response:
We have edited these sections to be more clear (e.g., we added a constraint that $(g, f_d)$ for all $d$ are continuous in Corollary 5).