SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {v} _ {i}) = \operatorname {H A S H} \left(\left\{\left\{\mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {q}) \right| \mathbf {q} \in H _ {t} (\mathbf {v} _ {i}) \right\} _ {t}\right), \quad i = 1, 2. \tag {17}
$$
Using Lemma B.3, we must have:
$$
\mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {v} _ {1}) = \mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {v} _ {2}). \tag {18}
$$
Further, given the definition of the neighborhood tuple, any  $\mathbf{u}_1 \in Q_{\mathbf{w}_1}^F(\mathbf{v}_1)$  is a sub-tuple of  $\mathbf{p}_1$ , which means that we can find a permutation  $\sigma \in I_{[k + t]}$ , such that the first  $k$  position of  $\sigma \cdot \mathbf{p}_1$  is exactly  $\mathbf{u}_1$ . As the order of the neighborhood tuple is predefined and the same for both  $Q_{\mathbf{w}_1}^F(\mathbf{v}_1)$  and  $Q_{\mathbf{w}_2}^F(\mathbf{v}_2)$ , the first  $k$  position of  $\sigma \cdot \mathbf{p}_2$  will be  $\mathbf{u}_2$ , as long as  $\mathbf{u}_1$  and  $\mathbf{u}_2$  is at the same position in the neighborhood tuple. Therefore, for any  $\mathbf{u}_1 \in Q_{\mathbf{w}_1}^F(\mathbf{v}_1)$  and  $\mathbf{u}_2 \in Q_{\mathbf{w}_2}^F(\mathbf{v}_2)$  at the same position  $o$  in the neighborhood tuple, we can find a permutation  $\sigma_o \in I_{[k + t]}$  to achieve it. Then, given Lemma B.5, we have  $\mathcal{C}_{(k + t)wl}^\infty(\sigma_o \cdot \mathbf{p}_1) = \mathcal{C}_{(k + t)wl}^\infty(\sigma_o \cdot \mathbf{p}_2)$ , which indicates  $\mathcal{C}_{(k + t)wl}^\infty(\mathbf{u}_1) = \mathcal{C}_{(k + t)wl}^\infty(\mathbf{u}_2)$  by using Lemma B.3. This means:
$$
\left(\mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {u} _ {1}) \mid \mathbf {u} _ {1} \in Q _ {\mathbf {w} _ {1}} ^ {F} (\mathbf {v} _ {1})\right) = \left(\mathcal {C} _ {(k + t) w l} ^ {\infty} (\mathbf {u} _ {2}) \mid \mathbf {u} _ {2} \in Q _ {\mathbf {w} _ {2}} ^ {F} (\mathbf {v} _ {2})\right). \tag {19}
$$
Now, suppose we use the stable color generated from  $(k + t)$ -wl as the initial color to perform one more iteration of  $(k, t)$ -FWL. First, Equation (19) indicates that we have  $\mathcal{C}_{ktfwl}^{\infty + 1}(\mathbf{p}_1) = \mathcal{C}_{ktfwl}^{\infty + 1}(\mathbf{p}_2)$  by doing one iteration of Equation (13). Next, Equation (18) further indicates we have  $\mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_2)$  by doing one iteration of Equation (14). This means the color of  $\mathbf{p}_1$  and  $\mathbf{p}_2$  cannot be further refined by  $(k, t)$ -FWL. This concludes the proof.
Now, we can prove Theorem 3.2 in the main paper. We restate it here:
Theorem B.7. For  $k \geq 2$ ,  $t \geq 1$ ,  $(k, t)$ -FWL is at most as powerful as  $(k + t)$ -WL. In particular,  $(k, 1)$ -FWL is as powerful as  $(k + 1)$ -WL.
Proof. Based on Proposition B.6, given two graphs  $G$ ,  $H$  with  $\mathcal{C}_{(k + t)wl}^{\infty}(G) = \mathcal{C}_{(k + t)wl}^{\infty}(H)$ . For any  $\mathbf{v}_1 \in V^k(G)$ ,  $\mathbf{v}_2 \in V^k(H)$ ,  $\mathbf{w}_1 \in V^t(G)$ ,  $\mathbf{w}_2 \in V^t(H)$ ,  $\mathbf{p}_1 = (\mathbf{v}_1, \mathbf{w}_1)$ ,  $\mathbf{p}_2 = (\mathbf{v}_2, \mathbf{w}_2)$ , we have  $\mathcal{C}_{ktfwl}^{\infty}(\mathbf{p}_1) = \mathcal{C}_{ktfwl}^{\infty}(\mathbf{p}_2)$  if  $\mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{p}_1) = \mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{p}_2)$ . This further indicates that  $\mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_2)$  if  $\mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{v}_1) = \mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{v}_2)$ . As we have  $\mathcal{C}_{(k + t)wl}^{\infty}(G) = \mathcal{C}_{(k + t)wl}^{\infty}(H)$ , for any  $\mathbf{v}_1 \in V^k(G)$ , we can find a corresponding  $\mathbf{v}_2 \in V^k(H)$  such that  $\mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{v}_1) = \mathcal{C}_{(k + t)wl}^{\infty}(\mathbf{v}_2)$ . This means  $\mathcal{C}_{ktfwl}^{\infty}(G) = \mathrm{HASH}(\{\mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_1)|\mathbf{v}_1 \in V^k(G)\}) = \mathrm{HASH}(\{\mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_2)|\mathbf{v}_2 \in V^k(H)\}) = \mathcal{C}_{ktfwl}^{\infty}(H)$ . Based on Definition A.3, we complete the proof of the first part. As  $(k, 1)$ -FWL is exactly  $k$ -FWL, we have  $(k, 1)$ -FWL is as powerful as  $(k + 1)$ -WL.
Finally, we prove the strict hierarchy of  $(k,t)$ -FWL. First, we provide the following lemma.
Lemma B.8. For  $k \geq 2, t \geq 1$ ,  $(k, t)$ -FWL  $\preceq (k, t + 1)$ -FWL;  $(k, t)$ -FWL  $\preceq (k + 1, t)$ -FWL.
Proof. First, we prove  $(k,t)$ -FWL  $\preceq (k,t + 1)$ -FWL. Actually, we can prove a strong result: given two graphs  $G$  and  $H$ ,  $\mathbf{v}_1 \in V^k(G)$  and  $\mathbf{v}_2 \in V^k(H)$ ,  $\mathcal{C}_{k(t + 1)fwl}^l(\mathbf{v}_1) = \mathcal{C}_{k(t + 1)fwl}^l(\mathbf{v}_2)$  also implies  $\mathcal{C}_{ktfwl}^l(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^l(\mathbf{v}_2)$  for any  $l \geq 0$ . We prove it by induction. For base case, it is easy to verify that if  $\mathcal{C}_{k(t + 1)fwl}^0(\mathbf{v}_1) = \mathcal{C}_{k(t + 1)fwl}^0(\mathbf{v}_2)$ , we have  $\mathcal{C}_{ktfwl}^0(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^0(\mathbf{v}_2)$  as both  $(k,t)$ -FWL and  $(k,t + 1)$ -FWL use the isomorphism type of  $k$ -tuples. Suppose it follows for  $l = 1,\dots,l - 1$ . At iteration  $l$ , if  $\mathcal{C}_{k(t + 1)fwl}^l(\mathbf{v}_1) = \mathcal{C}_{k(t + 1)fwl}^l(\mathbf{v}_2)$ , according to Equation (14), we have:
$$
\mathcal {C} _ {k (t + 1) f w l} ^ {l - 1} (\mathbf {v} _ {1}) = \mathcal {C} _ {k (t + 1) f w l} ^ {l - 1} (\mathbf {v} _ {2}), \tag {20}
$$
$$
\{\left\{\mathcal {C} _ {k (t + 1) f w l} ^ {l} (\mathbf {p} _ {1}) \mid \mathbf {p} _ {1} \in H _ {t + 1} (\mathbf {v} _ {1}) \right\} \} _ {t + 1} = \{\left\{\mathcal {C} _ {k (t + 1) f w l} ^ {l} (\mathbf {p} _ {2}) \mid \mathbf {p} _ {2} \in H _ {t + 1} (\mathbf {v} _ {2}) \right\} \} _ {t + 1}. \tag {21}
$$
This means, for any  $\mathbf{p}_1 = (\mathbf{v}_1,\mathbf{w}_1)\in H_{t + 1}(\mathbf{v}_1)$ , we can find a  $\mathbf{p}_2 = (\mathbf{v}_2,\mathbf{w}_2)\in H_{t + 1}(\mathbf{v}_2)$  such that  $\mathcal{C}_{k(t + 1)fwl}^l (\mathbf{p}_1) = \mathcal{C}_{k(t + 1)fwl}^l (\mathbf{p}_2)$ . According to Equation (13), we further obtain:
$$
\left(\mathcal {C} _ {k (t + 1) f w l} ^ {l - 1} (\mathbf {u} _ {1}) | \mathbf {u} _ {1} \in Q _ {\mathbf {w} _ {1}} ^ {F} (\mathbf {v} _ {1})\right) = \left(\mathcal {C} _ {k (t + 1) f w l} ^ {l - 1} (\mathbf {u} _ {2}) | \mathbf {u} _ {2} \in Q _ {\mathbf {w} _ {2}} ^ {F} (\mathbf {v} _ {2})\right). \tag {22}
$$
Therefore, we have  $\mathcal{C}_{k(t + 1)fwl}^{l - 1}(\mathbf{u}_1) = \mathcal{C}_{k(t + 1)fwl}^{l - 1}(\mathbf{u}_2)$  for  $\mathbf{u}_1$  and  $\mathbf{u}_2$  at the same position. As the statement follows for  $l = l - 1$ , we have  $\mathcal{C}_{ktfwl}^{l - 1}(\mathbf{u}_1) = \mathcal{C}_{ktfwl}^{l - 1}(\mathbf{u}_2)$  for  $\mathbf{u}_1$  and  $\mathbf{u}_2$  at the same position. Now, suppose we select a  $t$ -tuple  $\mathbf{w}_1'$  from  $\mathbf{w}_1$  and let the selection indices be  $(i_1,i_2,\dots ,i_t)$ . That is,  $\mathbf{w}_1' = (\mathbf{w}_{1i_1},\ldots ,\mathbf{w}_{1i_t})$ . Based on the definition A.2, for any  $\mathbf{u}_1' \in Q_{\mathbf{w}_1'}^F(\mathbf{v}_1)$ , it must exist in  $Q_{\mathbf{w}_1}^F(\mathbf{v}_1)$ . Further, let  $\mathbf{w}_2' = (\mathbf{w}_{2i_1},\ldots ,\mathbf{w}_{2i_t})$ , for any  $\mathbf{u}_1' \in Q_{\mathbf{w}_1'}^F(\mathbf{v}_1)$ , we can find a corresponding  $\mathbf{u}_2' \in Q_{\mathbf{w}_2'}^F(\mathbf{v}_2)$  at the same position and they must be the same position in  $Q_{\mathbf{w}_1}^F(\mathbf{v}_1)$  and  $Q_{\mathbf{w}_2}^F(\mathbf{v}_2)$ , respectively. This means, let  $\mathbf{p}_1' = (\mathbf{v}_1,\mathbf{w}_1')$  and  $\mathbf{p}_2' = (\mathbf{v}_2,\mathbf{w}_2')$ , we have  $\mathcal{C}_{ktfwl}^l(\mathbf{p}_1') = \mathcal{C}_{ktfwl}^l(\mathbf{p}_2')$ . Let selection indices be  $(1,2,\dots,t)$ , which is the first  $t$  elements in the tuple, for any  $\mathbf{p}_1' = (\mathbf{v}_1,\mathbf{w}_1') \in H_t(v_1)$ , we can find at least one  $\mathbf{p}_1 = (\mathbf{v}_1,\mathbf{w}_1) \in H_{t + 1}(\mathbf{v}_1)$  that the first  $t$  elements of  $\mathbf{w}_1$  is  $\mathbf{w}_1'$ . For the corresponding  $\mathbf{p}_2 = (\mathbf{v}_2,\mathbf{w}_2) \in H_{t + 1}(\mathbf{v}_2)$  with  $\mathcal{C}_{k(t + 1)fwl}^l(\mathbf{p}_1) = \mathcal{C}_{k(t + 1)fwl}^l(\mathbf{p}_2)$ , we have  $\mathcal{C}_{ktfwl}^l(\mathbf{p}_1') = \mathcal{C}_{ktfwl}^l(\mathbf{p}_2')$ , where  $\mathbf{p}_2' = (\mathbf{v}_2,\mathbf{w}_2')$  and  $\mathbf{w}_2'$  is the first  $t$  elements of  $\mathbf{w}_2$ . Based on Equation (21), we have:
$$
\left. \left\{\left\{\mathcal {C} _ {k t f w l} ^ {l} \left(\mathbf {p} _ {1} ^ {\prime}\right) \mid \mathbf {p} _ {1} ^ {\prime} \in H _ {t} \left(\mathbf {v} _ {1}\right) \right\} \right\} _ {t} = \left\{\left\{\mathcal {C} _ {k t f w l} ^ {l} \left(\mathbf {p} _ {2} ^ {\prime}\right) \mid \mathbf {p} _ {2} ^ {\prime} \in H _ {t} \left(\mathbf {v} _ {2}\right) \right\} \right\} _ {t}. \right. \tag {23}
$$
Finally, given Equation (20), we also have  $\mathcal{C}_{ktfwl}^{l-1}(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^{l-1}(\mathbf{v}_2)$ , which implies  $\mathcal{C}_{ktfwl}^l(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^l(\mathbf{v}_2)$ . This concludes the proof.
For the second part, the procedure is similar, as for any  $\mathbf{v} \in V^k(G)$ , we can find at least one  $\mathbf{v}' \in V^{k+1}(G)$  that contains all nodes and persevere the order of  $\mathbf{v}$ . Further, given a  $\mathbf{w} \in V^t(G)$  for any  $\mathbf{u} \in Q_{\mathbf{w}}^F(\mathbf{v})$ , we can find at least one  $\mathbf{u}' \in Q_{\mathbf{w}}^F(\mathbf{v}')$  that contains all nodes and persevere the order of  $\mathbf{u}$ . Then, an induction on  $l$  can be performed and we omit the details.
Next, we show a useful property of  $(k,t)$ -FWL.
Lemma B.9. For  $k \geq 2, t \geq 1$ , given a graph  $G$ , for any  $\mathbf{v}_1, \mathbf{v}_2 \in V^k(G)$ ,  $\mathcal{C}_{ktfwl}^\infty(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^\infty(\mathbf{v}_2)$  only if  $\forall i, j \in [k]$ ,  $SPD(v_{1i}, v_{1j}) = SPD(v_{2i}, v_{2j})$ .
Proof. Based on Lemma B.8, we only need to show it is true for  $(k,1)$ -FWL, which is the original  $k$ -FWL. At the iteration 0,  $\mathcal{C}_{k1fwl}^{0}(\mathbf{v}_{1}) = \mathcal{C}_{k1fwl}^{0}(\mathbf{v}_{2})$  if and only if the induced subgraph of  $\mathbf{v}_{1}$  and  $\mathbf{v}_{2}$  are isomorphic. Therefore,  $\forall i,j\in [k]$ , if  $\mathrm{SPD}(v_{1i},v_{1j}) = 0$  or  $\mathrm{SPD}(v_{1i},v_{1j}) = 1$ , we must have  $\mathrm{SPD}(v_{2i},v_{2j}) = 0$  or  $\mathrm{SPD}(v_{2i},v_{2j}) = 1$ , respectively. After the first iteration,  $\forall i,j\in [k]$ , if there exist at least one  $w_{1}\in V(G)$  such that  $(v_{1i},w_{1}),(w_{1},v_{1j})\in E(G)$  but no such  $w_{2}\in V(G)$  exist with  $(v_{2i},w_{2}),(w_{2},v_{2j})\in E(G), (k,1)$ -FWL will output different color for  $\mathbf{v}_{1}$  and  $\mathbf{v}_{2}$ , given the color update equation of  $(k,1)$ -FWL. This means  $\mathcal{C}_{k1fwl}^{1}(\mathbf{v}_{1}) = \mathcal{C}_{k1fwl}^{1}(\mathbf{v}_{2})$  implies that for  $\forall i,j\in [k]$ , if  $\mathrm{SPD}(v_{1i},v_{1j}) = 2$ , we must have  $\mathrm{SPD}(v_{2i},v_{2j}) = 2$ . Similarly, after the second iteration,  $(k,1)$ -FWL will output different color for  $\mathbf{v}_{1}$  and  $\mathbf{v}_{2}$  if there exist at least one  $w_{1}\in V(G)$  with  $\mathrm{SPD}(v_{1i},w_{1}) = 2$  and  $\mathrm{SPD}(w_{1},v_{1j}) = 1$  but no such  $w_{2}\in V(G)$  exists for  $\mathbf{v}_{2}$ . Therefore, we can conclude that  $l$  iteration of  $(k,1)$ -FWL can generate different color for  $\mathbf{v}_{1}$  and  $\mathbf{v}_{2}$  if there exist some  $i,j\in [k]$  with  $\mathrm{SPD}(v_{1i},v_{1j}) = d$  but  $\mathrm{SPD}(v_{2i},v_{2j})\neq d$  ( $d\leq l + 1$ ). Therefore, by performing enough iterations,  $(k,1)$ -FWL can compute the shortest path distance between any pair of nodes in a  $k$ -tuple and it is easy to verify  $\mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_1) = \mathcal{C}_{ktfwl}^{\infty}(\mathbf{v}_2)$  only if  $\forall i,j\in [k]$ ,  $\mathrm{SPD}(v_{1i},v_{1j}) = \mathrm{SPD}(v_{2i},v_{2j})$ . This concludes the proof.
Next, we introduce Cai-Furer-Immermman (CFI) graphs [13]. CFI graphs are a family of graphs that  $k + 1$ -WL can differentiate while  $k$ -WL cannot. Here we first state the construction of CFI graphs [8]. Construction. Let  $K_{k + 1}$  denote a complete graph on  $k + 1$  nodes (without self-loop). Nodes in  $K_{k + 1}$  are labeled from 0 to  $k$ . Let  $E(v)$  denote the set of edges incident to  $v$  in  $K_{k + 1}$ . We have  $|E(v)| = k$  for all  $v \in V(K_{k + 1})$ . Then, we define the graph  $G_k$  as follows:
1. For the node set  $V(G_{k})$ , we add
(a)  $(v,S)$  for each  $v$  in  $V(K_{k + 1})$  and for each even subset  $S\subseteq E(v)$
(b) two nodes  $e^1$  and  $e^0$  for each edge  $e \in E(K_{k+1})$ .
2. For the edge set  $E(G_{k})$ , we add
(a) an edge  $(e^0,e^1)$  for each  $e\in E(K_{k + 1})$
(b) an edge between  $(v, S)$  and  $e^1$  if  $v \in e$  and  $e \in S$ ;
(c) an edge between  $(v, S)$  and  $e^0$  if  $v \in e$  and  $e \notin S$ .
Further, we construct a companion graph  $H_{k}$  in a similar way to  $G_{k}$ , except that: in Step 1(a), for the vertex  $0 \in V(K_{k + 1})$ , we choose all odd subsets of  $E(0)$ . It is easy to verify that both  $G_{k}$  and  $H_{k}$  have  $(k + 1) \cdot 2^{k - 1} + \binom{k}{2} \cdot 2$  nodes.
We say a set  $S$  of nodes forms a distance-two-clique if the distance between any two vertices in  $S$  is exactly two.
Lemma B.10. The following holds for the graphs  $G_{k}$  and  $H_{k}$  defined above.
- There exists a distance-two-clique of size  $(k + 1)$  in  $G_{k}$ .
- There does not exist a distance-two-clique of size  $(k + 1)$  inside  $H_{k}$ .
Proof. Please see the Lemma 8 in [8] for detailed proof.
Next, we show that  $(k,t)$ -FWL cannot distinguish  $G_{k + t}$  and  $H_{k + t}$  but  $(k + 1,t)$ -FWL and  $(k,t + 1)$ -FWL can.
Lemma B.11. For  $k \geq 2, t \geq 1$ ,  $(k, t)$ -FWL cannot distinguish  $G_{k + t}$  and  $H_{k + t}$ .
Proof. Given Theorem 3.2,  $(k,t)$ -FWL is at most as powerful as  $(k + t)$ -WL. As we know  $(k + t)$ -WL cannot distinguish  $G_{k + t}$  and  $H_{k + t}$ , we conclude that  $(k,t)$ -FWL cannot distinguish between them neither.
Lemma B.12. For  $k \geq 2, t \geq 1$ ,  $(k + 1, t)$ -FWL and  $(k, t + 1)$ -FWL can distinguish  $G_{k + t}$  and  $H_{k + t}$ .
Proof. The proof idea is to show both  $(k + 1, t)$ -FWL and  $(k, t + 1)$ -FWL are powerful enough to detect distance-two-cliques of size  $(k + 1)$ , which is sufficient to show that  $(k + 1, t)$ -FWL and  $(k, t + 1)$ -FWL can distinguish between  $G_{k + t}$  and  $H_{k + t}$ . Given Lemma B.9, we know that both  $(k + 1, t)$ -FWL and  $(k, t + 1)$ -FWL can compute the distance between any two nodes in a  $k + 1$ -tuple and  $k$ -tuple, respectively. We first discuss  $(k + 1, t)$ -FWL. In  $G_{k}$ , there exist a  $k + t + 1$ -tuple  $\mathbf{p} = (\mathbf{v}, \mathbf{w})$  with  $\mathbf{v} \in V^{k + 1}(G_{k})$  and  $\mathbf{w} \in V^{t}(G_{k})$  that exactly form a distance-two-clique. Based on Equation 13, there exists one  $\mathbf{p} \in V^{k + t + 1}(G_{k})$  such that  $\mathcal{C}_{(k + 1)tfwl}^{l}(\mathbf{p})$  encodes the distance between any pair of nodes in  $\mathbf{p}$  is 2. However, there is no such  $\mathbf{p}$  in  $H_{k}$ . This is sufficient to show that  $(k + 1, t)$ -FWL can distinguish  $G_{k}$  and  $H_{k}$ . The proof for  $(k, t + 1)$ -FWL is similar, as  $(k, t + 1)$ -FWL can also encode pairwise distance information for any  $k + t + 1$ -tuple, thus detecting distance-two-clique with the size of  $k + t + 1$ . This concludes the proof.
Now, we are ready to prove Proposition 3.3 in the main paper. We restate it here:
Proposition B.13. For  $k \geq 2, t \geq 1$ ,  $(k, t + 1)$ -FWL is strictly more powerful than  $(k, t)$ -FWL;  $(k + 1, t)$ -FWL is strictly more powerful than  $(k, t)$ -FWL.
Proof. It is clear the proposition holds given Lemma B.8, Lemma B.12, and Definition A.3.  $\square$
B.2 Complexity analysis
For  $(k,t)$ -FWL, the space complexity is  $O(n^{k})$  as we only need to store representations of all  $k$ -tuples. For time complexity, if  $k$  and  $t$  are relatively small, to update the color of each  $k$ -tuple,  $(k,t)$ -FWL needs to aggregate all  $V^{t}(G)$  possible neighborhood tuples, resulting in  $O(n^{k + t})$  time complexity. If both  $k$  and  $t$  are large enough (related to  $n$ ), the time complexity further increases to  $O(n^{k + t} \cdot m \cdot (\frac{q!}{m!})^2)$ , where  $m = \min(k,t)$  and  $q = \max(k,t)$ .
B.3 Limitations
As discussed in the above section, although  $(k,t)$ -FWL can have a fixed space complexity of  $O(n^{k})$ , the time complexity will grow exponentially if we increase the  $t$ . Further, the increase of the  $t$  will also make the length of the neighborhood tuple increase. This makes the practical usage of  $(k,t)$ -FWL limited (This will be hugely alleviated by  $(k,t)$ -FWL+). This is evidence of the "no free lunch" issue in developing an expressive GNN model. However, we do believe there are many repeat computations in the  $(k,t)$ -FWL that can be safely removed without the hurt of the expressive power. We leave it to our future work.
C Additional discussion on  $(k,t)$ -FWL+
C.1 Detailed proofs for  $(k,t)$ -FWL+
In this section, we provide all detailed proofs for  $(k,t)$ -FWL+. Specifically, we will use  $(k,t)$ -FWL+ to implement many existing powerful GNN/WL models with the best matching expressive power. To simplify notations and make it more clear, let  $\hat{\mathcal{C}}$  denote the color output by  $(k,t)$ -FWL+,  $\tilde{\mathcal{C}}$  denote the
color output by any existing model we want to compare. Further, denote  $\hat{C}^l (v_1,v_2)$  as the color of tuple  $(v_{1},v_{2})$  at iteration  $l$  if  $k = 2$ .
SLFWL(2) [12]: We prove Proposition 3.5 in the main paper. We restate it here:
Proposition C.1. Let  $t = 1, k = 2$ , and  $ES(\mathbf{v}) = \mathcal{N}_1(v_1) \cup \mathcal{N}_1(v_2)$ , the corresponding  $(k, t)$ -FWL+ instance is equivalent to SLFWL(2) [12] and strictly more powerful than any existing node-based subgraph GNNs.
Proof. Given  $t = 1$ ,  $k = 2$ , and  $ES(\mathbf{v}) = \mathcal{N}_1(v_1) \cup \mathcal{N}_1(v_2)$ , the color update equation of  $(k, t)$ -FWL+ can be written as:
$$
\hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}\right) = \operatorname {H A S H} \left(\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}\right), \{\{\left(\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, w\right), \hat {\mathcal {C}} ^ {l - 1} \left(w, v _ {2}\right)\right) \mid w \in \mathcal {N} _ {1} \left(v _ {1}\right) \cup \mathcal {N} _ {1} \left(v _ {2}\right)) \} \}\right). \tag {24}
$$
We can see Equation (24) exactly matches SLFWL(2) stated in [12] and trivially this instance is as powerful as SLFWL(2). Further, given Theorem 7.1 in [12], we conclude that this instance is strictly more powerful than all existing node-based subgraph GNNs.
$\delta$ -k-LWL: The aggregation scheme of  $\delta$ -k-LWL can be written as:
$$
\tilde {\mathcal {C}} ^ {l} (\mathbf {v}) = \operatorname {H A S H} \left(\tilde {\mathcal {C}} ^ {l - 1} (\mathbf {v}), \left(\{\{\mathcal {C} ^ {l - 1} (\mathbf {u}) | \mathbf {u} \in \tilde {Q} _ {j} (\mathbf {v}) \} \} \mid j \in [ k ]\right)\right), \tag {25}
$$
where  $Q_{j}(\mathbf{v}) = \{\mathbf{v}_{w / j}|w\in Q_{1}(v_{j})\}$ . Next, we prove Proposition 3.6 in the main paper. We restate it here:
Proposition C.2. Let  $t = 1$ ,  $k = k$ , and  $ES(\mathbf{v}) = \bigcup_{i=1}^{k} Q_1(v_i)$ , the corresponding  $(k, t)$ -FWL+ instance is more powerful than  $\delta$ - $k$ -LWL [8].
Proof. Given  $t = 1$ ,  $k = k$ , and  $ES(\mathbf{v}) = \bigcup_{i=1}^{k} Q_1(v_i)$ , the color update equation of  $(k, t)$ -FWL+ can be written as:
$$
\hat {\mathcal {C}} ^ {l} (\mathbf {v}) = \operatorname {H A S H} \left(\hat {\mathcal {C}} ^ {l - 1} (\mathbf {v}), \{\{(\hat {\mathcal {C}} ^ {l - 1} (\mathbf {u}) | \mathbf {u} \in Q _ {w} ^ {F} (\mathbf {v})) | w \in \bigcup_ {i = 1} ^ {k} Q _ {1} (v _ {i}) \} \}\right). \tag {26}
$$
Given two  $k$ -tuple  $\mathbf{v}_1, \mathbf{v}_2 \in V^k(G)$ , it is easy to see that for any node  $w \in V(G)$ ,  $\hat{\mathcal{C}}^0(\mathbf{v}_{1,w/j})$  will be different to  $\hat{\mathcal{C}}^0(\mathbf{v}_{2,w/j})$  as long as there exist any  $v_{1i}$  and  $v_{2i}$  such that  $v_{1i}$  is a neighbor of node  $w$  but  $v_{2i}$  is not for any  $i \in [k], i \neq j$ . This means that for any  $\mathbf{u} \in Q_w^F(\mathbf{v})$ ,  $\hat{\mathcal{C}}^0(\mathbf{u})$  can injectively encode whether  $w$  is a neighbor to all other nodes in tuples. Further, as  $\bigcup_{i=1}^{k} Q_1(v_i)$  includes neighbors of all nodes in tuple  $\mathbf{v}$ , we can injectively encode  $(\{\hat{\mathcal{C}}^l(\mathbf{v}_{w/j}) | w \in Q_1(v_j)\} | j \in [k])$  for any  $l$  by  $\{\hat{\mathcal{C}}^{l-1}(\mathbf{u}) | \mathbf{u} \in Q_w^F(\mathbf{v})| w \in \bigcup_{i=1}^{k} Q_1(v_i)\}$ . Now, given any two graphs  $G, H$  with  $\hat{\mathcal{C}}^\infty(G) = \hat{\mathcal{C}}^\infty(H)$ . For any  $\mathbf{v}_1 \in V^k(G)$  and  $\mathbf{v}_2 \in V^k(H)$  with  $\hat{\mathcal{C}}^\infty(\mathbf{v}_1) = \hat{\mathcal{C}}^\infty(\mathbf{v}_2)$ , we must have  $\{\hat{\mathcal{C}}^\infty(\mathbf{v}_{1,w/j}) | w \in Q_1(v_{1j})\} = \{\hat{\mathcal{C}}^\infty(\mathbf{v}_{2,w/j}) | w \in Q_1(v_{2j})\}$  for any  $j \in [k]$  given the above statement. Then, it is easy to verify that we cannot further refine the color of tuple  $\mathbf{v}_1$  and  $\mathbf{v}_2$  if we use the stable color of  $(k,t)$ -FWL+ as initial color to perform another iteration of  $\delta$ -k-LWL, so as the final graph color histogram. Therefore, we conclude that  $(k,t)$ -FWL+ is more powerful than  $\delta$ -k-LWL.
GraphSNN [21]: The GNN aggregation scheme of GraphSNN can be written as:
$$
\tilde {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {1}\right) = \operatorname {H A S H} \left(\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {1}\right), \{\{\left(\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, w\right), \tilde {\mathcal {C}} ^ {l - 1} (w, w)\right) \mid w \in Q _ {1} \left(v _ {1}\right) \} \}, \right. \tag {27}
$$
$$
\tilde {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}\right) = \mathrm {H A S H} \left(\frac {\left| E _ {v _ {1} v _ {2}} \right| \left| V _ {v _ {1} v _ {2}} \right| ^ {\lambda}}{\left| V _ {v _ {1} v _ {2}} \right| \left| V _ {v _ {1} v _ {2}} - 1 \right|}\right), \tag {28}
$$
where  $|E_{v_1 v_2}|, |V_{v_1 v_2}|$  are the number of edges and nodes in the overlapping 1-hop subgraph between node  $v_1$  and  $v_2$ ,  $\lambda$  is a constant. Next, we prove Proposition 3.7 in the main paper. We restate it here:
Proposition C.3. Let  $t = 2$ ,  $k = 2$ , and  $ES^2(\mathbf{v}) = (Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))$ , the corresponding  $(k, t)$ -FWL+ instance is more powerful than GraphSNN [21].
Proof. Here we prove a slightly stronger one: even without a hierarchical multiset but only a plain multiset, the resulted  $(k,t)$ -FWL+ is already powerful enough to match GraphSNN. Given  $t = 2$ ,  $k = 2$ , and  $ES^2(\mathbf{v}) = (Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))$ , the color update equation of  $(k,t)$ -FWL+ can be written as:
$$
\begin{array}{l} \hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}\right) = \operatorname {H A S H} \left(\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}\right), \{\{\left(\hat {\mathcal {C}} ^ {l - 1} \left(u _ {1}, u _ {2}\right) \mid \left(u _ {1}, u _ {2}\right) \in Q _ {\left(w _ {1}, w _ {2}\right)} ^ {F} \left(v _ {1}, v _ {2}\right)\right)\right) \tag {29} \\ \left. \left| \left(w _ {1}, w _ {2}\right) \in \left(Q _ {1} (v _ {1}) \cap Q _ {1} (v _ {2})\right) \times \left(Q _ {1} (v _ {1}) \cap Q _ {1} (v _ {2})\right) \right\} \right\}. \\ \end{array}
$$