SlowGuess/NeurIPS_2023_OCR huggingface dataset:
This is the most global perspective one can achieve using  $\kappa_{\mathrm{OR}}$  with uniform probability measures, since polygons with more than five edges do not impact the curvature valuation.
However, by changing the probability measure used by  $\kappa_{\mathrm{OR}}$ , we can shift the focus towards even larger substructures. For example, the  $n$ th power of the transition matrix provides information on the number of  $n$ -paths and can therefore provide substructure information for cycles of size  $n$  [43]. Resistance curvature, by contrast, is biased towards the largest substructures. Due to the 'global' nature of the resistance distance metric,  $\kappa_{\mathrm{R}}$  assigns cycles of size  $\geq 5$  a positive curvature. Moreover, in a locally finite graph, one cannot use  $\kappa_{\mathrm{R}}$  to establish a non-trivial bound on the number of triangles (consider creating an infinite cycle between two nodes).
F Probability Measure for Ollivier-Ricci Curvature and Counting Substructures
The Ollivier-Ricci curvature is of particular interest because of its flexibility. While the predominant probability measure  $\mu$  used by the community is uniform for each node, i.e. each of the node's neighbours is chosen with probability being proportional to the degree of the node. We experimented with different probability measures, one being based on expanding  $\mu$  to the two-hop neighbourhood of a vertex, the other one being based on random walk probabilities. Specifically, for a node  $x$  and a positive integer  $m$ , we calculate  $\mu_{\mathrm{RW}}$  as
$$
\mu_ {\mathrm {R W}} (y) := \sum_ {k \leq m} \phi_ {k} (x, y), \tag {20}
$$
with  $\phi_k(x,y)$  denoting the probability of reaching node  $y$  in a  $k$ -step random walk that starts from node  $x$ . Subsequently, we normalise Eq. (20) to ensure that it is a valid probability distribution. In our experiments, we set  $m = 2$ , meaning that at most 2-step random walks will be considered. As shown in the main paper, this formulation leads to an increase in expressivity, and we expect that further exploration of the probability measures will be a fruitful direction for the future.
We now explore to what extent the ability of the curvature to count substructures can also be improved in this way. To do this, we used powers of the transition matrix as the probability measure, as it has been shown that the  $n$ th power provides information on the number of  $n$ -paths and can therefore provide substructure information for cycles of size  $n$  [43]. We find that powers of the transition matrix larger than 1 can perform better for counting the substructures, particularly for substructures larger than 3-cycles. There is also a difference between Regular and Erdős-Rényi (ER) graphs as the best transition power tends to be higher for ER graphs. We hypothesise that this may have something to do with the mixing time of the graph, as large powers should converge to the stationary distribution, and regular graphs are more 'expander-like'. The best results are obtained by taking multiple landscapes using the transition matrix powers (up to  $n = 5$ ) and then averaging them. We show that combined with a single layer MLP, this method can perform better than using Graph Neural Network based approaches and OR curvature with the uniform measure.
Method	Counting Triangle	Substructures (MAE ↓)
Tailed Tri.	Star	4-Cycle
GCN	0.4186	0.3248	0.1798	0.2822
κOR Filtration	0.2321	0.2395	0.3393	0.3089
κOR Filtration with transition matrix powers	0.1956	0.2095	0.3212	0.2680
Method	Optimal Transition Power
ER	Regular
Triangle	2	1
Tailed Triangle	4	3
Star	4	2
Chordal Cycle	2	2
4-Cycle	8	3
Table 5: Computation time in seconds for discrete curvature on varying Erdős–Rényi graph sizes with  $p = 0.3$ .
Number of Nodes	κFR	κOR	κR
10	0.000	0.002	0.020
50	0.001	0.038	0.700
100	0.005	0.247	6.610
250	0.054	4.720	252.850
500	0.380	59.270	6414.970
1000	2.920	1040.700	74366.070
Table 6: Computation time for different numbers of Erdős--Rényi graphs in a reference set (n = 10 and p = 0.3) with different distribution distance measures
Number of Graphs	Degree + MMD	Orbit + MMD	Curvature + MMD	Curvature + Landscapes
20	3.6	ms	217.0	ms	4.2	ms	12.5	ms
50	10.9	ms	459.0	ms	12.4	ms	20.9	ms
100	34.1	ms	887.0	ms	37.9	ms	34.4	ms
200	120.0	ms	1960.0	ms	133.0	ms	80.4	ms
500	678.0	ms	6740.0	ms	727.0	ms	144.0	ms
1000	2620.0	ms	19900.0	ms	2680.0	ms	359.0	ms
G Computational Complexity
Persistence diagrams of 1-dimensional simplicial complexes, i.e. graphs, can be computed in  $\mathcal{O}(m\log m)$  time where  $m$  denotes the number of edges. Empirically, when calculating different curvature measures for different sizes of graphs, we find that Forman curvature scales well to large graphs, whereas OR and resistance curvatures can be used for smaller graphs and in cases that require a more expressive measure. Note that there are significantly faster ways to calculate resistance curvature as an approximation [65]. A majority of works on GGMs focus on small molecule generation, where any of these curvatures can be used with minimal pre-computation. Table 5 depicts the computational complexity of various curvature calculations on Erdős–Rényi graphs whilst Table 6 and Table 7 compares the complexity to methods based on MMD. We find that calculating persistence diagrams, turning these to persistence landscapes, averaging these and then calculating a distance takes a similar amount of time compared to MMD for different sizes of graphs and for different numbers of graphs in the reference set. Interestingly, our approach scales better than MMD as both the number of graphs in the reference set increases and when the size of the graphs increases. This will be important for comparing distributions of large data sets such as the commonly used Zinc dataset or QM9. Overall, we find that our method can be easily applied in practical use cases, especially given that models for graph generation typically generate graphs with well under 1000 nodes.
Table 7: Computation time for a fixed number of Erdős–Rényi graphs in a reference set with different sizes ( $p = 0.3$ ) with different distribution distance measures
Number of Graphs	Curvature + MMD	Curvature + Landscapes
10	2.3	ms	9.0	ms
20	4.5	ms	12.5	ms
50	15.8	ms	20.9	ms
100	93.6	ms	34.4	ms
200	556.0	ms	80.4	ms
500	727.0	ms	144.0	ms
1000	2800.0	ms	364.0	ms
H Ethical Concerns
We have proposed a general framework for comparing graph distributions focusing primarily on method and theoretical development rather than on potential applications. We currently view drug discovery as being one of the main application areas, where further experiments may be required, but we have no evidence that our method enhances biases or causes harm in any way.