SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Extension beyond binary Above theorems are presented in its bivariate and multivariate forms for binary variables. In general, it is easy to extend the results to categorical variables* . Just as the progression of the proofs for de Finetti's theorem, we hypothesize causal de Finetti holds true for continuous variables. Here we state the theorem in its multivariate form for categorical variables.
Theorem 4 (Causal de Finetti - multivariate and categorical). Consider an infinite sequence of size- $d$  random arrays  $\{(X_{1:n}, X_{2:n}, \ldots, X_{d:n})\}_{n \in \mathbb{N}}$ , where each variable  $X_{i:n}$  takes values in  $\{1, \ldots, k_i\}$ . The sequence is:
$$
X _ {i; [ n ]} \perp \overline {{\boldsymbol {N D}}} _ {i; [ n ]}, \boldsymbol {N D} _ {i; n + 1} | \boldsymbol {P A} _ {i; [ n ]}
$$
if and only if there exist  $d$  random variables where  $\pmb{\theta}_i\in [0,1]^{k_i\times \prod_{X_j\in P_{A_i}}k_j}$  and every column of  $\pmb{\theta}_i$  sum to 1 with suitable probability measures  $\{\nu_i\}$  such that the joint probability can be written as
$$
P \left(\mathbf {x} _ {:, 1: N}\right) = \int \int \prod_ {n = 1} ^ {N} \prod_ {i = 1} ^ {d} p \left(x _ {i; n} \mid \boldsymbol {p} \boldsymbol {a} _ {i; n}, \boldsymbol {\theta} _ {i}\right) d v _ {1} \left(\boldsymbol {\theta} _ {1}\right) \dots d v _ {d} \left(\boldsymbol {\theta} _ {d}\right), \tag {9}
$$
4 Identifiability Result
The causal de Finetti theorems show that exchangeable processes can be represented as ICM generative process when certain CI statements hold. However, such a representation is only really useful for causal discovery if it is unique - in other words we would like if only one such decomposition were possible for any given exchangeable process. This property is called identifiability. In this section we study the identifiability of ICM generative process. We start by introducing graphical terminology.
Definition 4 (Acyclic directed mixed graph (ADMG) (Richardson, 2003)). An acyclic directed mixed graph can contain two types of edges: directed  $\rightarrow$  or bi-directed  $\leftrightarrow$ . When an ADMG does not contain any bi-directed edge, it becomes a directed acyclic graph (DAG).
Definition 5 ( $\mathcal{I}$ -map (Koller and Friedman, 2009)). Given  $P$  is a distribution,  $\mathcal{I}(P)$  denotes the set of conditional independence relationships of the form  $X \perp Y \mid Z$  that hold in  $P$ . Given  $\mathcal{G}$  be a ADMG,  $\mathcal{I}(\mathcal{G})$  denotes the set of conditional independence assumptions encoded in  $\mathcal{G}$  which can be directly read-off via m-separation (Zhang and Spirtes, 2012). When  $\mathcal{G}$  is a DAG,  $\mathcal{I}(\mathcal{G})$  can be directly read-off via d-separation (Pearl, 1988).
Definition 6 (Global Markov property and faithfulness (Zhang and Spirtes, 2012)). Given a ADMG  $\mathcal{G}$  and a joint distribution  $P$ , the distribution satisfies global Markov property with respect to  $\mathcal{G}$  if  $\mathcal{I}(\mathcal{G}) \subseteq \mathcal{I}(P)$ . Sometimes it is also called  $P$  is Markovian with respect to  $\mathcal{G}$ . We say  $P$  is faithful to  $\mathcal{G}$  if  $\mathcal{I}(P) \subseteq \mathcal{I}(\mathcal{G})$ .
Definition 7 defines the mapping from causal graphs generated under an i.i.d. process to those generated under an exchangeable process. The latent variables in causal de Finetti theorems can be represented by bi-directed edges in Definition 4.
Definition 7 (ICM operator on a DAG). Let  $U$  be the space of all DAGs whose nodes represent  $X_{1},\ldots ,X_{d}$ . Let  $V$  be the space of ADMGs whose nodes represent  $\{(X_{i;n})\}$ , where  $i\in [d],n\in \mathbb{N}$ . A mapping  $F$  from  $U$  to  $V$  is an ICM operator if  $F(\mathcal{G})$  satisfies:
-  $F(\mathcal{G})$  restricted to the subset of vertices  $\{X_{1:n},\ldots ,X_{d:n}\}$  is a DAG  $\mathcal{G}$ , for any  $n\in \mathbb{N}$
-  $X_{i;n} \leftrightarrow X_{i;m}$  whenever  $n \neq m$  for all  $i \in [d]$
$^{*}$  (Barrett and Leifer, 2009) provides an alternative proof of conditional de Finetti in quantum theory for categorical variables.
We denote the resulting ADMG as  $ICM(\mathcal{G})$ . Let  $PA_{i;n}^{\mathcal{G}}$  denote the parents of  $X_{i;n}$  in  $ICM(\mathcal{G})$  and similarly for  $ND_{i;n}^{\mathcal{G}}$  for corresponding non-descendants.
Theorem 5 (Identifiability Theorem). Consider the set of distributions that are both Markovian and faithful to  $ICM(\mathcal{G})$ , i.e.,  $\mathcal{E}(\mathcal{G}) \coloneqq \{P : \mathcal{I}(P) = \mathcal{I}(ICM(\mathcal{G}))\}$ . Then,
$$
\mathcal {E} \left(\mathcal {G} _ {1}\right) = \mathcal {E} \left(\mathcal {G} _ {2}\right) i f a n d o n l y i f \mathcal {G} _ {1} = \mathcal {G} _ {2} \tag {10}
$$
The set of graphs  $\{\mathrm{ICM}(\mathcal{G})\}$  characterizes the set of causal graphs for data sampled from ICM-generative processes. Given any two causal structures  $\mathcal{G}_1$  and  $\mathcal{G}_2$  underlying data sampled from ICM-generative processes, we say they are Markov equivalent if  $\mathcal{E}(\mathcal{G}_1) = \mathcal{E}(\mathcal{G}_2)$ . Theorem 5 states given a distribution  $P$  that is Markovian and faithful to  $I_{CM}(\mathcal{G})$ , one can identify its unique causal structure as each graph induces unique conditional independences. See Appendix C for proof.
Connection to i.i.d. Causal de Finetti theorems though stated formally under exchangeable process, it automatically holds for data generated under an i.i.d. process. When observing i.i.d. data, the measures  $\nu_{i}$  in (8) are Dirac measures, and the de Finetti parameters  $\{\theta_i\}$  are deterministic, i.e., fixed across multiple samples generated from the process. The identifiability theorem stated here, however, excludes distributions generated by marginally i.i.d. processes. It requires  $P$  to be faithful to  $ICM(\mathcal{G})$ . If any one of the marginal distributions of  $P$  can collapse to an i.i.d. process, i.e., there exists an index  $d$  such that  $P(X_{d;1},\ldots ,X_{d;N}) = \prod_{n}P(X_{d;n})$ , then  $P$  is not faithful to  $ICM(\mathcal{G})$  since it contains extra conditional independence relationships. Fig. 2 illustrates that compared to i.i.d process, ICM-generative processes enable unique causal structure identification.
5 Causal Structure Learning in Multi-environment Data
We established in Thm. 5 that causal structure is identifiable in ICM generative models by testing for CI relationships in exchangeable data. For example, if  $Y_{i} \perp X_{j} \mid X_{i}$  holds for an exchangeable pair  $(X_{n},Y_{n})$ , we conclude that  $X \to Y$ , i.e.  $X$  causes  $Y$ . But how exactly does one test for this in data?
To test if a CI statement holds between a set of random variables, one typically requires multiple samples, that is i.i.d. copies of the variables in question. Similarly, to apply our identification results in practice, we need access to multiple i.i.d. copies of the exchangeable pair  $(X_{n},Y_{n})$ ,  $n\in \mathbb{N}$  (see Def. 2). Each copy of  $\{(X_n,Y_n)\}_{n\in \mathbb{N}}$  gives us a whole dataset containing a sequence of individual pairs, thus, we need multiple independent datasets to test for the CI condition. This requirement for multiple datasets connects our work to grouped or multi-environment data.
In the causal literature, grouped data refers to data available from multiple environments, each producing (conditionally) i. i. d observations from a different distribution, which are related through some invariant causal structure shared by all environments. Grouped data underlies a wide range of causal discovery approaches (Arjovsky et al., 2019; Heinze-Deml et al., 2018; Huang et al., 2020; Peters and Meinshausen, 2016; Rojas-Carulla et al., 2018; Tian and Pearl, 2001). We can interpret multi-environment data through the lens of exchangeability as follow: In each environment  $e \in \mathcal{E}$ , we observe exchangeable samples  $\mathbf{X}_{::1:N_e}^e = \{(X_{1:n}^e, \dots, X_{d:n}^e)\}_{n=1\dots N_e}$ , where  $X_{d:n}^e$  denotes the  $d$ -th random variable in  $n$ -th sample in environment  $e$  and  $N_e$  is the number of samples from environment  $e$ . Data across environments are independent and identically distributed in the sense that the distribution of  $\mathbf{X}_{::1:N}^e$  and  $\mathbf{X}_{::1:N}^{e'}$  is identical for all  $N < \min(N_e, N_{e'})$ . Each environment thus provides a finite marginal of an i. i. d copy of the same exchangeable process, just as we needed for testing CI. Alternatively, one can also interpret environments as samples from latent variables, i.e.  $(\theta^e, \psi^e)$  i.i.d. drawn from  $p(\theta), p(\psi)$  characterizes environment  $e$ .
Next, we propose the Causal-de-Finetti algorithm, which guarantees to recover the DAG given multi-environment data consistent with ICM. In particular, the algorithm utilizes two samples per environment and a sufficiently large number of independent environments to enable identification.
Notation: As every sample in all environments shares the same causal structure, we sometimes abbreviate the variable  $X_{i:n}^{e}$  to  $X_{i:n}$  or  $X_{i}$ . The results proved under abbreviated indices mean the abbreviated indices could take any values and the result remains the same. Let  $S_{n}$  denotes the set containing nodes belong to  $n$ -th rank in a DAG  $\mathcal{G}$ 's topological ordering. (See details in Appendix D)
- there are no other edges other than stated above
Lemma 1. A node  $X_{i;n}\in S_1$  if and only if for every  $m\neq n$  and  $j\neq i$ $X_{i;n}\perp X_{j;m}\mid \{X_{k;n}\}_{k\neq i}.$
Lemma 2. Let node  $X_{i} \in S_{n}$  and  $X_{j} \in S_{m}$  where  $m < n$ . Set  $k \coloneqq n - m$ . There does not exist a directed edge from  $X_{i}$  to  $X_{j}$  if and only if when  $k = 1$ ,  $X_{i} \perp X_{j} \mid S_{>n}$ ; and when  $k > 1$ :  $X_{i} \perp X_{j} \mid Z$ , where  $Z = S_{>n} \cup (\mathbf{PA}_{j} \cap S_{<n}) \cup (S_{n} \backslash X_{i})$ .
Lemma 1 states the necessary and sufficient conditions to identify leaf nodes. Lemma 2, intuitively says, to decide whether  $X_{i}$  and  $X_{j}$  have a direct edge, one should block all the potential non-directed paths. Step 1 of the algorithm is to iteratively identify and remove the current set of leaf nodes, and then search for the next set of leaf nodes until all nodes have been classified into their topological orders. Step 2 of the algorithm is to apply Lemma 2 to determine the existence of an edge between different topological orders. Algorithm 1 in Appendix D details the exact procedure.
We benchmark our method's performance against several state-of-the-art methods. As a measure of performance against methods for heterogeneous data, we compare against CD-NOD (Huang et al., 2017, 2020; Zhang et al., 2017). As a measure of performance against methods designed for i.i.d. data, we compare with common causal structure learning algorithms, e.g. FCI (Spirtes et al., 1995), GES (Chickering, 2002), NOTEARS (Zheng et al., 2018), DirectLinGAM (Shimizu et al., 2011) and PC algorithm (Spirtes et al., 2000b). Lastly, we compare with a random guess baseline.
Bivariate Causal Discovery We generate multi-environment data as described in Section 5. Latent factors  $\mathbf{N}$  were randomly generated with distinct and independent elements in each environment. Samples within each environment have the noise variables  $\tilde{\mathbf{N}}$  generated via Laplace distributions conditioned on the latent factor. We observe bivariate data  $\mathbf{X} \in \mathbb{R}^2$  with  $X_1$  and  $X_2$  denotes the first and second entry of  $\mathbf{X}$  and aim to uncover the causal direction between  $X_1$  and  $X_2$ . Let  $e$  denote variables contained in environment  $e$ .
$$
\begin{array}{l} \mathbf {N} ^ {\mathbf {e}} \sim \mathcal {U} [ - 1, 1 ] \\ \tilde {\mathbf {N}} ^ {\mathrm {e}} \sim \operatorname {L a p l a c e} (\mathbf {N}, 1) \\ \mathbf {X} ^ {\mathrm {e}} = \mathbf {A} ^ {\mathrm {e}} \tilde {\mathbf {N}} ^ {\mathrm {e}} + \mathbf {B} ^ {\mathrm {e}} \tilde {\mathbf {N}} ^ {\mathrm {e} \circ 2} \mathbb {1} _ {\text {n o n l i n e a r}} (e) \\ \end{array}
$$
where  $\circ 2$  denotes elementwise square operation. Specifically,  $\mathbf{A}^e\in \mathbb{R}^{2\times 2}$  is a randomly sampled triangular matrix and  $\mathbf{B}^{\mathrm{e}} = \mathbf{A}^{\mathrm{e}} - \mathbf{I}$ . We randomly sample bivariate structures,  $X_{1}\rightarrow X_{2},X_{2}\rightarrow$ $X_{1},X_{1}\perp X_{2}$ , by ensuring  $\mathbf{A}$  is either a lower triangular, upper triangular or diagonal matrix. Our data further simulates a realistic situation, i.e., the causal structure remains invariant with changing functional relationships across environments. This is implemented by randomly sampling the existence of nonlinear dependence indicator  $\mathbb{1}_{\mathrm{nonlinear}}(e)$  per environment. We perform three conditional independence tests with  $\alpha = 0.05$  and output our estimate as the causal structure corresponding to the test with the highest  $p$ -value. We repeat the experiment for 100 times and report the proportion of correct causal direction identified with varying numbers of environments. Figure 3(a) shows the proportion of correct bivariate causal direction detected as the number of environments  $|\mathcal{E}|$  increases and the number of observations within each environment as fixed to be 2. We observe Causal-de-Finetti algorithm outperforms all the other state-of-the-art methods and its accuracy converges close to  $100\%$ . This demonstrates its capability to handle datasets with limited samples per environment and changing functional relationships across environments.
Multivariate Causal Structure Discovery We further test our algorithm's performance in identifying multivariate causal structure. We randomly generate causal graphs with 3 variable nodes where each variable takes binary values. Figure 3(b) shows the Structural Hamming Distance (Tsamardinos et al., 2006) between true and estimated DAG averaged over 100 experiments. We again observe Causal-de-Finetti outperforms all the other baselines, which validates our identifiability theorem and demonstrates algorithms designed for i.i.d. data does not work in our setting.
(a) Bivariate causal discovery
(b) Multivariate structure learning
Figure 3: Our method's ("Causal-de-Finetti") performance in identifying the correct underlying DAG, compared to the "CD-NOD", "FCI", "GES", "NOTEARS", "DirectLinGAM", "PC", "Random" baseline in bivariate and multivariate settings. Shown are the mean and  $95\%$  confidence interval of the standard error of the mean for each method aggregated over 100 experiments. "Causal-de-Finetti" identifies unique causal structures and is robust against changing functions across environments.
Causal exchangeability Dawid (2021) introduces a decision-theoretic framework for causality and uses pre-treatment and post-treatment exchangeability as foundational assumptions on external data used to solve the decision problem. Jensen et al. (2020) studies object conditioning and show its probabilistic interpretations can be explained using exchangeability. Object conditioning, due to exchangeability, thus mitigates latent confounding and measurement errors for causal inference. Our work provides a statistical understanding of ICM assumption: it is equivalent to assuming exchangeability and certain conditional independence conditions.
Causal structure learning Within the study of i.i.d. data, it is well-known that one can only identify causal structures up to Markov equivalence classes (Pearl, 1988), and going beyond that is known to be impossible without further parametric constraints (Hoyer et al., 2008b; Shimizu et al., 2006). A recent line of work considers a mixture of observational multi-environment data and interventional data to perform inference: Arjovsky et al. (2019); Peters and Meinshausen (2016); Rojas-Carulla et al. (2018) use causal invariance property to discover stable predictors and Huang et al. (2017, 2020) estimate kernel mean embeddings of heterogenous data distributions to test the independence of causal mechanisms. Monti et al. (2020) discovers bivariate causal direction by first recovering the underlying generating sources and then performing conditional independence tests on the recovered source factors. These algorithms on non-i.i.d. grouped data all demonstrate success, though it is unclear the connection between causal assumptions and probabilistic implications of grouped data. Our work observes that grouped data is akin to exchangeable sequences, containing richer conditional independence structures. In particular, ICM-generative processes with a sufficient number of environments allow unique causal structure identification.
Relations to causality in time-series The study of data generated from i.i.d. process, exchangeable process, and time-series can be seen as a progression to understand more structured data. Appendix E details the connections between ICM-generative processes and causality in time series (Runge, 2020).
Conclusion We prove causal de Finetti theorems formalizing the independent causal mechanism assumption in data generating processes as concrete statistical conditions. We call the induced generative models ICM-generative processes. For data sampled from ICM-generative processes, we show that one can identify unique causal structure. We build the connection between exchangeable and grouped data and justify the success of many methods leveraging ICM and algorithms in non-i.i.d. grouped data. Going beyond the i.i.d. assumption has been the bottleneck to applying machine learning to real-world situations. Rather than considering it a nuisance, our work shows an example of a theoretical advantage of exchangeable data in causal structure identification.
Acknowledgement S.G. would like to acknowledge helpful discussions with Damon Wishick on understanding causal de Finetti theorem in multi-environment data and Thijs van Ommen for his constructive feedback in the reviewing process which corrected the original version of Lemma 2.
W. Kirsch. An elementary proof of de Finetti's theorem. Statistics & Probability Letters, 151(1), 2019.
A. Klenke. Probability Theory: A Comprehensive Course. World Publishing Corporation, 2008.
D. Koller and N. Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009.
F. Locatello, S. Bauer, M. Lucic, G. Raetsch, S. Gelly, B. Scholkopf, and O. Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. In international conference on machine learning, pages 4114-4124. PMLR, 2019.
K. Madan, N. R. Ke, A. Goyal, B. Schölkopf, and Y. Bengio. Fast and slow learning of recurrent independent mechanisms. arXiv preprint arXiv:2105.08710, 2021.
R. P. Monti, K. Zhang, and A. Hyvarinen. Causal discovery with general non-linear relationships using non-linear ica. In Uncertainty in artificial intelligence, pages 186-195. PMLR, 2020.
B. O'Neill. Exchangeability, correlation, and bayes' effect. International statistical review, 77(2): 241-250, 2009.
G. Parascandolo, N. Kilbertus, M. Rojas-Carulla, and B. Scholkopf. Learning independent causal mechanisms. In Proceedings of the 35th International Conference on Machine Learning (ICML), volume 80 of Proceedings of Machine Learning Research, pages 4033-4041. PMLR, 2018.
J. Pearl. Probabilistic reasoning in intelligent systems: networks of plausible inference. Morgan Kaufmann, 1988.
J. Pearl. Causality: Models, Reasoning and Inference. Cambridge University Press, New York, 2nd edition edition, 2009.
J. Peters and N. Meinshausen. Causal inference using invariant prediction: identification and confidence intervals. Journal of the Royal Statistical Society, Series B:947-1012, 2016.
J. Peters, J. M. Mooij, D. Janzing, and B. Scholkopf. Causal discovery with continuous additive noise models. 2014.
J. Peters, D. Janzing, and B. Schölkopf. Elements of Causal Inference: Foundations and Learning Algorithms. 2017.
T. Richardson. Markov Properties for Acyclic Directed Mixed Graphs. Scandinavian Journal of Statistics, 30(1):145-157, 2003.
M. Rojas-Carulla, B. Scholkopf, R. Turner, and J. Peters. Invariant models for causal transfer learning, 2018.
J. Runge. Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets. In Conference on Uncertainty in Artificial Intelligence, pages 1388-1397. PMLR, 2020.
B. Scholkopf, D. Janzing, J. Peters, E. Sgouritsa, K. Zhang, and J. Mooij. On causal and anticausal learning. In ICML, 2012.
B. Scholkopf, F. Locatello, S. Bauer, R. N. Ke, N. Kalchbrenner, A. Goyal, and Y. Bengio. Towards causal representation learning. Proceedings of the IEEE, 109(5):612-634, 2021.
S. Shimizu, P. O. Hoyer, A. Hyvarinen, and A. Kerminen. A Linear Non-Gaussian Acyclic Model for Causal Discovery. Journal of Machine Learning Research, 7:2003-2030, 2006.
S. Shimizu, T. Inazumi, Y. Sogawa, A. Hyvarinen, Y. Kawahara, T. Washio, P. O. Hoyer, K. Bollen, and P. Hoyer. Directlingam: A direct method for learning a linear non-gaussian structural equation model. Journal of Machine Learning Research-JMLR, 12(Apr):1225-1248, 2011.
P. Spirtes and T. S. Richardson. A polynomial time algorithm for determining dag equivalence in the presence of latent variables and selection bias. In D. Madigan and P. Smyth, editors, Proceedings of the Sixth International Workshop on Artificial Intelligence and Statistics, volume R1 of Proceedings of Machine Learning Research, pages 489-500. PMLR, 04-07 Jan 1997. Reissued by PMLR on 30 March 2021.
P. Spirtes, C. Meek, and T. Richardson. Causal inference in the presence of latent variables and selection bias. In Proceedings of the Eleventh Conference on Uncertainty in Artificial Intelligence, UAI'95, page 499-506, San Francisco, CA, USA, 1995. Morgan Kaufmann Publishers Inc. ISBN 1558603859.
P. Spirtes, C. Glymour, R. Scheines, S. Kauffman, V. Aimale, and F. Wimberly. Constructing bayesian network models of gene expression networks from microarray data. 2000a.
P. Spirtes, C. N. Glymour, R. Scheines, and D. Heckerman. Causation, prediction, and search. MIT press, 2000b.
J. Tian and J. Pearl. Causal Discovery from Changes. In Proceedings of the 17th Annual Conference on Uncertainty in Artificial Intelligence (UAI), pages 512-522, 2001.
I. Tsamardinos, L. Brown, and C. Aliferis. The max-min hill-climbing bayesian network structure learning algorithm. Machine Learning, 65:31-78, 10 2006. doi: 10.1007/s10994-006-6889-7.
J. Zhang and P. L. Spirtes. A transformational characterization of markov equivalence for directed acyclic graphs with latent variables. arXiv preprint arXiv:1207.1419, 2012.
K. Zhang and A. Hyvarinen. On the Identifiability of the Post-Nonlinear Causal Model. In Proceedings of the Twenty-Fifth Conference on Uncertainty in Artificial Intelligence, 2009.
K. Zhang, B. Huang, J. Zhang, C. Glymour, and B. Schölkopf. Causal discovery from nonstationary/heterogeneous data: Skeleton estimation and orientation determination. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence (IJCAI), pages 1347-1353, Aug. 2017. doi: 10.24963/ijcai.2017/187.
X. Zheng, B. Aragam, P. Ravikumar, and E. P. Xing. DAGs with NO TEARS: Continuous Optimization for Structure Learning. In Advances in Neural Information Processing Systems, 2018.