Complex systems, such as political, biological, and financial ones, consist of many elements, whose connections display highly structured patterns1,2,3. Interestingly, some key features, such as preferential attachment1,4,5, appear to be very general and are observed in very diverse networks1. Recent investigations have explored the possibility that hidden similarities (and important differences) between networks can be unveiled by analyzing network spectra: the spectral domain can indeed reveal properties which would otherwise remain undetected6,7.

A number of studies have unearthed interesting relations between the network spectral properties and connectivity8,9. In particular, the degeneracy of the lowest eigenvalue of the graph Laplacian associated with the network is equal to the number of its connected components10. Results in this field encourage the research of spectrum-based frameworks to capture similar patterns in networks of various nature11, following a recent tendency to explore several tools for network comparison12,13,14. Several applications can be envisaged, ranging from the possibility to characterize different information patterns15 to the reduction of the structure and complexity of biological, transportation, and social multiplex networks16,17,18.

In this article we propose a quantum-inspired approach to characterize complex networks based on the Laplacian spectrum. We associate with the network a one-dimensional Schrödinger equation whose eigenvalues coincide with those of the graph spectrum. The potential that appears in such equation is reconstructed through dressing transformations19,20,21,22,23, and provides a compact representation of the network properties, in particular those related to connectivity. We shall see that the application of quantum-inspired techniques to the study of complex networks turns out to be fecund. On one hand, it offers different perspectives, on the other hand, it is able to capture features that usual methods do not detect.

To test the effectiveness of this tool, we apply it to a well-known testbed in complex network theory, provided by Erdös and Rényi (ER)24. Besides their historical role25, random graphs like the ER model are currently used to provide a description of real phenomena such as epidemiological cases26, collaboration networks27 and social networks28, at least as benchmarks. Moreover, ER networks are characterized by an interesting phase transition, related to the emergence of a giant component, at a critical value of the connection probability between pairs of nodes29. We will show that our analysis tools, based on the reconstructed potentials, are able to capture the singular behavior of the network close to the transition. Specifically, three indicators of such criticality will be identified: the depth, the width and the Higuchi Fractal dimension (HFD)30 of the pointwise median potential, computed on several realizations of the ER network with the same size and connection probability. According to the mathematical tool one adopts, many strategies are possible in order to characterize a potential that represents the whole ensemble (over many realizations of the network). We shall opt for the pointwise median of the potentials over different network realizations, since it is best suited to unearth the sought criticality features. As we shall discuss in the following, other mathematical averaging procedures can be employed, but turn out to be less effective. We shall henceforth refer to the pointwise median potential over many network realizations at fixed connection probability as the ensemble potential. Finally, to check the validity of the proposed approach in real-world systems, we shall reconstruct potentials from the graph spectra of publicly available complex networks describing infrastructures (US power grid)31. These are real networks, for which no notion of phase transition can be defined. However, interestingly, we shall find that the fractality of the ensemble potential displays signatures of criticality.

The content of this Article is organized as follows: in “Setting up the problem: from graph spectra to reconstructed potentials” section we present the properties of the Laplacian spectrum and discuss the method for reconstructing the associated potentials via dressing transformations; in “Erdös-Rényi phase transition in the reconstructed potential framework” section we examine the description of the ER network provided by the reconstructed potential framework, focusing on the critical behavior of its length scale, depth and HFD at the phase transition; in “Analysis of a real-world network” section we use this approach to investigate a real-world network, the US power grid. The details of the dressing transformation for the potential reconstruction, some additional properties of reconstructed potential, as well as a comparison among different averaging procedures are presented in the Supplementary Information.

Setting up the problem: from graph spectra to reconstructed potentials

Algebraic graph theory is a branch of graph theory devoted to the investigation of graph connectivity properties using results and methods from algebra. In this respect, one of the most interesting results concerns the possibility of infering a connectivity measure by looking at particular eigenvalues of the graph Laplacian32. However, more general properties of a graph could be unearthed by examining all the eigenvalues and the graph energy, defined as their sum33,34. This approach could result in an alternative perspective on the problem of measuring the robustness of real-world complex networks. In the attempt to give a compact representation of the information contained in the whole graph spectrum, we apply a methodology, based on non-linear equations, to retrieve a one-dimensional potential given a set of energy levels (see Fig. 1 for a schematic overview).

Figure 1
figure 1

Conceptual workflow of the proposed methodology: starting from a given network, one first computes the Laplacian and its spectrum; the potential of a 1D Schrödinger equation, yielding the given set of eigenvalues, is then obtained and used to characterize the whole network and investigate its connectivity.

Accordingly, starting from a generic (unweighted and undirected) network, we first compute its Laplacian and eigenvalues, and then reconstruct the unique Schrödinger potential associated with the spectrum. The potential profile will yield a snapshot of the network configuration, providing a quantum mechanical perspective on the study of its connectivity.

Laplacian spectrum

We introduce here the formalism that is necessary to analyze complex networks in the framework of graph theory32 and recall a few basic notions that will be useful in our analysis. A graph \({\mathscr {G}}=({\mathscr {N}},{\mathscr {E}})\) is defined through a set \({\mathscr {N}}\) of N nodes and a set \({\mathscr {E}}\) of edges connecting them. The adjacency matrix A of \({\mathscr {G}}\) is a matrix whose elements \(a_{ij}\) are nonvanishing only if a connection between node i and node j exists. In general, graphs can be built by assigning a weight and an orientation to each edge. In the present work, we shall focus on undirected and unweighted graphs, whose adjacency matrices are symmetric and binary (i.e., consisting only of 0 and 1 elements). Moreover, for the sake of simplicity, the networks considered in this work will not include loops, namely links connecting a node to itself. For each graph \({\mathscr {G}}\), given its adjacency matrix \(A=\{a_{ij}\}\), the number of connections of each node, namely the node degree \(d_i\), is simply calculated by summing column- or row-wise the adjacency matrix. Accordingly, one defines the degree matrix D as the diagonal matrix with \(D_{ii}=d_i\). The Laplacian \(L = \{L_{ij}\}\) of \({\mathscr {G}}\) is defined as the difference \(D-A\), so that:

$$\begin{aligned} L_{ij} = \left\{ \begin{array}{rl} d_i &{} \text{ if } i=j \\ -1 &{} \text{ if } i,j \text{ adjacent } \\ 0 &{} \text{ otherwise } \\ \end{array} \right. . \end{aligned}$$

The normalized Laplacian \({\mathscr {L}} = \{{\mathscr {L}}_{ij}\}\) of \({\mathscr {G}}\) is defined as the matrix with elements

$$\begin{aligned} {\mathscr {L}}_{ij} = \left\{ \begin{array}{ll} 1 &{} \text{ if } i=j \text{ and } d_i \ne 0 \\ -\frac{1}{\sqrt{d_i d_j}} &{} \text{ if } i,j \text{ adjacent } \\ 0 &{} \text{ otherwise } \\ \end{array} \right. \end{aligned}$$

which can be expressed as \({\mathscr {L}}=D^{-1/2}LD^{1/2}\), with the convention \(\left( D^{-1/2}\right) _{i,i}=0\) for \(d_i=0\), namely if the node associated with index i is isolated. If the complex network features components that are disconnected from each other, both the L and \({\mathscr {L}}\) matrices can be recast into block-diagonal forms, with each block corresponding to a specific component. The spectrum of the normalized Laplacian, which is also called the spectrum of the graph, provides comprehensive information on the structure of the network, with regard to the number of its connected components and their dimensions. The eigenvalues \(\lambda _1 \le \lambda _2 \le \dots \le \lambda _N\) of \({\mathscr {L}}\) satisfy \(0\le \lambda _{i} \le 2\). In particular, \(\lambda _{1}=0\) is always an eigenvalue, whose multiplicity coincides with the number of connected components in the network. The eigenvalue \(\lambda _2\), called algebraic connectivity or Fiedler eigenvalue, is therefore nonvanishing if and only if the network is connected10. To give an idea of the spectra of \({\mathscr {L}}\) corresponding to peculiar structures, it is worth reviewing a few notable cases which will be relevant for our analysis35:

  • disconnected graph (\(A_{ij}=0\) for all ij): 0 is the only eigenvalue, with multiplicity N;

  • complete graph \(K_N\) (\(A_{ij}=1\) for all \(i\ne j\)): the eigenvalues are 0, with multiplicity 1, and \(N/(N-1)\), with multiplicity \(N-1\);

  • path \(P_N\) on N vertices: the eigenvalues are \(1-\cos \frac{\pi k}{N-1}\), with \(k=0,\dots ,N-1\);

  • cycle \(C_N\) on N vertices: the eigenvalues are \(1-\cos \frac{2\pi k}{N}\), with \(k=0,\dots ,N-1\).

If the network includes components \(K_n\), \(P_n\), \(C_n\) with \(n<N\), the eigenvalues of the \(n\times n\) Laplacians associated with such components will contribute to the spectrum of the whole network Laplacian (2).

Reconstructing potentials through dressing transformations

We now associate to a given network a potential and a 1D Schrödinger equation, whose energy levels coincide with the spectrum of the normalized Laplacian of the network. For this purpose, we shall apply a method based on the dressing transformation, proposed in Ref.20 and employed e.g. in Refs.19,23.

For a given network, we compute the eigenvalues \(\lambda _1 \le \lambda _2\le \dots \le \lambda _N\) of the normalized Laplacian \({\mathscr {L}}\), and consider the shifted spectrum

$$\begin{aligned} E_n = \lambda _n - \lambda _N , \end{aligned}$$

whose values are in \([-2,0]\). Hence, we derive the potential V(x) such that all the \({\widetilde{N}} < N\) nonvanishing shifted eigenvalues are energy levels of the Schrödinger equation (\(\hslash =1, m=1/2\))

$$\begin{aligned} -\partial _x^2 \psi (x) + V(x) \psi (x) = E_n \psi (x), \end{aligned}$$

with \(\psi (x)\) a normalizable wavefunction. We obtain the potential V by applying a method, whose details are outlined in the Supplementary Information, that is based on the iteration of a two-step procedure: we first solve the Riccati equation

$$\begin{aligned} \displaystyle f'_n(x) - f_n^2(x) + V_{n+1}(x) - E_n = 0 \quad \text {with } f_n(0)=0\,, \end{aligned}$$

and then update the potential according to

$$\begin{aligned} V_n(x) = V_{n+1}(x) + 2 f_n'(x). \end{aligned}$$

The iteration starts at \(n={\widetilde{N}}\), with \(V_{{\widetilde{N}}+1}=0\) and proceeds until \(n=1\), yielding the final potential \(V_1\) that can be identified with V in Eq. (4). Notice that the potentials obtained by the above procedure are even by construction.

The sequence of equations (5) can be integrated with any standard numerical method. Following the approach proposed in Ref.23, we adopted a fourth-order Runge-Kutta (RK) method with step size \(h = 10^{-5}\) to guarantee a high reconstruction accuracy. It is worth remarking that the dressing transformation is not the only technique to solve the inverse problem of finding the potential corresponding to a given set of levels. Another possible choice is the variational method described in Ref.22, which however requires a search in a very large parameter space. Additional details are given in the Supplementary Information.

Erdös-Rényi phase transition in the reconstructed potential framework

A random network is a set of N nodes, with edges randomly placed among them. The original model of a random network was introduced by Erdös and Rényi (ER) in their seminal work24, where they defined an ensemble G(NL) of graphs having a fixed number L of randomly placed edges. Here we will focus on a different formulation, proposed by Gilbert36 and characterized by the fact that the number of edges is not fixed. This model is based on an ensemble of networks G(Np), in which each node pair is connected with probability p. A parameter to quantify the connectivity for networks in this ensemble is the average degree

$$\begin{aligned} \langle k \rangle = p(N-1). \end{aligned}$$

Erdös and Rényi predicted the existence of a phase transition (in the thermodynamic limit) at \(\langle k \rangle = 1\), corresponding to the critical probability \(p_c=1/(N-1)\). This transition consists in the appearance of percolation and is related to a change in the scaling behavior of the typical dimension \(N_{LCC}\) of the largest connected component in each graph of the ensemble, which becomes a giant component at the critical probability. In the subcritical regime (\(p<p_c\)), \(N_{LCC}\) is of order \(\ln N\), while in the supercritical one (\(p>p_c\)), \(N_{LCC}\) scales like the number of nodes N. At criticality, \(N_{LCC}\sim N^{2/3}\)24,29,36.

Reconstructed potentials and connection probabilities

We consider different realizations of the ER complex network, with \(N=500\) nodes and different values of the connection probability p. To get a qualitative understanding of the relation between the network structure, the graph spectrum and the reconstructed potential, let us first look at three particular cases: \(p=10^{-4}\), \(p=0.9\) and the critical probability \(p=p_c=1/(N-1)\simeq 2 \times 10^{-3}\).

The statistical ensemble for \(p=10^{-4}\) is made of almost disconnected networks. In each realization, a few pairs of connected nodes are present, and connected components with more than two nodes are extremely rare. Thus, the typical spectrum \(\lambda _n\) (\(n=1,\dots ,N\)) of \({\mathscr {L}}\) consists of the highly degenerate eigenvalue 0, whose multiplicity coincides with the number of connected components, and the eigenvalue 2, related to the presence of paths \(P_{2}\) of two nodes (see the examples in “Laplacian spectrum” section), which are on average \(pN(N-1)/2\simeq 12.5\). These eigenvalues correspond to the values \(-2\) and 0 of the shifted spectrum (3), respectively. This structure of the spectrum tends to appear in the vast majority of realizations, one of which is displayed in Fig. 2. We observe that the number of wells in the reconstructed potential tends to coincide with the ground state degeneracy, which, in this case, is equal to 488, while the excited state has degeneracy 12. The similarity of the reconstructed potentials is reflected in the regularity of the ensemble potential \(V_m(x)\) (computed as the pointwise median over \(M=100\) network realizations), shown in the right panel of Fig. 2.

Figure 2
figure 2

Left panel: complex network with \(N=500\) nodes, generated using the ER model with connection probability \(p=10^{-4}\) (graph generated with the Python libraries Graphviz 2.3837 and NetworkX 2.438). Central panel: shifted graph spectrum \(E_n\) (red horizontal lines) and reconstructed potential V(x) (green) corresponding to the network in the left panel, with x the dimensionless variable of the Schrödinger equation (4); since V(x) is an even function, only the positive x semi-axis is displayed. Right panel: ensemble potential \(V_m(x)\) obtained from the reconstructed potentials of \(M=100\) network realizations with the same N and p, by computing the pointwise median.

For \(p=0.9\), in basically all network realizations the graph consists of a single component, with a high density of links. In such configuration, the spectrum \(\lambda _n\) of \({\mathscr {L}}\) consists of a nondegenerate eigenvalue 0, separated by a gap from the other eigenvalues, that concentrate around 1. Indeed, when the connection probability is close to \(p=1\), the spectrum approximates that of the complete graph \(K_{N}\). Also in this case the structure of the spectrum is weakly dependent on the specific network realization, a feature which is again reflected in the similarity of the reconstructed potentials. The typical potential profile is characterized by a single minimum around \(x=0\), and rapidly increases approaching an almost constant value. The statistical variability of the reconstructed potentials is extremely low, leading to a very smooth median \(V_m(x)\) (computed over \(M=100\) network realizations), manifest in Fig. 3.

Figure 3
figure 3

Left panel: complex network with \(N=500\) nodes, generated using the ER model with connection probability \(p=0.9\) (graph generated with Gephi 0.9.239). Central panel: shifted graph spectrum \(E_n\) (red horizontal lines) and reconstructed potential V(x) (green, only positive x displayed) corresponding to the network in the left panel, with x the dimensionless variable of the Schrödinger equation (4). Right panel: ensemble potential \(V_m(x)\) over \(M=100\) network realizations with the same N and p.

At the critical probability \(p=p_c=1/(N-1)\), (almost) each realization of the network is characterized by the emergence of a giant component, involving a number of nodes of order \(N^{2/3}\)24,29,36. The remaining nodes are either connected into smaller size components or isolated. The eigenvalues \(\lambda _n\) of the graph spectrum are distributed in the full interval [0, 2], with a larger concentration around the endpoints. This behavior is mainly due to the presence of the giant component, which can be approximately described as a path, that contains also small ramifications and cycles. For this reason the contribution of the giant component to the graph spectrum is qualitatively similar to the spectrum of a path \(P_{n}\) with \(n\sim N^{2/3}\). Although the giant component displays general (and common) features in all the network realizations at critical p, the details of its nontrivial structure can hardly be reproduced. Therefore, since giant components corresponding to different realizations are generally characterized by very different patterns and micro-structures, and even different dimensions, the shifted eigenvalues \(E_n\) (positions of the associated spectral lines in the central panel of Fig. 4) will be wildly fluctuating. Smaller components and isolated nodes in the network will contribute to the spectrum of \({\mathscr {L}}\) with sparse and degenerate eigenvalues, as in the case of low p. In Fig. 4 we show the reconstructed potential for a single realization, whose eigenvalues \(E_n\) correspond to the shifted spectrum (3) lying between \(-2\) and 0. The shape of this potential, characterized by irregular oscillations around a constant value, with no appreciable increase in the considered x range, is actually rather similar for all realizations at critical p. However, the features of these oscillations wildly differ for different realizations, since they are subject to the same variability that characterizes the spectrum associated with the giant component. As a result, the profile of the median \(V_m(x)\) is very irregular. This was observed to be true also for a surprisingly small number of realizations. This observation is central: we shall argue that the irregularity of the average potential at criticality is but a manifestation of the emergence of fractality.

Figure 4
figure 4

Left panel: complex network with \(N=500\) nodes, generated using the ER model with connection probability \(p=p_c=1/(N-1)\simeq 2\cdot 10^{-3}\) (graph generated with the Python libraries Graphviz 2.3837 and NetworkX 2.438). Central panel: shifted graph spectrum \(E_n\) (red horizontal lines) and reconstructed potential V(x) (green, only positive x displayed) corresponding to the network in the left panel, with x the dimensionless variable of the Schrödinger equation (4). Right panel: ensemble potential \(V_m(x)\) over \(M=100\) network realizations with the same N and p.

Figure 5
figure 5

Median \(V_m(x)\) of the reconstructed potentials \(V_i(x)\,(i=1,\dots ,M)\), for \(M=100\) ER networks, \(N=500\) nodes and connection probability p. The critical value is \(p_c = 1/(N-1)\simeq 2 \times 10^{-3}\). Left panel: \(p<p_c\), with p ranging from \(10^{-4}\) (top) to \(2 \times 10^{-3}\) (bottom). Right panel: \(p>p_c\), with p ranging from \(2 \times 10^{-3}\) (bottom) to 0.9 (top). The values of p are given in the insets. For \(p < p_c\), the ensemble potentials are not smooth and decrease as p approaches the critical value from below (left). For \(p\gg p_c\), \(V_m(x)\) rapidly increases and reaches a saturation value (right).

Length scale of the reconstructed potential

The ensemble potentials \(V_m(x)\) obtained from \(M=100\) realizations of the ER network with \(N=500\) nodes, for different values of p, are shown in Fig. 5. One observes a very different behavior, depending on whether p is smaller or larger than \(p_c\). For \(p<p_c\), \(V_m\) features irregular oscillations superposed to an increasing trend, that becomes less and less steep as criticality is approached. For \(p>p_c\), the curves become smoother (differentiable), and a minimum in the origin gradually appears, followed by a rise to an almost constant plateau. As we shall see, this behavior is well approximated by a Landau potential \(V(x)=a\,\mathrm {sech}^2(x/b)\), with \(-a\) and b denoting the depth and width of the trapping potential, respectively40.

Figure 6
figure 6

Potentials for \(p>p_c\). Left: comparison between ensemble potentials \(V_m\) in the right panel of Fig. 5 (continuous lines) and their best fits with the functional form \(V_\text {fit}(x,p)\) in Eq. (8) (dashed lines). Center: best fit values of a (whose absolute value represents the depth of the potential well) vs p; the fit yields \(a \sim \left( p-p_{c}\right) ^{-\alpha }\), with \(\alpha \simeq 1.60 \pm 0.22\). Right: best fit values of b (width of the potential well) vs p; the fit yields \(b \sim \left( p-p_{c}\right) ^{-\beta }\), with \(\beta \simeq 1.35 \pm 0.13\).

The reason for the dependence of \(V_m(x)\) on \(p (>p_c)\) becomes evident when one compares the shifted Laplacian spectra in the central panels of Figs. 3 and 4: by approaching the percolation transition from above, the reconstructed potentials tend to become steeper, in order to accommodate a larger number of nondegenerate eigenvalues in the upper part of the spectrum. This observation suggests a fit of the ensemble potential \(V_{m}(x)\) with an expression that interpolates between the large-p and critical-p regimes: we consider an ansatz of the following type

$$\begin{aligned} V_\text {fit}(x,p)= a(p)\,\mathrm{sech}^2 \left( \frac{x}{b(p)} \right) -2-a(p)\,, \end{aligned}$$

in the attempt to fit the slower increase of \(V_{m}(x)\) towards its asymptotic (large-x) value in the vicinity of the phase transition. Figure 6 displays the comparison between \(V_m(x)\) and \(V_\text {fit}(x,p)\) at different values of \(p>p_c=2 \times 10^{-3}\), and the dependence of the fit parameters a and b on the connection probability p (at \(N=500\)). The relative errors on the fit parameters a and b are always smaller than \(0.02\%\) for \(p\le 5 \times 10^{-2}\), and increase as the critical point is approached, reaching \(1.16\%\) for a and \(1.65\%\) for b at \(p=3\times 10^{-3}\), where the oscillations of the ensemble potential profile reduce the fit accuracy.

The ensemble potential captures the critical behavior of the system, as it emerges from the divergence of the fit parameters as p approaches \(p_c\) from above. In particular, the scales a and b, which set respectively the depth and width of the trapping potential, diverge like

$$\begin{aligned} a \sim \left( p-p_{c}\right) ^{-\alpha }\,, \qquad b \sim \left( p-p_{c}\right) ^{-\beta } \end{aligned}$$

at the percolation transition, with critical exponents \(\alpha \simeq 1.60 \pm 0.22\) and \(\beta \simeq 1.35 \pm 0.13\). This shows that the very structure of the potential of the 1D Schrödinger equation, as well as the parameters that characterize it, detect the percolation phase transition of the associated network. A few additional properties of the potential \(V_\text {fit}\) are discussed in the Supplementary Information. In the next subsection, we shall explore in detail the association between the shape of the ensemble potential and the onset of the percolation phase transition in the collection of ER networks from which the pointwise median is computed. Actually, the roughness of the \(V_m\) profile represents a signature of fractality, a property that emerges around \(p_c\) as a result of the median operation, but is not detected in single-realization reconstructed potentials, characterized instead by a smooth profile at all connection probabilities.

Before moving on to the quantitative description of the fractality of the median potential \(V_{m}\), it is worth observing that a possible alternative approach to the study of the ER network ensemble would be based on analysing the pointwise mean potential \(V_{\mu }\). However, as we detail in the Supplementary Information, although \(V_{\mu }\) follows qualitatively similar trends to those of \(V_m\), depicted in Fig. 5, its profile remains smooth, even close to the percolation phase transition, and shows no sign of fractality.

Transition characterization through Higuchi Fractal Dimension

We observed (Fig. 5) that the ensemble potential profile is less smooth at the critical probability \(p_c\) than in the low- and high-p regimes, due to the spectral fluctuations of the associated networks. Figure 7 shows, for different values of N, the ensemble potentials over \(M=100\) realizations of the network, always at the critical connection probabilities \(p_c=1/(N-1)\); it can be noticed that the increasing trend in x of the ensemble potential is more manifest for networks of smaller size N. At \(N=500\), one observes oscillations but no overall increasing trend with x.

Figure 7
figure 7

Median \(V_m(x)\) of the reconstructed potentials \(V_i(x)\) \((i=1,\dots ,M)\) for \(M=100\) ER networks, for different network size N, always at the critical probability \(p_c = 1/(N-1)\). Each plot is obtained at a fixed value of N, specified in the legend.

We now introduce a measure to quantify the lack of smoothness of \(V_m\). In Ref.19, the ruggedness of the potentials reconstructed from given sets of energy levels was characterized in terms of a qualitative measure of fractal dimension. Here, we shall use the Higuchi Fractal Dimension (HFD)30, that, having been originally introduced to characterize time series, is especially suited to describe the profile of functions of one variable. From a given sequence \(\{F_1,F_2,\dots ,F_\nu \}\) one extracts the subsets

$$\begin{aligned} \left\{ F_i, F_{i+k},\dots , F_{i+\left\lfloor \frac{\nu -i}{k} \right\rfloor k} \right\} , \quad \text {with } i=1,2,\dots , k \end{aligned}$$

of values corresponding to indices separated by a positive integer \(k<\nu\) and starting from i. The quantities

$$\begin{aligned} L_{i}(k)=\frac{\nu -1}{\left\lfloor \frac{\nu -i}{k}\right\rfloor }\sum _{j=1}^{\left\lfloor \frac{\nu -i}{k}\right\rfloor }\left|F_{i+jk}-F_{i+(j-1)k} \right|\end{aligned}$$

represent properly normalized measures of the mean distance between neighboring values in (10). The terms \(L_{i}(k)\) corresponding to the same spacing k can then be averaged over all possible initial points to obtain

$$\begin{aligned} \langle L(k) \rangle = \frac{1}{k}\sum _{i=1}^{k}L_i(k)\,. \end{aligned}$$

If \(\langle L(k) \rangle \sim k^{-D}\), the exponent D is called the HFD of the sequence \(\{F_1,F_2,\dots ,F_\nu \}\). In practice, the above dependence holds only in a certain range of k; in our analysis, we have considered \(2\le k \le 800\).

Figure 8
figure 8

Higuchi fractal dimension of the ensemble potentials \(V_m(x)\) on a set of M realizations of ER graphs with \(N=500\) nodes, as a function of the connection probability p. The (blue) dots and dashed curve refer to the ensemble potentials in Fig. 5, obtained from \(M=100\); the (red) crosses and full curve show the HFD for \(M=1000\).

Figure 8 shows the HFD values of the ensemble potentials computed on M realizations of ER networks with \(N=500\) nodes at fixed p, with \(M=100\) (see Fig. 5) and \(M=1000\). From both plots, we observe that the fractal dimension peaks around the critical probability, while it drops to a value close to one in the low- and high-p regimes. The inset in Fig. 8 displays a (close) zoom of the peaks around \(p=p_c=1/(N-1)\), showing that the maximum value is attained at the critical probability, for the explored values of p and N.

The maximum of the HFD can be therefore be considered as an indicator of criticality. We observe that the plotted values at each connection probability p depend on the specific ensemble of M randomly sampled realizations of the network. We actually checked that plots from independent sets, each containing \(M=100\) realizations, generally fluctuate around a mean curve. However, despite this variability, a general trend emerges, characterized by the presence of a peak around the critical probability, in all the considered sets of \(M=100\) realizations.

Figure 9
figure 9

Left: mean HFD values at criticality vs M and N; Right: error bars for the some data plots. Each distribution contains \(s(M)=20000/M\) HFD values of the ensemble potentials on M realizations of ER graphs with N nodes, at the critical connection probability \(p=p_c=1/(N-1)\). The position of the maximum is largely independent of M.

Finally, a comparison between the two plots displayed in Fig. 8 reveals that the values of HFD obtained for different numbers M of realizations are sensibly different when the connection probability approaches the critical value. This result motivates us to systematically investigate the behavior of the fractal dimensions at \(p=p_c=1/(N-1)\) for networks with varying numbers of nodes N and realizations M concurring to the ensemble potential, in the attempt of extracting information on the asymptotic scaling of the HFD with both N and M. At criticality, for each value of \(N\in \{125,200,250,500\}\) we generated 20,000 networks, which were grouped into statistically independent sets of \(M\in \{25,50,100,200,400,800,1000,2000,5000,10{,}000,20{,}000\}\) realizations, each with cardinality \(s(M)=20{,}000/M\). We then computed the HFD values of the ensemble potentials at criticality, corresponding to sets with the same M, obtaining distributions of fractal dimension consisting of s(M) elements. We report in Fig. 9 the mean HFD of such distributions as a function of M and N, with the error bars displayed in the right panel obtained by dividing the standard deviation of the distribution related to a specific M by \(\sqrt{s(M)}\). In all the plots the HFD displays an initial increase, due to the fact that fractality emerges when the ensemble potential is computed over a relevant number of realizations, while the single potentials are not fractal (HFD\(\simeq 1\)). The position of the maximum is largely independent of M, and the HFD decreases for large M. We observe that such a decrease becomes less significant for larger values of N. It would be tempting to assume that, as N increases further, the HFD reaches a plateau after the maximum, as a function of M. However, our data do not enable us to safely draw this conclusion (even by a tentative analysis of finite-size scaling), nor to determine the precise value of the maximum for \(N, M \rightarrow \infty\). Additional details on the numerical procedure are outlined in the Supplementary Information.

Analysis of a real-world network

Figure 10
figure 10

Graph representation of the US power grid (top left panel) and realizations of sub-sampled networks with \(N'=740\) and \(\langle k \rangle = 0.4\) (top right), \(N'=1851\) and \(\langle k \rangle = 1.01\) (bottom left), \(N'=3492\) and \(\langle k \rangle = 1.89\) (bottom right); the largest connected component in each sub-sampled network is highlighted in red (the layout of the graph is different from that used in Fig. 4). Graphs are generated with the Python libraries Graphviz 2.3837 and NetworkX 2.438.

The formalism based on the reconstructed potentials and the HFD, developed in the previous sections and used to characterize ensembles of ideal ER networks, will now be applied to the description of a real-world situation. It is important to stress that a real-world network is not a random graph in the sense of ER, and does not enjoy the same idealized features. It is not obvious, for example, that a real-world network percolates, certainly not in the same way as a random graph. For instance, the very presence of a unique giant component and its scaling features cannot be taken for granted. We shall now look at a specific example and consider a number of typical quantities that characterize it.

The data analyzed in this section are taken from a public database31 and represent the power grid of the Western States of the USA41). This system can be modeled as an undirected unweighted complex network with \(N=4941\) nodes and \(L=6594\) edges; a node indicates a generator or a transformator or a substation, and each edge represents a power supply line. We shall find it convenient to work here with the average degree \(\langle k \rangle\) defined in Eq. (7) (and we recall that the percolation phase transition of an ER random network would take place at \(\langle k \rangle =1\)). The network, displayed in the top left panel of Fig. 10, is made up of a single connected component and is characterized by an average degree \(\langle k \rangle = 2.67\); its fill, defined as the ratio between the number of edges L and the maximum number of edges \(N(N-1)/2\) in an undirected network without loops, takes the value \(5.40\cdot 10^{-4}\).

The US power grid network is deterministic, with the edges corresponding to an organized structure, constrained by infrastructural requirements. In order to enable a comparison with a random graph, we shall introduce randomness in the system, by sampling out a subset of \(N'<N\) nodes to form an subgraph, in which the edges connecting these nodes are inherited from the original network. The sub-networks corresponding to different numbers \(N'\) of sub-sampled nodes are reported in Fig. 10.

The properties of the sampled subnetworks will fluctuate according to the specific subset of \(N'\) nodes. We performed a statistical analysis in the intermediate range \(370\le N' \le 4113\), in which the variability of the sampled subnetwork is expected to be larger, as \(0.20 \le \langle k \rangle \le 2.22\) would be close to criticality (\(\langle k \rangle = 1\)) if the network were random. At fixed \(N'\), we generated \(M=100\) subgraph realizations and computed, for each of them, the average degree \(\langle k \rangle\), the size \(N'_{LCC}\) of the largest connected component (LCC) and the reconstructed potential. The left panel of Fig. 11 displays the dependence of the LCC relative size \(N'_{LCC}/N'\) vs the average degree \(\langle k \rangle\) of such distributions, with the error bars representing their standard deviations over \(M=100\) subgraph realizations (at fixed \(N'\)) (the inset shows for comparison the same quantity in the case of the ER network ensemble1). The dependence of the size of the LCC on \(\langle k \rangle\) appears to be smooth and no signature of a phase transition is observed: a fit of the LCC fraction for \(\langle k \rangle > 1\), displayed in the right panel of Fig. 11, yields \(N'_{LCC}/N'-(N'_{LCC}/N')|_{\langle k \rangle = 1} \sim (\langle k \rangle - 1)^{7.0\pm 0.1}\) (for comparison, for an ER network at criticality, one would get the exponent 11). We stress again that the graph is not random and a phase transition is not properly defined in this case. Although this is not central to our analysis, we also observe that the number of subnetworks scales like \(N \atopwithdelims ()N'\), so that the 100 realizations are practically independent and very different from each other.

Figure 11
figure 11

Left panel: largest connected component (LCC) fraction \(N'_{LCC}/N'\) vs average degree \(\langle k \rangle\) in the sampled subnetworks of the US power grid. Each point corresponds to a fixed subsampling size \(N'\): the ordinates represent the mean values obtained from \(M=100\) realizations and the error bars are the standard deviations of the respective distributions. The inset shows the behavior of the same quantity in the ER network ensemble. Right panel: power-law fit, on a log-log scale, of the LCC fraction for \(\langle k \rangle >1\), yielding \(N'_{LCC}/N'-(N'_{LCC}/N')|_{\langle k \rangle = 1} \sim (\langle k \rangle - 1)^{7.0\pm 0.1}\).

We now test the performance of the reconstructed potential formalism as a tool of network analysis. In Fig. 12 (left) we show the profile of the ensemble potential \(V_m\) for some values of \(N'\); the corresponding mean values of \(\langle k \rangle\) are also reported to facilitate comparison with the analogous plots for the ER networks. Finally, we computed the HFD of the ensemble potentials, represented in Fig. 12 (right) as a function of the average degree in the sampled subnetworks. Notice that it is impossible to investigate the behavior of the HFD for larger values of \(\langle k \rangle\), as the US power grid network, displayed in the top left panel of Fig. 10, has an average degree \(\langle k \rangle \simeq 2.67\), that represents an upper bound for our analysis.

Figure 12
figure 12

Left. Pointwise median \(V_m(x)\) of the reconstructed potentials of \(M=100\) subsamplings of the US power grid with \(N'\) nodes and edges inherited from the original network (\(N=4941\)). The size \(N'\) of sampled subnetworks ranges from \(N'=740\) (top) to \(N'=3492\) (bottom). Right. Higuchi fractal dimension of the ensemble potentials on a set of \(M=100\) subsamplings of the US power grid network, as a function of the average degree \(\langle k \rangle\), for \(370 \le N' \le 4113\). The horizontal coordinates indicate the mean of \(\langle k \rangle\) on the ensemble of subsamplings, while the error bars denote the corresponding standard deviations.

The range of \(\langle k \rangle\) values here analyzed roughly corresponds to probabilities \(4 \times 10^{-4} \le p \le 4.4 \times 10^{-3}\) in Fig. 8 (random ER networks). The HFD displays a clear increasing trend up to \(\langle k \rangle \simeq 0.75\), and then reaches a plateau for larger values of \(\langle k \rangle\), characterized by irregular (a few percent) fluctuations. Notice that, as emphasized before, the real US power grid network is characterized by an average degree \(\langle k \rangle \simeq 2.67\), a value that cannot be reached in our analysis. Comparison with a bona fide random ER network would lead us to expect that the plateau ends at \(\langle k \rangle \gtrsim 3.5\) (\(p \gtrsim 7 \times 10^{-3}\)). On a wider scale the plateau would then appear as a (sharp) maximum, see Fig. 8.

The behavior of the HFD detects therefore the occurrence of a significant amount of fractality in the ensemble of sampled subnetworks for the corresponding values of \(N'\) and \(\langle k \rangle\). We can interpret this behavior as a remnant of the criticality of the corresponding ER graph. Observe that such conclusion does not emerge from the quantity displayed in Fig. 11. The fractality of the potential, detected by the HFD, appears therefore to be a better indicator of a structure that is reminiscent of the ER phase transition. It is remarkable that we are able to reach this conclusion although the sampled subnetworks originate from a given, real-world deterministic graph and cannot, strictly speaking, be considered “random”, as those of an ER graph.

A few additional comments are in order. We evaluated the HFD for \(2\le k \le 800\), k being the scale index introduced in Eq. (12). This choice was motivated by consistency with the analysis of “Transition characterization through Higuchi Fractal Dimension” section, pertaining to an ER random network. An investigation with \(2\le k \le 35\) would yield the same qualitative features, with a lower (about 30%) fractality index, but a very similar plateau, starting again at \(\langle k \rangle \simeq 0.75\).

Conclusions and outlook

We have proposed a quantum-inspired approach to investigate complex networks: by using the mathematical framework provided by dressing transformations, we have developed a technique to uniquely associate a Schrödinger-like potential to the graph spectrum of a given network. We have verified that such potential probes and detects nontrivial phenomena in complex network dynamics, such as the phase transition in the Erdös-Rényi model, related to the emergence of a giant component. In particular, such transition can be investigated by monitoring the length scale and the Higuchi Fractal Dimension of the ensemble potential computed from several network realizations having the same size and connection probability.

We have applied this technique to the study of a real-world network, showing that the fractality of the ensemble potential displays a behavior that is reminescent of criticality, although no bona fide phase transition can be properly defined in such a case. We also observed that standard techniques (such as the scaling feaures of the LCC) are unable to detect any signature or remnant of criticality. Future work will extend this analysis to more complex models of artificial networks, which include other formation mechanisms, such as link rewiring and preferential attachment.

The reconstructed potential provides a snapshot representation of the structure of a network, yielding information on its connectivity and on the number of disconnected components. We observe that fractality has been related to network topology and self-similarity42,43,44; to establish a relation between such fractality, arising from connectivity, and the one outlined in our work could foster interesting developments. For example, this aspect could be considered when examining real-world networks, since the reconstructed potential and its fractality could be used to test their robustness, shed light about hidden geometries and even diagnose possible weaknesses.

For this reason, we plan to explore further the characterization of real-world networks through reconstructed potentials, trying in particular to understand whether the typical patterns found in this analysis are an intrinsic feature of the specified domains. Moreover, we will investigate the possibility to improve our framework by combining the reconstructed potentials with other approaches to complex networks, based on entropy11,45,46 and machine learning47.