SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Algorithm 2 Computing Distance between Two Sets of Graphs
Require:  $\mathcal{G}_1$  is a set of graphs.   
Require:  $\mathcal{G}_2$  is a set of graphs.   
Require:  $D$  to be the maximum homology degree to be computed.   
Require:  $f$  is a function to generate a filtration for persistent homology computations.   
Ensure: Dist is the distance between  $\mathcal{G}_1,\mathcal{G}_2$    
function COMPUTESETDISTANCE  $(\mathcal{G}_1,\mathcal{G}_2)$ $\Lambda_1\gets$  is an empty list.   
 $\Lambda_{2}\gets$  is an empty list.   
DistVec  $\leftarrow$  is an empty  $D + 1$  -dimensional vector.   
for  $G\in \mathcal{G}_1$  do L  $\leftarrow$  ComputePersistenceLandscape  $(G,f)$  AddItem(  $\Lambda_{1},L$    
end for   
for  $G\in \mathcal{G}_2$  do L  $\leftarrow$  ComputePersistenceLandscape  $(G,f)$  AddItem(  $\Lambda_{2},L$    
end for   
 $\bar{\Lambda}_{1}\gets$  ComputeAverageLandscape  $(\Lambda_{1})$ $\bar{\Lambda}_{2}\gets$  ComputeAverageLandscape  $(\Lambda_{1})$  ▷ By Algorithm 1.   
 $k\gets 0$    
while  $k\leq D$  do DistVec[k]  $\leftarrow$  |supNorm(  $\bar{\Lambda}_1(k,t))-$  supNorm(  $\bar{\Lambda}_2(k,t))|$    
end while   
Dist  $\leftarrow ||DistVec||_2$    
return Dist   
end function   
function COMPUTEPERSISTENCELANDSCAPE(G,f,D)   
 $P\gets$  compute persistence diagram for  $G$  using  $f$  for homology degree  $k\in \{0,\dots ,D\}$ $L\gets$  transform  $P$  into a persistence landscape. See [10] for implementation. return  $L$    
end function
where  $E_{x}$  is the set of edges incident to  $x \in V$ . However, one can also define a filtration directly over vertices with a scalar valued function  $h \colon V \to \mathbb{R}$ . By assumption,  $h$  can attain only a finite number of values, call the unique values  $b_{1}, b_{2}, \ldots, b_{k}$ . Thus, we can also compute a filtration  $\emptyset \subseteq G_{0} \subseteq G_{1} \ldots \subseteq G_{k-1} \subseteq G_{k} = G$ , where each  $G_{i} \coloneqq (V_{i}, E_{i})$ , with  $V_{i} \coloneqq \{v \in V \mid h(v) \leq b_{i}\}$  and  $E_{i} \coloneqq \{e \in E \mid \max_{v \in e} h(v) \leq b_{i}\}$ . Similarly, the explicit ordering on  $V$  given by  $h$  induces an ordering on  $E$ :
$$
e \leq e ^ {\prime} \iff \max  _ {v \in e} h (v) \leq \max  _ {v ^ {\prime} \in e ^ {\prime}} h \left(v ^ {\prime}\right)
$$
The key idea here is that either choice gives rise to an ordering of both edges, and vertices that are used to calculate persistent homology of the graph. This means that the arguments for Theorem 1 and Theorem 5 also bound the bottle-neck distance for persistence diagrams generated using vertex filtrations.
Graph perturbations. Here we explicitly specify a common framework used in the proofs for stability of curvature functions. As mentioned in the main text, we consider perturbations to unweighted, connected graphs  $G = (V,E)$ , with  $|V| = n$  and  $|E| = m$ . In the case of edge addition, let  $i*$  and  $j*$  be arbitrary vertices that we wish to connect with a new edge, forming our new graph  $G' = (V,E')$  where  $E' = E \cup (i*,j*)$  such that  $|E'| = m + 1$ . For edge deletion, we similarly let  $(i*,j*) \in E$  be the edge we delete such that  $E' \subset E$  and  $|E'| = m - 1$ . Moreover, we only consider edges  $(i*,j*)$  that leave  $G'$  connected.
B.1.1 Forman-Ricci Curvature
Proof. We first handle the case of edge addition, using the graph perturbation framework specified above. By definition  $\kappa_{\mathrm{FR}}(i,j)$  depends only on the degrees of the source and target  $(i,j)\in E$  and the number of triangles formed using  $(i,j),|\#_{\Delta_{ij}}| = |N(i)\cap N(j)|$ , where  $N(i),N(j)$  are the set of neighbouring nodes for  $i,j$  respectively. This is a local computation-- all relevant information can be computed in the subgraph surrounding the inserted edge  $(i*,j*)$ . Thus, in order to understand stability of  $\kappa_{\mathrm{FR}}(i,j)$ , we need to understand how  $N(i)$  and  $N(j)$  change under graph perturbations. For our new graph  $G^{\prime}$ , the only edges with potential to change their curvature lie in the set:
$$
E _ {*} := \{(u, v) \in E | u, v \in N (i *) \cup N (j *) \}
$$
For the new edge  $(i*, j*) \in E_*$ , we can directly compute  $\kappa_{\mathrm{FR}}(i*, j*)$  based on the original structure of the graph. However, in terms of stability we are interested in the other members of  $E_*$ , i.e. edges in the original graph. The analysis of  $E_*$  can be split into two cases: one of the nodes is  $i*$  or  $j*$  or neither is.
Case 1: WLOG assume  $(i,j) = (i*,j)\in E_{*}$ . Clearly,  $d_i^\prime = d_i + 1$ . As for  $|\#_{\Delta_{ij}}^{\prime}|$ , this can maximally be increased by 1 in the case that  $j*\in N(j)$ , else the triangle count stays the same.
Case 2: Let  $(i,j)\in E_{*}$  where  $i,j\in V\setminus \{i*,j*\}$ . In this case, there is no change to the degree nor the number  $|\#_{\Delta_{uv}}^{\prime}|$ .
Thus Case 1 defines the bounds which are dictated as follows: if  $(i*, j*)$  forms a new triangle, our curvature can increase by 2, and if no triangle is formed the curvature can decrease by 1 in response to the increased degree. Thus we can bound  $\kappa_{\mathrm{FR}}'(i, j) := 4 - d_i' - d_j' + 3|\#_{\Delta_{ij}}'\|$  as follows:
$$
\kappa_ {\mathrm {F R}} (i, j) - 1 \leq \kappa_ {\mathrm {F R}} ^ {\prime} (i, j) \leq \kappa_ {\mathrm {F R}} (i, j) + 2
$$
The case of edge deletion can be handled similarly. Again, we need only consider the edges in  $E_*$ , as defined in the proof above, and can make the same case argument.
Case 1 WLOG assume  $(i,j) = (i*,j)\in E_*$ . Clearly,  $d_i^\prime = d_i - 1$ . As for  $|\#_{\Delta_{ij}}^{\prime}|$ , this can maximally be decreased by 1.
Case 2: Let  $(i,j)\in E_{*}$  where  $i,j\in V\setminus \{i*,j*\}$ . Degree and number of triangles do not change in response to the perturbation.
Again, Case 1 gives rise to the following bounds hold for  $\kappa_{\mathrm{FR}}^{\prime}$ :
$$
\kappa_ {\mathrm {F R}} (i, j) - 2 \leq \kappa_ {\mathrm {F R}} ^ {\prime} (i, j) \leq \kappa_ {\mathrm {F R}} (i, j) + 1
$$
B.1.2 Ollivier-Ricci Curvature
The definition of  $\kappa_{\mathrm{OR}}$  establishes a relationship between the graph metric  $d_G$ , the Wasserstein distance  $W_1$ , the probability distributions  $\mu_i, \mu_j$  at nodes  $i, j$  and the curvature. Given that we are considering unweighted, and connected graphs we know that  $(V, d_G)$  is a well-defined metric space and therefore  $W_1$  (as defined in [55]) defines the  $L_1$  transportation distance between two probability measures  $\mu_i, \mu_j$  with respect to the metric  $d_G$ . This is relevant for a much larger class of graph metrics than just the standard choice of the shortest path distance. We use results from [55] and the metric properties of  $W_1$  and  $d_G$  on graphs to bound the potential changes in  $\kappa_{\mathrm{OR}}$  following an edge perturbation.
Lemma 1. Consider the triple  $\mathcal{G} = (G, d_G, \mu)$ . Let  $\delta_i$  denote the Dirac measure at node  $i$  and  $J(i) := W_1(\delta_i, \mu_i)$  the corresponding jump probability in the graph  $G$ . The Ollivier-Ricci curvature
$\kappa_{OR}(i,j)$  satisfies the following Bonnet-Myers inspired upper bound:
$$
\kappa_ {O R} (i, j) \leq \frac {J (i) + J (j)}{d _ {G} (i , j)} \tag {7}
$$
Proof. Rearranging the original definition for OR curvature gives:
$$
W _ {1} (\mu_ {i}, \mu_ {j}) = d _ {G} (i, j) (1 - \kappa_ {\mathrm {O R}} (i, j))
$$
By definition of the  $W_{1}$ , we have  $d_{G}(i,j) = W_{1}(\delta_{i},\delta_{j})$ . Using this and the fact that  $W_{1}$  satisfies the triangle inequality property, we can construct the desired upper bound on  $\kappa_{\mathrm{OR}}$ :
$$
d _ {G} (i, j) \leq W _ {1} (\delta_ {i}, \mu_ {i}) + W _ {1} (\mu_ {i}, \mu_ {j}) + W _ {1} (\delta_ {j}, \mu_ {j})
$$
$$
d _ {G} (i, j) \leq J (i) + d _ {G} (i, j) \left(1 - \kappa_ {\mathrm {O R}} (i, j)\right) + J (j)
$$
$$
\begin{array}{l} d _ {G} (i, j) \left(1 - \left(1 - \kappa_ {\mathrm {O R}} (i, j)\right)\right) \leq J (i) + J (j) \\ \kappa_ {\mathrm {O R}} (i, j) \leq \frac {J (i) + J (j)}{d _ {G} (i , j)} \\ \end{array}
$$
Proof. We first prove the upper bound. Given that  $G'$  is still connected (by assumption), and both  $W_1'$  and  $d_{G'}$  still satisfy the metric axioms, this result follows directly from Lemma 1. For proving the lower bound, recall from Section 3.1 that  $\mathcal{G}' = (G', d_{G'}, \mu')$  specifies the behaviour of the new graph metric  $d_{G'}$  and the and the updated probability measure  $\mu'$  in response to the perturbation. Moreover, this defines a new Wasserstein distance  $W_1'$  and we will show that the maximum reaction (as evaluated by  $W_1'$ ) to the perturbation  $W_{\max}' := \max_{x \in V} W_1'(\mu_x', \mu_x)$  can be used to express a general lower bound for OR curvature in the event of a perturbation. As per Eq. (2), we can define our curvature following the perturbation as:
$$
\kappa_ {\mathrm {O R}} ^ {\prime} (i, j) = 1 - \frac {1}{d _ {G ^ {\prime}} (i , j)} W _ {1} ^ {\prime} \left(\mu_ {i} ^ {\prime}, \mu_ {j} ^ {\prime}\right) \tag {8}
$$
Once again, we can make use of the metric properties of  $W_1'$ , to establish the lower bound as
$$
\begin{array}{l} \kappa_ {\mathrm {O R}} ^ {\prime} (i, j) \geq 1 - \frac {1}{d _ {G ^ {\prime}} (i , j)} \left[ W _ {1} ^ {\prime} \left(\mu_ {i}, \mu_ {i} ^ {\prime}\right) + W _ {1} ^ {\prime} \left(\mu_ {j}, \mu_ {j} ^ {\prime}\right) + W _ {1} ^ {\prime} \left(\mu_ {i}, \mu_ {j}\right) \right] \\ \geq \frac {1}{d _ {G ^ {\prime}} (i , j)} \big [ 2 W _ {\max} ^ {\prime} + W _ {1} ^ {\prime} (\mu_ {i}, \mu_ {j}) \big ]. \\ \end{array}
$$
B.1.3 Resistance Curvature
A brief clarification on inverting edge weights. The common practice when computing effective resistance is to invert the edge weights of a graph in order to get a resistance. Given the spirit of resistance from circuit theory, we know that a high resistance should make it difficult for current to pass between nodes. Analogously when thinking about our graph as a markov chain, this would correspond to a low transition probability. So, if we think about our edge weights as coming from some kernel where higher similarity results in a higher edge weight, then we should definitely invert our edge weights to get to resistance. However, in the case that our edge weights represent the cost of travelling between nodes, then this is a suitable proxy for resistance in which case inverting the nodes is unnecessary. In order to achieve the theoretical properties of curvature with well known examples described in [19], we do not invert the edge weights in our experiments. Which means
that the curvature itself interprets the edge weights themselves as a cost/resistance; we think it is an important point to specify especially given the similarity to markov chains and the borrowed terminology from circuit theory.
Definitions. The resistance distance, intuitively, measures how well connected two nodes are in a graph. It is defined in [19] as:
$$
R _ {i j} := \left(\mathbf {e} _ {i} - \mathbf {e} _ {j}\right) ^ {\intercal} Q ^ {\dagger} \left(\mathbf {e} _ {i} - \mathbf {e} _ {j}\right) \tag {9}
$$
Here  $Q$  is the normalized laplacian (weighted degrees on the diagonal, see [19]),  $Q^{\dagger}$  the Moore-Penrose inverse, and  $\mathbf{e}_i$  is  $i^{th}$  unit vector. This is the main feature that will be studied to understand the stability of the curvature measure, and can be computed for any two nodes in a connected component of a graph.
Recalling the equations for node resistance curvature and resistance curvature, i.e. Eq. (3), it becomes clear that the main task is to understand how the resistance distance changes in response to perturbations. The results below from [46], are crucial for our proofs. Let  $C(i,j)$  be the commute time between nodes  $i,j\in V$ . It is important to note that these results depend on the normalized Laplacian, defined in [46] as  $N = D^{\frac{1}{2}}AD^{\frac{1}{2}}$ , with eigenvalues  $\lambda_{i}$ , ordered such that  $\lambda_{1}\geq \lambda_{2}\geq \dots$ . Here,  $D$  is the diagonal matrix with inverse degrees and  $A$  the adjacency matrix. Also, as is consistent with the rest of the paper, assume our graph has  $n$  nodes and  $m$  edges, and  $d_{i}$  is the degree at node  $i\in V$ .
Proposition 1. For a graph  $G$ , let  $N = D^{\frac{1}{2}}AD^{\frac{1}{2}}$  be the normalized Laplacian with eigen values  $\lambda_1 \geq \lambda_2 \geq \dots \geq \lambda_n$ . Then, the commute time in  $G$  between nodes  $i, j$  is subject to the following bounds:
$$
m \left(\frac {1}{d _ {s}} + \frac {1}{d _ {t}}\right) \leq C (i, j) \leq \frac {2 m}{1 - \lambda_ {2}} \left(\frac {1}{d _ {s}} + \frac {1}{d _ {t}}\right) \tag {10}
$$
Proposition 2. Consider the unweighted graph  $G$ , where each edge represents a unit resistance, i.e we consider each edge in the graph to be artificially weighted with value 1. Then the following equality holds for the commute time between nodes  $i$ ,  $j$ :
$$
C (i, j) = 2 m R _ {i j} \tag {11}
$$
Proposition 3. If  $G'$  arises from a graph  $G$  by adding a new edge, then the commute time  $C'(i,j)$  between any two nodes in  $G'$  is bounded by:
$$
C ^ {\prime} (i, j) \leq \left(1 + \frac {1}{m}\right) C (i, j) \tag {12}
$$
For proofs of these propositions, we refer the reader to [46]. These results create a direct connection between commute times and resistance distance, and gives insight into how commute time reacts under edge addition, and we use them directly to generate our bounds for resistance curvature.
Proof. Let  $R_{ij}'$  be the resistance distance in  $G'$ . Likewise, let  $C(i,j)$  be the commute distance in  $G$  between nodes  $i,j$  and  $C'(i,j)$  be the commute time in  $G'$ . Then Eq. (11) and Eq. (12) ensure that  $R_{ij}'$  is bounded above, by the original resistance distance in  $G$ :
$$
2 (m + 1) R _ {i j} ^ {\prime} \leq 2 m \left(1 + \frac {1}{m}\right) R _ {i j}
$$
$$
R _ {i j} ^ {\prime} \leq R _ {i j}
$$
This follows our intuition of resistance distance very well: with the addition of an edge nodes can only get more connected. Eq. (10) also gives a nice lower bound:
$$
(m + 1) \left(\frac {1}{d _ {i} ^ {\prime}} + \frac {1}{d _ {j} ^ {\prime}}\right) \leq C ^ {\prime} (i, j)
$$
$$
\frac {1}{2} \left(\frac {1}{d _ {i} ^ {\prime}} + \frac {1}{d _ {j} ^ {\prime}}\right) \leq R _ {i j} ^ {\prime}
$$
In the case that we are adding a single edge, it is often the case that node degrees remain constant. However, the nodes that are connected by the new edge,  $(i*,j*)\in E'\setminus E$ , increase such that  $d_{i*}^{\prime} = d_{i*} + 1$  and  $d_{j*}^{\prime} = d_{j*} + 1$ . Thus, the following lower bound holds in general for  $R_{ij}^{\prime}$  and we can remain agnostic to the precise location of the new edge:
$$
\frac {1}{2} \left(\frac {1}{d _ {i} + 1} + \frac {1}{d _ {j} + 1}\right) \leq R _ {i j} ^ {\prime} \leq R _ {i j} \tag {13}
$$
And likewise, after adding  $p$  edges:
$$
\frac {1}{2} \big (\frac {1}{d _ {i} + p} + \frac {1}{d _ {j} + p} \big) \leq R _ {i j} ^ {p} \leq R _ {i j}
$$
So the bounds of our perturbed resistance distance  $R_{ij}^{\prime}$  are determined by the initial network structure  $(R_{ij})$  and the number connections each specific vertex has. Naturally, certain node pairs will be more strongly affected by the addition of an edge. We can define the maximum reaction to perturbation across pairs as follows:
$$
\Delta_ {a d d} := \max  _ {i, j \in V} \left(R _ {i j} - \frac {1}{2} \left(\frac {1}{d _ {i} + 1} + \frac {1}{d _ {j} + 1}\right)\right) \tag {14}
$$
This can be used to bound node resistance curvature. In an unweighted graph, we have
$$
p _ {i} = 1 - \frac {1}{2} \sum_ {j \sim i} R _ {i j}
$$
$$
p _ {i} ^ {\prime} = 1 - \frac {1}{2} \sum_ {j \sim i} R _ {i j} ^ {\prime}
$$
For  $G$  and  $G'$  respectively. Given that resistance can only increase,  $p_i$  is clearly an lower bound for  $p_i'$ . Certainly an upper bound occurs when when the resistance between each one of i's neighbors maximally decreases. Thus we get the following inequality:
$$
p _ {i} \leq p _ {i} ^ {\prime} \leq p _ {i} + \frac {d _ {i}}{2} \Delta_ {a d d} \tag {15}
$$
Finally this gives the desired bound on  $\kappa_{\mathrm{R}}^{\prime}$ :
$$
\kappa_ {\mathbb {R}} (i, j) \leq \kappa_ {\mathbb {R}} ^ {\prime} (i, j) \leq \kappa_ {\mathbb {R}} (i, j) + \frac {\Delta_ {a d d} (d _ {i} + d _ {j})}{R _ {i j} - \Delta_ {a d d}}
$$
Theorem 7. If  $G'$  is the graph generated by edge deletion, then  $\kappa_R' \leq \kappa_R$ , bounded by:
$$
| \kappa_ {R} ^ {\prime} (i, j) - \kappa_ {R} (i, j) | \leq \frac {1}{R _ {i j} + \Delta_ {d e l}} \Big [ \frac {2}{R _ {i j}} (2 R _ {i j} + \Delta_ {d e l}) (p _ {i} + p _ {j}) - \Delta_ {d e l} (d _ {i} + d _ {j}) \Big ],
$$
where  $\Delta_{del} = \frac{2}{1 - \lambda_2} -\min_{i,j\in V}(R_{ij})$  and  $\lambda_{2}$  is the second largest eigenvalue of  $N$ .
Proof. Now we can beg the question of how effective resistance changes when we remove an edge. By inverting our initial argument in above proof of Theorem 4, we know that after removing an edge our resistance distance can only increase. Formally,  $R_{ij} \leq R_{ij}'$ . For the upper bound, we can once again make an argument using Eq. (10), this time relying on the other half of the inequality. Here we need to also mention the normalized Laplacian  $N'$  for  $G'$ , with eigenvalues  $\lambda_1' \geq \lambda_2' \geq \ldots \geq \lambda_n'$ .
$$
C ^ {\prime} (i, j) \leq \frac {2 (m - 1)}{1 - \lambda_ {2} ^ {\prime}} \big (\frac {1}{d _ {i} ^ {\prime}} + \frac {1}{d _ {j} ^ {\prime}} \big)
$$
$$
R _ {i j} ^ {\prime} \leq \frac {1}{1 - \lambda_ {2} ^ {\prime}} \big (\frac {1}{d _ {i} ^ {\prime}} + \frac {1}{d _ {j} ^ {\prime}} \big)
$$
Again, we know that only the two unique vertices  $(i*, j*)$  that shared an edge will have affected degrees, s.t  $d_{i*}' = d_{i*} - 1$  and  $d_{j*}' = d_{j*} - 1$ . Moreover, from Guo et al. [28], we know that  $\lambda_2 \geq \lambda_2'$ . So we can loosely bound the  $R_{ij}'$  as follows:
$$
R _ {i j} \leq R _ {i j} ^ {\prime} \leq \frac {2}{1 - \lambda_ {2}} \tag {16}
$$
In fact, this applies to any number of edge deletions, as long as  $G'$  stays connected. Again, we can define a maximum possible change in resistance distance across the graph:
$$
\Delta_ {d e l} = \max  _ {i, j \in V} \left(\frac {2}{1 - \lambda_ {2}} - R _ {i j}\right) = \frac {2}{1 - \lambda_ {2}} - \min  _ {i, j \in V} \left(R _ {i j}\right) \tag {17}
$$
This leads to the following bounds on node and edge curvature, and completes the proof:
$$
p _ {i} - \frac {d _ {i}}{2} \Delta_ {d e l} \leq p _ {i} ^ {\prime} \leq p _ {i}
$$
$$
(1 - \lambda_ {2}) [ p _ {i} + p _ {j} - \frac {\Delta_ {d e l}}{2} (d _ {i} + d _ {j}) ] \leq \kappa_ {\mathrm {R}} ^ {\prime} (i, j) \leq \kappa_ {\mathrm {R}} (i, j)
$$
$$
\kappa_ {\mathbb {R}} (i, j) - \frac {1}{R _ {i j} + \Delta_ {d e l}} \big [ \frac {2}{R _ {i j}} (2 R _ {i j} + \Delta_ {d e l}) (p _ {i} + p _ {j}) - \Delta_ {d e l} (d _ {i} + d _ {j}) \big ] \leq \kappa_ {\mathbb {R}} ^ {\prime} (i, j) \leq \kappa_ {\mathbb {R}} (i, j)
$$
B.2 Expressivity Proofs
$$
\left\| \left(f \left(e _ {F}\right), f \left(e _ {F} ^ {\prime}\right)\right) - \left(g \left(e _ {G}\right), g \left(e _ {G} ^ {\prime}\right)\right) \right\| _ {\infty}, \tag {18}
$$
which we can rewrite to  $\max_{C: E_F \to E_G} \{f(x) - g(C(x))\}$  for a general map  $C$  induced by the bijection of the bottleneck distance. Not every map is induced by a bijection, though. Hence, if we maximise over arbitrary maps between the edge sets, we are guaranteed to never exceed the bottleneck distance.
C Additional Proofs for Distinguishing Strongly-Regular Graphs
Proof. We first show the part of the statement relating to the Forman-Ricci curvature. Given a distance-regular graph  $G$  with  $N$  vertices and intersection array  $\{b_0, b_1, \ldots, b_{D-1}; c_1, c_2, \ldots, c_D\}$ . Let  $i, j$  be adjacent nodes in  $G$ . For a regular graph, we have  $d_i = d_j = b_0$ , where  $b_0$  is a constant.
The number of triangles between two adjacent nodes  $i$  and  $j$  in  $G$  is given by  $a_1 = b_0 - b_1 - c_1$  [18]. The Forman curvature of  $i, j$  is thus
$$
\kappa_ {\mathrm {F R}} (i, j) := 4 - 2 b _ {0} + 3 \left| b _ {0} - b _ {1} - c _ {1} \right|. \tag {19}
$$
Given two strongly-regular graphs with the same intersection array, i.e. the same values of  $b_{0}, b_{1}$  and  $c_{1}$ , the Forman curvature yields the same value for all pairs of adjacent nodes and cannot distinguish them. For the resistance curvature, the claim follows as an immediate Corollary of Theorem A [6] and described in Koolen et al. [41]. Given the resistance between two nodes depends only on the intersection array and the number of nodes in the graph, then the resistance curvature cannot distinguish two strongly-regular graphs.
The expressivity of Ollivier-Ricci curvature is strictly better, and it turns out that there are graphs with the same intersection array that we can distinguish, namely the Rook graph and the Shrikhande graph. Both graphs have the same intersection array  $\{6,3;1,2\}$  but differ in their first hop peripheral subgraphs [22]. It is known that 2-WL cannot distinguish these graphs. Ollivier-Ricci curvature, however, is sensitive to these differences in peripheral subgraphs with the edge curvatures for the Rook graph being:  $[0.2,0.2,0.33,0.33,0.33,0.2,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.2,0.2,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33,0.33]$ , and for the Shrikhande graph they are  $[0,0,0.27,0.27,0.1,0,0.27,0.27,0.1,0,0.27,0.1,0.27,0,0.27,0.1,0.27,0,0.1,0.27,0.27,0.1,0.27,0.27,0.1,0.27,0.27,0.1,0.27,0.1,0.27,0.1,0.27,0.1,0.27]$ , demonstrating that OR curvature can distinguish these graphs—unlike Resistance curvature, Forman-Ricci curvature and the 2-WL test.
D Additional Stability Analysis
Given the bounds on curvature established in Section 3.1, we explore how curvature changes experimentally by analysing edge perturbations on Erdős–Rényi graphs. In particular, we provide statistics that quantify the maximal change in curvature for random graphs with varying connectivity parameters in response to edge additions and deletions. The experiment fixes the number of nodes in the ER graphs ( $n = 100$ ), and generates a sample of 50 graphs for the selected values of  $p$ . For each graph in the sample, we measure the curvature  $\kappa$  of all edges and calculate the standard deviation  $\sigma_{\kappa}$  of this distribution. We then perturb the original graph by edge addition/deletion and calculate the new curvature  $\kappa'$ . The following tables present the worst case deviations in curvature, which we define as  $\Delta \kappa = |\kappa - \kappa'|$ , in units of  $\sigma_{\kappa}$ ; in other words the maximal value of  $\Delta \kappa / \sigma_{\kappa}$  over all sample graphs and their edges.
Curvature	Edge Addition:	Maximal Change (↓) in Curvature for ER Graphs (Δκ/σκ)
p=0.1	p=0.2	p=0.3	p=0.4	p=0.5	p=0.6	p=0.7	p=0.8	p=0.9
κFR	0.582	0.419	0.334	0.296	0.253	0.246	0.232	0.25	0.315
κOR	1.545	1.157	0.613	0.465	0.396	0.366	0.368	0.399	0.512
κR	0.689	0.417	0.296	0.251	0.221	0.232	0.227	0.243	0.321
Curvature	Edge Deletion:	Maximal Change (↓) in Curvature for ER Graphs (Δκ/σκ)
p=0.1	p=0.2	p=0.3	p=0.4	p=0.5	p=0.6	p=0.7	p=0.8	p=0.9
κFR	0.609	0.408	0.334	0.291	0.255	0.239	0.245	0.243	0.319
κOR	1.397	1.27	0.623	0.479	0.394	0.365	0.347	0.402	0.482
κR	0.75	0.431	0.336	0.248	0.229	0.218	0.225	0.242	0.312
E Additional Commentary on Counting Substructures
We find that the difference in perspective between the selected curvature notions is underscored by their respective performance when counting substructures. Forman curvature is an inherently local measure by definition, depending only on 3-cycles between adjacent nodes and their degrees. Ollivier-Ricci curvature, when used with a uniform measure, can bound the number of triangles within a locally finite graph [37] through its relation with the Watts-Strogatz clustering coefficient [67]. It
can also be shown that quadrangles and pentagons influence the OR curvature, further enhancing the expressivity of this type of curvature [37].