O LLIVIER -R ICCI
C URVATURE
FOR
H
YPERGRAPHS
A U NIFIED F RAMEWORK
Anonymous authors
Paper under double-blind review
A BSTRACT
Bridging geometry and topology, curvature is a powerful and expressive invariant.
While the utility of curvature has been theoretically and empirically confirmed in the context of manifolds and graphs, its generalization to the emerging domain of hypergraphs has remained largely unexplored.
On graphs, Ollivier-Ricci curvature measures differences between random walks via Wasserstein distances, thus grounding a geometric concept in ideas from probability and optimal transport.
We develop O RCHID , a flexible framework generalizing Ollivier-Ricci curvature to hypergraphs, and prove that the resulting curvatures have favorable theoretical properties.
Through extensive experiments on synthetic and real-world hypergraphs from different domains, we demonstrate that O RCHID curvatures are both scalable and useful to perform a variety of hypergraph tasks in practice.
I NTRODUCTION
Hypergraphs generalize graphs by allowing any number of nodes to participate in an edge.
They allow us to faithfully represent complex relations, such as co-authorship of scientific papers, multilateral interactions between chemicals, or group conversations, which cannot be adequately captured by graphs.
While hypergraphs are more expressive than graphs and other relational objects like simplicial complexes, they are harder to analyze both theoretically and empirically, and many concepts that have proven useful for understanding graphs have yet to be transferred to the hypergraph setting.
Curvature has established itself as a powerful characteristic of Riemannian manifolds, as it permits the description of global properties through local measurements by harmonizing ideas from geometry and topology.
For graphs, graph curvature measures to what extent the neighborhood of an edge deviates from certain idealized model spaces, such as cliques, grids, or trees.
It has proven helpful, for example, in assessing differences between real-world networks (Samal et al., 2018), identifying bottlenecks in real-world networks (Gosztolai & Arnaudon, 2021), and alleviating oversquashing in graph neural networks (Topping et al., 2022).
One prominent notion of graph curvature is OllivierRicci curvature (ORC).
ORC compares random walks based at specific nodes, revealing differences in the information diffusion behavior in the graph.
As the sizes of edges and edge intersections can vary in hypergraphs, there are many ways to generalize ORC to hypergraphs.
While some notions of hypergraph ORC have been previously studied in isolation (e.g., Asoodeh et al., 2018; Leal et al., 2020; Eidi & Jost, 2020), a unified framework for their definition and computation is still lacking.
Contributions.
We introduce O RCHID , a unified framework for Ollivier-Ricci curvature on hypergraphs.
O RCHID integrates and generalizes existing approaches to hypergraph ORC.
Our work is the first to identify the individual building blocks shared by all notions of hypergraph ORC, and to perform a rigorous theoretical and empirical analysis of the resulting curvature formulations.
We develop hypergraph ORC notions that are aligned with our geometric intuition while still efficient to compute, and we demonstrate the utility of these notions in practice through extensive experiments.
Structure.
After providing the necessary background on graphs and hypergraphs and recalling the definition of Ollivier-Ricci curvature for graphs in Section 2, we introduce O RCHID , our framework for hypergraph ORC, and analyze the theoretical properties of O RCHID curvatures in Section 3.
We treat related work in Section 4, before assessing the empirical properties and practical utility of
O RCHID curvatures through extensive experiments in Section 5.
Finally, we discuss the limitations and possible extensions of O RCHID as well as potential directions for future work in Section 6.
P RELIMINARIES
Graphs and Hypergraphs A simple graph G =
( V, E ) is a tuple containing n nodes (vertices)
V = { v 1 , . .
. , v n } and m edges E = { e 1 , . . .
, e m } , with e i ∈ (cid:0) V 2 (cid:1) for all i ∈ [ m ] .
Here, for a set S and a positive integer k ≤ | S | , (cid:0) Sk (cid:1) denotes the set of all k -element subsets of S , and for x ∈ N with 0 / ∈ N , [ x ] = { i ∈ N | i ≤ x } .
In multi-graphs , edges can occur multiple times, and hence, E = ( e 1 , . .
e m ) is an indexed family of sets, with e i ∈ (cid:0) V 2 (cid:1) for all i ∈ [ m ] .
Generalizing simple graphs, a simple hypergraph H
=
( V, E ) is a tuple containing n nodes V and m hyperedges
E ⊆ P ( V ) \ ∅ , i.e., in contrast to edges, hyperedges can have any cardinality r ∈ [ n ] .
In a multi- hypergraph , E = ( e 1 , . . .
e m ) is an indexed family of sets, with e i ⊆ V for all i ∈ [ m ] .
We assume that all our hypergraphs are multi-hypergraphs, and we drop the prefix hyper from hypergraph and hyperedge where it is clear from context.
We denote the degree of node i , i.e., the number of edges containing i , by deg( i ) =
|{ e ∈ E | i
∈ e }| , write i ∼ j if i is adjacent to j (i.e., there exists e ∈ E such that { i, j } ⊆ e ), and use N ( i ) (
N ( e ) ) for the neighborhood of i ( e ), i.e., the set of nodes adjacent to i (edges intersecting edge e ).
While deg( i ) =
|
N ( i ) | in simple graphs and deg( i ) ≥ | N ( i ) | in multigraphs, these relations do not generally hold for hypergraphs.
Two nodes i ̸
= j are connected in H if there is a sequence of nodes i = v 1 , v 2 , . .
. , v k − 1 , v k =
j such that v l ∼ v l +1 for all l ∈ [ k ] .
Every such sequence is a path in H , whose length is the cardinality of the set of edges used in the adjacency relation.
We refer to the length of a shortest path connecting nodes i, j as the distance between them, denoted as d( i, j ) .
We assume that all hypergraphs are connected , i.e., there exists a path between all pairs of vertices.
This turns H into a metric space ( H, d) with diameter diam( H ) :
= max { d( i, j ) |
i, j ∈ V } .
(Hyper)graphs in which all nodes have the same degree k
( deg( i ) =
k for all i ∈ V ) are called k -regular .
Three properties of hypergraphs that distinguish them from graphs give rise to additional (ir)regularities.
First, hyperedges can vary in cardinality, and a hypergraph in which all hyperedges have the same cardinality r ( | e | = r for all e ∈ E ) is called r -uniform .
Second, hyperedge intersections can have cardinality greater than 1 , and we call a hypergraph s -intersecting if all nonempty edge intersections have the same cardinality s ( e ∩ f ̸ = ∅ ⇔ | e ∩ f |
= s for all e, f ∈ E ).
Third, nodes can cooccur in any number of hyperedges , and we call a hypergraph c
-cooccurrent if each node cooccurs c times with any of its neighbors ( i ∼ j ⇔ |{ e ∈ E | { i, j } ⊆ e }| =
c for all i, j ∈ V ).
Using this terminology, graphs are 2 -uniform, 1 -intersecting, 1 -cooccurrent hypergraphs.
Given a hypergraph H
=
( V, E ) , its unweighted clique expansion is G ◦ =
( V, E ◦ ) with E ◦ = {{ i, j } | { i, j } ⊆ e for some e ∈ E } , where two nodes are adjacent in G ◦ if and only if they are adjacent in H .
The weighted clique expansion of H is G ◦ endowed with a weighting function w : E ◦ → N , where w ( e ) = |{ e ∈ E | { i, j } ⊆ e }| for each e ∈ E ◦ , i.e., an edge { i, j } is weighted by how often i and j cooccur in edges from H .
Both of these transformations are lossy, i.e., we cannot uniquely reconstruct H from G ◦ .
The unweighted star expansion of H is the bipartite graph
G ′ =
( V ′ , E ′ ) with V ′ =
V ˙ ∪ E and E ′
= {{ v, e } | v ∈ V, e ∈ E, v ∈ e } , and we can uniquely reconstruct H from G ′ if we know which of its parts corresponds to the original node set of H .
Ollivier-Ricci curvature for Graphs Ollivier-Ricci curvature (ORC) extends the notion of Ricci curvature defined for Riemannian manifolds to metric spaces equipped with a probability measure or, equivalently, a random walk (Ollivier, 2007; 2009).
On graphs, which are metric spaces with the shortest-path distance d( · , · ) , the ORC κ of a pair of nodes { i, j } is defined as [Equation] , j
[Equation]
µ i , µ j ) , and hence , κ ( i, j
[Equation]
= [Equation] [Equation] where µ i is a probability measure associated with node i that depends measurably on i and has finite first moment, and W 1 is the Wasserstein distance of order 1 , which captures the amount of work needed to transport the probability mass from µ i to µ j in an optimal coupling.
The use of the shortest-path distance is necessary to ensure that ORC is also well-defined for pairs of non-adjacent vertices.
This definition on edges or pairs of vertices alludes to the fact that Ricci curvature is associated to tangent vectors of a manifold.
A common strategy to measure curvature at a node i is to average over the curvatures of all edges incident with i (Jost & Liu, 2014; Banerjee, 2021), i.e.,
[Equation]
A popular probability measure that easily generalizes to weighted graphs and multigraphs is
[Equation]
where α serves as a smoothing parameter (Lin et al., 2011).
With this definition, stacking the probability measures yields the transition matrix of an α -lazy random walk.
T HEORY
Having introduced the concept of hypergraphs and the definition of Ollivier-Ricci curvature (ORC) for graphs, we now develop our framework for ORC on hypergraphs, called O RCHID (OllivierRicci Curvature for Hypergraphs In Data).
We focus our exposition on undirected, unweighted multi-hypergraphs, but O RCHID straightforwardly generalizes to other hypergraph variants.
3. O LLIVIER -R ICCI C URVATURES FOR H YPERGRAPHS (O RCHID C URVATURES )
As mentioned in Section 2, hypergraphs differ from graphs in that edges can have any cardinality, and consequently, edges can intersect in more than one node, and nodes can co-occur in more than one edge.
When generalizing ORC as defined in Section 2 to hypergraphs, these peculiarities become relevant in two places: first, in the generalization of the measure µ for nodes, and second, in the generalization of the distance metric W 1 .
Construing the distance metric as a function aggregating measures ( A GG ), with A GG : V + → R , we can rewrite Eq.
(1) for pairs of nodes { i, j } as
[Equation]
which facilitates its generalization; we will also use κ ( e ) for (hyper)edges as a shorthand notation for Eq.
When defining probability measures and A GG functions on hypergraphs, we would like to retain as much flexibility as possible while also ensuring the following conditions:
I. Mathematical generalization.
For graphs, A GG is an instantiation of the original ORC on graphs.
II.
Permutation invariance.
A GG ( e ) =
A GG ( σ ( e )) for edges e and all node index permutations σ . III.
Scalability.
The probability measures and A GG functions should be efficiently computable.
Beyond these properties, we would also like to have the following interpretability features to ascertain that a hypergraph curvature measure is a conceptual generalization of ORC:
A. Probabilistic intuition.
The probability measures assigned to nodes should correspond to a semantically sensible random walk on the hypergraph.
B. Optimal transport intuition.
The generalization of the distance metric ( A GG ) should have a semantically sensible interpretation in terms of optimal transport.
C. Geometric intuition.
Edges
in hypercliques should have positive
curvature
, edges
in
hypergrids
should
have
curvature zero and edges
in
hypertrees
should
have negative curvature.
We now specify probability measures and A GG functions for which the conditions above hold.
Probability Measures ( µ ).
In graphs, the most natural probability measures are induced by the α -lazy random walk given in Eq.
(3): With probability α , we stay at the current node i , and with probability (1 − α ) /
deg( i ) , we move to one of its neighbors.
There are at least three direct extensions of this formulation to hypergraphs that all retain this probabilistic intuition, thus fulfilling the requirement of Feature A.
These extensions, illustrated in Fig.
1, differ only in how they distribute the (1 − α ) probability mass in Eq.
(3) from node i to the nodes in i ’s neighborhood.
Given a hypergraph
H , for i and j with i ∼ j , first, we could define
[Equation]
A
B
C
D
E
F   (a) Node 0 and its neighborhood 1 2 3 4 5 6 7 8 (b) Equal-Nodes Random Walk ( EN )
A
C
B
D
F
E (c) Equal-Edges Random Walk ( EE )
A
C
B
D
F
E (d) Weighted-Edges Random Walk ( WE ) by which we pick a neighbor j of node i uniformly at random.
We call this the equal-nodes random walk ( EN ), which is a random walk on the unweighted clique expansion of H .
Second, we could set
[Equation]
which first picks an edge e ∋ i with | e | ≥ 2 , then picks a node j ∈ e \{ i } , both uniformly at random.
We call this the equal-edges random walk ( EE ), which is a two-step random walk on the unweighted star expansion of H , starting at a node i ∈ V , and non-backtracking in the second step.
It underlies the curvatures studied by Asoodeh et al.
(2018) and Banerjee (2021).
Third, we could define
[Equation]
first picking an edge e incident with i with probability proportional to its cardinality, then picking a node j ∈ e \{ i } uniformly at random.
We call this the weighted-edges random walk ( WE ): a two-step random walk from a node i ∈ V on a specific directed weighted star expansion of H whose second step is non-backtracking—or equivalently, a random walk on a weighted clique expansion of H .
Similarity Measures ( A GG ).
In the original formulation of ORC, i.e., Eq.
(1), when determining the curvature of an edge { i, j } , the Wasserstein distance W 1 is used to aggregate the probability measures of i and j .
There are at least three different extensions of this aggregation scheme to hypergraphs that retain an optimal transport intuition, as required by Feature B.
Leveraging that an edge e ⊆ V is simply a set of nodes, the easiest extension is to leave the aggregation function unchanged: We continue determining the curvature for pairs of nodes, and account for the edges in H only in the definition of our probability measure.
In this case, we could derive a curvature for an edge e as the average over all curvatures of node pairs contained in e , i.e., we could define A GG as
[Equation]
This is equivalent to computing the curvature of e based on the average over all W 1 distances of probability measures associated with nodes contained in e :
[Equation]
Intuitively, this definition assesses the mean amount of work needed to transport the probability mass from one node in e to another node in e .
Alternatively, and still keeping with the intuition from optimal transport, we can define A GG as
[Equation]
consequently ,
[Equation]
where ¯ µ denotes the Wasserstein barycenter of the probability measures of nodes contained in e , and the denominator generalizes the original d( i, j ) .
Asoodeh et al.
(2018) use this aggregation function.
Intuitively, A GG B is proportional to the minimum amount of work needed to transport all probability mass from the probability measures of the nodes to one place, with the caveat that this place need not correspond to a node in the underlying hypergraph.
Finally, we can capture the maximum amount of work needed to transport all probability mass from one node in e to another node in e as
[Equation]
⊆ e } , and consequently , κ [Equation] ( e [Equation]
− A GG M
[Equation]
Independent of the choice of A GG , the curvature at a node i can be defined as the mean of all curvatures of meaningful directions containing i , i.e.,
[Equation]
or it can be derived as the mean of all curvatures of edges containing i , i.e.,
[Equation]
Finally, for connected H , we can define the curvature of an arbitrary subset of nodes s ⊆ V as
[Equation]
where A GG can be any of our aggregation functions, and d( s ) :
= max { d( i, j ) | { i, j } ⊆ s } refers to the extent of the subset s .
Note that for s ∈ E , d( s ) = 1 , and thus, Eq.
(14) is consistent with our previous definitions of hyperedge curvatures.
3. P ROPERTIES OF O RCHID C URVATURES
Having introduced our probability measures ( µ ) and aggregation functions ( A GG ), we now analyze their properties and the properties of the resulting curvatures.
All proofs are deferred to Appendix A.1.
First, we note that µ EN , µ EE , and µ WE are equivalent for certain hypergraph classes, and all aggregation functions coincide for graphs.
Lemma 1.
For graphs and r -uniform, k -regular, c -cooccurrent hypergraphs, µ EN = µ EE = µ WE .
Lemma 2.
For graphs, i.e., 2 -uniform hypergraphs, we have A GG A ( e ) =
A GG B ( e ) =
A GG M ( e ) for all edges e ∈ E .
Taken together, Lemma 1 and Lemma 2 imply that for graphs, O RCHID simplifies to ORC, regardless of the choice of probability measure and aggregation function.
This fulfills Condition I.
Moreover, all our aggregation functions are permutation-invariant by construction, thus satisfying
Condition II.
Concerning Condition III, κ A and κ M exhibit better scalability than κ B , as Wasserstein barycenters are harder to compute than individual distances (Cuturi & Doucet, 2014).
Another reason to prefer κ A and κ M over κ B is the existence of upper and lower bounds that are easy to calculate.
To this end, let d min ( H ) :
= min { d( u, v ) | u ̸ = v ∈ V } be the smallest nonzero distance in H , and let ∥·∥ 1 refer to the L 1 norm of a vector.
We then obtain the following bounds for κ A and κ M .
Theorem 3.
For any probability measure µ and C ( e ) := 2 / | e | ( | e |− 1) , the curvature κ A ( e ) of an edge e ∈ E is bounded by
[Equation]
Theorem 4.
For any probability measure µ , the curvature κ M ( e ) of an edge e ∈ E is bounded by
[Equation]
Directly from our definitions, we further obtain the following relationships between κ A , κ B , and κ M , and between O RCHID curvatures on hypergraphs and ORC on their unweighted clique expansions.
Corollary 5.
Given a hypergraph H
=
( V, E ) , κ M ( e ) ≤ κ A ( e ) and κ M ( e ) ≤ κ B ( e ) for all e ∈ E .
Corollary 6.
Given a hypergraph H
=
( V, E ) and its unweighted clique expansion G ◦
=
( V, E ◦ ) , for { i, j } ∈ E ◦ , the ORC κ ( i, j ) in G ◦ equals its O RCHID curvature κ ( i, j ) of direction { i, j
} ⊆ V in H with µ EN , and the ORC κ ( i ) of i ∈ V in G ◦ equals its O RCHID curvature κ N ( i ) in H with µ EN .
Corollary 6 clarifies that the equal-nodes random walk establishes the connection between O RCHID and ORC on graphs.
Moreover, O RCHID curvatures capture relations between global properties and local measurements, similar to the Bonnet–Myers theorem in Riemannian geometry (Myers, 1941).
Theorem 7.
Given a subset of nodes s ⊆ V and an arbitrary probability measure µ , let δ i denote a Dirac measure at node i , and let J( µ i ) :
= W 1 ( δ i , µ i ) denote the jump probability of µ i .
If (i) all curvatures based on µ are strictly positive, i.e., κ ( s ) ≥ κ > 0 for all s ⊆ V , and (ii)
W 1 ( µ i , µ j ) ≤
A GG ( s ) for { i, j } =
argmax(d( s )) , then
[Equation]
Note that condition (ii) of Theorem 7 is always satisfied by A GG M .
Finally, in Appendix A.1, we generalize the concepts of cliques, grids, and trees (prototypical positively curved, flat, and negatively curved graphs) to hypergraphs, and we prove the following lemmas to ensure that O RCHID curvatures respect our geometric intuition, as required by Feature C.
Theorem 8 (Hyperclique curvature) .
For an edge e in a hyperclique H
=
( V, E ) on n nodes with edges E = (cid:0)
Vr (cid:1) for some r ≤ n , with α = 0 ,
[Equation]
Theorem 9 (Hypergrid curvature) .
For an edge e in a r -uniform, k -regular hypergrid, with α = 0 , κ ( e ) = 0 , independent of r and k .
Theorem 10 (Hypertree curvature) .
For an edge e in a r -uniform, k -regular, 1 -intersecting hypertree, with α =
[Equation]
[Equation]
[Equation]
R ELATED W ORK
We restrict our exposition to the literature on hypergraph curvatures, which is most closely related to our work.
Further related work is discussed in Appendix A.2.
Much of the hypergraph curvature literature focuses on defining notions of ORC and Forman-Ricci Curvature (FRC) specifically for directed hypergraphs and studying some of their mathematical and empirical properties (e.g., Leal et al., 2019; 2020; 2021; Saucan & Weber, 2018).
Notably, the directed hypergraph ORC introduced by Eidi & Jost (2020) is an instantiation of our framework with µ EE and A GG A .
Curvature notions for undirected hypergraphs are comparatively less explored, and especially the literature generalizing
ORC is almost entirely theoretical.
The generalization of ORC proposed by Asoodeh et al.
and the equivalent measure used by Banerjee (2021) are instantiations of our framework using µ EE and A GG B .
Akamatsu (2022) propose ( α, h ) -ORC using cost functions based on structured optimal transport, and Ikeda et al.
(2021) define λ -coarse Ricci curvature using a λ -nonlinear Kantorovich difference based on a submodular hypergraph Laplacian as a generalization of ORC as introduced by Lin et al.
Both of these works define curvature exclusively for pairs of nodes, rather than for hyperedges.
Beyond ORC, Yadav et al.
(2022) study FRC for undirected hypergraphs defined via poset representations, and Murgas et al.
(2022) explore hypergraphs constructed from proteinprotein interactions using a different notion of FRC based on the Hodge Laplacian.
To the best of our knowledge, with O RCHID , we are the first to introduce a flexible framework generalizing ORC to hypergraphs, and to demonstrate the utility of hypergraph ORC in practice.
[Table]
E XPERIMENTS
Having established in Section 3 that O RCHID curvatures have our desired theoretical properties, and finding that they strictly generalize both ORC on graphs and existing definitions of hypergraph ORC, we now seek to ascertain that they are also meaningful in practice.
We ask the following questions:
Q1 Parametrization.
How do our choices of α , µ , and A GG impact O RCHID curvatures?
Q2 Hypergraph exploration.
How can O RCHID curvatures help us in exploring hypergraphs?
Q
Hypergraph learning.
How can O RCHID curvatures help us in hypergraph learning tasks?
To address these questions, we experiment with data from different domains, spanning several orders of magnitude.
We investigate four individual real-world hypergraphs in which edges represent co-authorship (aps-a, dblp) and FDA-registered drugs (ndc-ai, ndc-pc), six collections of real-world hypergraphs in which edges represent questions on Stack Exchange Sites (stex), co-authorship by venues (aps-av, dblp-v), co-citation by venues (aps-cv), chords in music pieces (mus), and character cooccurrence on stage in Shakespeare’s plays (sha), as well as three collections of synthetic hypergraphs based on different generative models (syn-c, syn-r, syn-s), for a total of 4 321 hypergraphs.
We summarize their basic properties in Table 1, and give more details on their statistics, semantics, and provenance in Appendix A.3.
We implement O RCHID in Julia and Python.
Our experiments are run on AMD EPYC 7702 CPUs with up to 256 cores.
We discuss our implementation and results in more detail in Appendices A.4 and A.5, and make all our code, data, and results publicly available.
Q1 Parametrization.
To understand how our choices of α , µ , and A GG impact O RCHID curvatures, we first compute the pairwise mutual information between O RCHID edge curvatures with 36 different parametrizations.
As illustrated in Fig.
2, while changing α for the same combination of µ and A GG has similar effects across hypergraphs, there is no uniform pattern in the relationships between different combinations of µ and A GG .
This underscores the fact that the various notions of
O RCHID curvature are not redundant but rather emphasize distinct aspects of hypergraph structure.
For a fine-grained view of the differences between parametrizations, we inspect the distributions of
[Figure]
AWE
[Figure]
ai
EN
[Figure]
MEN
[Figure]
AEE
[Figure]
MWE
[Figure]
NMI
[Figure]
[Figure]
[Figure]
3b) as input features.
We see that only curvatures yield a meaningful and discriminative grouping.
Corroborating this finding, we also depict Bonferroni (1936) adjusted p-values of testing for significant differences in feature distributions using MMD on distributions of edge curvature computed with the same parameters as for (3a) (upper triangle) or edge cardinality (lower triangle), for the subset of the dblp-v collection corresponding to top conferences grouped by areas of research (3c).
our four curvature types, (i) edge curvature κ ( e ) , (ii) edge-averaged node curvature κ E ( i ) , (iii) directional curvature κ ( i, j ) for all { i, j } ⊆ e ∈ E , and (iv) direction-averaged node curvature κ N ( i ) , for each of our 36 parametrizations.
By construction, directional curvature and direction-averaged node curvature do not vary with the choice of A GG , and κ M lower-bounds κ A for edge curvatures and edge-averaged node curvatures.
However, the differences between κ M and κ A vary across graphs, while consistently, the larger α , the more concentrated our curvature distributions (Appendix A.5).
Q2 Hypergraph Exploration.
To explore individual graphs , we perform case studies on graphs from the aps-cv collection, leveraging that most nodes in these graphs also occur as edges.
We scrutinize the relationships between node and edge curvatures, other local node and edge statistics, and article metadata.
We observe that curvature values span a considerable range even for articles with otherwise comparable statistics, but the curvature distributions of influential papers appear to differ systematically from those of less influential papers (Appendix A.5).
Exploring graph collections , we run kernel PCA (kPCA)
(Schölkopf et al., 1997) with a radial basis function kernel (RBF kernel) and curvatures or other local features known to be powerful baselines (Cai & Wang, 2018), e.g., node degrees and neighborhood sizes, as inputs to jointly embed graphs from a collection.
We statistically bootstrap the maximum mean discrepancy (MMD) (Gretton et al., 2006) to test the null hypothesis that the feature distributions of two graphs are equal.
As shown in Fig.
3, O RCHID curvatures result in more interpretable embeddings and more discriminative tests than other local features.
Q3 Hypergraph Learning.
To explore the utility of curvatures for learning on individual hyper-
[Table]
graphs , we perform spectral clustering using either curvatures or other local node features.
To evaluate the resulting node clusterings, we leverage that nodes in the aps-cv collection correspond to
APS papers, for which we consistently know the titles.
Hence, even in the absence of a meaningful ground truth, we can still check the sensibility of a clustering by statistically analyzing the titles grouped together using tools from natural language processing.
We find that node clusterings based on curvatures correspond to thematically more coherent groupings (Appendix A.5).
For learning on hypergraph collections , we spectrally cluster the collection using RBF or exponential Wasserstein kernel matrices, exp( − γ W( µ x , µ y ))
(Plaen et al., 2020), on node and edge curvatures or other local features.
As we do not have ground-truth labels, we evaluate the quality of the resulting clusterings in an unsupervised manner, using what we call the Wasserstein Clustering Coefficient (WCC).
This measure compares averaged intra -cluster Wasserstein distances to averaged inter -cluster Wasserstein distances, such that a lower WCC corresponds to a higher-quality clustering.
Given c clusters
X =
{ X 1 , . .
, X c } of hypergraphs H represented by their feature distributions ⃗χ H , we define
WCC
[Equation]
X ) :
[Equation]
As illustrated in Table 2, when evaluated using WCC with directional curvature distributions as ⃗χ , i.e., WCC κ ( i,j ) , O RCHID curvatures consistently yield better clusterings than other local features.
D ISCUSSION AND C ONCLUSION
We introduced O RCHID , the first unified framework for Ollivier-Ricci curvature on hypergraphs that integrates and generalizes existing approaches to hypergraph ORC.
O RCHID disentangles the individual building blocks shared by all notions of hypergraph ORC and yields curvature notions that are provably aligned with our geometric intuition.
We performed a rigorous theoretical and empirical analysis of O RCHID curvatures, and demonstrated their utility and scalability in practice through extensive experiments, covering both hypergraph exploration and hypergraph learning .
While our work paves the way towards future work seeking to leverage the power of Ollivier-Ricci curvature for hypergraphs in hypergraph learning algorithms, it still has some limitations to be addressed.
First, ORC on graphs is defined for any probability measure, but we only consider measures corresponding to a single step of a random walk.
This leaves the investigation of higher-order random walks or alternative probability measures to future work, where elucidating relationships between specific probability measures and other structural properties of hypergraphs would be of particular interest.
Second, hyperedge intersections can vary in cardinality, but this variation is not currently reflected in our probability measures.
This creates an opportunity to integrate O RCHID with the swalk framework proposed by Aksoy et al.
(2020), or to define persistent O RCHID curvatures based on hypergraph filtrations, extending work on persistent ORC for graphs (Wee & Xia, 2021b).
Third, like the original ORC, O RCHID curvatures are static, but many hypergraphs are inherently dynamic, suggesting a need to develop dynamic curvature notions.
Fourth, despite its unprecedentedly comprehensive scope, our study only scratches the surface regarding the theoretical and empirical analysis of O RCHID curvatures, and we believe that there are many more connections between O RCHID curvatures and other hypergraph descriptors to be uncovered, and many more use cases to be explored.
For instance, O RCHID generalizes ORC, but not Forman–Ricci curvature (FRC), and we believe that a framework for FRC could help uncover new relations between combinatorial curvature notions and hypergraph structure.
Finally, we imagine that incorporating hypergraph curvature into models as an additional inductive bias could prove useful in hypergraph learning more broadly.
E THICS S TATEMENT
Our main contribution is O RCHID , a unified mathematical framework yielding theoretically sound hypergraph descriptors that are also practically useful for hypergraph exploration and hypergraph learning.
As such
O RCHID comes with the caveats applicable to hypergraph exploration and hypergraph learning methods more generally.
Most importantly, it should be used with caution on data related to people and its results should not be decontextualized.
We adhered to these principles in our experiments and selected our datasets accordingly
R EPRODUCIBILITY S TATEMENT
To facilitate reproducibility we provide more details on our data, implementation, and results in more detail in Appendices A.3 to A. and make all our code, data, and results publicly available at https://bit.ly/3RkYZQH.
A A PPENDIX
In this Appendix, we include the following materials.
A.1 Deferred Proofs.
All proofs for Section 3, along with supporting definitions, lemmas and corollaries.
A.2 Further Related Work.
Discussion of related work treating hypergraphs or curvatures, but not hypergraph curvatures.
A.3 Dataset Details.
Further information on the provenance, semantics, and statistics of our datasets.
A.4 Implementation Details.
Details on our implementation, including proofs showing the correctness of performance shortcuts.
A.5 Further Results.
Display and discussion of results not included in the main paper.
A. D EFERRED P ROOFS
Lemma 1.
For graphs and r -uniform, k -regular, c -cooccurrent hypergraphs, µ EN = µ EE = µ WE .
Proof.
For notational simplicity, w.l.o.g., we assume that α = 0 .
In an r -uniform, k -regular, ccooccurrent hypergraph H =
( V, E ) , each node i has degree k and ( r − 1)
k c neighbors, and each edge has cardinality r .
Hence, for nodes i, j ∈ V with i ∼ j ,
[Equation]
Graphs are 2 -uniform and 1 -cooccurrent
(but not generally regular), and hence, | N ( i ) | =
deg( i ) .
Using this to simplify the probability measure expressions, the claim follows.
Lemma 2.
For graphs, i.e., 2 -uniform hypergraphs, we have A GG A ( e ) =
A GG B ( e ) =
A GG M ( e ) for all edges e ∈ E .
Proof.
Given probability distributions µ 1 , µ 2 , . . . , µ n , their Wasserstein barycenter is defined as the distribution ¯ µ that minimizes f (¯ µ ) := 1 n (cid:80) ni =1 W 1 (¯ µ, µ i ) .
Since | e | = 2 , we minimize
W 1 (¯ µ, µ 1 ) + W 1 (¯ µ, µ 2 ) .
The Wasserstein distance is a metric, so it satisfies the triangle inequality.
Thus, W 1 ( µ 1 , µ 2 ) ≤ W 1 (¯ µ, µ 1 )+W 1 (¯ µ, µ 2 ) for all choices of ¯ µ .
Hence, f is minimized by either µor µ 2 .
Evaluating both cases yields A GG A ( e ) =
A GG B ( e ) , and observing that A GG M ( e ) =
W 1 ( µ i , µ j ) for e = { i, j } by definition, the claim follows.
Theorem 3.
For any probability measure µ and C ( e ) := 2 / | e | ( | e |− 1) , the curvature κ A ( e ) of an edge e ∈ E is bounded by
[Equation]
Proof.
We bound each of the summands in the curvature calculation.
Given probability measures µ i , µ j , a result by Gibbs & Su (2002, Theorem 4) states that
[Equation]
(18) where d TV refers to the total variation distance .
The intuition behind this bound is that the total variation distance represents a specific type of transport plan between the two probability measures; the factors arising from the minimum (maximum) distance in a space indicate the minimum (maximum) distance that realizes this transport plan.
Since all our measures are defined over a finite space, we have d TV ( µ i , µ j ) = {+
 ∥+} µ i − µ j ∥ 1 .
The claim follows by considering that pairwise distances are being subtracted to calculate our curvature measure.
Theorem 4.
For any probability measure µ , the curvature κ M ( e ) of an edge e ∈ E is bounded by
[Equation]
Proof.
For A GG M , Eq.
(18) applies for a single pairwise distance only.
We thus only obtain a single bound based on the maximum total variation distance between two probability measures.
Theorem 7.
Given a subset of nodes s ⊆ V and an arbitrary probability measure µ , let δ i denote a Dirac measure at node i , and let J( µ i ) :
= W 1 ( δ i , µ i ) denote the jump probability of µ i .
If (i) all curvatures based on µ are strictly positive, i.e., κ ( s ) ≥ κ > 0 for all s ⊆ V , and (ii) W 1 ( µ i , µ j ) ≤
A
GG ( s ) for { i, j } =
argmax(d( s )) , then
[Equation]
Proof.
Let { i, j } =
argmax(d( s )) as required in the theorem.
We then have following chain of (in)equalities:
[Equation]
Rearranging Eq.
(14), we have (1 − κ ( s ))
d( s ) =
A GG ( s ) .
According to our assumptions,
W [Equation] [Equation]
) ≤ A GG ( s ) =
(1 − κ ( s ))
d( i, j ) .
Inserting this into Eq.
(19) yields
[Equation]
where the last step is only valid since κ ( s ) ≥ κ > 0 by assumption.
Definition 11 (Hypercliques, hypergrids, hypertrees) .
A simple, connected hypergraph H =
( V, E ) is
– a hyperclique if E = (cid:0) Vr (cid:1) for some r ≤ | V | , – a hypergrid if H is an r -uniform hypergraph for which there exists a lattice L
= ( V, E L ) s.t.
E
= { e ∈ (cid:0)
Vr (cid:1) | e corresponds to a path of length r in L } , and – a hypertree if there exists a tree T =
( V, E T ) s.t.
each edge e ∈ E T induces a subtree in T .
Corollary 12.
Cliques are hypercliques, grids are hypergrids, and trees are hypertrees.
Corollary 13.
If H = ( V, E ) is a hyperclique, a hypergrid, or an r -uniform, k -regular, 1intersecting hypertree, for i, j ∈ V , the sets S
i = { e ∈ E | i ∈
e } and S j = { e ∈ E | j ∈ e } are isomorphic, i.e., there exists φ :
N ( i ) ∪ { i } → N ( j ) ∪ { j } such that {{ φ ( x ) | x ∈ e } | e ∈ S i } =
S j .
For hypercliques, hypergrids, and hypertrees with certain regularities, A GG A ( e ) and A GG M ( e ) are constants.
Lemma 14 (Hypercliques, hypergrids, hypertrees) .
If H = ( V, E ) is a hyperclique, a hypergrid, or an r -uniform, k -regular, 1 -intersecting hypertree, we have A GG A ( e ) =
A GG M ( e ) =
W 1 ( µ i , µ j ) =
w for w ∈ R , e ∈ E , and i, j ∈ V with i ∼ j .
Proof.
By Corollary 13, we have w :=
W 1 ( µ i , µ j ) =
W 1 ( µ p , µ q ) for i, j, p, q ∈ V with i ∼ j and p ∼ q .
Hence A GG M ( e ) = w , and A GG A ( e ) = 2 | e | ( | e |− 1) (cid:80) { i,j
}⊆
e W 1 ( µ i , µ j ) =
| e | ( | e |− 1) | e | ( | e |− 1)w = w , for e ∈ E .
Corollary 15.
If H = ( V, E ) is a hyperclique, a hypergrid, or an r -uniform, k -regular, 1intersecting hypertree, A GG A ( e )
=
A GG M ( e ) .
Using Lemma 14, we now prove that under A GG A and A GG M , hypercliques are positively curved, hypergrids are flat, and hypertrees are negatively curved, as desired.
Theorem 8 (Hyperclique curvature) .
For an edge e in a hyperclique H
=
( V, E ) on n nodes with edges E = (cid:0)
Vr (cid:1) for some r ≤ n , with α = 0 ,
[Equation]
Proof.
A hyperclique is r -uniform, ( n − 1) -regular, and ( r − 2)
-cooccurrent, so µ EN i =
µ EE i =
µ WE i for each node i ∈ V by Lemma 1.
Thus, considering µ EN i , each node i ∈ V has n − 1 neighbors to which it distributes its probability mass equally, and we have W 1 ( µ i , µ j ) =
1 n − 1 for i, j ∈ V with i ∼ j .
The claim now follows from Lemma 14.
Theorem 9 (Hypergrid curvature) .
For an edge e in a r -uniform, k -regular hypergrid, with α = 0 , κ ( e ) = 0 , independent of r and k .
Proof.
By Corollary 13, the sets S i = { e ∈ E | i ∈
e } and S j = { e ∈ E | j ∈ e } are isomor- phic, and due to the symmetries in the hypergrid, the isomorphism φ :
N ( i ) ∪ { i } → N ( j ) ∪ { j } minimizing the cost (cid:80) x ∈N ( i ) ∪{ i } d ( x, φ ( x )) corresponds to the coupling minimizing W 1 ( µ i , µ j ) .
The cost of φ equals the minimum cost of an isomorphism in H ’s underlying lattice L between the inclusive ( r − 1)
-hop neighborhoods of two nodes adjacent in L , which is | N ( i ) ∪ { i }| .
Hence,
W [Equation] µ
[Equation]
, µ [Equation] [Equation]
N ( i ) ∪{ i }| |N
( i ) ∪{ i }| = 1 for i, j ∈ V with i ∼ j and all choices of µ , and the claim then follows from Lemma 14.
Theorem 10 (Hypertree curvature) .
For an edge e in a r -uniform, k -regular, 1 -intersecting hypertree, with α
[Equation]
[Equation]
Proof.
An r -uniform, k -regular, 1 -intersecting hypertree is 1 -cooccurrent, so we have µ EN i = µ EE i = µ WE i for each node i ∈ V by Lemma 1.
Each node i ∈ V has ( r − 1) k neighbors, such that µ EN i distributes a fraction 1 ( r − 1) k of the probability mass to each of i ’s neighbors.
Nodes i, j ∈ V with i ∼ j share ( r − 2) neighbors (those in the unique edge e satisfying { i, j } ⊆ e ), and the probability mass allocated by µ i to j can be matched with the probability mass allocated by µ j to i at cost 1 .
Because H is a hypertree, the remaining probability mass, ( r − 1)( k − 1) / (cid:0) ( r − 1) k (cid:1) =
( k − 1) /k , needs to be transported from the neighborhood of i to the neighborhood of j at cost 3 .
Hence,
[Equation]
for i, j ∈ V with i ∼ j .
Again, the claim follows from Lemma 14.
A. F URTHER R ELATED W ORK
In addition to the related work discussed in the paper, we here highlight existing work in the more loosely related fields of graph curvature, hypergraph learning, and hypergraph mining and analysis.
Graph Curvature.
Beyond the Ollivier-Ricci concepts, there are also curvature concepts based on the contractivity of operators (Bakry & Émery, 1985), which could be considered a “spiritual precursor” to Ollivier’s work.
This perspective has been used to provide a predominantly spectral perspective on curvature (Liu et al., 2019; Münch & Rose, 2020), whereas ORC can foremost be seen as a probabilistic concept .
Recently, Kempton et al.
(2020) defined a hybrid between Ollivier and Bakry-Émery curvature on graphs.
A more combinatorial perspective is assumed by FRC, which is motivated by defining equivalent formulations of curvature on structured spaces, such as
CW complexes or simplicial complexes.
Originally described by Forman (2003), FRC has since been improved in the context of explaining the learning behavior of graph neural networks (Topping et al., 2022), with other recent work focusing on fusing it with topological graph properties (Roy et al., 2020).
ORC was first developed for general Markov chains (Ollivier, 2007; 2009), but has quickly been adopted to characterize graphs (Jost & Liu, 2014) and networks (Weber et al., 2017).
With numerous follow-up publications elucidating the relationship between structural properties of a graph and ORC (Bauer et al., 2017; Samal et al., 2018), the initial concept has also been substantially updated (Bourne et al., 2018; Lin et al., 2011).
As an emerging research direction, we identified the combination of ORC (and FRC) with concepts from computational topology, leading to an inherent multi-scale perspective on data.
This has led to promising results for treating biomedical graph data (Wee & Xia, 2021b;a).
Hypergraph Learning.
Work tackling certain hypergraph learning tasks such as hypergraph clustering (Amburg et al., 2020; Veldt et al., 2020) has existed for many years (Zhou et al., 2006; Wachman & Khardon, 2007).
Some approaches make use of intrinsic structural properties of hypergraphs, leading to hypergraph neural network architectures (Huang & Yang, 2021) and message passing formulations (Gao et al., 2019), whereas others focus on developing similarity measures, i.e., kernels (Bai et al., 2014; Bloch & Bretto, 2013; Martino & Rizzi, 2020).
Methods from the rich literature on graph kernels can also be employed to address hypergraph learning tasks, namely, by transforming the hypergraph into a graph, but most popular transformations are lossy and may drastically increase the size of the object under study, such that the practicality and utility of this approach is unclear.
Hypergraph Mining and Analysis.
In recent years, there has been a renewed interest in hypergraph mining and analysis.
Notably, there is work developing new hypergraph descriptors (Aksoy et al., 2020), extending motif discovery to hypergraphs (Lee et al., 2020; Lee & Shin, 2021), solving classic graph mining tasks in the hypergraph setting (Macgregor & Sun, 2021), or identifying patterns in real-world hypergraphs (Do et al., 2020).
However, to the best of our knowledge, none of this work draws on curvature concepts to solve the mining and analysis tasks of interest.
A. D ATASET D ETAILS
At a high level, our workflow to produce and work with the datasets used in our experiments (Section 5) was as follows:
Obtain raw data in a variety of different formats, e.g., CSV, JSON, or XML.
Transform the raw data into a hypergraph CSV that retains as much of the raw data semantics as possible.
This CSV is guaranteed to contain one row per edge, one column with unique edge identifiers, and one column with the nodes contained in each edge.
It may also contain additional columns holding further metadata associated with individual edges.
Column names may differ between datasets to reflect dataset semantics.
Provide a unified loading interface to the datasets in Python.
Transform semantics-laden hypergraph CSV files into semantics-free one-based integer edge lists and sparse matrices for curvature computations in Julia, compute curvatures in Julia, and store the results in JSON files.
Map results back to original dataset semantics in Python for further examination.
In the following, we give more details on the provenance, semantics, and statistics of our datasets.
Unless if otherwise noted, we make our datasets publicly available with our online materials, along with the raw data and all preprocessing code.
A.3. APS - A , APS - AV , APS - CV : A MERICAN P HYSICAL S OCIETY J OURNAL A RTICLES
The American Physical Society (APS), a nonprofit organization working to advance the knowledge of physics, publishes several peer-reviewed research journals.
The APS makes two datasets based on its publications available to researchers: (i) an edge list containing (citing, cited) pairs of articles contained in its collection, and (ii) a JSON dataset containing the metadata for each article in its collection.
These datasets are updated on a yearly basis, and researchers can request access by filling out a web form located at https://journals.aps.org/datasets .
We made a data access request and were granted access to the 2021 versions of the APS datasets within two weeks.
From the APS datasets, we derived the following hypergraphs and hypergraph collections:
(i) aps-a
Each node corresponds to an author who published at least one article in an APS journal.
Each edge e corresponds to an article in an APS journal, and it contains as nodes all authors of e .
This hypergraph is derived from the JSON data.
(ii) aps-av: aps-a, split up by journal, for a total of 19 hypergraphs.
For each journal j , the edge set of aps-a is restricted to articles from j , and the node set of aps-a is restricted to nodes authoring at least one article from j .
(iii) aps-cv: We derive one hypergraph for each of the 19 journals represented in the edge list data.
For each journal j , the edge set comprises articles from j citing at least one article in j , and the node set consists of articles in j cited by at least one article in j .
Access.
Due to the terms and conditions associated with data access, we cannot make the APS datasets or the hypergraphs derived from them publicly available, and researchers seeking to work with this data will have to request data access from APS directly as outlined above.
However, we make our preprocessing code publicly available, such that researchers who have obtained access to the APS datasets can easily reproduce our hypergraphs from the raw data.
Caveats.
When doing our case studies on the aps-cv dataset, we observed that some DOIs present in the edge list had no associated metadata in the JSON files provided by APS.
This does not affect our curvature computations, but it might constrain the interpretability of results, e.g., when inspecting node clustering results based on article categories present only in the metadata.
A.3. DBLP , DBLP - V : DBLP J OURNAL A RTICLES AND C ONFERENCE P ROCEEDINGS
The DBLP computer science library provides high-quality bibliographic information on computer science publications.
All DBLP data is released under a CC0 license and freely available in one
XML file that is updated regularly.
We obtained the XML dump dated September 1, 2022 from https://dblp.org/xml/release/ and preprocessed it into a CSV file containing only entries corresponding to the XML tags article and inproceedings , with one row per entry and the following columns:
– key: unique identifier of the entry, e.g., conf/iclr/XuHLJ19 or journals/cacm/Savage16c .
– tag: XML tag associated with the entry, one of { inproceedings , article }.
– crossref: cross-reference to a venue, e.g., conf/iclr/2019 .
Sometimes missing although a venue should be present.
– author: semicolon-separated list of DBLP author names, e
g., Keyulu Xu;
Weihua
Hu;Jure Leskovec;Stefanie Jegelka .
Sometimes missing (we discard entries without authors when loading the data).
– year: entry publication year, e.g., 2019 .
– title: entry title, e.g., How Powerful are Graph Neural Networks? .
– publtype: if present, the type of publication, e.g., informal .
Mostly missing.
– journal: for article entries, the name of the publishing journal, e
g., Commun.
ACM .
– booktitle: for inproceedings entries, the name of the publishing venue, e.g., ICLR .
– volume: if present, the publication volume, e.g., 59 .
– number: if present, the publication number, e.g., 7 . – pages: if present, the entry pages, e.g., 12-14 .
– mdate: modification date, e.g., 2019-07-25 .
This constitutes our individual hypergraph dblp, in which each edge represents a paper, and each node represents an author.
From this hypergraph, we additionally derived the dblp-v hypergraph collection, which contains different subsets of dblp by venue or group of venues.
More precisely, we distinguish 1 193 hypergraphs as follows:
(i) dblp_journal-all , dblp_inproceedings-all : partition of dblp into entries published in journals and entries published as part of proceedings.
(ii) dblp_journal-{journal} : one hypergraph per journal, for all journals with at least 1 000 articles in the DBLP dataset.
(iii) dblp_proceedings-{venue} : one hypergraph per venue (grouped by booktitle ), for all venues with at least 1 000 papers in the DBLP dataset.
(iv) dblp_proceedings_area-{area}_{venues} : one hypergraph per each of the FoR (field of research) areas 4601–4608, 4611–4613 as used in the CORE ranking (4609 andwere not present in the ranking), where each area is represented by all conferences (grouped by booktitle ) with CORE rank A ∗ and A that have at least 1 000 papers in the DBLP dataset.
These areas and associated top conferences are as follows:
Applied computing – AIED, ICCS – 4602:
Artificial intelligence – AAAI, AAMAS, ACL, AISTATS, CADE, CIKM, COLING, COLT, CP, CogSci, EACL, EC, ECAI, EMNLP, GECCO, ICAPS, IJCAI, IROS, KR, UAI – 4603: Computer vision and multimedia computation – AAAI, CVPR, ECAI, ICCV, ICME, IJCAI, IROS, WACV – 4604: Cybersecurity and privacy – AsiaCCS, CCS, CRYPTO, DSN – 4605: Data management and data science – CIKM, ECIR, EDBT, ICDAR, ICDE, ICDM, ISWC, KDD, MSR, PODS, RecSys, SDM, SIGIR, VLDB, WSDM, WWW – 4606:
Distributed computing and systems software – ASPLOS, CCGRID, CLUSTER, CONCUR, DISC, DSN, HPCA, HPDC, ICCAD, ICDCS, ICNP, ICPP, ICS, ICWS, INFOCOM, IPDPS, IPSN, PODC, SC, SIGCOMM, SPAA, WWW
[Figure]
N u m b e r o f D r u g s (
[Figure]
200 Number of Pharmaceutical Classes
N u m b e r o f D r u g s (
[Figure]
– 4608: Human-centred computing – ASSETS, CHI, CSCW, ITiCSE, IUI, SIGCSE, UIST – 4611: Machine learning – AAAI, AISTATS, COLT, ECAI, ICDM, ICLR, ICML, IJCAI, KDD, NeurIPS, PPSN, WSDM – 4612: Software engineering – ASE, ASPLOS, CAV, ICSE, ICST, ISCA, ISSRE, MSR, OOPSLA, PLDI, POPL, RE, SIGMETRICS – 4613:
Theory of computation – EC, ESA, FOCS, ICALP, ICLP, ISAAC, ISSAC, KR, LICS, MFCS, SODA, STACS, STOC, WG
Caveats.
For about 0.1% of all records, our XML parser failed, which originally resulted in “None” as one of the authors of all problematic records.
We then redid the preprocessing (and all subsequent computations) excluding those records, but the records were still counted when determining the venues to include in dblp-v.
A.3. NDC - AI , NDC - PC : D RUGS A PPROVED BY THE U.S. F OOD & D RUG A DMINISTRATION
The U.S. Food and Drug Administration (FDA) collects information on all drugs manufactured, prepared, propagated, compounded, or processed by registered drug establishments for commercial distribution in the United States.
The FDA maintains the National Drug Code (NDC) Directory, which is updated daily and contains the listed NDC numbers and all information submitted as part of a drug listing.
We downloaded the NDC data from https://download.open.fda.gov/ drug/ndc/drug-ndc-0001-of-0001.json.zip on August 21, 2022, and transformed it into a CSV file, an example record of which is shown in Table 3.
From this CSV file, we derived two hypergraphs.
In both hypergraphs, edges correspond to FDA-registered drugs.
In ndc-ai, nodes correspond to the active ingredients used in these drugs, and in ndc-pc, nodes correspond to the pharmaceutical classes assigned to these drugs.
The edge cardinality distributions resulting from both semantics are shown in Fig.
A.3. MUS : M USIC P IECES
music21 is an open-source Python library for computer-aided musicology that comes with a corpus of public-domain music in symbolic notation.
Using the music21 library, we extracted a collection of hypergraphs from the music21 corpus.
In this collection, each hypergraph corresponds to a music piece, each edge corresponds to a chord sounding for a specific duration at a particular offset from the start of the piece, and each node corresponds to a sound frequency.
Note that hypergraphs in the mus collection are node-aligned, which distinguishes them from the hypergraphs in all other collections.
In Table 4, we show the cardinality decomposition of selected music hypergraphs that include the largest edges.
There, we include edges of cardinality 0 for completeness (they correspond to pauses in the music), but they are discarded in our curvature computations.
Caveats.
When constructing our hypergraph collection from the music21 corpus, we excluded pieces that are primarily monophonic.
After exploring the corpus manually and evaluating the chord
[Table]
, ’857005’], ’spl_set_id’:
[’fcd2b59e-8087-475e-9e6b- 911bd846ea96’], ’is_original_packager’:
[True], ’upc’:
[’0371930021121’, ’0371930020124’, ’0371930019128’], ’unii’:
[’NO70W886KK’, ’362O9ITL9D’]} statistics of individual pieces, we decided to use only music with the following prefixes (corresponding to names of composers or collections): bach, beethoven, chopin, haydn, handel, monteverdi, mozart, palestrina, schumann, schubert, verdi, joplin, trecento, weber.
Some pieces are included in several editions (e.g., BWV 190.7, the chorale by Johann Sebastian Bach occupying the first two lines of Table 4, which is included in both the original and an instrumental version).
A.3. STEX : S TACK E XCHANGE S ITES
StackExchange is a platform hosting Q&A communities also known as sites.
Each question is assigned at least one and at most five tags.
In the second half of August 2022, we used the StackExchange API to download all questions asked on all StackExchange sites listed on the StackExchange data explorer ( https://data.stackexchange.com/ ), along with their associated tags and other metadata (including question titles and, for smaller sites, also question bodies).
From our downloads, we created the stex hypergraph collection, in which each hypergraph corresponds to a
StackExchange site, each edge corresponds to a question asked on a site, and each node corresponds to a tag used at least once on a site.
Tables 5 to 11 list the basic statistics for each hypergraph from the stex collection.
Caveats.
While our curvature computations uniformly include only questions asked no later than
August 15, midnight GMT, the metadata associated with these questions stems from snapshots at different times in the second half of August 2022.
We also excluded stackoverflow.com and math.stackexchange.com from our downloads because they could not be downloaded within one day due to API quota limitations, and ru.stackoverflow.com because it was large but we would not have been able to interpret our results.
[Table]
260 127427 1 06518     beethoven-o59no3-m 81 319 381734 1 219 255 139     beethoven-o 82 6 492 112 440 922 1 448 2 886 538 119     monteverdi-madrigal.3.6              schumann-clara-o17-m3  12 15183 74 25   schumann-o41no1-m 72 251 130 919 366
A.3. SHA : S HAKESPEARE ’ S P LAYS
The sha collection is a subset of the H YPERBARD dataset recently introduced by Coupette et al.
(2022), based on the TEI-encoded XML files of Shakespeare’s plays provided by Folger Digital
Texts.
Here, each hypergraph represents one of Shakespeare’s plays, which are categorized into three types: comedy, history, and tragedy.
In each hypergraph representing a play, nodes correspond to named characters in the play, and edges correspond to groups of characters simultaneously present on stage.
These hypergraphs are documented extensively in the paper introducing the H YPERBARD dataset (Coupette et al., 2022).
A.3. SYN - C , SYN - R , SYN - S : S YNTHETIC H YPERGRAPHS
To generate synthetic hypergraphs, we wrote hypergraph generators extending three well-known graph models to hypergraphs.
(i) For syn-c, we extended the configuration model, which, for undirected graphs, is specified by a degree sequence.
Our hypergraph configuration model is specified by a node degree sequence and an edge cardinality sequence.
(ii) For syn-r, we extended the Erd˝os-Rényi random graph model, which, for undirected graphs, is specified by a number of nodes n and an edge existence probability p .
Our Erd˝os-Rényi random hypergraph model is specified by a number of nodes n , a number of edges m , and the probability p of a one in any cell of the node-to-edge incidence matrix.
(iii)
For syn-s, we extended the stochastic block model which, for undirected graphs, is specified by a vector of c community sizes and a c × c affinity matrix specifying affiliation probabilities between communities.
Our hypergraph stochastic block model is specified by a vector of c V node community sizes, a vector of c E edge community sizes, and a c V × c E affinity matrix specifying affiliation probabilities between node communities and edge communities.
We used each of our generators to create 250 hypergraphs with identical node count n , edge count m , and density c / nm , where c is the number of filled cells in the node-to-edge incidence matrix.
Caveats.
Our generators work by pairing node and edge indices, and duplicated (node, edge) index pairs are discarded to generate simple hypergraphs, which can lead to small deviations from the input specification in practice.
[Table]
askubuntu 3 137 393 266 0.007977 68 310 104 529 105 601 68 907 45astronomy 12 773 0.
23311astronomy.meta 339 0.
aviation 122 701 0.
47631aviation.meta 752 0.
bicycles 18 873 0.
4642 bicycles.meta 442 0.
bioacoustics 287 1.
bioacoustics.meta 49 0.
bioinformatics 4 998 0.
11  bioinformatics.meta 112 0.
biology 27 348 0.
58732biology.meta 814 0.
[Table] [Table]
.meta 434 0.
blender 98 724 0.003758 31302295blender
[Table]
boardgames 113 166 0.
92   boardgames.meta 659 0.
bricks 4 220 0.
11   bricks.meta 211 0.
buddhism 7 956 0.
221  buddhism.meta 491 0.
cardano 2 248 0.
cardano.meta 43 0.
chemistry 41 571 0.
9141042chemistry.meta 1 034 0.
chess 7 864 0.
122  chess.meta 368 0.
chinese 10 298 0.
431  chinese.meta 349 0.
christianity 114 955 0.
13422christianity.meta 1 579 0.
civicrm 14 324 0.
4531 civicrm
[Table]
meta 69 0.
[Table]
[Table] [Table]
2dsp.meta 307 0.
earthscience 6 329 0.
1111 earthscience.meta 321 0.
ebooks 1 466 0.
ebooks.meta 99 0.
economics 13 690 0.
3431 economics.meta 444 0.
electronics 2 318 175 731 0.013191 31 201 46 423 46 974 29 107 22electronics.meta 1 685 0.
elementaryos 8 471 0.
321  elementaryos.meta 107 0.
ell 99 970 0.005332 46 764 31 310 1452ell.meta 1 224 0.
emacs 23 939 0.
7941 emacs.meta 216 0.
engineering 13 867 0.
34311engineering.meta 217 0.
english 984 125 848 0.007819 48 232 38 850 23 112 105english.meta 3 589 0.
11   eosio 2 422 0.
[Table]
[Table]
[Table] [Table] [Table] [Table]
11  gardening 16 629 0.
35421gardening.meta 320 0.
genealogy 3 572 0.
[Table] meta 485 0.
german 16 022 0.
652  german [Table]
gis 2 829 150 205 0.018834 13 868 36 527 45 339 32 527 21gis [Table] meta 1 016 0.
graphicdesign 34 820 0.
7 542 10942graphicdesign
[Table]
meta 851 0.
ham 4 299 0.
11  ham
[Table]
hardwarerecs 3 945 0.
11   hardwarerecs
[Table]
italian 3 590 0.
11   italian.meta 151 0.
[Table]
[Table] [Table]
[Table] [Table]
literature 25 614 0.
[Table] [Table]
[Table] [Table]
martialarts
[Table] [Table]
1321 matheducators 3 360 0.
1   matheducators.meta 255 0.
{+mathematica 85 069 0.008287 25 896 31 653 
+}
[Table]
mathoverflow.
[Table]
1 530 137 735 0.011108 20 381 37 763 38 643 24 597 16mattermodeling 2 422 0.
mattermodeling.
[Table]
mechanics 125 243 0.
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
11   monero
[Table]
meta 85 0.
money 136 187 0.
38 036 1085money
[Table]
movies 421 829 0.
4 857 114  movies.meta 1 285 0.
music 23 424 0.
47631music.meta 992 0.
musicfans 2 990 0.
11   musicfans.meta 218 0.
mythology 1 953 0.
[Table]
1 pets.meta 407 0.
philosophy 17 915 0.
45421philosophy.meta 793 0.
photo 125 961 0.
36742photo.meta 1 095 0.
physics 892 209 515 0.004257 21 914 42 808 53 150 45 705 45physics.meta 3 228 0.
1   pm 6 198 0.
111  pm.meta 315 0.
poker 2 051 0.
poker.meta 122 0.
politics 14 628 0.
14431politics.meta 1 067 0.
portuguese 2 349 0.
portuguese.meta 137 0.
proofassistants 434 0.
proofassistants.meta 64 0.
psychology 7 641 0.
1211 psychology.meta 557 0.
pt.meta.stackoverflow 2 986 0.
1   pt.stackoverflow 2 936 152 483 0.019255 28 143 50 055 42 386 21 287 10puzzling 24 985 0.
6952 puzzling.meta 1 365 0.
quant 20 283 0.
35532quant.meta 252 0.
quantumcomputing 7 823 0.
1221 quantumcomputing.meta 187 0.
raspberrypi 35 872 0.
7 901 11942raspberrypi.meta 451 0.
retrocomputing 4 976 0.
11  retrocomputing.meta 304 0.
reverseengineering 8 754 0.
1221 reverseengineering.meta 150 0.
robotics 6 261 0.
111  robotics.meta 159 0.
rpg 146 635 0.
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table]
A. I MPLEMENTATION D ETAILS
To simplify the computation of Wasserstein distances between adjacent nodes, we leverage the following fact about the relevant distances (i.e., transportation costs) between nodes.
Lemma 1.
Given a hypergraph H
=
( V, E ) and nodes i, j, k, ℓ ∈ V with i
∼ j as well as µ i ( k ) >and µ j ( ℓ ) > 0 , d( k, ℓ ) ≤ 3 .
Proof.
By the triangle inequality and the definition of our probability measures, we have
[Equation]
Furthermore, we speed up the computation of Wasserstein distances by exploiting the following observation to reduce each instance to its smallest equivalent instance.
Lemma 2.
Given a hypergraph H
=
( V, E ) and nodes i, j ∈ V with i ∼ j , if µ i ( k ) =
µ j ( k ) for some node k ∈ V , then W 1 ( µ i , µ j )
=
W 1 ( µ − k
i , µ − k j ) , where µ − k
i is defined as
[Equation]
Proof.
If µ i ( k ) = µ j ( k ) = 0 , the claim holds trivially.
Otherwise, µ i ( k ) = µ j ( k ) =
β > 0 .
In this case, let C ∗ be an optimal coupling between µ i and µ j .
If the probability mass allocated to k by µ i does not get moved at all in C ∗ , it contributes 0 to W 1 ( µ i , µ j ) , and we are done.
Therefore, assume otherwise.
Then there exist nodes p, q ∈ V such that probability mass gets moved from p to k and from k to q in C ∗ .
By the triangle inequality, d( p, q ) ≤ d( p, k ) + d( k, q ) , and as d( k, k ) = 0 , the cost of moving that mass directly from p to q and keeping all mass at k cannot be larger than the cost of moving the mass from p to k and from k to q .
Hence, we can modify C ∗ such that the mass allocated to k by µ i does not get moved at all without increasing the coupling cost.
Thus, there always exists an optimal coupling in which all mass at k remains at k , and the claim follows.
A. F URTHER R ESULTS
Here, we showcase further results to support and supplement the exposition in the main paper.
Q1 Parametrization.
Expanding the discussion on O RCHID parametrizations, Fig.
5 shows the distributions of edge curvatures and edge-averaged node curvatures for two hypergraphs from the dblp-v collection, representing top conferences in machine learning and theoretical computer science, respectively.
The figure highlights once more the consistently concentrating effect of increasing α , and it elucidates the differential effects of moving from maximum aggregation (left parts of the split violins) to mean aggregation (right parts of the split violins), from almost no shifts to large shifts in probability mass (compare, e.g., Fig.
5b, top right panel, with Fig.
5b, bottom left panel).
Fig.
5 might convey the impression that, other parameters being equal, the distributions of curvatures based on µ EN and µ WE are more similar to each other than to µ EE .
This does not hold in general, however, as demonstrated for ndc-pc in Fig.
6a, where node curvature distributions based on µ WE are more similar to those based on µ EE than to the node curvature distributions based on µ EN .
Comparing Fig.
6a to Fig.
6b (ndc-ai), we further observe that rather similar distributions of edge curvature and directional curvature can be accompanied by rather different distributions of edge-averaged and direction-averaged node curvatures, even for hypergraphs originating from the same domain.
Finally, when visualizing curvatures for hypergraphs in the same collection or across collections with related semantics (Fig. 7), we can identify several distinct prototypical shapes of curvature distributions and relationships between curvatures based on different probability measures.
[Figure]
C u r v a t u r
[Figure]
( κ
[Figure] [Figure]
Q2 Hypergraph Exploration.
Extending the discussion of individual hypergraph exploration in the main paper, we focus on a case study of the citation hypergraph of the journal Physical Review
E (PRE), which regularly publishes, inter alia, interdisciplinary work on graphs and networks.
In this hypergraph, which has 45 504 nodes and 52 574 edges, nodes represent PRE articles cited by at least one other PRE article, edges represent PRE articles citing at least one other PRE article, and each edge i comprises the nodes j cited by the paper corresponding to i . Therefore, the edge curvature of a (citing) paper i can be interpreted as an indicator of its breadth of content : The more positive the edge curvature, the stronger the general tendency of the papers jointly cited by paper i to be cited together, suggesting that these papers are topically related. Similarly, the node curvature of a (cited) paper j can be interpreted as an indicator of its breadth of impact : The more negative the node curvature, the more diversely the paper has been cited in the literature.
With these interpretations in mind, we compute all curvatures for the PRE citation hypergraph, using α = 0 . 1 , µ WE , and A GG A .
We find that for all 54 articles with at least 100 citations (top articles), the edge-averaged node curvature is larger than the direction-averaged node curvature, which is always negative, although only 36% of all PRE articles exhibit this feature combination.
This matches the intuition that from highly cited articles, the literature should diverge in many different directions.
At the same time, we observe that curvatures span a considerable range, even among top articles.
[Table] [Figure] [Figure] In Table we record the top articles with extreme curvature values and in Fig.
8, we display the pairwise relationships between curvature features and other local features for all PRE articles.
In line with the interpretations sketched above, the top article with the largest node curvatures is a classic reference for community detection in the highly integrated field of network science, whereas the articles with the smallest node curvatures address topics relevant to a broader range of approaches to collective phenomena in many-body systems (which are the focus of PRE)
[Table] [Table]
N
[Table]
n
[Table]
e
[Table] [Table]
i
[Table]
j
[Table] [Table]
m -
[Table]
e
[Table]
a
[Table]
e
[Table]
e -
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table]
n
[Table]
d
[Table]
e l - 50 - n o d e _ d e g r eer b
f k e r n e l - 50 - n o d e _ n e i g
h b
o r h
oo d _ s i
z er b f k e r n e l - S T D - a d j - n o d e _ c
u
r v a t u r e _ e d g e sr b f k e r n e l - S T D - a d j - n o d e _ c
u
r v a t u r e _ n e
i
g
h b
o r h oo dr b f k e r n e l - S T D - n o d e _ c u r v a t u r e _
e d g e sr b f k e r n e l - S T D - n o d e _ c u r v a t u r e _ n e i g
h b
o r h oo dr b f k e r n e l - S T D - n o d e _
d e g r eer b f k e r n e l - S T D - n o d e _ n e i g
h b
o r h
oo d _ s i z es p e c t r a l _ c l u s t e r _a d j a c e n c y _
r e g - u n w e
i g h t e d100 - s i g n e d a d js p e c t r a l _ c l u s t e r _ b n c - u n w e i g h t e d -- s i g n e d a d js p e c t r a l _ c l u s t e r _
l
a p l a c i a n - u n w e i g h t e d - 100 - s i g n e d a d ju n w e
[Table]
[Figure]
Q3 Hypergraph Learning.
Continuing the discussion of node clustering in hypergraphs abridged in the main paper, we again focus on the citation hypergraph corresponding to articles from Physical
Review E (PRE).
We experiment with a variety of features, clustering methods, and combinations thereof, including both classic and recent clustering methods, such as SPONGE (Cucuringu et al., 2019).
We aim for 17 clusters, which is the number of “disciplines” present in the APS metadata (unfortunately, disciplines are only assigned to more recent articles, and hence, cannot serve as ground truth).
As depicted in Fig.
9, we find that clusterings generated using curvatures as features differ radically from clusterings generated using other local features.
To evaluate the semantic sensibility of our clusterings in the absence of a suitable ground truth, we leverage the metadata associated with
PRE articles.
In particular, we concatenate the titles of the articles grouped in each of our clusters into “documents”, and consider the set of all clusters as our “document collection”, to then identify characteristic terms for each cluster using TF-IDF feature extraction.
We observe that clusterings based on O RCHID features tend to be more thematically coherent than clusterings based on other local features. As illustrated in Table 13, O RCHID features tend to separate paper titles well by topic (many frequently occurring terms are associated with only very few clusters, and the terms grouped together characterize specific subfields of the physics of collective phenomena covered by PRE), whereas clusters based on non-O RCHID features are much less topically focused.
[Table] [Table] [Table]