Venue: NeurIPS 2021 Conference

Reviews:

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: To deal with the issue of distributional shifts between training and testing domains, the authors propose Latent Causal Invariance Models (LaCIM) consisting of both causal latent factors and non-causal latent factors and the extent of the correlations between them is governed by a domain variable. They theoretically show the identifiability of the causal latent factors and the ground-truth predicting mechanism in the proposed LaCIM. Based on the identifiability, they learn the model by reformulating VAE and then verify it on various real-world data. 
main_review: Overall I like the idea and technically the paper makes sense. Here are some of my concerns.

My main concern is that how practical the proposed LaCIM is. If I understand correctly, from Definition 4.1 we know that for any $e$, we have $S⫫Z | C$, that is, $S⫫Z | C, D$. Also, from the assumption over the prior $p_{\boldsymbol{T}, \boldsymbol{\Gamma}}$, we see that $S_i ⫫ S_j | C, D$ for any $i \neq j$ and $Z_i ⫫ Z_j | C, D$ for any $i \neq j$. These conditional independence (given $C$ and $D$) assumptions play a key role in proving the identifiability. Conversely, if the latent variables $S$ and $Z$ do not satisfy these conditional independence assumptions, the identifiability would not hold true and the proposed method would fail to identify the causal factors. Am I right? Actually, in many real-world scenarios, these assumptions do not hold. For example, when some part of Z is affected by $Y$ [1-5], or $Z$ is directly affected by $S$ [6], etc. In fact, [3,7] provided some more general approaches to covering the dependent cases for identifiability, which might be helpful to relax the assumptions in this paper. 

Another concern is that it seems in the paper that the authors did not explicitly provide the out-of-distribution generalization guarantees, i.e., some theoretical guarantees on that the learned invariant predictor can be generalized from the training environments in $\mathcal{E}_{train}$ to all the environments in $\mathcal{E}$. Proposition 4.2 is more of a definition than a proof. It might be better if the authors could provide more details about it.

The notations in Section 4.2 seem a bit messy. For example, what is $q_t$? what is $k_t$? etc. All these appear for the first time and should be explained better. In the last sentence of the caption of Figure 1, is it right that "the read and blue respectively means the invariant and varied values/distributions"? or the opposite?


**References** \
[1] Invariant Risk Minimization. Arjovsky et al. 2019 \
[2] Invariant Risk Minimization Games. Ahuja et al. 2020 \
[3] Nonlinear Invariant Risk Minimization: A Causal Approach. Lu et al. 2021 \
[4] Elements of Causal Inference: Foundations and Learning Algorithms. Peters et al., 2017. \
[5] Domain Adaptation under Target and Conditional Shift. Zhang et al., 2013. \
[6] Self-Supervised Learning with Data Augmentations Provably Isolates Content from Style. Kügelgen et al., 2021 \
[7] ICE-BeeM: Identifiable Conditional Energy-Based Deep Models Based on Nonlinear ICA. Khemakhem et al., 2020
limitations_and_societal_impact: The authors did not include any societal impact in the paper.
review_title: null

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: This paper introduces the "Latent Causal Invariance Model" (LaCIM), a structural variational autoencoder-like approach for learning to isolate causal factors from "spurious" ones in prediction to improve generalization to new environments. The authors assume a latent generative structure for the data, with separate latent constructs for causal and contextual factors. Under strong parametric assumptions and requirements on the number of source environments the authors prove identifiability of the causal factors. Experiments on imaging datasets (2 benchmarks and a small medical dataset) show LaCIM outperforms some existing domain adaptation baselines as well as Invariant Risk Minimization (IRM). Further, qualitative assessment of images generated by ablating the causal and contextual factors show disentanglement of these factors.
main_review: To the best of my knowledge, the proposed LaCIM approach is a novel and interesting approach for avoiding "spurious correlations" to improve model generalizability to new contexts. The theoretical results are quite daunting to parse, in part because the methodological ideas build off of both literature on additive noise models (ANM) in causal discovery and independent component analysis (ICA). The authors define a two step process for learning: first learning the generative model (effectively a VAE), then computing the latent representation that maximizes the likelihood for each example and fitting a classifier on top of this. The approach is reasonable, and the experiments show its potential.

I did have a number of minor concerns. The assumed causal structure makes some questionable decisions, there are untestable assumptions regarding the quality of the input data, and the experiments are designed to satisfy the assumptions of LaCIM (meaning comparisons to other methods are likely over optimistic). 

Strengths:
- The approach is novel, synthesizing ideas from ANM and ICA to new effect
- The authors prove identifiability of their model. These results are hidden behind rather dense theory, though, so I was unable to check these results.
- Promising experimental evaluation: both quantitative comparisons to other approaches as well as qualitative analysis of disentanglement of factors.

Weaknesses:
- Under the causal model assumed by LaCIM, X and Y are generated concurrently from the contextual factors Z and causal factors S. The authors note this as a strength or unexplored direction in Remark 1 (Ln 148), but for many examples it doesn't seem to make as much sense as assuming X generates or is generated by Y. For example, in Remark 1 the authors talk about disease status (Y) and ultrasound tests (X), but surely whether or not a patient has the disease will effect the results observed in the ultrasound! In most classification tasks, even in imaging, the label is the concept of interest while the observed data (i.e., the image) is a realization of that label. In the qualitative analysis (Line 349), fixing S kept the class label fixed (which the authors state as evidence that LaCIM has learned the "causal" factors), but is it not inefficient to have this redundancy in the role of Y and S? Further, what value is there in having D and C be separate? Isn't it sufficient to just have D in Fig 1c? No additional conditional independence value is added.
- The identifiablity results in Section 4.2 are very interesting, but are at times quite hard to follow. This is in part because of a general lack of clarity in this section (but in general the paper would benefit from one pass to improve writing). The authors justify many of the assumptions in Section 4.2 by pointing to other works that make these assumptions, but readers not familiar with these other works will not understand the significance or consequences of these assumptions. I think the authors assume readers will be familiar with, e.g., assumptions and techniques from ICA. 
- The authors discuss the diversity of environments. This is very important and I'm glad to see this! Condition i) (on Line 234) is untestable, right? It depends on R, the cardinality of the latent confounding construct... Does this mean, in general, a user will have no idea if they have enough data or high enough quality data to ensure the correctness of LaCIM?
- In the experiments, the authors explicitly set up different environments to try to follow the generative structure of LaCIM. But this structure does not match up with, e.g., the way the original colored MNIST dataset was generated and thus favors LaCIM. Could LaCIM be applied to the original MNIST dataset? Does IRM (which was the paper which developed the original colored MNIST datasets) outperform LaCIM then? This would speak to sensitivity of results to the causal structural assumptions which would be important to know.
- In the simulated experiment, I think it would be more relevant to examine how the number of domains and the diversity of the data affect the identifiability. Currently, the simulated experiment looks at 3 vs 5 environments, but according to diversity condition i), isn't the relevant factor how the number of environments relates to the cardinality of the latent factor C?
- Minor question: Regarding the learning procedure, won't there be a posterior over S and Z? Couldn't predictions be made by marginalizing over this posterior, rather than optimizing to compute an estimate of s*,z* and then predict $P(Y | s^*)$?



### UPDATES:
Thanks to the authors for their response. I think the greatest improvements to the paper can be made by increasing the clarity in Section 4. I think elements from the discussion of the identifiability and diversity conditions in the authors' response to my comments should be included in the main paper. I believe this will really help readers better understand the method. 

I would like to make one comment regrading the experimental methodology: In their response, the authors state that "our method can outperform all compared methods on other benchmarks that satisfy our causal structure." It should be noted that this is expected in order to demonstrate the empirical soundness and validity of the method. For a comprehensive evaluation of the utility of the method, including its possible failure cases, it should also be applied in realistic settings which *may not satisfy the untestable assumptions of the method*. The authors assume a *latent* causal structure, and, in all experiments in the main paper, modify the datasets to satisfy this assumption. But in a real world practical application, a user will not know the latent causal structure. The authors pointed to experiments on the original colored MNIST dataset in the appendix. However, the authors modified the proposed LaCIM method (i.e., used LaCIM-REx) to fit the generative structure of the original colored MNIST dataset. In my view, this defeats the purpose of this experiment, because what we want to see is how the unmodified LaCIM method behaves on the original colored MNIST dataset. For example, from a user perspective, there is no way to differentiate the data generating process (DGP) of the original colored MNIST dataset from the DGP of the modified colored MNIST dataset used by the authors. Thus, in a real use case, the user would be unable to modify the LaCIM methodology as the authors did in the supplemental experiment. Put another way, users should be able to apply the method to problems as they appear (consider, e.g., the [WILDS](https://wilds.stanford.edu/) distribution shift benchmark tasks), or be able to determine that the method is not applicable to their particular problem/application.

Thus, while I remain positive about the work, I think the authors should more clearly investigate and discuss possible limitations of the method for this paper to be a strong and comprehensive . For this reason, I am maintaining my score.
limitations_and_societal_impact: I think the authors could put some more thought into possible impacts of applying LaCIM to more realistic imaging tasks. For example, in facial recognition tasks related to, e.g., law enforcement the distinction between "causal" vs "contextual" factors could have ethical implications or could imply limitations on how LaCIM models are interpreted.
review_title: null

final_score: rating: 7: Good paper, accept
review_content: summary: This work proposes an identifiable causal model with latent variables to model spurious correlations between labels and irrelevant context (such as background or light setting) in order to construct a classifier which is robust to certain distribution shifts. The authors show under which conditions the irrelevant context and important features can be disentangled from only input observations and labels. They propose a VAE-like approach to learn the model which they use to come up with an invariant classifier. The identifiability of the model is assessed on synthetic data and the robustness to dataset shift is evaluated on multiple real world data sets, drawing a favorable picture of their contribution. 
main_review: Originality:

I have been following the literature on nonlinear ICA (from which the identifiability result is inspired) and it is the first time I see these ideas directly applied to out-of-distribution generalization. As far as I know, all important related works have been cited.

Quality:

I believe this paper presents interesting novel ideas with convincing experiments and I enjoyed reading it. However, some algorithmic decisions are not justified and the paper lacks clarity. The focus on identifiability and why it matters for dataset shift generalization is not well explained. I make some of these concerns more specific in what follows, with no specific order: 

Some assumptions appear to be implicit. For instance, the fact that q_s + q_z <= q_x. Otherwise, f_x cannot be bijective. Moreover, saying that f_x and f_y are bijective without specifying the domain and codomain of the functions is imprecise. For instance, if q_s + q_z < dim(x) and the codomain is R^dim(x), then f_x cannot be bijective. So what is the codomain?

L172: The two points are said to “...ensure the robustness of such a two-step invariant prediction, ...”. However, the aforementioned two-step procedure is only very vaguely defined up to this point in the paper, thus it was hard for me to accept that we actually want these desiderata. Maybe presenting the procedure before would help? 

That being said, even after understanding the procedure, I felt like I had to think a lot to understand why these two points (at line 172) are important to have (and I am still not sure). Could you provide a clear explanation of what would be the consequence of any of these desiderata not holding?

Definition 4.3:
Desiderata 1 (line 172) does not require M_s and M_z to be permutation-scaling matrices, right? In principle, only having “block” identifiability would be enough, no? Do you believe one could come up with weaker assumptions? If not, please mention that having permutation matrices is “extra” and not really required. 

Is it possible that $[f\_x^{-1}]\_\mathcal{S}$ maps some points of $\mathcal{X}$ outside $\mathcal{S}$? Similarly for $\mathcal{Z}$? Since the definition supposes only $\mathcal{X} \supset f\_x(\mathcal{S}\times\mathcal{Z})$, it is possible.

This definition assumes implicitly that $f\_x$ is invertible but this is not mentioned until the following theorem. This assumption should be mentionned earlier.

Theorem 4.5 introduces a notion of “asymptotic identifiability”, however, I am not sure I understand its interpretation. It would be helpful to give some intuition for its meaning. That would help me understand its value. Also, I suspect the dimensionality of the sufficient statistic is allowed to grow, however, the definition of $\mathcal{P}\_\text{exp}$ does not allow for this. Moreover, in order for the assumption of Theorem 4.4 to hold, the number of environments $m$ needs to grow as well, right? This should be clearer. I believe an interesting consequence of this Theorem is that even if the assumptions of Theorem 4.4 are not satisfied for some $p \in \mathcal{P}_\text{exp}$, it can still be approximated by an identifiable model. Is that correct (assuming the exponential model is in the appropriate Sobolev space)? 

Section 4.3.2 presents the invariant prediction procedure which, as far as I know, is not standard (which is not necessarily a bad thing). I had a hard time interpreting the meaning of it and understanding why it makes sense. I believe the author should add a few lines motivating this approach. One possible interpretation for the max in (6) is that it corresponds to a maximum a posteriori (MAP) estimation of z and s in a counterfactual model in which p(s,z|c) is replaced by p(s)p(z) (thus without correlation). But even with this interpretation, I am not completely satisfied. Of course the procedure is invariant to the environment by design, but is it optimal in some sense?

Section 5: I found the experiments sufficient and convincing. Identifiability is confirmed on synthetic experiments and out-of-distribution generalization is measured against multiple relevant baselines on three datasets. Since I do not follow closely the literature on OOD generalization, I cannot confirm that no important baseline is missing. 

I would like to see more than one latent interpolation for the dataset CMNIST. Do they all look as good as the one presented here?

Clarity:

L96: The definition of [f]_A is imprecise, usually the word “restricted” refers to the domain being restricted. At that point I did not understand it and even after reading Definition 4.3, I had to infer it from context. Please clarify.

L139: This sentence is contradictory: “In our scenario, we do not require D to be observed; rather, we only need the domain index d_e...”. This means D is observed, no?

Equation (1): I believe some notation is unnecessarily hard to follow. For instance, the $|c$ symbol should be removed from the two left factors in the first line of (1). Also, having a superscript t on T and \Gamma was a bit confusing. It led me to think that these things could depend on the actual *value* of z or s. Now I understand that this is just to allow different exponential families for Z and S. A solution would be to remove this superscript and replace it with a footnote mentioning that everything works even if we have different sufficient statistics for Z and S.
 
Some notation is implicitly defined. For instance q_s and q_z being the dimensionality of S and Z, respectively. It would help the reader to mention it explicitly in the text. Similarly for k_s and k_q, which are the dimensionality of the sufficient statistic of each s_i and z_i, respectively. What is the dimensionality of x? Again, implicitly defined on L228.

Theorem 4.4: The fifth assumption was hard to parse, even if I have some experience  with these kinds of assumptions.

L237: “... can hold unless the space of \Gamma belong to a zero-(Lebesgue) measure set.” This statement is not clear. It seems \Gamma can always take only finitely many values and thus is contained in a measure zero set, even if the assumptions are satisfied. Am I misunderstanding something?

The writing of Section 4.3.1 should be completely revised. I had a very hard time actually understanding many steps of the derivations and even just what the actual inference model (q) versus the generative model (p) are. Some conditional density functions are introduced without definitions which might explain why I could not follow. Also, is there a superscript e missing on q_\psi(y | s) at line 271. 

In Section 5: Please mention explicitly which representations are used to compute the MCC. I suppose they are the ground-truth (z,s) and the one obtained by solving (6)?

Significance:

I believe using ideas from nonlinear ICA to come up with identifiable latent models for out-of-distribution generalization is an interesting direction and could inspire more work. 






limitations_and_societal_impact: Yes.
review_title: null

final_score: rating: 6: Marginally above the acceptance threshold
review_content: summary: In this paper, the authors propose a method to estimate the invariant causal mechanism. By modeling the process as the causal graph in Fig.1 (c), the authors first provide the condition when disentangling causal factors is feasible. Based on the theoretical result, they present the method to infer causal factor and non-causal factor with X based on VAE.
main_review: The authors address an important problem in this paper. The method is with solid theoretical guarantee. The experiments validate the effectiveness of the proposed method. I like this paper. Hence I give a positive score. I possibly change my score according to the comments of other reviewers.

I have two suggestions:

1. The writing could be improved. The theoretical part is quite hard to follow. There are many notations without clear illustration, e.g. k_t,q_t, \theta. Does k_t imply the sample number and q_t imply the domain number? 

2. I suggest one additional citation, where the authors propose a method that also takes latent causal factors into account when there are distributional shifts. 

IJCAI 2017 Causal discovery from nonstationary/heterogeneous data: Skeleton estimation and orientation determination.
limitations_and_societal_impact: Yes
review_title: null

Meta-review: This paper investigates the problem that distribution shift may degrade the prediction accuracy of the learned model. It proposes a way to distinguish between the underlying causal factors and other factors, together with a strategy to deal with distribution shift by using only causal factors for prediction. The studied problem is interesting, and reviewers agree that both theoretical studies and empirical results are convincing.
Decision: Accept (Poster)