SlowGuess/NeurIPS_2023_OCR huggingface dataset:
First, we show that  $\hat{\mathcal{C}}^1(v_1, v_2)$  is already powerful to recover all the information in Equation (28). For any  $(w_1, w_2) \in (Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))$ ,  $w_1$  and  $w_2$  must all be common neighbors of node  $v_1$  and  $v_2$ . Therefore  $(Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))$  will contain all node pairs in the 1-hop overlapping subgraph of  $(v_1, v_2)$ . Thus we have the size of  $(Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))$  equal to  $|V_{v_1 v_2}|^2$  and this information will be definitely encoded in  $\hat{\mathcal{C}}^1(v_1, v_2)$  by aggregating all possible tuple  $\left(\hat{\mathcal{C}}^0(u_1, u_2)|(u_1, u_2) \in Q_{(w_1, w_2)}^F(v_1, v_2)\right)$ . Further, we have  $(w_1, w_2) \in Q_{(w_1, w_2)}^F(v_1, v_2)$ , which means  $\hat{\mathcal{C}}^1(v_1, v_2)$  will also encode  $\{\{\hat{\mathcal{C}}^0(w_1, w_2)|(w_1, w_2) \in (Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))\}$ . As  $\hat{\mathcal{C}}^0(w_1, w_2)$  encode whether there is an edge between  $w_1$  and  $w_2$ , it is easy to see  $\{\{\hat{\mathcal{C}}^0(w_1, w_2)|(w_1, w_2) \in (Q_1(v_1) \cap Q_1(v_2)) \times (Q_1(v_1) \cap Q_1(v_2))\}\}$  can encode  $|E_{v_1 v_2}|$ . Thus we can conclude that  $\hat{\mathcal{C}}^1(v_1, v_2)$  can encode Equation (28). Namely, for any two tuples  $(v_{11}, v_{12})$ ,  $(v_{21}, v_{22}) \in V^2(G)$ , we have:  $\hat{\mathcal{C}}^l(v_{11}, v_{12}) = \hat{\mathcal{C}}^l(v_{21}, v_{22}) \Rightarrow \hat{\mathcal{C}}^l(v_{11}, v_{12}) = \hat{\mathcal{C}}^l(v_{21}, v_{22})$ , for any  $l \geq 1$ .
Second, for any tuple  $(v_{1}, v_{1}) \in V^{2}(G)$ , the neighbor in  $(k, t)$ -FWL+ is  $Q_{1}^{2}(v_{1})$ . For any  $(w_{1}, w_{2}) \in Q_{1}^{2}(v_{1})$ , it is easy to see that  $\hat{\mathcal{C}}^{0}(w_{1}, w_{2})$  will be different between tuples with  $w_{1} \neq w_{2}$  and  $w_{1} = w_{2}$ . This implies that  $(k, t)$ -FWL+ can injectively encode  $\{\{\hat{\mathcal{C}}^{l}(w, w) | w \in Q_{1}(v_{1})\}\}$  for any  $l$  as  $(w_{1}, w_{2}) \in Q_{(w_{1}, w_{2})}^{F}(v_{1}, v_{1})$ . Namely, for any two nodes  $v_{1}, v_{2} \in V(G)$ , we have:  $\hat{\mathcal{C}}^{l}(v_{1}, v_{1}) = \hat{\mathcal{C}}^{l}(v_{2}, v_{2}) \Rightarrow \{\{\hat{\mathcal{C}}^{l-1}(w_{1}, w_{1}) | w_{1} \in Q_{1}(v_{1})\} = \{\{\hat{\mathcal{C}}^{l-1}(w_{2}, w_{2}) | w_{2} \in Q_{1}(v_{2})\}\}$ .
Third, since  $(v_{1},w_{1})\in Q^{F}_{(w_{1},w_{2})}(v_{1},v_{1})$ , it is easy to verify that  $(k,t)$ -FWL+ can injectively encode  $\{\{\hat{C}^l (v_1,w_1)|w_1\in Q_1(v_1)\}\}$  for any  $l$ . Namely, for any two nodes  $v_{1},v_{2}\in V(G)$ , we have:  $\hat{C}^l (v_1,v_1) = \hat{C}^l (v_2,v_2)\Rightarrow \{\{\hat{C}^{l - 1}(v_1,w_1)|w_1\in Q_1(v_1)\} \} = \{\{\hat{C}^{l - 1}(v_2,w_2)|w_2\in Q_1(v_2)\} \}$ .
Now, given any two graphs  $G$ ,  $H$  with  $\hat{\mathcal{C}}^{\infty}(G) = \hat{\mathcal{C}}^{\infty}(H)$ . For any  $(v_{11}, v_{12}) \in V^{2}(G)$  and  $(v_{21}, v_{22}) \in V^{2}(H)$  with  $\hat{\mathcal{C}}^{\infty}(v_{11}, v_{12}) = \hat{\mathcal{C}}^{\infty}(v_{21}, v_{22})$ , if  $v_{11} \neq v_{12}$ , we must have  $v_{21} \neq v_{22}$  and we have  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{22})$  if  $\hat{\mathcal{C}}^{\infty}(v_{11}, v_{12}) = \hat{\mathcal{C}}^{\infty}(v_{21}, v_{22})$  given the first statement. If  $v_{11} = v_{12}$  and  $v_{21} = v_{22}$ , we further denote it by  $(v_{11}, v_{11})$  and  $(v_{22}, v_{22})$ . We have  $\{\{\hat{\mathcal{C}}^{\infty}(w_{11}, w_{11})|w_{11} \in Q_1(v_{11})\} = \{\{\hat{\mathcal{C}}^{\infty}(w_{21}, w_{21})|w_{21} \in Q_1(v_{21})\}$  given the second statement and  $\{\{\hat{\mathcal{C}}^{\infty}(v_{11}, w_{11})|w_{11} \in Q_1(v_{11})\} = \{\{\hat{\mathcal{C}}^{\infty}(v_{21}, w_{21})|w_{21} \in Q_1(v_{21})\}$  given the third statement. Now, given the stable color output by  $(k, t)$ -FWL+, we can verify that performing another iteration using Equation (27) and Equation (28) will not further refine the color of  $(v_{11}, v_{11})$  and  $(v_{22}, v_{22})$ , resulting in the same final graph color histogram. This concludes the proof.
Edge-based subgraph GNNs The GNN aggregation scheme of edge-based subgraph GNNs like  $\mathrm{I}^2$ -GNN [19] can be written as:
$$
\tilde {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}, w _ {2}\right) = \operatorname {H A S H} \left(\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}, w _ {2}\right), \{\{\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, w _ {1}, w _ {2}\right) \mid w _ {1} \in Q _ {1} \left(v _ {2}\right) \} \}\right), \quad \forall w _ {2} \in Q _ {1} \left(v _ {1}\right), \tag {30}
$$
$$
\tilde {\mathcal {C}} ^ {\infty} (G) = \mathrm {H A S H} \left(\{\{\{\{\tilde {\mathcal {C}} ^ {\infty} (v _ {1}, v _ {2}, w _ {2}) | v _ {2} \in V (G) \} \} | w _ {2} \in Q _ {1} (v _ {1}) \} | v _ {1} \in V (G) \}\right), \tag {31}
$$
where we assume that the initial color of  $\tilde{\mathcal{C}}^0 (v_1,v_2,w_2)$  is  $l_{G}(v_{2})$  if  $v_{2}\neq [v_{1},w_{2}]$  or  $\mathrm{HASH}(l_G(v_2),1)$  if  $v_{2} = v_{1}$  or  $\mathrm{HASH}(l_G(v_2),2)$  if  $v_{2} = w_{2}$ . Equation (30) can be described as in the subgraph rooted at edge  $(v_{1},w_{2})$ , we do the 1-WL color update on all node  $v_{2}$ . Meanwhile, the initial color is the node marking of  $v_{1}$  and  $w_{2}$ , which is the most powerful subgraph selection policy [19]. First, we show some useful lemma for edge-based subgraph GNNs.
Lemma C.4. Given two graphs  $G, H$ , for any two tuples  $(v_{11}, v_{12}) \in V^2(G)$ ,  $(v_{21}, v_{22}) \in V^2(H)$ ,  $w_{12} \in Q_1(v_{11})$ , and  $w_{22} \in Q_1(v_{21})$ , we have  $\tilde{\mathcal{C}}^\infty(v_{11}, v_{11}, w_{12}) = \tilde{\mathcal{C}}^\infty(v_{21}, v_{21}, w_{22})$  and  $\tilde{\mathcal{C}}^\infty(v_{11}, w_{21}, w_{21}) = \tilde{\mathcal{C}}^\infty(v_{21}, w_{22}, w_{22})$  if  $\tilde{\mathcal{C}}^\infty(v_{11}, v_{12}, w_{12}) = \tilde{\mathcal{C}}^\infty(v_{21}, v_{22}, w_{22})$ .
Proof. We prove it by contradiction. First, if  $v_{12} = v_{11}$  or  $v_{12} = w_{12}$  we must have  $v_{22} = v_{21}$  or  $v_{22} = w_{22}$ , respectively, as the initial color of  $(v_{1}, v_{1}, w_{2})$  and  $(v_{1}, w_{2}, w_{2})$  are different from other nodes in the subgraph. Further it is easy to show that  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{11}, w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{21}, w_{22}) \iff \tilde{\mathcal{C}}^{\infty}(v_{11}, w_{12}, w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, w_{22}, w_{22})$  as they are uniquely labeled. Second, if  $v_{12} \neq v_{11}, w_{12}$  and  $v_{22} \neq v_{21}, w_{22}$ , we can leverage the fact that the information of tuple  $(v_{1}, v_{1}, w_{2})$  and  $(v_{1}, w_{2}, w_{2})$  can be passed to other nodes injectively through message passing. Suppose we have  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{12}, w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{22}, w_{22})$ , if  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{11}, w_{12}) \neq \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{21}, w_{22})$ , by doing another  $m$  iterations ( $m$  is large enough), this discrepancy must be reflected by  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{12}, w_{12})$  and  $\tilde{\mathcal{C}}^{\infty}(v_{21}, v_{22}, w_{22})$ , respectively. Therefore, we must have  $\tilde{\mathcal{C}}^{\infty + m}(v_{11}, v_{12}, w_{12}) \neq \tilde{\mathcal{C}}^{\infty + m}(v_{21}, v_{22}, w_{22})$ , which is a contradiction to the stable color. The case of  $(v_{1}, w_{2}, w_{2})$  is similar to the first one. This concludes the proof.
Lemma C.5. Given two graphs  $G, H$ , for any two tuples  $(v_{11}, v_{12}) \in V^2(G)$ ,  $(v_{21}, v_{22}) \in V^2(H)$ ,  $w_{12} \in Q_1(v_{11})$ , and  $w_{22} \in Q_1(v_{21})$ , we have  $\{\{\tilde{\mathcal{C}}^\infty(v_{11}, w_{11}, w_{12})|w_{11} \in V(G)\}\} = \{\{\tilde{\mathcal{C}}^\infty(v_{21}, w_{21}, w_{22})|w_{21} \in V(H)\}\}$  if  $\tilde{\mathcal{C}}^\infty(v_{11}, v_{11}, w_{12}) = \tilde{\mathcal{C}}^\infty(v_{21}, v_{21}, w_{22})$  and  $\tilde{\mathcal{C}}^\infty(v_{11}, w_{12}, w_{12}) = \tilde{\mathcal{C}}^\infty(v_{21}, w_{22}, w_{22})$ .
Proof. This lemma is an extension of Lemma B.6 in [12]. First, given Lemma B.6 in [12], it is easy to conclude that we have  $\{\{\tilde{C}^{\infty}(v_{11},w_{11},w_{12})|w_{11}\in Q_{k_1}(v_{11})\cap Q_{k_2}(w_{12})\} =$ $\{\{\tilde{C}^{\infty}(v_{21},w_{21},w_{22})|w_{21}\in Q_{k_1}(v_{21})\cap Q_{k_2}(w_{22})\} \}$  for any  $k_{1},k_{2}\in \mathbb{N}$ . This directly implies  $\{\{\tilde{C}^{\infty}(v_{11},w_{11},w_{12})|w_{11}\in V(G))\} = \{\{\tilde{C}^{\infty}(v_{21},w_{21},w_{22})|w_{21}\in V(H)\} \}$ . This concludes the proof.
Lemma C.6. Given two graphs  $G$ ,  $H$ , for any two tuples  $(v_{11}, v_{12}) \in V^2(G)$ ,  $(v_{21}, v_{22}) \in V^2(H)$ ,  $w_{12} \in Q_1(v_{11})$ , and  $w_{22} \in Q_1(v_{21})$ , we have  $\{\{\tilde{\mathcal{C}}^\infty(v_{11}, w_{11}, w_{12})|w_{11} \in V(G)\}\} = \{\{\tilde{\mathcal{C}}^\infty(v_{21}, w_{21}, w_{22})|w_{21} \in V(H)\}\}$  if  $\tilde{\mathcal{C}}^\infty(v_{11}, v_{12}, w_{12}) = \tilde{\mathcal{C}}^\infty(v_{21}, v_{22}, w_{22})$ .
Proof. Given Lemma C.4, if  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{12}, w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{22}, w_{22})$ , we have  $\tilde{\mathcal{C}}^{\infty}(v_{11}, v_{11}, w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, v_{21}, w_{22})$  and  $\tilde{\mathcal{C}}^{\infty}(v_{11}, w_{21}, w_{21}) = \tilde{\mathcal{C}}^{\infty}(v_{21}, w_{22}, w_{22})$ . Next, given Lemma C.5, we have  $\{\{\tilde{\mathcal{C}}^{\infty}(v_{11}, w_{11}, w_{12})|w_{11} \in V(G)\}\} = \{\{\tilde{\mathcal{C}}^{\infty}(v_{21}, w_{21}, w_{22})|w_{21} \in V(H)\}\}$ . This concludes the proof.
Lemma C.7. For any two graphs  $G$ ,  $H$  and two nodes  $v_{11} \in V(G)$  and  $v_{21} \in V(H)$ , we have  $\{\{\{\tilde{C}^{\infty}(v_{11}, w_{11}, w_{12})|w_{11} \in V(G)\}\}|w_{12} \in Q_1(v_{11})\} = \{\{\{\tilde{C}^{\infty}(v_{21}, w_{21}, w_{22})|w_{21} \in V(H)\}\}|w_{22} \in Q_1(v_{21})\}$  if  $\{\{\{\tilde{C}^{\infty}(v_{11}, w_{11}, w_{12})|w_{12} \in Q_1(v_{11})\}\}|w_{11} \in V(G)\} = \{\{\{\tilde{C}^{\infty}(v_{21}, w_{21}, w_{22})|w_{22} \in Q_1(v_{21})\}\}|w_{21} \in V(H)\}$ .
Proof. If we have  $\{\{\{\tilde{C}^{\infty}(v_{11},w_{11},w_{12})|w_{12}\in Q_1(v_{11})\} |w_{11}\in V(G)\} \} =$ $\{\{\{\tilde{C}^{\infty}(v_{21},w_{21},w_{22})|w_{22}\in Q_1(v_{21})\} |w_{21}\in V(H)\} ,$  for any  $w_{11}\in V(G)$  , we can find a  $w_{21}\in$ $V(H)$  such that  $\{\{\tilde{C}^{\infty}(v_{11},w_{11},w_{12})|w_{12}\in Q_1(v_{11})\} = \{\{\tilde{C}^{\infty}(v_{21},w_{21},w_{22})|w_{22}\in Q_1(v_{21})\} .$  Next, as the color is stable, based on Lemma C.6, we can conclude that  $\{\{\{\tilde{C}^{\infty}(v_{11},w_{11},w_{12})|w_{11}\in$ $V(G)\} |w_{12}\in Q_1(v_{11})\} = \{\{\{\tilde{C}^{\infty}(v_{21},w_{21},w_{22})|w_{21}\in V(H)\} |w_{22}\in Q_1(v_{21})\} .$
Now, given  $t = 2$ ,  $k = 2$ , and  $ES^2(\mathbf{v}) = Q_1(v_2) \times Q_1(v_1)$ , the corresponding  $(k, t)$ -FWL+ instance 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.\left. \right. \tag {32} \\ \left| w _ {1} \in Q _ {1} (v _ {2}) \right\rbrace \left. w _ {2} \in Q _ {1} (v _ {1}) \right\rbrace \}. \\ \end{array}
$$
However, edge-based subgraph GNNs use 3-tuple representations instead of 2-tuples in the  $(k,t)$ -FWL+, which makes the comparison not trivial. Therefore, we slightly rewrite the above equation:
$$
\hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}, w _ {1}, w _ {2}\right) = \operatorname {H A S H} \left(\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}, w _ {1}, w _ {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 {33}
$$
$$
\hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}, w _ {2}\right) = \operatorname {H A S H} \left(\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}, w _ {2}\right), \{\{\hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}, w _ {1}, w _ {2}\right) \mid w _ {1} \in Q _ {1} \left(v _ {2}\right) \} \}\right), \tag {34}
$$
$$
\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), \{\{\hat {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}, w _ {2}\right) \mid w _ {2} \in Q _ {1} \left(v _ {1}\right) \} \}\right), \tag {35}
$$
where we let  $\hat{\mathcal{C}}^0 (v_1,v_2,w_2)$  and  $\hat{\mathcal{C}}^0 (v_1,v_2,w_1,w_2)$  be the same for any  $(v_{1},v_{2})\in V^{2}(G),w_{1}\in$ $Q_{1}(v_{2})$  , and  $w_{2}\in Q_{1}(v_{1})$  . It is easy to verify that the above equations the equivalent to the original one. Now, we prove a strong lemma:
Lemma C.8. For any two graphs  $G$ ,  $H$ , given two tuples  $(v_{11}, v_{12}) \in V^2(G)$  and  $(v_{21}, v_{22}) \in V^2(H)$ , for any  $(w_{11}, w_{12}) \in Q_1(v_{12}) \times Q_1(v_{11})$  and  $(w_{21}, w_{22}) \in Q_1(v_{22}) \times Q_1(v_{21})$ , we have  $\tilde{\mathcal{C}}^{l-1}(v_{11}, w_{11}, w_{12}) = \tilde{\mathcal{C}}^{l-1}(v_{21}, w_{21}, w_{22})$  if  $\hat{\mathcal{C}}^l(v_{11}, v_{12}, w_{11}, w_{12}) = \hat{\mathcal{C}}^l(v_{21}, v_{22}, w_{21}, w_{22})$  for any  $l \geq 1$ .
Proof. We prove it by induction on  $l$ . The base case is easy to verify given Lemma B.1 and the definition of initial color in edge-based subgraph GNNs.
Now suppose it is true for  $l = 2, \ldots, l - 1$ . At iteration  $l$ , if  $\hat{\mathcal{C}}^l(v_{11}, v_{12}, w_{11}, w_{12}) = \hat{\mathcal{C}}^l(v_{21}, v_{22}, w_{21}, w_{22})$ , given Equation 33, we must have:
$$
\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1 1}, v _ {1 2}, w _ {1 1}, w _ {1 2}\right) = \hat {\mathcal {C}} ^ {l - 1} \left(v _ {2 1}, v _ {2 2}, w _ {2 1}, w _ {2 2}\right), \tag {36}
$$
$$
\hat {\mathcal {C}} ^ {l - 1} \left(u _ {1 1}, u _ {1 2}\right) = \hat {\mathcal {C}} ^ {l - 1} \left(u _ {2 1}, u _ {2 2}\right), \tag {37}
$$
for any  $(u_{11}, u_{12}) \in Q_{(w_{11}, w_{12})}^{F}(v_{11}, v_{12})$  and  $(u_{21}, u_{22}) \in Q_{(w_{21}, w_{22})}^{F}(v_{21}, v_{22})$  at the same position. Particularly, we have  $(v_{11}, w_{11}) \in Q_{(w_{11}, w_{12})}^{F}(v_{11}, v_{12})$  and  $(v_{21}, w_{21}) \in Q_{(w_{21}, w_{22})}^{F}(v_{21}, v_{22})$  and they are in the same position. Given Equation (35), we have:
$$
\{\{\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1 1}, w _ {1 1}, y _ {1 2}\right) \mid y _ {1 2} \in Q _ {1} \left(v _ {1 1}\right) \} \} = \{\{\hat {\mathcal {C}} ^ {l - 1} \left(v _ {2 1}, w _ {2 1}, y _ {2 2}\right) \mid y _ {2 2} \in Q _ {1} \left(v _ {2 1}\right) \} \}. \tag {38}
$$
Equation (38) further indicates that for any  $y_{12} \in Q_1(v_{11})$ , we can find a  $y_{22} \in Q_1(v_{21})$  such that
$$
\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1 1}, w _ {1 1}, y _ {1 2}\right) = \hat {\mathcal {C}} ^ {l - 1} \left(v _ {2 1}, w _ {2 1}, y _ {2 2}\right). \tag {39}
$$
Next, given Equation (34), we can conclude that:
$$
\{\{\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1 1}, w _ {1 1}, x _ {1 1}, y _ {1 2}\right) \mid x _ {1 1} \in Q _ {1} \left(w _ {1 1}\right) \} = \{\{\hat {\mathcal {C}} ^ {l - 1} \left(v _ {2 1}, w _ {2 1}, x _ {2 1}, y _ {2 1}\right) \mid x _ {2 1} \in Q _ {1} \left(w _ {2 1}\right) \}. \tag {40}
$$
Since the statement follows at iteration  $l - 1$ , we have  $\{\tilde{\mathcal{C}}^{l - 2}(v_{11},x_{11},y_{12})|x_{11}\in Q_1(w_{11})\} = \{\tilde{\mathcal{C}}^{l - 2}(v_{21},x_{21},y_{12})|x_{21}\in Q_1(w_{21})\}$ . We also have  $\tilde{\mathcal{C}}^{l - 2}(v_{11},w_{11},y_{12}) = \tilde{\mathcal{C}}^{l - 2}(v_{21},w_{21},y_{22})$  given Equation (39). This means that we must have  $\tilde{\mathcal{C}}^{l - 1}(v_{11},w_{11},y_{12}) = \tilde{\mathcal{C}}^{l - 1}(v_{21},w_{21},y_{22})$  based on Equation (30). Finally, as  $w_{12}$  is one of  $y_{12}$  and  $w_{22}$  is one of  $y_{22}$  and it is one such pair that holds the statement at iteration  $l - 1$ . It must be the case that they are also the pair at iteration  $l$ . This means we have  $\tilde{\mathcal{C}}^{l - 1}(v_{11},w_{11},w_{12}) = \tilde{\mathcal{C}}^{l - 1}(v_{21},w_{21},w_{22})$ , which concludes the proof.
Now we prove Proposition 3.8 in the main paper. We restate it here:
Proposition C.9. Let  $t = 2, k = 2$ , and  $ES^2(\mathbf{v}) = Q_1(v_2) \times Q_1(v_1)$ , the corresponding  $(k, t)$ -FWL+ instance is more powerful than edge-based subgraph GNNs like  $I^2$ -GNN [19].
Proof. Note that the initial color of edge-based subgraph GNNs is weaker than  $(k, t)$ -FWL+ given Lemma C.8, but it is still sufficient to show that the stable color from  $(k, t)$ -FWL+ cannot be further refined by edge-based subgraph GNNs. For any two graphs  $G$  and  $H$  with  $\hat{\mathcal{C}}^{\infty}(G) = \hat{\mathcal{C}}^{\infty}(H)$ , it is easy to see that for any  $(v_{11}, v_{12}) \in V^{2}(G)$  and  $w_{12} \in Q_{1}(v_{11})$ , we can find a  $(v_{21}, v_{22}) \in V^{2}(H)$  and  $w_{22} \in Q_{1}(v_{21})$  with  $\hat{\mathcal{C}}^{\infty}(v_{11}, v_{12}, w_{12}) = \hat{\mathcal{C}}^{\infty}(v_{21}, v_{22}, w_{22})$ . Then, given Equation (34), we have  $\{\{\hat{\mathcal{C}}^{\infty}(v_{11}, v_{12}, w_{11}, w_{12})|w_{11} \in Q_{1}(v_{12})\} = \{\{\hat{\mathcal{C}}^{\infty}(v_{21}, v_{22}, w_{21}, w_{22})|w_{21} \in Q_{1}(v_{22})\}\}$ . Further, given Lemma C.8, we have  $\{\{\hat{\mathcal{C}}^{\infty}(v_{11}, w_{11}, w_{12})|w_{11} \in Q_{1}(v_{12})\} = \{\{\hat{\mathcal{C}}^{\infty}(v_{21}, w_{21}, w_{22})|w_{21} \in$
$Q_{1}(v_{22})\} \} \mathrm{Now,}$  if we use the stable color from  $(k,t)$  -FWL  $^+$  as the initial color to do one more iteration of edge-based subgraph GNNs, it is easy to see that the color of  $(v_{11},w_{11},w_{12})$  and  $(v_{21},w_{21},w_{22})$  cannot get further refined and we have  $\tilde{\mathcal{C}}^{\infty}(v_{11},v_{12},w_{12}) = \tilde{\mathcal{C}}^{\infty}(v_{21},v_{22},w_{22})$  Note that the graph color histogram of edge-based subgraph GNNs is slightly different than  $(k,t)$  FWL  $^+$  as in edge-based subgraph GNNs, the order of multiset is  $v_{2}\to w_{2}\to v_{1}$  . In  $(k,t)$  -FWL  $^+$  , the order of multiset is  $w_{2}\rightarrow v_{2}\rightarrow v_{1}$  . However, based on Lemma C.7, the first order is less powerful than the second order. Therefore we can conclude that the final graph color histogram of edge-based subgraph GNNs will also be the same. This concludes the proof.
KP-GNN [22]: The GNN aggregation scheme of KP-GNN with the shortest path distance kernel and peripheral subgraph encoder as 1-WL 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), \{\{(\tilde {\mathcal {C}} ^ {l - 1} (w, w), \tilde {\mathcal {C}} ^ {l - 1} (v _ {1}, w)) | w \in V (G) \} \}\right), \tag {41}
$$
$$
\tilde {\mathcal {C}} ^ {l} \left(v _ {1}, v _ {2}\right) = \operatorname {H A S H} \left(\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, v _ {2}\right), \{\{\tilde {\mathcal {C}} ^ {l - 1} \left(v _ {1}, w\right) | w \in Q _ {\mathrm {S P D} \left(v _ {1}, v _ {2}\right)} \left(v _ {1}\right) \cap Q _ {1} \left(v _ {2}\right) \} \}\right), \tag {42}
$$
where the initial color of  $\tilde{\mathcal{C}}^0 (v_1,v_2)$  is the isomorphism type of  $(v_{1},v_{2})$  and  $\mathrm{SPD}(v_1,v_2)$ . Before we prove Proposition 3.9, we first show that a slightly stronger version of  $(k,t)$ -FWL+ is still bounded by KP-GNN.
Lemma C.10. Let  $t = 1$ ,  $k = 2$ , and  $ES^t(\mathbf{v}) = Q_{SPD(v_1, v_2)}(v_1) \cap Q_1(v_2)$ . Further let the initial color  $\hat{\mathcal{C}}^0(v_1, v_2)$  encode  $SPD(v_1, v_2)$ , the corresponding  $(k, t)$ -FWL+ instance is at most as powerful as KP-GNN [22] with the peripheral subgraph encoder as powerful as 1-WL.
Proof. Given  $t = 1$ ,  $k = 2$ , and  $ES^t(\mathbf{v}) = Q_{\mathrm{SPD}(v_1, v_2)}(v_1) \cap Q_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), \{\{\hat {\mathcal {C}} ^ {l - 1} \left(v _ {1}, w\right) \mid w \in Q _ {\mathrm {S P D} \left(v _ {1}, v _ {2}\right)} \left(v _ {1}\right) \cap Q _ {1} \left(v _ {2}\right) \} \}\right). \tag {43}
$$
We can see Equation (43) exactly match Equation (42). However, the update of  $\hat{C}^l(v_1,v_1)$  is not equal to Equation (41) as the neighbor of  $(v_{1},v_{1})$  in  $(k,t)$ -FWL+ only contain itself. Therefore it is easy to see that for any  $l$  given two nodes  $v_{1},v_{2}\in V(G)$ , must have  $\tilde{C}^l (v_1,v_1) = \tilde{C}^l (v_2,v_2)$  if  $\hat{C}^l (v_1,v_1) = \hat{C}^l (v_2,v_2)$ . Given two graphs  $G$  and  $H$  such that  $\tilde{C}^\infty (G) = \tilde{C}^\infty (H)$ , for any  $(v_{11},v_{12})\in V^{2}(G)$  and  $(v_{21},v_{22})\in V^{2}(H)$  with  $\tilde{C}^\infty (v_{11},v_{12}) = \tilde{C}^\infty (v_{21},v_{22})$ , we must have  $\{\tilde{C}^\infty (v_{11},w)|w\in Q_{\mathrm{SPD}(v_{11},v_{12})}(v_{11})\cap Q_1(v_{12})\} = \{\tilde{C}^\infty (v_{21},w)|w\in Q_{\mathrm{SPD}(v_{21},v_{22})}(v_{21})\cap Q_1(v_{22})\}$ . Thus, it is easy to verify that if we use the stable color output by KP-GNN as initial color to perform 1 iteration of  $(k,t)$ -FWL+, we have  $\hat{C}^\infty (v_{11},v_{12}) = \hat{C}^\infty (v_{21},v_{22})$ . Further, given Equation (41), for any  $(v_{11},v_{11})\in V^{2}(G)$ , we can find a  $(v_{22},v_{22})\in V^{2}(H)$  such that  $\tilde{C}^\infty (v_{11},v_{11}) = \tilde{C}^\infty (v_{22},v_{22})$ , which means  $\{\tilde{C}^\infty (v_{11},w_{12})|w_{12}\in V(G)\} = \{\tilde{C}^\infty (v_{22},w_{22}),|w_{22}\in V(H)\}$ , and thus  $\{\tilde{C}^\infty (w_{11},w_{12})|(w_{11},w_{12})\in V^{2}(G)\} = \{\tilde{C}^\infty (w_{21},w_{22})|(w_{21},w_{22})\in V^{2}(H)\}$ . This indicates that even if  $(k,t)$ -FWL+ use the shortest path distance as the initial color, we still have  $\{\tilde{C}^\infty (w_{11},w_{12})|(w_{11},w_{12})\in V^{2}(G)\} = \{\tilde{C}^\infty (w_{21},w_{22})|(w_{21},w_{22})\in V^{2}(H)\}$  and thus the final graph color histogram cannot be refined. This concludes the proof.
Now, it is easy to prove Proposition 3.9 in the main paper. We restate it here:
Proposition C.11. Let  $t = 1$ ,  $k = 2$ , and  $ES(\mathbf{v}) = Q_{SPD(v_1,v_2)}(v_1) \cap Q_1(v_2)$ , the corresponding  $(k,t)$ -FWL+ instance is at most as powerful as KP-GNN [22] with the peripheral subgraph encoder as powerful as 1-WL.
Proof. It is easy to see that the corresponding  $(k, t)$ -FWL+ is weaker than Equation (43) with the initial color as the shortest path distance, we omit the detailed proof. Then, given Lemma C.10, we can directly conclude the proof.
We conjecture that if we further equip  $(k,t)$ -FWL+ with Equation (41),  $(k,t)$ -FWL+ can be as powerful as KP-GNN. We also conjecture that if we let  $t = p$  and  $k = 2$ ,  $ES(\mathbf{v}) = (Q_{\mathrm{SPD}}(v_1,v_2)(v_1) \cap Q_1(v_2))^p$  with initial color as the shortest path distance, the resulting  $(k,t)$ -FWL+ has a close relationship with KP-GNN with the peripheral subgraph encoder as powerful as LFWL(p) [12] and leave the detailed proof in the future.
GDGNN [23]. Before we give the formal update equation of GDGNN, we first formally define  $\mathcal{SP}(v_1,v_2)$  as a set of nodes that are in the shortest distance path between node  $v_{1}$  and  $v_{2}$ . Namely,  $\mathcal{SP}(v_1,v_2) = \{w|\mathrm{SPD}(v_1,w) + \mathrm{SPD}(w,v_2) = \mathrm{SPD}(v_1,v_2),\forall w\in V(G)\}$  if  $v_{1}\neq v_{2}$  and  $\mathcal{SP}(v_1,v_1) = \{v_1\}$ . Then, the color update equation of GDGNN can be written as: