Chapter 6
Walks, connectivity, and centrality
Which hyperedges are strongly connected, which vertices hold a system together, and which elements would disconnect it if they failed? This chapter answers these questions with three families of tools. The -walks of Aksoy et al. measure connectivity at a chosen strength of overlap and yield -components, -distances, and the -betweenness and -closeness centralities that Nagy et al. used to find the critical elements of a manufacturing space. Random walks on hypergraphs lead to stationary distributions and PageRank. Eigenvector centralities defined on the adjacency tensor and the nonlinear node–edge centralities of Tudisco and Higham make the importance of a group depend on all of its members, and the hyper-core decomposition identifies the densely interacting nucleus of a hypergraph. The examples compare these measures on the wire-harness space and on synthetic hypergraphs.
6.1 Problem and idea
In a graph, two edges either share a vertex or not, and a path is a sequence of edges that share vertices. In a hypergraph two hyperedges may share one vertex or ten, and the difference matters. Two production activities that share only the AGV are connected in a weak sense: material passes from one to the other. Two activities that share an operator, a robot, a tool, and a sensor are connected in a strong sense: they form a cell, and a disturbance in one propagates immediately to the other. A path through the hypergraph that uses only single shared vertices is a chain of weak contacts; a path that uses large overlaps is a chain of strong ones. A graph-based distance on the clique expansion or on the ordinary line graph cannot tell them apart.
The idea of Aksoy et al. [21] is to make the required overlap a parameter. An -walk is a sequence of hyperedges in which consecutive hyperedges share at least vertices (fig. 6.1). For this is the usual notion of connectivity; as grows, only strong overlaps count, the hypergraph falls apart into -components, and distances and centralities computed at several values of describe the system at several strengths of interaction. The same idea applies to vertices, which are -adjacent when they share at least hyperedges.
6.2 Theory
6.2.1 Degrees and distributions
The simplest centralities are local. The degree of a vertex, weighted or not, counts its hyperedges; the strength of a hyperedge, , is its weighted size. Their distributions, together with the distribution of the overlaps of intersecting hyperedges, are the first fingerprint of a hypergraph (fig. 2.5); empirical hypergraphs typically have heavy-tailed degree distributions, a few typical hyperedge sizes, and overlaps concentrated on one or two vertices [29, 85].
6.2.2 -walks, -distances, and -components
An -walk of length is a sequence of hyperedges with for ; equivalently, a walk in the -line graph of (2.3). The -distance is the length of the shortest -walk from to (infinite if there is none), the -components are the connected components of , and the -diameter is the largest finite -distance [21]. Only hyperedges of size at least take part. The vertex versions use the -line graph of the dual: vertices and are -adjacent when in (2.1).
The -components are nested: every -component lies inside an -component, so increasing refines the partition. hatvis summarizes the refinement in two ways. The -component profile lists, for , the number of elements that take part, the number of components, the size and diameter of the largest one, and the number of links of ; it is a compact fingerprint of how strong the overlaps of a hypergraph are. The -profile plot draws one column per value of and one row per hyperedge, colored by the -component the hyperedge belongs to, with the rows in an order that keeps components contiguous at every level; the plot reads like a dendrogram in which the merging height is the overlap strength.
6.2.3 -centralities
Any centrality of the -line graph is an -centrality of the hypergraph [21]. Three are used here. The -betweenness of a hyperedge is the share of shortest -walks between other hyperedges that pass through it,
|
| (6.1) |
with the number of shortest -walks from to and the number of those through [86], normalized by the number of pairs. The -closeness is the reciprocal mean -distance to the reachable elements. Because a hypergraph usually becomes disconnected for , the harmonic -closeness
|
| (6.2) |
is preferable: unreachable elements contribute zero instead of making the measure undefined [87]. The -eigenvector centrality is the principal eigenvector of the weighted adjacency of . Applied to the dual, all three rank vertices.
Nagy et al. [4] proposed to rank the elements of a manufacturing space by averaging an -centrality over the strengths of interaction,
|
| (6.3) |
with the -betweenness or the harmonic -closeness. An element that is central only at is a broker of weak contacts (a shared transport resource); an element that remains central at and is embedded in strongly overlapping activities (a shared competence of a cell). The average rewards both, and the individual values tell them apart. Algorithm 6.1 summarizes the computation.
6.2.4 Random walks and PageRank
A random walk on a hypergraph moves between vertices through hyperedges. In the walk of Zhou et al. [35], a walker at vertex chooses one of its hyperedges with probability proportional to the weight, , and then a vertex of that hyperedge uniformly at random. The transition matrix is
|
| (6.4) |
the operator of the random-walk Laplacian (2.5). The walker may stay at its vertex (it can choose itself in the second step), and on a connected hypergraph the stationary distribution is proportional to the weighted degree, . Two generalizations matter in practice. Chitra and Raphael [40] let the second step depend on edge-dependent vertex weights , so that a vertex can be more important in one hyperedge than in another (an author’s contribution to a paper, the relationship score of a requirement in a QFD hyperedge); they showed that with edge-independent weights every hypergraph walk is equivalent to a walk on a weighted clique expansion, so that only edge-dependent weights add genuinely higher-order information. Carletti et al. [88] weight the step from to by , which favors moves inside large hyperedges. hatvis provides all of them and the simple walk on the clique expansion.
The PageRank [89] of a hypergraph walk is the stationary distribution of the walk that follows with probability and teleports to a random vertex (or to a personalization distribution) with probability . With the Zhou walk on an unweighted hypergraph, PageRank is close to the normalized degree; with edge-dependent weights it can differ substantially, because a vertex with a high weight in a few important hyperedges collects more probability than a vertex with low weights in many.
6.2.5 Eigenvector centralities
An eigenvector centrality declares a vertex important if it is connected to important vertices. On a graph the definition is the Perron vector of the adjacency matrix; on a hypergraph there are several choices, and they differ in how the importance of the co-members of a hyperedge is combined [83, 90].
Clique-expansion eigenvector centrality (CEC). The Perron vector of the clique adjacency of (2.2), , adds the importance of the co-members: in a hyperedge , vertex receives .
Z- and H-eigenvector centralities (ZEC, HEC). Benson [90] used the adjacency tensor of a -uniform hypergraph (2.8). The tensor–vector product (2.9) multiplies the importance of the co-members, so in vertex receives , and a hyperedge contributes only if all its other members are important. The Z-eigenvector centrality solves
|
| (6.5) |
and the H-eigenvector centrality solves
|
| (6.6) |
where is the entrywise power. The H-eigenvector of a connected hypergraph is unique by the Perron–Frobenius theory of nonnegative tensors and is found by the iteration of Ng, Qi, and Zhou [91], , normalized. Z-eigenvectors need not be unique; hatvis computes one with the shifted symmetric higher-order power method of Kolda and Mayo [92], , from the uniform start. Both are defined for uniform hypergraphs; hatvis evaluates (2.9) from the incidence lists without forming the tensor.
Nonlinear node and edge centralities. Tudisco and Higham [83] rank vertices and hyperedges simultaneously. With positive vectors (vertices) and (hyperedges) and four positive maps applied entrywise, they look for
|
| (6.7) |
A vertex is important if it belongs to important hyperedges, and a hyperedge is important if it contains important vertices; the maps decide how. With all maps the identity, (6.7) is the pair of leading singular vectors of , the hypergraph analogue of the hubs and authorities of HITS (kind="linear"). With and the importance of a hyperedge is the geometric mean of its members, so a single unimportant member pulls the whole hyperedge down ("log-exp"); with , and large it approaches the maximum, so a hyperedge is as important as its most important member ("max"). Tudisco and Higham prove that, under conditions on the homogeneity degrees of the maps, the positive solution of (6.7) is unique and a nonlinear power iteration converges to it; hatvis uses the damped form , with normalization. The linear version was used for the electric-car house of quality in section 5.4, where the vertex and the hyperedge centralities rank the requirements and the specifications at the same time.
6.2.6 Hyper-cores
The -core of a graph is its largest subgraph in which every vertex has degree at least . Mancastroppa et al. [93] generalized it to hypergraphs with a second parameter that controls the size of the interactions. The -hyper-core is the maximal subhypergraph in which every vertex belongs to at least hyperedges that have at least members inside the core; it is found by repeatedly removing vertices that violate the condition, shrinking the hyperedges accordingly, and discarding hyperedges with fewer than remaining members. The -core number is the largest for which vertex belongs to the -hyper-core, and the hyper-coreness
|
| (6.8) |
combines the core numbers over all interaction sizes. Mancastroppa et al. showed that higher-order processes such as threshold contagion localize in the hyper-cores and that seeding a process in the vertices of highest hyper-coreness is more efficient than seeding by degree.
In a nutshell: Connectivity and centrality
- -walks: consecutive hyperedges share at least vertices; -distance, -components (nested in ), -diameter; -component profile and -profile plot.
- -centralities: betweenness (6.1), harmonic closeness (6.2), eigenvector of ; averages over (6.3) (Nagy et al.); vertices via the dual.
- Random walks: Zhou (6.4) (), edge-dependent (Chitra–Raphael), Carletti; PageRank.
- Eigenvector family: CEC (sum of co-members), ZEC and HEC (product of co-members, uniform hypergraphs), nonlinear node–edge (6.7) (linear, log-exp, max).
- Hyper-cores: -cores and hyper-coreness (6.8).
6.3 Using it in hatvis
s_betweenness(H, s=1, edges=True, normalized=True)
- edges
-
True ranks hyperedges, False ranks vertices (through the dual).
- Related
-
s_closeness, s_harmonic_closeness, s_eigenvector, average_s_centrality(H, func, s_max, edges), s_centrality_table(H, s_values, edges); s_connected_components, s_distance, s_distance_matrix, s_diameter, s_component_profile; plots plot_s_profile, plot_s_walks, plot_ranking.
node_edge_eigenvector(H, kind="linear", p=10)
- kind
-
"linear", "log-exp", "max"; returns the vertex and the hyperedge centralities as two Series.
- Related
-
degree_centrality, edge_strength, clique_eigenvector, z_eigenvector, h_eigenvector, pagerank(H, alpha=0.85, edge_dependent=False), hypercore_numbers(H, m), hypercoreness(H); spectral.transition_matrix(H, kind), spectral.stationary_distribution.
6.4 Examples
How strongly are the activities connected? The -component profile of the wire-harness space is computed for hyperedges and for vertices.
print(hv.s_component_profile(H, s_values=range(1, 5))) print(hv.s_component_profile(H, s_values=range(1, 5), edges=False))
| elem. | comp. | largest | diam. | links | elem. | comp. | largest | diam. | links | |
| 1 | 70 | 1 | 70 | 2 | 1031 | 31 | 1 | 31 | 3 | 141 |
| 2 | 70 | 4 | 24 | 3 | 253 | 29 | 1 | 29 | 4 | 73 |
| 3 | 56 | 17 | 12 | 1 | 143 | 28 | 1 | 28 | 5 | 47 |
| 4 | 40 | 29 | 4 | 1 | 14 | 28 | 1 | 28 | 5 | 35 |
Table 6.1 shows two very different behaviors. The activities are all 1-connected, with diameter 2: any two activities are linked through at most one intermediate activity, because the sensors and the AGV touch almost everything. At they split into four components, the largest with 24 activities, and at into seventeen, so the strong overlaps are local: the stations are cells, connected to each other only through single shared resources. The resources, in contrast, stay connected for all four values of while their diameter grows from 3 to 5: they are linked by chains of resources that share several activities, but these chains become long. The -profile plot of fig. 6.2 shows the refinement for every activity; the vertex -line graphs of fig. 6.3 show how the links between resources thin out from to while the sensors and the crimping competence become the brokers of the remaining strong links.
Critical elements of the manufacturing space. Following Nagy et al. [4], the resources are ranked by -betweenness and harmonic -closeness for and by their averages.
table = hv.s_centrality_table(H, s_values=(1, 2, 3), edges=False) avg_bc = hv.average_s_centrality(H, hv.s_betweenness, s_max=3, edges=False) avg_hc = hv.average_s_centrality(H, hv.s_harmonic_closeness, s_max=3, edges=False)
At the two sensors and have by far the largest betweenness (0.185 and 0.177), followed by the operators of the assembly stations; the handling sensor , although it takes part in 24 activities, has a small betweenness at this level, because it is adjacent to almost every other resource and therefore rarely needed as an intermediary. At the ranking changes: rises to 0.395, and the crimping competence jumps from rank 11 to rank 2 (0.287), followed by (0.266). The competence is not a broker of weak contacts; it is the element through which the strongly overlapping crimping activities of the four stations are connected. The averages over rank , , , and highest by betweenness and , , , by harmonic closeness (fig. 6.4). The result agrees with the conclusion of the original study that the information and competence elements, not the physical machines, hold the collaborative space together; it also shows why the analysis must be done at several values of , since would have been missed at .
Open in ColabExample plot_18_wire_harness_centrality.py in the gallery
A family of centralities. The eight vertex centralities of sections 6.2.4 to 6.2.6 are compared on a 3-uniform Chung–Lu hypergraph (section 9.2.1) with 40 vertices of heterogeneous expected degree and 70 hyperedges.
C = pd.DataFrame({ "degree": hv.degree_centrality(H), "CEC": hv.clique_eigenvector(H), "ZEC": hv.z_eigenvector(H), "HEC": hv.h_eigenvector(H), "linear NEC": hv.node_edge_eigenvector(H, "linear")[0], "max NEC": hv.node_edge_eigenvector(H, "max")[0], "PageRank": hv.pagerank(H), "hyper-coreness": hv.hypercoreness(H), }) corr = C.corr(method="spearman")
The Spearman correlations in fig. 6.5 show three groups. Degree, PageRank, and hyper-coreness agree almost perfectly (degree–PageRank 0.99, degree–hyper-coreness 0.97): on a uniform hypergraph the Zhou walk has the degree as stationary distribution, and PageRank only adds teleportation. CEC, HEC, and the two node–edge centralities form a second group (pairwise correlations 0.93–0.99). ZEC stands apart: its correlation with PageRank is only 0.70 and with degree 0.77. Because ZEC multiplies the importance of the co-members, a vertex of moderate degree whose hyperedges contain other central vertices can outrank a vertex of high degree whose hyperedges are formed with peripheral ones. Which centrality is “right” depends on the process: if a hyperedge contributes only when all its members act (a team that needs everyone, a reaction that needs all reactants), the multiplicative ZEC or the log-exp node–edge centrality is the appropriate model; if any member can transmit (gossip in a group), CEC or PageRank is.
Open in ColabExample plot_19_centrality_family.py in the gallery
Hyper-cores. The last example plants a nucleus: eight core vertices form 25 hyperedges of three to five members among themselves, and 60 further hyperedges of two or three members are drawn from the core and forty peripheral vertices .
cores = pd.DataFrame({f"m={m}": hv.hypercore_numbers(H, m) for m in range(2, 6)}) R = hv.hypercoreness(H)
The core numbers separate the two groups at every interaction size (fig. 6.6). For most core vertices have core number 14 (two of them 9 and 10), and the peripheral vertices at most 4; for only the core vertices remain, with core number 4, because no peripheral vertex takes part in hyperedges of five members. The hyper-coreness ranks exactly the eight core vertices at the top. A degree ranking would mix in peripheral vertices that happen to take part in many small hyperedges; the hyper-core decomposition distinguishes many small interactions from fewer large ones.
6.5 Further reading
Aksoy et al. [21] develop the -walk framework with many applications; HyperNetX [20] implements it. Nagy et al. [4] apply -centralities to the analysis and design of manufacturing spaces. Benson [90] compares the clique, Z-, and H-eigenvector centralities, and Tudisco and Higham [83] introduce the nonlinear node and edge centralities with their existence and uniqueness theory. Random walks on hypergraphs are studied by Zhou et al. [35], Chitra and Raphael [40], Carletti et al. [88], and Hayashi et al. [39]. Mancastroppa et al. [93] introduce hyper-cores and their role in higher-order processes. Estrada and Rodríguez-Velázquez [94] defined early subgraph centralities and clustering coefficients for hypernetworks.