Introduction

The study of pairwise interactions has led to a vast range of useful concepts and tools in network science1,2. Several recent studies have developed extensions that account for higher-order interactions3,4,5. Of course, the appropriate higher-order representation is dependent on the research problem being addressed. For example, as discussed in ref. 5, in studying a coauthorship data set one could pose three distinct questions:

  1. 1.

    Have two given authors ever contributed simultaneously to a multi-authored paper? A simple undirected graph records such pairwise interactions.

  2. 2.

    Has a given set of authors ever contributed simultaneously to a multi-authored paper? Because any subset of these authors must also have contributed simultaneously to a multi-authored paper, we may use a simplicial complex to record these interactions. This structure incorporates downward closure: any subset of nodes within a simplex also forms a simplex.

  3. 3.

    Has a given set of authors formed the complete coauthorship list on a paper? In this case, a hypergraph is appropriate, with the set of authors forming a hyperedge. Any proper subset of those authors will not appear as a hyperedge unless they form the complete coauthorship list on some other paper.

In this work, we are concerned with extensions of so-called eigenvector centrality measures to the higher-order setting of hypergraphs. Eigenvector centrality for graphs has been widely used to assign levels of importance to individual nodes. It assigns scores to nodes in terms of the Perron eigenvector of the adjacency matrix of the graph1,6. A standard approach when dealing with hypergraphs is to use graph-based algorithms on the clique-expanded graph of the hypergraph7. In this case, we can assign centrality scores to the nodes of the hypergraph by looking at the centrality of the nodes in its clique-expanded graph. Another relatively well-established idea to represent and work with hypergraphs relies on the use of higher-order tensors8,9. This approach requires a uniform hypergraph, and defines centrality scores in terms of the Perron eigenvector of the adjacency tensor.

We note that the clique-expansion matrix approach is a form of flattening which essentially corresponds to an additive model: for a given node, the importance of its neighbours in a hyperedge is summed into a linear (possibly weighted) combination. Instead, the tensor-eigenvector approach is a multiplicative model: the importance of the neighbours in each hyperedge is multiplied. While the two models coincide on standard graphs (as each hyperedge involves exactly two nodes, and hence there is at most one neighbour), these two models are intrinsically different on uniform hypergraphs with larger hyperedges. See the “Results and Discussion” section for more details.

In this work, we define a general eigenvector model for node and edge centralities on hypergraphs with arbitrary hyperedge size based on the hypergraph incidence matrix and the choice of four nonlinear functions. Working in terms of the incidence matrix provides a general yet simple model which, for example, immediately transfers to the case of simplicial complexes, where all subsets of each hyperedge happen to be present. The choice of the nonlinear functions allows us to specify the way node importances are combined within the hyperedges (and, vice-versa, the way hyperedge importances influence node scores). We show that both the clique-expansion and, for uniform hypergraphs, the tensor-based eigenvector centralities are particular cases of the proposed model obtained for specific choices of the nonlinearities. Thus, our approach allows us to generate a whole new family of centrality models and to extend popular tensor-eigenvector centrality models to general hypergraphs in a natural way. More precisely, the main contributions of this work are as follows.

We formulate node and edge hypergraph centrality as a general constrained nonlinear eigenvalue problem Eq. (2) based on the hypergraph incidence operator. We provide existence and uniqueness theory for the eigenvalue equation in Theorem 2.2 and we propose a nonlinear power method (NPM) to compute its solution. In the special case of a 2-uniform hypergraph (a graph) this leads to a hypertext induced topic search (HITS) type iteration for networks that simultaneously assigns centrality to nodes and edges, whereas, for general hypergraphs, the NPM allows us to compute centrality scores for nodes and general hyperedges. The convergence theory for the NPM is provided in Theorem 2.3. Finally, in the “Experiments” section, we provide several computational experiments on synthetic and real-world data to illustrate the behaviour of different node and edge centrality models obtained as particular cases of the general constrained nonlinear eigenvalue Eq. (2).

Our main contributions are presented in the “Results and Discussion” section while all proofs appear in the “Methods” section.

Results and discussion

Notation and motivation

We begin by considering an unweighted, undirected, graph G = (V, E) with node set V = {1, …, n}, edge set E = {e1, …, em} and binary adjacency matrix \(A\in {{\mathbb{R}}}^{n\times n}\). In this context, eigenvector centrality was popularized in the social network science community6, although the idea can be traced back to the 19th Century10. This centrality model assigns a measure of importance, xi > 0, to node i in such a way that the importance of node i is linearly proportional to the sum of the importance of its neighbours. This relationship may be written

$$A{{{{{{{\boldsymbol{x}}}}}}}}=\lambda {{{{{{{\boldsymbol{x}}}}}}}},\quad {{{{{{{\boldsymbol{x}}}}}}}} \, > \, 0,\quad \,{{\mbox{for some}}}\,\lambda \; > \; 0.$$
(1)

Thanks to the Perron–Frobenius theorem, this matrix eigenvector problem admits a unique solution x* if A is irreducible (that is, the graph is connected)1. In this case, x* can be computed to arbitrary precision via the power method if A is primitive (that is, the graph is aperiodic), see, for example11.

Over the years, a large amount of work has been devoted to the definition of centrality models able to capture different network properties and thus provide an importance score to the nodes of a graph. However, much less work has focused on models and methods for quantifying the centrality of edges. In addition to being of interest in its own right, quantifying edge importance has natural applications in a number of important tasks, including link detection, edge prediction, and matrix completion12,13,14.

An eigenvector centrality for edges can be developed by considering the line graph and its adjacency matrix A(e)15. In this setting, \({A}^{(e)}\in {{\mathbb{R}}}^{m\times m}\) has \({A}_{{e}_{1},{e}_{2}}^{(e)}\ne 0\) if and only if e1E and e2E share at least one node. The centrality of the edges can thus be defined via the Perron eigenvector A(e)y = λy, as in Eq. (1).

Another somewhat natural model for edge centrality can be induced by a given node centrality x: assign to each edge e the score ye = ∑iexi obtained by looking at the nodes the edge connects. This is what is typically done when computing edge scores for, e.g., link prediction13,16,17 or network robustness optimization18,19. However, a mutually reinforcing centrality score for both nodes and edges can be designed by requiring the edges to inherit importance from the nodes they connect and, vice-versa, the nodes to inherit importance from the edges they participate in. We describe this idea in detail in the next section. Since the resulting model extends essentially unchanged to the higher-order setting where edges contain an arbitrary number of nodes, we will present this idea in the framework of a hypergraph.

Hypergraphs

In the remainder of this work, we consider a general hypergraph H = (V, E) where V = {1, …, n} is the set of nodes and E = {e1, …, em} now denotes the set of hyperedges20. Note that in our setting every node can belong to an arbitrary number of hyperedges, i.e., we allow hereditary hypergraphs21, which can also be used to model a simplicial complex structure. We let B denote the n × m incidence matrix of H, defined as follows: the rows of B correspond to nodes while its columns correspond to hyperedges and we have Bi,e = 1 if node i takes part in hyperedge e, that is,

$${B}_{i,e}=\left\{\begin{array}{ll}1&i\in e\\ 0&\,{{\mbox{otherwise.}}}\,\end{array}\right.$$

In many situations, we have access to external node and edge weights in the form of weight functions \(\nu :{{\mathbb{R}}}^{V}\to {{\mathbb{R}}}_{+}\) and \(w:{{\mathbb{R}}}^{E}\to {{\mathbb{R}}}_{+}\). For example, if the hypergraph data represents grocery goods (the nodes) and the list of items purchased by each customer in one visit to a supermarket (the hyperedges), then ν(i) can be an indicator of the price of item i, while w(e) may correspond to the profit the supermarket has made with the list of items in e. We use two diagonal matrices N and W to take into account these weights, defined by N = Diag(ν(1), …, ν(n)) and W = Diag(w(e1), …, w(em)).

Note that a hypergraph where all edges have exactly two nodes is a standard graph. In that case, we have BWB = A + D where A is the adjacency matrix of the graph and D = Diag(d1, …, dn) is the digonal matrix of the weighted node degrees di = ∑eEw(e)Bi,e = (BW1)i. Similarly, for a general hypergraph H, we have BWB = AH + DH where AH and DH are the adjacency and degree matrices of the clique-expansion graph GH = (V, EH) associated with H. The clique-expansion graph is a graph on the same vertex set of H, obtained by adding a weighted clique connecting all nodes in each hyperedge of H. More precisely, given H = (V, E), we have

$${({A}_{H})}_{ij}=\mathop{\sum}\limits_{e:\ i,j\in e}w(e),\quad {({A}_{H})}_{ii}=0.$$

Thus, ijEH if and only if i ≠ j participates in at least one hyperedge of H. Similarly, the degree matrix DH = Diag(d1, ..., dn) is the diagonal matrix whose diagonal entries are the weighted degrees of the nodes in the hypergraph, i.e., di = ∑e:iew(e) = (BW1)i.

Node and edge nonlinear hypergraph eigenvector centrality

We describe here a spectral (thus mutually reinforcing) model for node and edge centralities of hypergraphs. Suppose H = (V, E) is given with V = n and E = m, and let \({{{{{{{\boldsymbol{x}}}}}}}}\in {{\mathbb{R}}}^{n}\), \({{{{{{{\boldsymbol{y}}}}}}}}\in {{\mathbb{R}}}^{m}\) be nonnegative vectors whose entries will provide centrality scores for the nodes and hyperedges of H, respectively. We would like the importance ye for an edge eE to be a nonnegative number proportional to a function of the importance of the nodes in e, for example, ye ∑ieν(i)xi. Similarly, we require that the centrality xi of node iV is a nonnegative number proportional to a function of the importance of the edges it participates in, for example, xi ∑e:iew(e)ye. As the centralities xi and ye are all nonnegative, these sums coincide with the weighted 1 norm of specific sets of centrality scores. Thus, we can generalize this idea by considering the weighted p norm of node and edge importances. This leads to

$${x}_{i}\propto {\left(\mathop{\sum}\limits_{e:i\in e}w(e){y}_{e}^{p}\right)}^{1/p},\quad {y}_{e}\propto {\left(\mathop{\sum}\limits_{i\in e}\nu (i){x}_{i}^{q}\right)}^{1/q},$$

for some p, q ≥ 1. More generally, we can consider four functions \(f,g,\varphi ,\psi :{{\mathbb{R}}}_{+}\to {{\mathbb{R}}}_{+}\) of the nonnegative real line \({{\mathbb{R}}}_{+}\) and require that

$${x}_{i}\propto g\left(\mathop{\sum}\limits_{e:i\in e}w(e)f({y}_{e})\right),\quad {y}_{e}\propto \psi \left(\mathop{\sum}\limits_{i\in e}\nu (i)\varphi ({x}_{i})\right).$$

If we extend real functions on vectors by defining them as mappings that act in a component-wise fashion, the previous relations can be compactly written as the following constrained nonlinear equations

$$\left\{\begin{array}{l}\lambda {{{{{{{\boldsymbol{x}}}}}}}}=g\left(BWf({{{{{{{\boldsymbol{y}}}}}}}})\right)\\ \mu {{{{{{{\boldsymbol{y}}}}}}}}=\psi \left({B}^{\top }N\varphi ({{{{{{{\boldsymbol{x}}}}}}}})\right)\end{array}\right.\quad {{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}} > 0,\quad \lambda ,\mu > 0.$$
(2)

If f, g, ψ, and φ are all identity functions, then Eq. (2) boils down to a linear system of equations that is structurally reminiscent of the HITS centrality algorithm for directed graphs22,23. HITS computes two different node centralities: a hub centrality, which is proportional to the authority score of neighbouring nodes, and at the same time, authority centrality, which is proportional to the hub score of neighbouring nodes. Similarly, Eq. (2) with f = g = φ = ψ = id defines two centralities, but in this case, they relate to nodes and hyperedges: the importance of a node is proportional to the sum of the importance of the hyperedges it belongs to and, vice-versa, the importance of a hyperedge is proportional to the sum of the importance of the nodes it involves.

As for HITS centrality, when f = g = φ = ψ = id and we have no edge nor node weights (i.e., W, N are identity matrices), then x, y in Eq. (2) are the left and right singular vectors of a certain matrix, in this case B, and the matrix Perron–Frobenius theory tells us that if the bipartite graph with adjacency matrix \(\left(\begin{array}{ll}0&B\\ {B}^{\top }&0\end{array}\right)\) is connected, then Eq. (2) has a unique solution. Instead, when either f, g, φ, or ψ is not linear, even the most basic question of the existence of a solution to Eq. (2) is not straightforward. However, for homogeneous functions f, g, φ, and ψ, the nonlinear Perron–Frobenius theory for multihomogeneous operators24 allows us to give guarantees on existence, uniqueness, and computability for the nonlinear singular-vector centrality model in Eq. (2).

Before addressing these issues, we investigate the system in Eq. (2) further, showing how it includes some previously proposed eigenvector centrality models as special cases, and offers additional useful flexibility.

The linear case: eigenvector centrality for graph and line graph

When H is a standard simple and unweighted graph H = G = (V, E), with binary adjacency matrix A, it is easy to verify that BB = A + D, where D is the diagonal matrix of the node degrees. Moreover, BB = A(e) + Δ, where A(e) is the adjacency matrix of the line graph of G and Δ = Diag(δ1, …, δm) is a diagonal matrix whose diagonal entries count the number of nodes each edge contains. In this case, each edge has exactly two nodes, so Δ = 2I. The corresponding identities hold if we allow weights on the nodes and on the edges of G, namely BWB = A + D, where now A and D are the weighted adjacency and degree matrix of G, and BNB = A(e) + Δ with

$${({A}^{(e)})}_{{e}_{1},{e}_{2}}=\left\{\begin{array}{ll}\nu (i)&{e}_{1}\ne {e}_{2}\,{{\mbox{and they share the node}}}\,\ i\ \,{{\mbox{in}}}\,G\\ 0&\,{{\mbox{otherwise}}}\,\end{array}\right.$$
(3)

and δe = ∑ieν(i).

It follows that when H is a graph, the node-edge eigenvector model in Eq. (2) for the linear case f = g = φ = ψ = id is strongly related to the standard eigenvector centrality applied to G and its line graph. In fact, by using the two identities λx = BWy and μy = BNx we obtain

$$\left\{\begin{array}{l}\widetilde{\lambda }\ {{{{{{{\boldsymbol{x}}}}}}}}=BW{B}^{\top }N{{{{{{{\boldsymbol{x}}}}}}}}=(A+D)N{{{{{{{\boldsymbol{x}}}}}}}}\\ \widetilde{\lambda }\ {{{{{{{\boldsymbol{y}}}}}}}}={B}^{\top }NBW{{{{{{{\boldsymbol{y}}}}}}}}=({A}^{(e)}+{{\Delta }})W{{{{{{{\boldsymbol{y}}}}}}}}\end{array}\right.$$

with \(\widetilde{\lambda }=\lambda \mu\). Thus, x and y are the Perron eigenvectors of diagonally perturbed adjacency matrices of the graph and the line graph.

A similar connection holds for the general hypergraph case. In that case, the node-edge eigenvector model in Eq. (2) for the linear choices f = g = φ = ψ = id is tightly connected to the eigenvector centrality of the clique-expansion graph of H its line graph. Precisely we have

$$BW{B}^{\top }={A}_{H}+{D}_{H}\quad \,{{\mbox{and}}}\,\quad {B}^{\top }NB={A}_{H}^{(e)}+{{{\Delta }}}_{H},$$

where \({A}_{H}^{(e)}\) and ΔH are the adjacency and degree matrix of the line graph of GH, as defined in Eq. (3).

Tensor-based eigenvector centrality for uniform hypergraphs and its extension

In this subsection, we find an intriguing connection between recently proposed tensor-based eigenvector centralities for uniform hypergraphs and the nonlinear singular vector model proposed in Eq. (2). In particular, we show that the centrality models based on tensor eigenvectors are a special case of our general nonlinear singular vector framework and that this new approach allows us to extend tensor eigenvector centralities to general non-uniform hypergraph data. We first review the uniform hypergraph case.

A hypergraph is said to be k-uniform if e = k for all eE. Thus, a 2-uniform hypergraph is a graph in the standard sense. The concept of eigenvector centrality has been extended to the case of k-uniform hypergraphs with k > 2 by means of the hypergraph adjacency tensor9. As every hyperedge contains exactly k nodes, we can associate to H a tensor \({{{{{{{\mathcal{A}}}}}}}}\) with k indices \({{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,{i}_{k}}\) such that \({{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,{i}_{k}}=w(e)\) if the hyperedge e = {i1, …, ik} belongs to E, and \({{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,{i}_{k}}=0\) otherwise. Clearly, \({{{{{{{\mathcal{A}}}}}}}}\) coincides with the adjacency matrix of the graph when k = 2. Different notions of tensor eigenvectors are available in the literature (see e.g.,25,26). In particular, for p > 0, a p eigenvector for \({{{{{{{\mathcal{A}}}}}}}}\) is a vector x such that

$$\mathop{\sum}\limits_{{i}_{2},\ldots ,{i}_{k}}{{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},{i}_{2},\ldots ,{i}_{k}}{x}_{{i}_{2}}{x}_{{i}_{3}}\cdots {x}_{{i}_{k}}=\lambda \ {x}_{{i}_{1}}^{\ p}.$$
(4)

The special cases p = 1 and p = k − 1 correspond to so-called Z- and H-eigenvectors for \({{{{{{{\mathcal{A}}}}}}}}\). Note that both Z- and H-eigenvectors boil down to standard matrix eigenvectors when k = 2. However, when k > 2 matters are significantly different. In particular, the eigenvector centrality defined by Eq. (4) is no longer linear when k > 2, in the sense that taking a linear combination of eigenvectors does not automatically produce an eigenvector.

This nonlinearity makes the analysis and the computation of solutions to Eq. (4) more challenging than standard eigenvector centralities for graphs (i.e., k = 2). However, it has been observed in, e.g.,26,27,28 that the nonlinear eigenvector Eq. (4) admits a unique solution that can be computed to an arbitrary precision if the tensor \({{{{{{{\mathcal{A}}}}}}}}\) is not too sparse and if the exponent p satisfies certain assumptions. In particular, for a large range of values of p all these properties hold with almost no requirement on the connectivity of the underlying hypergraph25. From this point of view, the nonlinearity yields a remarkable advantage rather than a disadvantage.

Extending tensor eigenvector centrality models to the non-uniform hypergraph setting is not straightfoward. The next theorem shows that our nonlinear singular vector model in Eq. (2) provides a natural framework to this end. In fact, Theorem 2.1 shows that, for uniform hypergraphs, the tensor-based eigenvector centrality in Eq. (4) is a particular case of Eq. (2) for logarithmic- and exponential-based nonlinear functions. Thus, when used on non-uniform hypergraphs, these choices of functions in Eq. (2) yield a tensor eigenvector-like centrality for general hypergraphs. We will further discuss this extension in the “Experiments” section.

Let H be a k-uniform hypergraph. As observed above, when k = 2 we have BWB = A + D, where A and D are the adjacency and degree matrices of the graph H, respectively. Thus, for p = 2 we can easily rewrite the eigenvector centrality Eq. (4) in terms of the incidence matrix, as Eq. (4) coincides with Ax = λx and we have Ax = (BWB − D)x = λx. If the vector x is entrywise positive, we can add a nonlinear transformation in the eigenvector equation to obtain a similar relation for any k ≥ 2 and any p ≥ 1. More precisely, we have

Theorem 2.1

Let H be ak-uniform hypergraph withν(i) = 1 for alliV. Ifxis a positive solution of Eq. (2) withf(x) = x, g(x) = x1/(p+1), ψ(x) = exand\(\varphi ({{{{{{{\boldsymbol{x}}}}}}}})={{{{{{\mathrm{ln}}}}}}}\,({{{{{{{\boldsymbol{x}}}}}}}})\), thenxis an eigenvector centrality solution of the tensor eigenvalue problem in Eq. (4).

Existence, uniqueness, and computation of nonlinear hypergraph centralities

In this section, we discuss the existence, uniqueness, positivity, maximality, and computation of the node and edge hypergraph centrality defined by the general nonlinear singular value problem in Eq. (2). Analogously to the linear case, these properties will follow directly from the nonlinear Perron–Frobenius theorem for multihomogeneous mappings24, which extends the classical Perron–Frobenius theory for nonnegative matrices to a much broader class of nonlinear nonnegative operators.

To this end, we recall that a function φ is said to be α-homogeneous if φ(λu) = λαφ(u) for all λ ≥ 0. In this case, we say that α is the homogeneity degree of φ. Furthermore, we say that φ is order-preserving if φ(v) ≥ φ(u) for all v ≥ u; whereas we say that φ is positive if φ(v) > 0 for all v > 0. We have

Theorem 2.2

Letf, g, φ, ψbe order-preserving and homogeneous of degreesα, β, γ, δ, respectively. Define the coefficientρ = αβγδ. If either

p1. ρ < 1, or

p2. ρ = 1; f, g, φ, ψare differentiable and positive maps; the bipartite graph with adjacency matrix\(\bigg(\begin{array}{ll}0&BW\\ {B}^{\top }N&0\end{array}\bigg)\)is connected

then there exist uniquex, y > 0 (up to scaling) and uniqueλ, μ > 0 solution of Eq. (2).

By analogy with the linear case, we refer to the positive solutions of Eq. (2) defining the hypergraph centralities as nonlinear Perron singular vectors.

On top of existence and uniqueness guarantees, the matrix Perron–Frobenius theorem provides us with the convergence of the so-called power method, a very powerful tool for computing the Perron singular vectors. In the case of nonnegative matrices, however, one needs to require the bipartite graph of \(A=\left(\begin{array}{ll}0&BW\\ {B}^{\top }N&0\end{array}\right)\)to be aperiodic (i.e., the matrix A is primitive) in order to ensure the convergence of the power method for an arbitrary choice of the starting point, as connectedness alone is not enough. As an example, consider the 2 × 2 matrix \(A=\left(\begin{array}{ll}0&1\\ 1&0\end{array}\right)\) which acts on vectors by swapping the first and the second coordinates. The graph of A is connected but not aperiodic and, indeed, the sequence x(r+1) = Ax(r) does not converge in general (it converges only if x(0) has constant entries).

Algorithm 1

Nonlinear Power Method for hypergraph centrality

Much like the matrix case, one can compute the nonlinear Perron singular vectors in Eq. (2) via what we call the Nonlinear Power Method, described in Algorithm 1. However, similarly to the nonlinear eigenvalue problem for tensors25,26, the nonlinear power method converges under significantly milder conditions than its more common linear counterpart. In particular, no aperiodicity assumption is required and, depending on the homogeneity degree of the nonlinear functions, global convergence may be ensured even for disconnected graphs. The following theorem describes the convergence of Algorithm 1 to the solution of Eq. (2).

Theorem 2.3

Under the assumptions and notation of Theorem 2.2, letx(r), y(r)be the sequences generated by Algorithm 1. If either P1 or P2 holds, thenx(r) and y(r)converge to the unique positive solutions x*, y*of Eq. (2) such thatx* = y* = 1. Moreover, if P1 holds, then the convergence is linear, i.e.:

$$\parallel {{{{{{{{\boldsymbol{x}}}}}}}}}^{(r)}-{{{{{{{{\boldsymbol{x}}}}}}}}}^{* }\parallel +\parallel {{{{{{{{\boldsymbol{y}}}}}}}}}^{(r)}-{{{{{{{{\boldsymbol{y}}}}}}}}}^{* }\parallel =O({\rho }^{r}).$$

Experiments

In this section, we compare the behaviour of three node-edge eigenvector centrality models, which correspond to three choices of the functions f, g, φ, ψ in Eq. (2), as described below:

  • The “linear” centrality model corresponds to the choice f = g = φ = ψ = id which, as discussed in the Node and edge nonlinear hypergraph eigenvector centrality section, essentially corresponds to the standard eigenvector centrality applied to the graph and the line graph obtained by clique-expanding the input hypergraph.

  • The “log-exp” centrality model corresponds to the choices f = id, \(\varphi (x)={{{{{{\mathrm{ln}}}}}}}\,(x)\), \(\psi (x)=\exp (x)\) and \(g(x)=\sqrt{x}\). As discussed in the Tensor-based eigenvector centrality for uniform hypergraphs and its extension section, this choice generalizes the tensor eigenvector centrality proposed in9 to the case of nonuniform hypergraphs. In fact, when the hypergraph is uniform, we have already observed in Theorem 2.1 that the node centrality defined via Eq. (2) with this choice of f, g, φ, ψ boils down to a Z-eigenvector of the adjacency tensor of the hypergraph. Similarly, for a general hypergraph, from Eq. (2) we get

    $$\mu {y}_{e}=\psi \Big(\mathop{\sum}\limits_{j\in e}\nu (j)\varphi ({x}_{j})\Big)=\exp \Big(\mathop{\sum}\limits_{j\in e}\nu (j){{{{{{\mathrm{ln}}}}}}}\,({x}_{j})\Big)=\mathop{\prod}\limits_{j\in e}{x}_{j}^{\nu (j)}.$$

    Thus, if x, y are nonnegative vectors satisfying Eq. (2) there exists a positive \(\widetilde{\lambda }\) such that

    $$\widetilde{\lambda }{x}_{i}^{2}={x}_{i}^{\nu (i)}\mathop{\sum}\limits_{e:i\in e}w(e)\mathop{\prod}\limits_{j\in e\setminus \{i\}}{x}_{j}^{\nu (j)}.$$
    (5)

    Note in particular that, when the input hypergraph has binary node weights, i.e., ν(i) = 1 for all iV, Eq. (5) corresponds to a nonuniform hypergraph version of the tensor Z-eigenvector centrality for uniform hypergraphs, precisely we have

    $$\widetilde{\lambda }{x}_{i}=\mathop{\sum}\limits_{e:i\in e}w(e)\mathop{\prod}\limits_{j\in e\setminus \{i\}}{x}_{j}.$$
  • The “max” centrality model is based on the observation that the function \({\mu }_{\alpha }({{{{{{{\boldsymbol{v}}}}}}}})={({v}_{1}^{\alpha }+\cdots +{v}_{m}^{\alpha })}^{1/\alpha }\) is a type of ‘softmax’: when α → , μα(v) converges to \(\max ({{{{{{{\boldsymbol{v}}}}}}}})=\max \{{v}_{1},\ldots ,{v}_{m}\}\). More precisely, we have

    $$\max ({{{{{{{\boldsymbol{v}}}}}}}})\le {({v}_{1}^{\alpha }+\cdots +{v}_{m}^{\alpha })}^{1/\alpha }\le {m}^{1/\alpha }\max ({{{{{{{\boldsymbol{v}}}}}}}}),$$

    thus, already for α = 10 we have \({\mu }_{\alpha }({{{{{{{\boldsymbol{v}}}}}}}})\approx \max ({{{{{{{\boldsymbol{v}}}}}}}})\). Based on this observation, the proposed centrality model corresponds to the choice of nonlinear mappings: f = g = id, φ(x) = xα and ψ(x) = φ−1(x) = x1/α, for α = 10. Notice that, with this choice of α, the max node centrality xi is large when i is part of at least one important edge. In fact, from Eq. (2) we have

    $${x}_{i}\approx \max \{{y}_{e}:e\supset i\}.$$

Illustrative example: hypergraph sunflower

A sunflower is a hypergraph whose hyperedges all have one common intersection in one single node, called the core. Let uV be that intersection. Also let r be the number of petals (the hyperedges) each containing ei nodes, for i = 1, …, r. By definition, uei for all i. Further, a node vei and vej for i ≠ j if and only if v = u.

Let us first consider the case of a uniform sunflower. This case corresponds to the setting where all the petals have the same number of nodes, i.e., ei = k + 1 for all i and for some integer k. The tensor eigenvector centrality of a uniform sunflower is studied for example in9. In that case, we can assume that all the hyperedges have the same centrality score and that the same holds for all the nodes, besides the core, which is assigned a specific value.

Assuming no weights on nodes or hyperedges, by symmetry we may impose the constraints \({x}_{{v}_{i}}={x}_{v}\) for all vi ≠ u and ye = y for all eE in Eq. (2) to obtain

$${x}_{v}\propto g(f(y)),\quad {x}_{u}\propto g(rf(y)),\quad y\propto \psi (\varphi ({x}_{u})+k\varphi ({x}_{v})).$$

So, for example, with the choices of Theorem 2.1 we get xu/xv = g(r) = r1/(p+1) which coincides with the value computed in9, for the two choices p = 1 and p = m − 1, i.e., the tensor Z-eigenvector and H-eigenvector based centralities, respectively. More generally, if g is homogeneous of degree β we have

$$\frac{{x}_{u}}{{x}_{v}}\propto {r}^{\beta }.$$
(6)

This shows that the node centrality assignment in the case of a uniform sunflower hypergraph only depends on the homogeneity degree of g and, in particular, when β → 0 all the centralities tend to coincide, while xu > xv for all β > 0, confirming and extending the observation in ref. 9 for the setting of uniform hypergraph centralities based on tensor eigenvectors. Figure 1a illustrates this behaviour on an example uniform sunflower hypergraph with eight petals (r = 8) each having three nodes (k = 3). The figure shows the nodes of the hypergraph with a blue dot whose size is proportional to its centrality value computed according to the “linear”, “log-exp”, and “max” centrality models. The value of β for these three centralities is 1 for both the ‘max’ and the ‘linear’ centrality’, and 1/2 for ‘log-exp’ centrality’. Thus, all the three models assign essentially the same centrality score: the core node u has a strictly larger centrality, while all other nodes have the same centrality score. Similarly, the computed edge centrality is constant across all models and all petals.

Fig. 1: Example of node centralities on sunflower hypergraphs.
figure 1

Node centrality scores for the "linear'', "log-exp'', and "max'' centrality models on the two example hypergraph sunflowers. The corresponding centrality model is specified on top of each panel. Dots represent the hypergraph nodes and their size is proportional to their centrality value. a Shows results on a uniform sunflower with eight petals each containing three nodes; b shows results on a hypergraph sunflower with eight petals containing 3, 4, …, 10 nodes, respectively.

The situation is different for the case of a non-uniform hypergraph sunflower. In this case, we have r petals each containing an arbitrary number of nodes. The computational results in Fig. 1b indicate that the “linear”, “log-exp”, and “max” centrality models capture significantly different centrality properties: All three models recognize the core node as the most central one; however, while the ‘linear’ model favours nodes that belong to large hyperedges, the multiplicative ‘log-exp’ model behaves in the opposite way assigning a larger centrality score to nodes being part of small hyperedges. Finally, the ‘max’ model behaves like in the uniform case, assigning the same centrality value to all the nodes in the petals (core node excluded). For this hypergraph, we observe that the edge centrality follows directly from the node one: for the ‘linear’ model the edge centrality is proportional to the number of nodes in the edge, for the ‘log-exp’ model it is inversely proportional to the number of nodes, while for the ‘max’ model all edges have the same centrality. It would be of interest to pursue these differences analytically and hence gain further insights into the effect of f, g, φ, and ψ.

Real-world hypergraph data

In this section, we analyze the proposed nonlinear node-edge hypergraph centrality model on two real-world datasets. The code used to compute the results of this section is written in julia and is available at https://github.com/ftudisco/node-edge-hypergraph-centrality.

Walmart trips. This is a transactional dataset that consists of a hypergraph describing customer trips at Walmart: hyperedges are sets of co-purchased products at Walmart, as released as part of the Kaggle competition in29. The hypergraph data are taken from ref. 30. Products are assigned a label that points to one of ten broad departments in which each product appears on walmart.com (e.g., “Clothing, Shoes, and Accessories”). There is also an additional “Other” class. The hyperedge weights are given by the number of times that a particular set of products appears in the list of co-purchased items. We summarize relevant statistics for this dataset in the list below:

  • number of nodes: 88,860; number of hyperedges: 65,979;

  • maximum edge weight: 679; mean/variance of edge weights: 1.06/15.24;

  • maximum edge size: 25; mean edge size 6.86.

Math stackexchange co-tags. This is a temporal higher-order network dataset from ref. 31. Here we use the whole dataset ignoring the temporal component. The resulting dataset is a sequence of simplices where each simplex is a set of nodes. In this dataset, nodes are tags and simplices are the sets of tags applied to questions on math.stackexchange.com. We represent the dataset as a hypergraph with one hyperedge for each simplex. As before, the weight of each hyperedge is an integer number counting how many times that hyperedge appears in the data. Some basic statistics of this dataset are:

  • number of nodes: 1,629; number of hyperedges: 170,476;

  • maximum edge weight: 16,230; mean/variance of edge weights: 4.82/9,430.71;

  • maximum edge size: 5; mean edge size: 3.48.

In Fig. 2 we scatter-plot the node and edge centrality obtained with these three models on the Walmart trip and the Math Stack-exchange co-tag hypergraphs. We normalize the values of each centrality vector by dividing them entry-wise by their largest entry (so that their largest value is scaled to one). The figure compares the three centrality models in a pair-wise fashion and shows no apparent linear correlation between any pair of centralities, confirming that different choices of the nonlinear functions lead to remarkably different centrality score assignments. This is further confirmed by Fig. 3, where we plot the intersection similarity—left panel—as well as the Kendall-τ and the Spearman correlation coefficients—middle and right panels, respectively—between the top k nodes ranked by the linear model vs the ranking assigned to the same nodes by the other models, for k which varies between 1 and 100. The intersection similarity32 is a measure used to compare the top k entries of two ranked lists 1 and 2 that may not contain the same elements. It is defined as follows: let \({\ell }_{k}^{j}\) be the list of the top k elements in j, for j = 1, 2. Then, the top k intersection similarity between 1 and 2 is

$${{{{{{{{\rm{isim}}}}}}}}}_{k}({\ell }^{1},{\ell }^{2})=1-\frac{1}{k}\mathop{\sum }\limits_{t=1}^{k}\frac{| {\ell }_{t}^{1}{{\Delta }}{\ell }_{t}^{2}| }{2\ t},$$

here \(| {\ell }_{t}^{1}{{\Delta }}{\ell }_{t}^{2}|\) denotes the number of elements in the symmetric difference between \({\ell }_{t}^{1}\) and \({\ell }_{t}^{2}\). When the ordered sequences contained in 1 and 2 are completely different, then the intersection similarity between the two is minimum and it is equal to 0, whereas, the intersection similarity between 1 and 2 is equal to 1 if and only if the two ordered sequences coincide.

Fig. 2: Scatter plots of node and edge centralities.
figure 2

Scatter plots comparing node and edge centrality scores obtained with the "linear'', "log-exp'', and "max'' centrality models on the Math stackexchange co-tags and the Walmart trips hypergraphs. Each dot in the panels represents either a node or a hyperedge, with coordinates (x, y) corresponding to the centrality value assigned to that node or hyperedge by two different models, as specified by the axis' labels.

Fig. 3: Similarity between the node and edge centralities.
figure 3

Intersection similarity, Kendall-τ correlation, and Spearman correlation similarities between top k nodes, for k {1, …, 100}, on the Math stackexchange co-tags and the Walmart trips hypergraph datasets. Nodes are ranked according to the "linear'', "log-exp'', and "max'' centrality models and are paired as specified in the legend.

As already observed for the case of the sunflower hypergraph, the ‘linear’ and ‘log-exp’ models may assign very different node centrality scores. This effect is also highlighted in Table 1 where we report the top ten nodes with the highest centrality for the three models for the math stackexchange datasets. For this dataset nodes are the tags that posts receive on the math-stackexchange website.

Table 1 Top ten nodes in the math stackexchange co-tags hypergraph.

A similar comparison is illustrated in Fig. 4 where we scatter-plot the edge centrality of the three models with their edge weights. We see that, especially for the ‘linear’ and ‘max’ versions, larger edge weights do not correspond to greater importance in this spectral sense.

Fig. 4: Scatter plots of edge weights and centralities.
figure 4

Scatter plots comparing the edge weights against the edge centrality score computed with the "linear'', "log-exp'', and "max'' centrality models on the Math stackexchange co-tags and the Walmart trips hypergraphs. Each dot in the panels represents a hyperedge e, with coordinates (xe, ye), where xe corresponds to the centrality value assigned to e by one of the three models, whereas ye = w(e) is the weight of e in the hypergraph.

Conclusion

Centrality measures give useful information in a range of network science settings. In the study of on-line human behaviour, such measures are relevant to targeted advertising33, and to the detection of fake news generation34 and other negative behaviours such as the spread of viruses and cyberbullying35. They have also proved useful in the physical world; for example in predicting (or vaccinating against) disease outbreaks36, extracting biologically relevant features from neural connectivity data37, and quantifying the attack robustness of power networks38.

Taking the classical network view, where all nodes and pairwise connections play the same structural role, typically requires us to trade-off some fine detail for the sake of elegance and simplicity. By moving to higher-order interactions, we are able to re-introduce some of this detail. Of course, in doing so we must understand the costs and benefits in terms of both the computational expense of the new algorithms and the ease with which results can be assimilated. Our aim in this work was to show that the widely-used spectral approach to centrality measurement can be extended rigorously and at very little cost to the general hypergraph setting in order to quantify the importance of both nodes and hyperedges. As shown in Theorem 2.2, there is a sound underlying theory behind the resulting constrained eigenvalue problems. Further, as shown in Theorem 2.3, the measures can be computed by an efficient and globally convergent iteration (Algorithm 1) that is built on matrix-vector products.

Methods

This section provides the proof of our three main theorems.

Proof of Theorem 2.1

First note that with f = id and g(x) = x1/(p+1) and N = I, from Eq. (2) we get λp+1xp+1 = BWy and μy = ψ(Bφ(x)) which together imply that αxp+1 = BWψ(Bφ(x)) for some α > 0. Now, as every edge e contains exactly k nodes, we can write e = {i1, …, ik}, yielding

$$\psi {({B}^{\top }\varphi ({{{{{{{\boldsymbol{x}}}}}}}}))}_{e}=\exp \left(\mathop{\sum}\limits_{j\in e}{{{{{{\mathrm{ln}}}}}}}\,({x}_{j})\right)={x}_{{i}_{1}}\cdots {x}_{{i}_{k}}.$$

Furthermore, for any i1V and any \({{{{{{{\boldsymbol{y}}}}}}}}\in {{\mathbb{R}}}^{m}\) we have \({(BW{{{{{{{\boldsymbol{y}}}}}}}})}_{{i}_{1}}={\sum }_{e:{i}_{1}\in e}w(e){y}_{e}\). Thus, if \({{{{{{{\mathcal{A}}}}}}}}\) is the adjacency tensor of H (defined by \({{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,\,{i}_{k}}=w(e)\) if e = {i1, …, ik} E and \({{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,\,{i}_{k}}=0\) otherwise) we get

$${[BW\psi ({B}^{\top }\varphi ({{{{{{{\boldsymbol{x}}}}}}}}))]}_{{i}_{1}}=\mathop{\sum}\limits_{e:{i}_{1}\in e}w(e)\psi { \big({B}^{\top }\varphi ({{{{{{{\boldsymbol{x}}}}}}}})\big)}_{e}=\mathop{\sum}\limits_{{i}_{2}\,,\ldots ,\,{i}_{k}}{{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},\ldots ,\,{i}_{k}}{x}_{{i}_{1}}\cdots {x}_{{i}_{k}}.$$

This shows that if x solves Eq. (2) then x must be such that

$$\mathop{\sum}\limits_{{i}_{2}\,,\ldots ,\,{i}_{k}}{{{{{{{{\mathcal{A}}}}}}}}}_{{i}_{1},{i}_{2}\,,\ldots ,\,{i}_{k}}{x}_{{i}_{1}}{x}_{{i}_{2}}\cdots {x}_{{i}_{k}}=\alpha \ {x}_{{i}_{1}}^{\ p+1}.$$

Finally, as x is positive we can divide the previous identity by \({x}_{{i}_{1}}\), which reveals that x solves the tensor eigenvalue problem in Eq. (4). □

Proof of Theorem 2.2

The proof follows directly from the Perron–Frobenius theorem for multihomogeneous mappings24. Below we highlight the main steps. Let \(F:{{\mathbb{R}}}^{n}\times {{\mathbb{R}}}^{m}\to {{\mathbb{R}}}^{n}\times {{\mathbb{R}}}^{m}\) be the mapping

$$F({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})=\left(\ g\left(BWf({{{{{{{\boldsymbol{y}}}}}}}})\right),\psi \left({B}^{\top }N\varphi ({{{{{{{\boldsymbol{x}}}}}}}})\right)\ \right).$$

A simple computation shows that F is order-preserving and multihomogeneous with homogeneity matrix

$$M=\left(\begin{array}{ll}0&| \alpha \beta | \\ | \gamma \delta | &0\end{array}\right)$$
(7)

and a solution of Eq. (2) coincides with the multihomogeneous eigenvalue equation F(x, y) = (λx, μy). As the spectral radius of M coincides with \(\sqrt{| \alpha \beta \gamma \delta | }\), the thesis follows directly from [24, Thm. 3.1] under assumption P1. Assume now P2 holds. Since the mappings f, g, φ, ψ act entry-wise, are homogeneous and order preserving, we have that the graph \({{{{{{{\mathcal{G}}}}}}}}(F)\), as per [24, Def. 5.1], coincides with the bipartite graph with adjacency matrix \(\left(\begin{array}{ll}0&BW\\ {B}^{\top }N&0\end{array}\right)\). Thus, by [24, Thm. 5.2] there exist positive solutions to Eq. (2). Now let (u, v) > 0 be any such solution and let DF(u, v) be the Jacobian matrix of F evaluated at (u, v). Since f, g, φ, ψ are positive and homogeneous, the nonzero pattern of DF(u, v) coincides with the nonzero pattern of the matrix \(\left(\begin{array}{ll}0&BW\\ {B}^{\top }N&0\end{array}\right)\). Therefore, the thesis for assumption P2 eventually follows from [24, Thm. 6.2].

Proof of Theorem 2.3

This proof follows almost directly from the case of tensor eigenvectors, discussed in [26, Thm. 3.3]. We tailor the main ideas of that argument to our hypergraph eigenvalue problem in Eq. (2). Consider the mapping \(G:{{\mathbb{R}}}^{n}\times {{\mathbb{R}}}^{m}\to {{\mathbb{R}}}^{n}\times {{\mathbb{R}}}^{m}\), defined by

$$G({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})=\left(\ \sqrt{{{{{{{{\boldsymbol{x}}}}}}}}g\left(BWf({{{{{{{\boldsymbol{y}}}}}}}})\right)},\sqrt{{{{{{{{\boldsymbol{y}}}}}}}}\psi \left({B}^{\top }N\varphi ({{{{{{{\boldsymbol{x}}}}}}}})\right)}\ \right),$$

where all the operations are intended entrywise, and let M be the homogeneity matrix defined in Eq. (7). It is not difficult to verify that G is order-preserving and multihomogeneous, with homogeneity matrix \(\widetilde{M}=\frac{1}{2}(M+I)\) and that, if F is defined as in the proof of Theorem 2.2, then (x, y) is such that F(x, y) = (λx, μy), for positive λ and μ, if and only if \(G({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})=(\widetilde{\lambda }{{{{{{{\boldsymbol{x}}}}}}}},\widetilde{\mu }{{{{{{{\boldsymbol{y}}}}}}}})\), with \(\widetilde{\lambda },\widetilde{\mu } \, > \, 0\). Moreover, a direct computation shows that the Jacobian matrices DF(x, y) and DG(x, y) of F and G, respectively, are such that

$$DG({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})=\frac{1}{2}{{{{{{{\rm{Diag}}}}}}}}{\left(G({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})\right)}^{-1/2}\big({{{{{{{\rm{Diag}}}}}}}}\left(F({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})\right)+{{{{{{{\rm{Diag}}}}}}}}\left(({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})\right)DF({{{{{{{\boldsymbol{x}}}}}}}},{{{{{{{\boldsymbol{y}}}}}}}})\big),$$
(8)

where Diag(v) is the diagonal matrix with diagonal entries given by the elements of v. As observed in the proof of Theorem 2.2, for a positive vector (x, y) the matrix DF(x, y) is irreducible. Thus, from Eq. (8), DG(x, y) is primitive and the thesis eventually follows from [24, Thm. 7.1].