SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Algorithm A1  $PC_{q_{\mathrm{max}}}$
1: Input: A  $n$ -variate time series  $V = (\mathbf{X}^1, \mathbf{X}^2, \mathbf{X}^3, \dots, \mathbf{X}^n)$ , target time series  $\mathbf{X}^j$ , maximum time lag  $\tau_{\mathrm{max}}$ , significance threshold  $\alpha_{PC}$ , maximum condition dimension  $p_{\mathrm{max}}$  (default  $p_{\mathrm{max}} = n\tau_{\mathrm{max}}$ ), maximum number of combinations  $q_{\mathrm{max}}$  (default  $q_{\mathrm{max}} = 1$ ), conditional independence test function  $CI$   
2: function  $CI(X,Y,Z)$   
3: Test  $X \perp Y|\mathbf{Z}$  using test statistic measure  $I$   
4: return  $p$ -value, test statistic value  $I$   
5: Initialize preliminary set of parents  $\widehat{Pa}(X_t^j) = \{X_{t-\tau}^i : i \in \{1,\dots,n\}, \tau \in \{1,\dots,\tau_{\mathrm{max}}\}\}$   
6: Initialize dictionary of test statistic values  $I^{\min}(X_{t-\tau}^i \to X_t^j) = \infty \forall X_{t-\tau}^i \in \widehat{Pa}(X_t^j)$   
7: for  $p = 0,1,2,\dots,p_{\mathrm{max}}$  do  
8: if  $|\widehat{Pa}(X_t^j)| - 1 < p$  then  
9: Break for-loop  
10: end if  
11: for all  $X_{t-\tau}^i$  in  $\widehat{Pa}(X_t^j)$  do  
12:  $q = -1$   
13: for all lexicographically chosen subsets  $S \subseteq \widehat{Pa}(X_t^j) \setminus \{X_{t-\tau}^i\}$  with  $|\mathcal{S}| = p$  do  
14:  $q = q + 1$   
15: if  $q \geq q_{\mathrm{max}}$  then  
16: Break from inner for-loop  
17: end if  
18: Run CI test to obtain  $(p$ -value,  $I) \leftarrow CI(X_{t-\tau}^i, X_t^j, S)$   
19: if  $|I| < I^{\min}(X_{t-\tau}^i \to X_t^j)$  then  
20:  $I^{\min}(X_{t-\tau}^i \to X_t^j) = |I|$   
21: end if  
22: if  $p$ -value >  $\alpha_{PC}$  then  
23: Mark  $X_{t-\tau}^i$  for removal from  $\widehat{Pa}(X_t^j)$   
24: Break from inner for-loop  
25: end if  
26: end for  
27: end for  
28: Remove non-significant parents from  $\widehat{Pa}(X_t^j)$   
29: Sort parents in  $\widehat{Pa}(X_t^j)$  by  $I^{\min}(X_{t-\tau}^i \to X_t^j)$  from largest to smallest  
30: end for  
31: return  $\widehat{Pa}(X_t^j)$
Algorithm A2 MCI
1: Input: A  $n$ -variate time series  $V = (\mathbf{X}^1, \mathbf{X}^2, \mathbf{X}^3, \dots, \mathbf{X}^n)$ , sorted parents  $\widehat{Pa}(X_t^j)$  for all variables  $X^j$  estimated with Algorithm A1 maximum time lag  $\tau_{\max}$ , maximum number  $p_X$  of parents of variable  $X^i$ , and conditional independence test function  $CI$   
2: for all  $(X_{t - \tau}^i, X_t^j)$  with  $i, j \in \{1, \dots, n\}$ ,  $\tau \in \{0, \dots, \tau_{\max}\}$ , excluding  $(X_t^j, X_t^j)$  do  
3: Remove  $X_{t - \tau}^i$  from  $\widehat{Pa}(X_t^j)$  if necessary  
4: Define  $\widehat{Pa}_{p_X}(X_{t - \tau}^i)$  as the first  $p_X$  parents from  $\widehat{Pa}(X_t^i)$ , shifted by  $\tau$   
5: Run MCI test to obtain  $(p$ -value,  $I$ )  $\leftarrow CI(X_{t - \tau}^i, X_t^j, \mathbf{Z} = \{\widehat{Pa}(X_t^j), \widehat{Pa}_{p_X}(X_{t - \tau}^i)\}$   
6: end for  
7: Optionally adjust  $p$ -value of all links by False Discovery Rate-approach (FDR)  
8: return  $p$ -value and MCI test statistic values
B  $\mathbf{PCMCI}_{\Omega}$
Algorithm B1  $PCMCI_{\Omega}$
1: Input: A  $n$ -variate time series  $V = (\mathbf{X}^1, \mathbf{X}^2, \mathbf{X}^3, \dots, \mathbf{X}^n)$ , periodicity upper bound  $\omega_{\mathrm{ub}}$ , time lag upper bound  $\tau_{\mathrm{ub}}$ . By default, we assume  $\tau_{\mathrm{ub}}$  and  $\omega_{\mathrm{ub}}$  are larger than their true value.  
2: A superset of parent set is obtained using PCMCI with  $\tau_{\mathrm{ub}}$  and denote it by  $\widehat{\mathrm{SPa}}(X_t^j) \forall j, t$ .  
3: for  $\mathbf{X}^j$  where  $j \in [n]$  do  
4: for a guess  $\omega \in [\omega_{\mathrm{ub}}]$  of  $\omega_j$  do  
5: Let  $\widehat{\Pi}^j := \{\widehat{\Pi}_k^j | k \in [\omega]\}$  where  $\widehat{\Pi}_k^j = \{2\tau_{\mathrm{ub}} + k, 2\tau_{\mathrm{ub}} + \omega + k, 2\tau_{\mathrm{ub}} + 2\omega + k, \dots\}$ .  
6: for  $k \in [\omega]$  do  
7: Initialize the parent set for  $X_t^j, t \in \{t : t \geq 2\tau_{\mathrm{ub}}, t \in \widehat{\Pi}_k^j\}$  (with guess  $\omega$ ) denoted by  $\widehat{\mathrm{Pa}}_\omega(X_t^j) \gets \widehat{\mathrm{SPa}}(X_t^j)$ .  
8: Consider  $X_{t - \tau}^i \in \widehat{\mathrm{Pa}}_\omega(X_t^j)$ . Remove  $X_{t - \tau}^i$  from  $\widehat{\mathrm{Pa}}_\omega(X_t^j)$  if  $X_{t - \tau}^i \perp X_t^j$  (if  $\widehat{\mathrm{SPa}}(X_t^j) \cup \widehat{\mathrm{SPa}}(X_{t - \tau}^i)$  does not use a CI Test with samples  $t \in \{t : t \geq 2\tau_{\mathrm{ub}}, t \in \widehat{\Pi}_k^j\}$ ).  
9: Store  $\widehat{\mathrm{Pa}}_\omega(X_t^j)$  for  $X_t^j, t \in \{t : t \geq 2\tau_{\mathrm{ub}}, t \in \widehat{\Pi}_k^j\}$ .  
10: end for  
11: end for  
12:  
...  
13: if there exists turning points  $S_j, S_j \in [\omega_{\mathrm{ub}}]$  then  
14:  $\widehat{\omega}_j \gets \min S_j$   
15: else  
16:  
17:  $\widehat{\omega}_j \gets \arg \min_{\omega \in [\omega_{\mathrm{ub}}} \max_{k \in [\omega]} |\widehat{\mathrm{Pa}}_\omega(X_t^j|_t) |.$   
18: end if  
19: Set  $\widehat{\mathrm{Pa}}(X_t^j) \gets \widehat{\mathrm{Pa}}_{\widehat{\omega}_j}(X_t^j)$  for  $X_t^j, t \in \{t : t \geq 2\tau_{\mathrm{ub}}\}$ .  
20: end for  
21: return  $\widehat{\omega}_j$  and  $\widehat{\mathrm{Pa}}(X_t^j) \forall j \in [n], t \geq 2\tau_{\mathrm{ub}}$ .
C Soundness of  $\mathbf{PCMCI}_{\Omega}$
C.1 Stationary Markov Chain
Claim: Any discrete-valued time series  $V$  with Semi-Stationary Structural Causal Model (SCM) satisfying assumption A1, A2, A4, A5 can be written as a Markov chain  $\{Z_{n}\}$  as long as this Markov chain satisfies  $\mathrm{Pa}(Z_n)\subset Z_n\cup Z_{n - 1}$  for all  $n$ , where  $Z_{n}$  is a set of variables in  $V$ . This Markov chain has a finite number of states if all time series in  $V$  are discrete-valued time series.
Note that when the notation  $n$  is related to a Markov chain  $Z_{n}$ , it means the running index. In the context of  $X_{t}^{j\in [n]}$ ,  $n$  represents the index of component time series within the  $n$ -variate time series.
To simplify, assume that one associated Markov chain of  $V = \{\mathbf{X},\mathbf{Y}\}$  has  $Z_{n} = \{X_{t},Y_{t},X_{t - 1},Y_{t - 1}\}$  with  $t\in \{t\in \mathbb{N}^+:,t\leq T\}$  satisfying  $\mathrm{Pa}(Z_n)\subset Z_n\cup Z_{n - 1}$ . Here, the notation for the time points of variables is simplified as  $t$  and  $t - 1$ , even though it should be a function of  $n$ , the running index of the Markov chain. Note that  $Z_{n - 1} = \{X_{t - 2},Y_{t - 2},X_{t - 3},Y_{t - 3}\}$  rather than  $\{X_{t - 1},Y_{t - 1},X_{t - 2},Y_{t - 2}\}$ , as the simplified notation could erroneously suggest the latter sequence. A simple proof is shown below through Markov assumption (A2).
Figure 2: Partial causal graph for 3-variate time series  $V = \{\mathbf{X}^1, \mathbf{X}^2, \mathbf{X}^3\}$  with a Semi-Stationary SCM where  $\tau_{\mathrm{max}} = 3$ ,  $\omega_1 = 3$ ,  $\omega_2 = 2$ ,  $\omega_3 = 1$ ,  $\Omega = 6$  and  $\delta = 6$ . The first  $3(= \tau_{\mathrm{max}})$  time slices  $\{\mathbf{X}_t\}_{1 \leq t \leq 3}$  are the starting points. The same color edges denote the same causal mechanism. E.g. for  $\mathbf{X}^1$ : there are 3  $(= \omega_j)$  time partition subsets  $\{\Pi_k^1\}_{1 \leq k \leq 3}$ . The time points  $t$  of nodes  $X_t^1$  sharing the same filling color are in the same time partition subsets. The time points  $t$  of nodes  $X_t^1$  sharing both the same filling color and the same outline shape are in the same homogenous time partition subsets. There are 6  $(= \delta)$  different Markov chains in this multivariate time series  $V$ , and the first element of these 6 Markov chains is shown as  $\{Z_1^q\}_{1 \leq q \leq 6}$  and are tinted with a gradient of blue hues.  $Z_1^1$  and  $Z_2^1$  denote the first two elements of the first Markov chain while  $Z_1^2$  and  $Z_2^2$  denote the first two elements of the second Markov chain.
$$
\begin{array}{l} p \left(Z _ {n} \mid Z _ {n - 1}, Z _ {n - 2}, \dots\right) (3) \\ = p \left(X _ {t}, Y _ {t}, X _ {t - 1}, Y _ {t - 1} \mid Z _ {n - 1}, Z _ {n - 2}, \dots\right) (4) \\ = p \left(X _ {t} \mid Z _ {n} \cup Z _ {n - 1} \backslash X _ {t}, Z _ {n - 2}, \dots\right) p \left(Y _ {t} \mid Z _ {n} \cup Z _ {n - 1} \backslash \left(X _ {t} \cup Y _ {t}\right), Z _ {n - 2}, \dots\right) \dots (5) \\ = p \left(X _ {t} \mid \operatorname {P a} \left(X _ {t}\right), Z _ {n} \cup Z _ {n - 1} \backslash \left(X _ {t} \cup \operatorname {P a} \left(X _ {t}\right)\right)\right) (6) \\ \times p \left(Y _ {t} | \operatorname {P a} (Y _ {t}), Z _ {n} \cup Z _ {n - 1} \backslash \left(X _ {t} \cup Y _ {t} \cup \operatorname {P a} (Y _ {t})\right)\right) \\ \times p \left(X _ {t - 1} | \operatorname {P a} \left(X _ {t - 1}\right), Z _ {n} \cup Z _ {n - 1} \backslash \left(X _ {t} \cup Y _ {t} \cup X _ {t - 1} \cup \operatorname {P a} \left(X _ {t - 1}\right)\right)\right) \dots \\ = p \left(X _ {t} \mid Z _ {n} \cup Z _ {n - 1} \backslash X _ {t}\right) p \left(Y _ {t} \mid Z _ {n} \cup Z _ {n - 1} \backslash \left(X _ {t} \cup Y _ {t}\right)\right) \dots (7) \\ = p \left(X _ {t}, Y _ {t}, X _ {t - 1}, Y _ {t - 1} \mid Z _ {n - 1}\right) (8) \\ = p \left(Z _ {n} \mid Z _ {n - 1}\right) (9) \\ \end{array}
$$
Assume that the space of both  $X_{t}$  and  $Y_{t}$  with  $t < T$  are  $\{1,2\}$ . There are total  $2^{4} = 16$  states of Markov Chain  $\{Z_{n}\} = \{\{X_{t},Y_{t},X_{t - 1},Y_{t - 1}\} \}$ . The transition probability  $\mathbf{P}$  for this Markov Chain is illustrated as a  $16\times 16$  matrix:
$$
\mathbf {P} = \begin{array}{c} {(1, 1, 1, 1)} \\ {(2, 1, 1, 1)} \\ {\dots} \end{array} \left[ \begin{array}{c c c} {p _ {1, 1}} & {p _ {1, 2}} & {\dots} \\ {p _ {2, 1}} & {p _ {2, 2}} & {\dots} \\ {\dots} & {\dots} & {\dots} \end{array} \right] _ {1 6 \times 1 6}
$$
where  $(1,1,1,1)$  means  $X_{t} = 1,Y_{t} = 1,X_{t - 1} = 1,Y_{t - 1} = 1$ . Each row in this transition probability matrix is a conditional distribution of  $Z_{n}$  given one realization of  $Z_{n - 1}$ . Each entry is a probability of having one specific realization of  $Z_{n}$  given one realization of  $Z_{n - 1}$ . This probability can be decomposed by conditional distributions based on Markov assumption (A2). Take  $p_{1,1}$  as an example:
$$
\begin{array}{l} p _ {1, 1} = p \left(X _ {t} = 1, Y _ {t} = 1, X _ {t - 1} = 1, Y _ {t - 1} = 1 \mid X _ {t - 2} = 1, Y _ {t - 2} = 1, X _ {t - 3} = 1, Y _ {t - 3} = 1\right) (10) \\ = p \left(X _ {t} = 1 \mid \operatorname {P a} \left(X _ {t}\right)\right) p \left(Y _ {t} = 1 \mid \operatorname {P a} \left(Y _ {t}\right)\right) p \left(X _ {t - 1} = 1 \mid \operatorname {P a} \left(X _ {t - 1}\right)\right) p \left(Y _ {t - 1} = 1 \mid \operatorname {P a} \left(Y _ {t - 1}\right)\right) (11) \\ \end{array}
$$
where  $\mathrm{Pa}(.)$  here are realizations, not random variables.
For time series  $V$  with Semi-Stationary SCM, there are (potentially)  $\delta$  different Markov chains  $\{Z_n^q\}, q \in [\delta]$ :
where  $n \in \{n : n \in \mathbb{N}^+, \tau_{\max} + q - 1 + n\delta \leq T\}$ ,  $\delta = \lceil \frac{\tau_{\max} + 1}{\Omega} \rceil \Omega$ . As proved in the claim, such a Markov chain exists as long as  $\mathrm{Pa}(Z_n^q) \subset Z_n^q \cup Z_{n-1}^q$  for all  $n$ . The value of  $\delta$  can guarantee the existence of such Markov chain because  $\delta$  is larger than  $\tau_{\max} + 1$  and is a multiple of  $\Omega$ , that is, a multiple of all  $\{\omega_j\}_{j \in [n]}$ . By doing so,  $\mathrm{Pa}(Z_n^q) \subset Z_n^q \cup Z_{n-1}^q$  is satisfied; for any variable  $X_t^j$ , there exists  $q \in [\delta]$  and  $n \in \mathbb{N}^+$  such that variable  $X_t^j$  and its parent set  $\mathrm{Pa}(X_t^j)$  can be included in  $Z_n^q$ ; and the causal mechanism generating  $Z_n^q$  is invariant for different  $n$ . The state space of  $\{Z_n^q\}$  is the set containing all possible realizations of  $\{\mathbf{X}_{\tau_{\max} + q + (i-1) + (n-1)\delta}\}_{i \in [\delta], n \in \mathbb{N}}$ . The transition probabilities between the states are the product of associated causal mechanisms based on Markov assumption (A2).
Determined by the starting slice  $\mathbf{X}_t$  where  $\tau_{\mathrm{max}} < t \leq \tau_{\mathrm{max}} + \delta$ , there should be  $\delta$  potentially different Markov chains  $\{Z_n^q\}$  where  $1 \leq q \leq \delta$ . To be more specific, those Markov chains are:
$$
\begin{array}{l} \text {M a r k o v C h a i n 1 :} Z _ {n} ^ {1} = \left\{\mathbf {X} _ {\tau_ {\max } + 1 + (n - 1) \delta}, \mathbf {X} _ {\tau_ {\max } + 2 + (n - 1) \delta}, \dots , \mathbf {X} _ {\tau_ {\max } + n \delta} \right\}, \tag {12} \\ w h e r e n \in \{n: n \in \mathbb {N} ^ {+}, \tau_ {\max } + n \delta \leq T \}. \\ \end{array}
$$
$$
\text {M a r k o v C h a i n 2 :} Z _ {n} ^ {2} = \left\{\mathbf {X} _ {\tau_ {\max } + 2 + (n - 1) \delta}, \mathbf {X} _ {\tau_ {\max } + 3 + (n - 1) \delta}, \dots , \mathbf {X} _ {\tau_ {\max } + 1 + n \delta} \right\}, \tag {13}
$$
$$
w h e r e n \in \{n: n \in \mathbb {N} ^ {+}, \tau_ {\max } + 1 + n \delta \leq T \}.
$$
$$
\text {M a r k o v C h a i n} \delta : Z _ {n} ^ {\delta} = \left\{\mathbf {X} _ {\tau_ {\max } + n \delta}, \mathbf {X} _ {\tau_ {\max } + 1 + n \delta}, \dots , \mathbf {X} _ {\tau_ {\max } - 1 + (n + 1) \delta} \right\}, \tag {14}
$$
$$
\text {w h e r e} n \in \left\{n: n \in \mathbb {N} ^ {+}, \tau_ {\max } - 1 + (n + 1) \delta \leq T \right\}.
$$
Given Irreducible and Aperiodic Markov Chain assumption (A7), discrete-time Markov chain  $\{Z_n^q\}_{0 < n}$ ,  $q \in [\delta]$  with finite states should be a stationary and ergodic Markov chain, and there is a unique stationary distribution  $\pi_q$  (Bertsekas and Tsitsiklis [2008], Karlin [2014]). Additionally, the large power of the associate transition matrix  $\mathbf{P}_q$  will eventually converge to a matrix in which each row is the stationary distribution  $\pi_q$ . Equivalently,
$$
\lim  _ {n \rightarrow \infty} p \left(Z _ {n} ^ {q} = a \mid Z _ {1} ^ {q} = b\right) = p \left(Z _ {n} ^ {q} = a\right), \forall a, b \in S. \tag {15}
$$
where  $S$  is the state space of  $Z_{n}^{q}$
In other words, after a sufficiently long time, equivalently,  $n$  is large enough, the distribution of  $\{Z_n^q\}$  does not change with increasing  $n$ . That is, for large enough  $n$ :
$$
p \left(Z _ {n _ {1}} ^ {q}\right) = p \left(Z _ {n _ {2}} ^ {q}\right), \forall n _ {1}, n _ {2} > n. \tag {16}
$$
Returning from the stationary and ergodic Markov chains  $\{Z_{n}^{q}\}$ ,  $q\in [\delta ]$  back to the original data  $V$  through Eq.(12) to Eq.(14), the distribution of the original data  $V$  must adhere to the following condition:
$$
\begin{array}{l} p \left(\mathbf {X} _ {\tau_ {\max } + q + n _ {1} \delta}, \mathbf {X} _ {\tau_ {\max } + q + 1 + n _ {1} \delta}, \dots , \mathbf {X} _ {\tau_ {\max } + q + \delta - 1 + n _ {1} \delta}\right) \\ = p \left(\mathbf {X} _ {\tau_ {\max } + q + n _ {2} \delta}, \mathbf {X} _ {\tau_ {\max } + q + 1 + n _ {2} \delta}, \dots , \mathbf {X} _ {\tau_ {\max } + q + \delta - 1 + n _ {2} \delta}\right) \tag {17} \\ \end{array}
$$
for any  $q\in [\delta ]$  and  $n_1,n_2 > n$
Given these clarifications, we can naturally introduce a more refined time partition that is based on, yet finer than, the time partition defined in Definition 2.3 in the main paper.
Definition C.1 (Homogenous Time Partition). For a univariate time series  $\mathbf{X}^j$  in a Semi-Stationary SCM with periodicity  $\omega_{j}$ , the time partition  $\Pi_k^j$  of  $\mathbf{X}^j$  can be further divided into a series of non-overlapping and non-empty subsets  $\{\pi_{(k,s)}^j\}_{1\leq s\leq \frac{\delta}{\omega_j}}$ . For each  $t\in [\tau_{\max} + 1,T]$ , there exists  $k\in [\omega_j]$  so that  $t\in \Pi_k^j$  and further there exists  $s\in [\frac{\delta}{\omega_j} ]$  so that  $t\in \pi_{(k,s)}^{j}$ .  $\pi_{(k,s)}^j$  can be written as:
$$
\pi_ {(k, s)} ^ {j} := \left\{t: \tau_ {\max } + 1 \leq t \leq T, (t \bmod \omega_ {j}) + 1 = k, (t \bmod \frac {\delta}{\omega_ {j}}) + 1 = s \right\}. \tag {18}
$$
With this definition, we have  $\bigcup_{s=1}^{\frac{\delta}{\omega_j}} \pi_{(k,s)}^j = \Pi_k^j$ . While time partition  $\Pi_k^j$  guarantees that all variables in  $\{X_t^j\}_{t \in \Pi_k^j}$  share the same causal mechanism, homogenous time partition  $\pi_{(k,s)}^j$  guarantees that all variables in  $\{X_t^j\}_{t > t', t \in \pi_{(k,s)}^j}$  share the same distribution where  $t'$  represents the steps needed by the associated Markov chain to achieve equilibrium.
Fig 2 shows a partial causal graph for a 3-variate time series with Semi-Stationary SCM.  $\tau_{\mathrm{max}} = 3$  means that the causal mechanisms start from  $t = 4$ , and the random variables with  $t \in \{1,2,3\}$  are random noises. For the first time series  $\mathbf{X}^1$ , the periodicity  $\omega_1$  is 3. And the periodicity of the time series  $\mathbf{X}^2$  and  $\mathbf{X}^3$  is 2 and 1, respectively. The periodicity of the whole time series  $V$  is obtained by  $\mathrm{LCM}(3,2,1) = 6$ .  $\delta = \left\lceil \frac{\tau_{\mathrm{max}} + 1}{\Omega} \right\rceil \Omega = \left\lceil \frac{3 + 1}{6} \right\rceil \times 6 = 1 \times 6 = 6$ .
In Fig 2, periodicity  $\omega_{1} = 3$  means that the causal mechanisms repeat every three time points and hence there are three time partition subsets  $\Pi_k^1$ ,  $k \in [3]$ . More specifically,  $\Pi_1^1 = \{4,7,10,13,\dots,4 + 3N,\dots\}$ ,  $\Pi_2^1 = \{5,8,11,14,\dots,5 + 3N,\dots\}$ ,  $\Pi_3^1 = \{6,9,12,15,\dots,6 + 3N,\dots\}$  where  $N \in \mathbb{N}^{+}$ . Random variables  $\{X_t^1\}$  with  $t$  in the same time partition subset share the same causal mechanism. However, they may not share the same marginal distribution.
Still in Fig.2, based on the definition of homogenous time partition, time partition subset  $\Pi_1^1$  for  $\mathbf{X}^1$  can be further decomposed as  $\pi_{(k = 1,s = 1)}^{1} = \{4,10,\dots,4 + \delta N,\dots\}$ ,  $\pi_{(k = 1,s = 2)}^{1} = \{7,13,\dots,7+$ $\delta N,\ldots \}$ . where  $s\in [\frac{\delta}{\omega_1} ]$ . After a long run  $n$ ,  $Z_{n}^{1}$  and  $Z_{n + 1}^{1}$  will eventually share the same distribution, that is, all the variables inside  $Z_{n}^{q}$  will share the same joint or marginal distribution as the corresponding variables inside  $Z_{n + 1}^{q}$ . To illustrate this, we assume that this Markov chain has already achieved its equilibrium at time point  $t = 4$ . Based on Eq.(12) and Eq.(17), we have:
$$
p \left(\mathbf {X} _ {4}, \mathbf {X} _ {5}, \dots , \mathbf {X} _ {9}\right) = p \left(\mathbf {X} _ {1 0}, \mathbf {X} _ {1 1}, \dots , \mathbf {X} _ {1 5}\right) = p \left(\mathbf {X} _ {1 6}, \mathbf {X} _ {1 7}, \dots , \mathbf {X} _ {2 1}\right) = \dots \tag {19}
$$
From the identical joint distribution, we can further have:
$$
p \left(X _ {4} ^ {1}\right) = p \left(X _ {1 0} ^ {1}\right) = p \left(X _ {1 6} ^ {1}\right) = \dots \tag {20}
$$
as  $X_4^1 \in \mathbf{X}_4$ ,  $X_{10}^{1} \in \mathbf{X}_{10}$  and  $X_{16}^{1} \in \mathbf{X}_{16}$ .
Therefore, for sufficiently large values of  $t$  ensuring that  $Z_{n}^{1}$  has reached its stationary distribution, all variables within  $\{X_{t}^{j}\}_{t\in \pi^{j}(k,s)}$  will share the same distribution.
In Fig 2 there are  $6(= \delta)$  potentially different Markov chains  $\{Z_n^q\}, q \in [\delta]$  in  $V$ . For any time window with length  $\delta$ ,  $\{\mathbf{X}_t, \dots, \mathbf{X}_{t + \delta - 1}\}$ , there exists  $q \in [\delta], n \in \mathbb{N}^+$ , so that this time window can be completely included in  $Z_{n}^{q}$ . For instance, set  $\{\mathbf{X}_5, \mathbf{X}_6, \dots, \mathbf{X}_{10}\}$  is in  $Z_1^2$ , which is the first element of Markov chain  $\{Z_n^2\}$ .
Constructing Markov chains and applying the Irreducible and Aperiodic Markov Chain assumption (A7) enable us to obtain a consistent estimator for the conditional and joint distributions of interest.
C.2 Consistent Estimator
The conditional distributions for variables in  $\{X_{t}^{j}\}_{t\in \Pi_{k}^{j}}$  are the same, that is,  $p(x_{t_1}^j |\mathrm{Pa}(x_{t_1}^j)) = p(x_{t_2}^j |\mathrm{Pa}(x_{t_2}^j)),\forall t_1,t_2\in \Pi_k^j.$  For simplicity, denote
$$
p _ {t \in \Pi_ {k} ^ {j}} \left(x _ {t} ^ {j} | \operatorname {P a} \left(x _ {t} ^ {j}\right)\right) := p \left(x _ {t} ^ {j} | \operatorname {P a} \left(x _ {t} ^ {j}\right)\right), \forall t \in \Pi_ {k} ^ {j} \tag {21}
$$
Consider an indicator function such that  $\mathbb{1}(x_t^j,\mathrm{Pa}(x_t^j)) = 1$  if configuration  $(x_{t}^{j},\mathrm{Pa}(x_{t}^{j}))$  has realized, otherwise  $\mathbb{1}(x_t^j,\mathrm{Pa}(x_t^j)) = 0$
Since every  $t \in \pi_{(k,s)}^j$  is apart from each other with  $N\delta$  steps where  $N \in \mathbb{N}^{+}$ , and there must exist  $q \in [\omega_j]$  and  $n_1 \in \mathbb{N}^+$  so that  $\{x_t^j, \mathrm{Pa}(x_t^j)\} \in Z_{n_1}^q$ , then for the same  $q$ , there must exist another  $n_2$  so that  $\{x_{t+N\delta}^j, \mathrm{Pa}(x_{t+N\delta}^j)\} \in Z_{n_2}^q$ . Hence, we have  $\{\mathbb{1}(x_t^j, \mathrm{Pa}(x_t^j))\}_{t \in \pi_{(k,s)}^j} = \{f(Z_{n_1(t)}^{q(t)})\}_{t \in \pi_{(k,s)}^j}$  with some function  $f: \mathbb{R}^{n \times \delta} \to \mathbb{R}^1$  satisfying  $E|f(Z_{n_1(t)}^{q(t)})| < \infty$ . Since the value of  $t$  determines  $q$  and  $n_1$ , we use  $q(t)$  and  $n_1(t)$  to emphasize their relations. For large enough  $t > t'$ ,
$\{\mathbb{1}(x_t^j,\mathrm{Pa}(x_t^j))\}_{t > t',t\in \pi_{(k,s)}^j}$  are identical samples where  $t^\prime$  is the time point needed by the associate Markov chain to achieve its equilibrium after  $n_1(t^{\prime})$  steps.
Without loss of generality, we assume  $T$  is a multiple of  $\delta$  all the time.
We can construct an estimator of  $p(x_{t}^{j}, \mathrm{Pa}(x_{t}^{j}))$  with large enough  $t$  as:
$$
\hat {p} \left(x _ {t} ^ {j}, \operatorname {P a} \left(x _ {t} ^ {j}\right)\right) = \frac {\delta}{T} \sum_ {t \in \pi_ {(k, s)} ^ {j}} \mathbb {1} \left(x _ {t} ^ {j}, \operatorname {P a} \left(x _ {t} ^ {j}\right)\right) \tag {22}
$$
where  $k, s$  is determined by  $t$  and there must exist one and only one  $k, s$  satisfying  $t \in \pi_{(k,s)}^j$ . Now, we are going to show this estimator is consistent.
We first decompose the estimator into two parts: time point  $t \leq t'$  and  $t > t'$ , where  $t'$  represents the time point when the equilibrium of the associated Markov chain is achieved.