SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Yonghan Jung<sup>1</sup>, Iván Díaz<sup>2</sup>, Jin Tian<sup>3</sup>, and Elias Bareinboim<sup>4</sup>
$^{1}$ Purdue University jung222@purdue.edu
$^{2}$ New York University ivan.diaz@nyu.edu
<sup>3</sup>Iowa State University jtian@iastate.edu
$^{4}$ Columbia University eb@cs.columbia.edu
Learning cause and effect relations is arguably one of the central challenges found throughout the data sciences. Formally, determining whether a collection of observational and interventional distributions can be combined to learn a target causal relation is known as the problem of generalized identification (or  $g$ -identification) [Lee et al., 2019]. Although  $g$ -identification has been well understood and solved in theory, it turns out to be challenging to apply these results in practice, in particular when considering the estimation of the target distribution from finite samples. In this paper, we develop a new, general estimator that exhibits multiply robustness properties for  $g$ -identifiable causal functionals. Specifically, we show that any  $g$ -identifiable causal effect can be expressed as a function of generalized multioutcome sequential back-door adjustments that are amenable to estimation. We then construct a corresponding estimator for the  $g$ -identification expression that exhibits robustness properties to bias. We analyze the asymptotic convergence properties of the estimator. Finally, we illustrate the use of the proposed estimator in experimental studies. Simulation results corroborate the theory.
Performing causal inferences is a crucial aspect of scientific research with broad applications ranging from the social sciences to economics, biology to medicine. It provides a set of principles and tools to draw causal conclusions from a combination of observations and experiments. Two significant tasks in the realization of these inferences are causal effect identification and estimation. Causal effect identification concerns determining the conditions under which one can infer the causal effect  $P(Y = y|do(X = x))$  (shortly,  $P(y|do(x))$ ) of the treatment  $X = x$  on the outcome  $Y = y$  from a combination of available data distributions and a causal graph depicting the data-generating process [Pearl, 2000, Baireinboim and Pearl, 2016]. Causal effect estimation aims to develop an estimator for the identified causal effect expression using a set of finite samples.
Recent advances in the literature on generalized causal effect identification (g-identification) have developed algorithms that can identify causal effects by using a set of observational and experimental distributions and a causal graph. The result is an expression of the causal effect as a function of available observational and experimental distributions [Bareinboim and Pearl, 2012, Lee et al., 2019]. For concreteness, consider some practical scenarios that exemplify g-identification.
Example 1. Many studies have investigated how a training program's eligibility  $(X)$  affects future salary  $(Y)$  (e.g.,[Glynn and Kashin, 2017]). Actual registration in the program  $(Z)$  determines the salary, and experimental studies have looked into how  $Z$  affects  $Y$  (e.g., [LaLonde, 1986]). Eligibility is determined by past average income  $(W)$ , which is associated with both  $Z$  and  $Y$ . The causal
(b)
Figure 1: Causal graphs of examples 1 and 2. The nodes representing the treatment and the outcome are marked in blue and red, respectively.
graph in Fig. 1a shows the data-generating process, with bidirected edges indicating unmeasured confounders affecting the variables. According to Lee et al. [2019], the causal effect  $P(y|do(x))$  can be identified by combining the experimental distribution on  $Z$  (denoted  $P(\cdot |do(z))$ ) with the observational distribution  $P$ . It's given as  $P(y|do(x)) = \sum_{z,w}P(y|do(z))P(z|w,x)P(w)$ .
Example 2. There have been many experimental studies on the effect of an antihypertensive drug  $(X_{1})$  on blood pressure  $(W)$  (e.g., Hansson et al. [1999]) and on the effect of using an anti-diabetic drug  $(X_{2})$  on cardiovascular disease  $(Y)$  (e.g., Ajjan and Grant [2006], Kumar et al. [2016]).  $R$  is a set of mediators. Their relations are depicted in Fig. 1b. Recent studies report that simultaneously taking antihypertensive and anti-diabetic drugs may be harmful [Ferrannini and Cushman, 2012]. This motivates the study of the combined causal effect of both treatments (i.e.,  $P(y|do(x_1,x_2)))$  by combining the two experimental studies (i.e., from  $P(\cdot |do(x_1))$  and  $P(\cdot |do(x_2))$ ). According to Lee et al. [2019], it turns out that  $P(y|do(x_1,x_2)) = \sum_{r,w}P(y|r,w,do(x_2))P(r|x_2,do(x_1))\sum_{x_2'}P(w|r,x_2',do(x_1))P(x_2'|do(x_1))$ , which means that the joint treatment effects can be computed using the two experimental studies on  $X_{1}$  and  $X_{2}$ .
On the other hand, causal effect estimation has mainly focused on limited identification scenarios, relying on stringent assumptions such as the no unmeasured confounder assumption. Beyond these restrictions, recent progress has been made in developing statistically appealing estimators from observational data for any identification functional given by the complete identification algorithms [Jung et al., 2020a,b, 2021b,a, Bhattacharya et al., 2022, Xia et al., 2021]. While these estimators are capable of estimating any identification expression from observational data, they are not yet sufficiently advanced to estimate g-identification, which involves multiple observations and experiments.
Recently, Jung et al. [2023] generalized existing doubly robust estimators [Mises, 1947, Bickel et al., 1993, Robins and Rotnitzky, 1995, Bang and Robins, 2005, Robins et al., 2009, van der Laan and Gruber, 2012, Luedtke et al., 2017, Chernozhukov et al., 2018, Rotnitzky et al., 2021] to estimate covariate adjustments (e.g., back-door adjustment [Pearl, 1995], sequential back-door (SBD) adjustment [Pearl and Robins, 1995] or multi-outcome SBD (mSBD) [Jung et al., 2021b]) in the g-identification setting, where the expression is in the form of covariate adjustment involving multiple experimental distributions. However, the covariate adjustments only cover a limited portion of all g-identifiability scenarios as in Examples (1,2). On a different thread, Xia et al. [2023] developed a neural network-based estimation framework capable of taking a combination of observational/experimental data. Still, the derived estimators do not possess the doubly robustness property. In other words, there is still a gap between g-identification and causal effect estimation.
In this paper, our goal is to bridge the gap between g-identification and causal effect estimation. Specifically, this paper presents a framework for estimating identification expressions using multiple sets of samples from both observational and interventional distributions. This framework is a generalization of the results in Jung et al. [2021b] since our results reduce to theirs when only observational data is available. Furthermore, our work subsumes the results in Jung et al. [2023] when the identification functional takes the form of covariate adjustments.
The contributions of our paper are as follows:
1. We show that any causal effects identifiable by g-identification can be expressed as a function of generalized mSBD adjustments. We provide a systematic procedure for specifying the function.
2. After developing a doubly robust estimator for generalized mSBD adjustments, we construct an estimation framework for any g-identifiable causal effects, which enjoys multiply robustness against model misspecification and bias. Experimental studies corroborate our results.
We use bold letters  $(\mathbf{X})$  to denote a random vector and  $X$  a random value. Each random vector is represented with a capital letter  $(\mathbf{X})$  and its realized value with a small letter  $(\mathbf{x})$ . Given a set  $\mathbf{X} = \{X_1, \dots, X_n\}$  aligned by an order  $\prec$  such that  $X_i \prec X_j$  for  $i < j$ , we denote  $\overline{\mathbf{X}}^i := \{X_1, \dots, X_i\}$  and  $\overline{\mathbf{X}}^{i:j} := \{X_i, \dots, X_j\}$ . For a discrete vector  $\mathbf{X}$ , we use  $\mathbb{1}_{\mathbf{x}}(\mathbf{X})$  to represent the indicator function such that  $\mathbb{1}_{\mathbf{x}}(\mathbf{X}) = 1$  if  $\mathbf{X} = \mathbf{x}$ ;  $\mathbb{1}_{\mathbf{x}}(\mathbf{X}) = 0$  otherwise. We use  $[n] := \{1, \dots, n\}$  as a collection of index. For a discrete vector  $\mathbf{V}$ , we use  $P(\mathbf{v}) := P(\mathbf{V} = \mathbf{v})$  where  $P$  is a distribution. We use  $\mathbb{E}_P[f(\mathbf{V})] := \sum_{\mathbf{v} \in \mathfrak{S}_{\mathbf{V}}} f(\mathbf{v}) P(\mathbf{v})$  for a function  $f$ , where  $\mathfrak{S}_{\mathbf{V}}$  denote the support of  $\mathbf{V}$ . We will use  $\mathfrak{D}_{\mathbf{V}}$  to denote the domain of  $\mathbf{V}$ . For a sample set  $D := \{\mathbf{V}_{(i)}\}_{i=1}^{n}$  where  $\mathbf{V}_{(i)}$  denotes the  $i$ th samples, we use  $\mathbb{E}_D[f(\mathbf{V})] := (1/n)\sum_{i=1}^{n} f(\mathbf{V}_{(i)})$ . We use  $\|f\|_P := \sqrt{\mathbb{E}_P[\{f(\mathbf{V})\]^2]}$ . If a function  $\widehat{f}$  is a consistent estimator of  $f$  having a rate  $r_n$ , we will use  $\widehat{f} - f = o_P(r_n)$ . We will say  $\widehat{f}$  is  $L_2$ -consistent if  $\|f - f\|_P = o_P(1)$ . We will use  $\widehat{f} - f = O_P(1)$  if  $\widehat{f} - f$  is bounded in probability. Also,  $\widehat{f} - f$  is said to be bounded in probability at rate  $r_n$  if  $\widehat{f} - f = O_P(r_n)$ . We use the typical graph terminology  $pa(\mathbf{C})_G, ch(\mathbf{C})_G, de(\mathbf{C})_G, an(\mathbf{C})_G$  to represent the union of  $\mathbf{C}$  with its parents, children, descendants, ancestors in the graph  $G$ . We use pre( $\mathbf{C}; G$ ) to denote the union of the predecessors of  $C_i \in \mathbf{C}$  given a topological order  $\prec_G$  over a graph  $G$ . We use  $G(\mathbf{C})$  to denote the subgraph of  $G$  over  $\mathbf{C}$ . Throughout the paper, we will assume a fixed topological order  $\prec_G$  over  $\mathbf{V}$  on  $G$ .
Structural Causal Models (SCMs). We use Structural Causal Models (SCMs) as our framework [Pearl, 2000, Baireinboim et al., 2022]. An SCM  $\mathcal{M}$  is a quadruple  $\mathcal{M} = \langle \mathbf{U},\mathbf{V},P(\mathbf{U}),F\rangle$  .  $\mathbf{U}$  is a set of exogenous (latent) variables following a joint distribution  $P(\mathbf{U})$  .  $\mathbf{V}$  is a set of endogenous (observable) variables whose values are determined by functions  $F = \{f_{V_i}\}_{V_i\in \mathbf{V}}$  such that  $V_{i}\gets$ $f_{V_i}(pa_i,u_i)$  where  $PA_{i}\subseteq V$  and  $U_{i}\subseteq U$  . Each SCM  $\mathcal{M}$  induces a distribution  $P(\mathbf{V})$  and a causal graph  $G = G(\mathcal{M})$  over  $\mathbf{V}$  in which there exists a directed edge from every variable in  $PA_{i}$  to  $V_{i}$  and dashed-bidirected arrows encode common latent variables (e.g., see Fig. 1a). Performing an intervention fixing  $\mathbf{X} = \mathbf{x}$  is represented through the do-operator,  $do(\mathbf{X} = \mathbf{x})$  , which encodes the operation of replacing the original equations of  $X$  (i.e.,  $f_{X}(pa_{x},u_{x}))$  by the constant  $x$  for all  $X\in \mathbf{X}$  and induces an interventional distribution  $P(\mathbf{V}|do(\mathbf{x}))$
Experimental Distributions and Samples To clarify the connection between the experimental samples where the randomization is applied to  $\mathbf{Z} \subseteq \mathbf{V}$  and the distribution  $P_{\mathbf{z}}(\mathbf{V} \backslash \mathbf{z})$ , we introduce the notation  $P_{\sigma(\mathbf{Z})}(\mathbf{V})$  where  $\sigma(\mathbf{Z})$  denotes that  $\mathbf{Z}$  is randomized. The distribution  $P_{\sigma(\mathbf{Z})}(\mathbf{V})$  is a distribution induced by the SCM in which the original equation  $Z \gets f_Z(pa_z, u_z)$  for  $Z \in \mathbf{Z}$  is replaced to the function assigning the value to  $Z = z$  at random without depending on other endogenous variables  $PA_Z$ ; e.g.,  $Z = 1$  and 0 at probability 0.5 for each. We note that  $P \coloneqq P_{\sigma(\emptyset)}$  when observational. For any set  $\mathbf{A}, \mathbf{B}, \mathbf{Z} \subseteq \mathbf{V}$ , the interventional distribution can be represented as  $P(\mathbf{A}|do(\mathbf{z}), \mathbf{B}) = P_{\sigma(\mathbf{Z})}(\mathbf{A}|\mathbf{Z} = \mathbf{z}, \mathbf{B})$  by the definition of the do-operator and  $P_{\sigma(\mathbf{Z})}$  distribution. We use  $P_{\mathbf{z}}(\mathbf{A}|\mathbf{B}) \coloneqq P_{\sigma(\mathbf{Z})}(\mathbf{A}|\mathbf{Z} = \mathbf{z}, \mathbf{B})$  to highlight that the distribution is induced from the randomization and conditioning on  $\mathbf{Z} = \mathbf{z}$ . The experimental samples from randomization  $\sigma(\mathbf{Z})$  induces samples  $D_{\sigma(\mathbf{Z})}$  following  $P_{\sigma(\mathbf{Z})}(\mathbf{V})$ . We use  $D_{\mathbf{z}}$  to denote the subsample of  $D_{\sigma(\mathbf{Z})}$  fixing  $\mathbf{Z} = \mathbf{z}$ , which follows  $P_{\mathbf{z}}(\mathbf{V})$ .
g-identification. Let  $\mathbb{Z} \coloneqq \{\mathbf{Z}_i\}_{i=1}^m$  denote a collection of variables where  $\mathbf{Z}_i$  can be an empty set. Let  $\mathbb{P} \coloneqq \{P_{\sigma(\mathbf{Z}_i)}(\mathbf{V}), \mathbf{Z}_i \in \mathbb{Z}\}$ , a collection of distributions inducing experimental samples from trials randomizing  $\mathbf{Z}_i \in \mathbb{Z}$ . A causal effect  $P(\mathbf{y}|do(\mathbf{x}))$  is said to be  $g$ -identifiable from  $\mathbb{P}$  in a causal graph  $G$  if  $P(\mathbf{y}|do(\mathbf{x}))$  is uniquely computable from the combination of distributions in  $\mathbb{P}$  in any SCM that induces  $G$  [Lee et al., 2019, Def. 4]. The complete g-identification algorithm developed by Lee et al. [2019] identifies the causal effect by decomposing so-called confounded components (c-component). A c-component is a maximal set of variables where every pair is connected by a bidirectional path composed of bidirectional edges ( $V_i \leftrightarrow V_j$ ). For example, graphs in Figs. (1a, 1b) form a single c-component since bidirectional paths connect any pairs of variables. For any sets  $\mathbf{C} \subseteq \mathbf{V}$ , the quantity  $Q[\mathbf{C}] \coloneqq P(\mathbf{c}|do(\mathbf{v} \backslash \mathbf{c}))$  is called a  $c$ -factor. To identify the causal effect
$P(\mathbf{y}|do(\mathbf{x}))$  from  $\mathbb{P}$  and  $G$ , the g-identification algorithm in [Lee et al., 2019, Algo. 1] (and rewrite in Algo. 1) rewrites the causal effect as a marginalization over a product of c-factors,  $P(\mathbf{y}|do(\mathbf{x})) = \sum_{\mathbf{d} \setminus \mathbf{y} \in \mathfrak{S}_{\mathbf{D} \setminus \mathbf{Y}}} \prod_{i=1}^{k_d} Q[\mathbf{D}_i]$ , where  $\mathbf{D} := an(\mathbf{Y})_{G(\mathbf{V} \setminus \mathbf{X})}$  and  $\mathbf{D}_i$  are c-components in  $G(\mathbf{D})$ , and identifies each  $Q[\mathbf{D}_i]$  from  $\mathbb{P}$ .
1.2 Problem Statement
This paper aims to develop an estimation framework for the g-identifiable causal effect  $P(\mathbf{y} | d o(\mathbf{x}))$  identified as a function of distributions in  $\mathbb{P}$  from experimental samples  $\mathbb{D} \coloneqq \{D_{\mathbf{Z}_i} \sim P_{\sigma(\mathbf{Z}_i)}(\mathbf{V}) \in \mathbb{P}\}$ . We impose the following regularity assumptions:
Assumption 1 (Regularity). For variables  $\mathbf{V}$  and distributions  $P_{\sigma (\mathbf{Z})}\in \mathbb{P}$ , the following conditions hold: (1) All variables in  $\mathbf{V}$  are discrete; (2)  $P_{\sigma (\mathbf{Z})}(\mathbf{v}) > c,\forall \mathbf{v}\in \mathfrak{D}_{\mathbf{V}}$  for some  $c\in (0,1)$ .
We discuss the relaxation of the regularity assumption in Appendix C. This relaxation allows some subset of variables in  $\mathbf{V}$  can be a mixture of continuous and discrete random variables. Due to space constraints, all proofs are provided in Appendix B.
2 Expressing Causal Effects as a Combination of mSBD Adjustments
In this section, we present an algorithm that expresses any g-identifiable causal effects as a combination of marginalization/multiplication/divisions of adjustment functionals defined in the following. We begin by formally defining the generalized multi-outcome sequential back-door adjustment (g-mSBD) functional, which strictly generalizes the mSBD adjustment proposed by Jung et al. [2021b]:
Definition 1 (generalized-mSBD adjustment (g-mSBD)). Let  $(\mathbf{W},\mathbf{R})$  be a disjoint pair in  $\mathbf{V}$  topologically ordered as  $(\mathbf{W},\mathbf{R}) = \{\mathbf{R}_0,W_1,\dots ,\mathbf{R}_{m - 1},W_m,\mathbf{R}_m\}$  by  $\prec_{G}$ , where  $\mathbf{R}_i$  can be empty. Let  $\overline{\mathbf{W}}^{i - 1} := \{W_j\}_{j = 1}^{i - 1}$  and  $\overline{\mathbf{R}}^{i - 1} := \{\mathbf{R}_j\}_{j = 0}^{i - 1}$  for  $\forall i\in [m]$ . Let  $\mathbf{C}\subseteq \mathbf{W}$ . Let  $\mathbb{Z}_0\subseteq \mathbb{Z}$  be some set such that  $\forall \mathbf{Z}\in \mathbb{Z}_0,\mathbf{W}\cap \mathbf{Z} = \emptyset$ . Let  $\mathrm{seq}(\mathbb{Z}_0)$  denote a sequence  $(\mathbf{z}_1,\dots ,\mathbf{z}_m)$  where  $\mathbf{z}_i$  denotes some realization of  $\mathbf{Z}_i\in \mathbb{Z}_0$  (same  $\mathbf{z}_i$  could appear multiple times in the sequence). Then, the g-mSBD adjustment is expressed as an operator  $A_0[\mathbf{W},\mathbf{C},\mathbf{R};\mathbb{Z}_0,\mathrm{seq},G](\mathbf{w}\backslash \mathbf{c},\mathbf{r})$  defined by
$$
A _ {0} [ \mathbf {W}, \mathbf {C}, \mathbf {R}; \mathbb {Z} _ {0}, \operatorname {s e q} ] (\mathbf {w} \backslash \mathbf {c}, \mathbf {r}) := \sum_ {\mathbf {c} \in \mathfrak {S} _ {\mathbf {C}}} \prod_ {i: W _ {i} \in \mathbf {W}} P _ {\mathbf {z} _ {i}} \left(w _ {i} | \overline {{\mathbf {w}}} ^ {i - 1}, \overline {{\mathbf {r}}} ^ {i - 1} \backslash \mathbf {z} _ {i}\right). \tag {1}
$$
The g-mSBD adjustment specializes to the mSBD adjustment [Jung et al., 2021b] when  $\mathbb{Z}_0 = \emptyset$ . The g-mSBD adjustment can be viewed as a variant of the g-formula [Robins, 1986] involving multiple distributions. The power of the g-mSBD adjustment lies in its ability to express the c-factor:
Lemma 1 (c-component Identification [Jung et al., 2021b]). Let  $\mathbf{S}$  denote a c-component in  $G_{i} := G(\mathbf{V} \backslash \mathbf{Z}_{i})$  for some  $\mathbf{Z}_{i} \in \mathbb{Z}$ . Let  $\mathbf{R} := p a(\mathbf{S})_{G_{i}} \backslash \mathbf{S}$ . Let  $(\mathbf{S}, \mathbf{R})$  be ordered as  $(\mathbf{R}_0, S_1, \dots, \mathbf{R}_{m-1}, S_m)$  by  $\prec_G$ . Let  $\mathbf{A} \subseteq \mathbf{S}$  denote a set satisfying  $\mathbf{A} = a n(\mathbf{A})_{G_i(\mathbf{S})}$ . Let  $\mathbf{C} := (\mathbf{S} \backslash \mathbf{A})$ . Let  $\mathbb{Z}_0 := \{\mathbf{Z}_i\}$  and  $\operatorname{seq}(\mathbb{Z}_0)$  be a sequence of  $\mathbf{z}_i$  repeating  $m$  times. Then, the  $c$ -factor  $Q[\mathbf{A}]$  is  $g$ -identifiable as follows:
$$
Q [ \mathbf {A} ] = A _ {0} [ \mathbf {S}, \mathbf {C}, \mathbf {R}; \mathbb {Z} _ {0} := \{\mathbf {Z} _ {i} \}, \operatorname {s e q} ] (\mathbf {a}, \mathbf {r}) = \sum_ {\mathbf {c} \in \mathfrak {S} _ {\mathbf {C}}} \prod_ {j: V _ {j} \in \mathbf {S}} P _ {\mathbf {z} _ {i}} \left(v _ {j} | \overline {{\mathbf {s}}} ^ {j - 1}, \overline {{\mathbf {r}}} ^ {j - 1} \backslash \mathbf {z} _ {i}\right). \tag {2}
$$
We propose an identification algorithm, Algo. 1, which expresses any causal effect as a combination of marginalizations, multiplications, and divisions of g-mSBD operators. Here are some results used for the g-mSBD operation. An example of using these results is provided in Appendix A.
Lemma 2 (Marginalization). Let  $A_0[\mathbf{W}, \mathbf{C}, \mathbf{R}; \mathbb{Z}_0, \mathbf{seq}](\mathbf{w} \backslash \mathbf{c}, \mathbf{r})$  denote the  $g$ -mSBD operator in Def. 1. Let  $\mathbf{W}_0 \subseteq \mathbf{W} \backslash \mathbf{C}$ . Let  $\mathbf{W}_{mar} \subseteq \{\mathbf{W}_0, \mathbf{C}\}$  denote the vector formed by the following procedure: Starting from  $\mathbf{W}_{mar} = \emptyset$ , for  $j = m, \dots, 1$ ,  $\mathbf{W}_{mar} = \mathbf{W}_{mar} \cup \{W_j\}$  if (1)  $W_j \in \{\mathbf{W}_0, \mathbf{C}\}$  and (2)  $\exists k \in \{j, \dots, m\}$  such that  $\mathbf{R}_j, \dots, \mathbf{R}_{k-1} = \emptyset$ ,  $\overline{\mathbf{W}}^{k+1:m} \subseteq \mathbf{W}_{mar}$ , and  $\mathbf{Z}_k = \dots = \mathbf{Z}_j$  and  $\mathbf{z}_k = \dots = \mathbf{z}_j$ . Let  $\mathbf{W}' := \mathbf{W} \backslash \mathbf{W}_{mar}$ ,  $\mathbf{R}' := \text{pre}(\mathbf{W}'; G) \cap \mathbf{R}$  and  $\mathbf{C}' := \{\mathbf{W}_0, \mathbf{C}\} \backslash \mathbf{W}_{mar}$ . Let  $\mathbb{Z}' \subseteq \mathbb{Z}_0$  denote the collection of  $\mathbf{Z}_i$  corresponding to the variable in  $\mathbf{W}'$ , and  $\text{seq}'$  the corresponding sequence. Then,
$$
\sum_ {\mathbf {w} _ {0} \in \mathfrak {S} _ {W _ {0}}} A _ {0} [ \mathbf {W}, \mathbf {C}, \mathbf {R}; \mathbb {Z} _ {0}, \operatorname {s e q} ] (\mathbf {w} \backslash \mathbf {c}, \mathbf {r}) = A _ {0} [ \mathbf {W} ^ {\prime}, \mathbf {C} ^ {\prime}, \mathbf {R} ^ {\prime}; \mathbb {Z} ^ {\prime}, \operatorname {s e q} ^ {\prime} ] (\mathbf {w} ^ {\prime} \backslash \mathbf {c} ^ {\prime}, \mathbf {r} ^ {\prime}). \tag {3}
$$
Algorithm 1: GID  $(\mathbf{x},\mathbf{y},\mathbb{Z},\mathbb{P},G)$
Input:  $\mathbf{x},\mathbf{y},\mathbb{Z}\coloneqq \{\mathbf{Z}_i\} ,\mathbb{P}\coloneqq \{P_{\sigma (\mathbf{Z}_i)}(\mathbf{V}),\forall \mathbf{Z}_i\in \mathbb{Z}\} ,G$  Output: Expression of  $P(\mathbf{y}|do(\mathbf{x}))$  w.r.t. distributions in  $\mathbb{P}$    
1 If  $\exists \mathbf{Z}_i\in \mathbb{Z}$  such that  $P(\mathbf{y}|do(\mathbf{x})) = P_{\mathbf{z}_i}(\mathbf{y})$  for some  $\mathbf{z}_i\in \mathfrak{D}_{\mathbf{Z}_i}$  , then return  $P_{\mathbf{z}_i}(\mathbf{y})$    
2 Let  $\mathbf{V}\gets an(\mathbf{Y})$  .  $P(\mathbf{v})\gets P(an(\mathbf{Y}))$  ; and  $G\gets G(an(\mathbf{Y}))$    
3 Let  $\mathbf{D}\coloneqq an(\mathbf{Y})_{G(\mathbf{V}\backslash \mathbf{X})}$    
4 Find the  $C$  -component of  $G(\mathbf{D})$  ..  $\mathbf{D}_1,\dots \mathbf{D}_{k_d}$    
5 foreach  $\mathrm{D}_j\in \{\mathrm{D}_1,\dots \mathrm{D}_{k_d}\}$  do   
6 foreach  $\mathbf{Z}_i\in \mathbb{Z}$  do   
7 Find the c-component  $\mathbf{S}_j^i$  in  $G(\mathbf{V}\backslash \mathbf{Z}_i)$  such that  $\mathbf{D}_j\subseteq \mathbf{S}_j^i$    
8  $Q[\mathbf{S}_j^i ] = A_0[\mathbf{S}_j^i,\emptyset ,\mathbf{R}_j^i;\mathbb{Z}_j^i := \{\mathbf{Z}_i\} ,\operatorname {seq}_j^i ](\mathbf{s}_j^i,\mathbf{r}_j^i),$  where  $\mathbf{R}_j^i\coloneqq pa(\mathbf{S}_j^i)_{G(\mathbf{V}\backslash \mathbf{Z}_i)}\backslash \mathbf{S}_j^i$  // By Lemma 1   
9 Run  $Q[\mathrm{D}_j] = \mathrm{SUBID}(\mathrm{D}_j,\mathrm{S}_j^i,Q[\mathrm{S}_j^i],G(\mathrm{S}_j^i))$    
10 If  $Q[\mathrm{D}_j]\neq \mathrm{FAIL}$  , then break.   
11 end   
12 If  $Q[\mathrm{D}_j] = \mathrm{FAIL}$  , then return FAIL.   
13 end   
14  $P(\mathbf{y}|do(\mathbf{x})) = \sum_{\mathbf{d}\backslash \mathbf{y}\in \mathfrak{S}_{\mathrm{D}\backslash \mathrm{Y}}}\prod_{j = 1}^{k_d}Q[\mathrm{D}_j]. / /$  Apply Lemmas (2,3,4) if viable   
15 return  $P(\mathbf{y}|do(\mathbf{x}))$    
a.1 Procedure SUBID(C,T,Q[T],G(T))   
a.2 Let A := an(C)G(T) = {A1,A2,,An} such that A1 <G< An in G(T).   
a.3 Let Q[A] =  $\sum_{t\backslash a\in S_T\backslash A}Q[T]$  // Apply Lemma 2 if viable   
a.4 If A = C, then return Q[A].   
a.5 If A = T, then return FAIL.   
a.6 else   
a.7 Let S be the c-component in G(A) such that C⊆ S.   
a.8 Let  $Q[\mathrm{S}]\coloneqq \prod_{\left\{i:A_i\in \mathrm{S}\right\}}\frac{\sum_{b_i + 1\in S_{B_i + 1}}Q[\mathrm{A}]}{\sum_{b_i\in S_{B_i}}Q[\mathrm{A}]}$  for B i := A \\A i-1. // Apply Lemmas (2,3,4) if viable   
a.9 return SUBID (C,S,Q[S],G(S))   
a.10 end
This lemma provides a graphical criterion where  $\sum_{\mathbf{w}_0 \in \mathfrak{S}_{W_0}} A_0[\mathbf{W}, \mathbf{C}, \mathbf{R}; \mathbb{Z}_0, \mathbf{seq}](\mathbf{w} \backslash \mathbf{c}, \mathbf{r})$  is given as a g-mSBD operator.