Asymptotic entropy of the Gibbs state of complex networks

In this work we study the entropy of the Gibbs state corresponding to a graph. The Gibbs state is obtained from the Laplacian, normalized Laplacian or adjacency matrices associated with a graph. We calculated the entropy of the Gibbs state for a few classes of graphs and studied their behavior with changing graph order and temperature. We illustrate our analytical results with numerical simulations for Erdős–Rényi, Watts–Strogatz, Barabási–Albert and Chung–Lu graph models and a few real-world graphs. Our results show that the behavior of Gibbs entropy as a function of the temperature differs for a choice of real networks when compared to the random Erdős–Rényi graphs.

where Z is a normalizing constant. Formal introduction of this concept will be presented in the Preliminaries. Numerical calculations shed light on interesting behavior of the entropy depending on the parameter τ of the Gibbs state interpreted as a parameter proportional to the inverse of temperature 4,9 or evolution time 4,9,13,14 . The authors of 4 point the phase transition of entropy value for Erdős-Rényi and Watts-Strogatz graphs for some critical value τ crit . Our analytical considerations on Erdős-Rényi graphs confirm that such a phase transition actually occurs, however, the value of τ crit depends on the graph order.
Depending on a graph, the phase transitions occurs either for smaller or larger values of τ . The direction of phase transition change may be derived from the analysis of entropy limits of graphs with increasing graph order: when the entropy for fixed τ grows like log(n) , then clearly the phase transition moves to the right. On the other hand, when entropy converges to zero, then the phase transition moves to the left.
For this reason, we calculated the entropy for some special graph classes for fixed parameter τ and changing graph order n. We made the entropy analysis for a few types of graph matrices, that is adjacency matrix, Laplacian and normalized Laplacian. It appeared that the entropy usually takes the form either o (1) or log n − O(1) , which shows that the phase transition moves respectively to the left or right. Furthermore, the deviations from log n differ for different random graph models, which can give a clue about their properties. On top of that, we made a numerical analysis for the entropy of a few real-world graphs analyzing the location and the shape of its phase transition. www.nature.com/scientificreports/ This work is organized as follows. We begin with preliminaries in "Preliminaries" section. Then, in "General entropy properties" section we present general theorems for entropy behavior basing on properties of the matrix spectra. The entropy values for specific graph classes are presented in "Entropy of specific graph classes" section. The entropy behavior studied for various random graph models and real-world graphs is described in "Random graphs" section. Eventually, conclusions can be found in "Conclusions" section.

Preliminaries
We will be interested in studying the von Neumann entropy of Gibbs states associated with a graph G. A graph G is a pair (V, E) where V is a set of vertices and E is a set of edges. In this work we restrict ourselves to simple undirected graphs. A graph has three typical matrix representations: the adjacency matrix, the Laplacian matrix and the normalized Laplacian matrix. The adjacency matrix of a simple graph is a symmetric square matrix consisting of ones if two vertices are adjacent and zeros otherwise. The adjacency matrix of a graph G will be denoted A(G). The degree matrix is a diagonal matrix with degrees of vertices on the diagonal. The degree matrix will be denoted D(G). We will often make use of (combinatorial) Laplacian matrix which is defined as L(G) := D(G) − A(G) . The normalized Laplacian is defined as . When it will not make confusion we will be writing only L instead of L(G) and analogously for other graph matrices. Eigenvalues of matrices will be denoted 1 , . . . , n , where 1 ≥ · · · ≥ n .
In this paper we will use the big-O notation.
Class O(f(n)) denotes a set of functions g such that there exist c > 0 and n 0 ∈ Z >0 s.t. for all n ≥ n 0 we have |g(n)| ≤ cf (n) . We write f (n) = �(g(n)) iff f (n) = O(g(n)) and g(n) = O(f (n)) . Finally, class o(f(n)) denotes set of functions g s.t. lim n→∞ g(n)/f (n) = 0 . In particular O(1) denotes a set of functions upperbounded in absolute value by a constant, and o(1) denotes a set of functions converging to 0. Now we will introduce the von Neumann entropy of a quantum state ̺ . As ̺ is a density matrix, it is positive and has unit trace, its eigenvalues form a probability vector. Thus, the von Neumann entropy of the state ̺ is defined as the standard Shannon entropy of its eigenvalues. This fact can be succinctly written as where log refers to the natural logarithm throughout this paper.
For any Hermitian operator H we can define an associated Gibbs state ̺ τ H as where Z = Tr(exp(−τ H)) is the partition function 14 . The parameter τ can be regarded either as a parameter proportional to the inverse of the temperature 4,9 or the diffusion time 4,9,13,14 . Note that the von Neumann entropy of the Gibbs state can be written as 4 This entropy has two simple properties summarized in the following lemma, which proof is stated in the Supplementary Materials in Section 1.

Lemma 1
Let H be a positive semidefinite matrix and c ∈ R . It holds that S ̺ τ cH = S ̺ cτ H and S ̺ τ c1+H = S ̺ τ H .
We will be writing S(̺ H ) instead of S ̺ τ H when the value τ does not need to be stated explicitly. When calculating the entropy of a graph given by the adjacency matrix we will use the notation S(̺ A ) for S(̺ −A ) . When dealing with the Laplacian and normalized Laplacian matrices we will be writing S(̺ L ) and S(̺ L ) respectively.
Finally, let us present a simple proposition describing the limit behavior of graph entropy.

Proposition 2
Assume G is be a connected graph of order n. Then, for M ∈ {A, L, L} we have The proof can be found in the Supplementary Materials in Section 2. In fact, the proof shows that even for not connected graphs the entropy converges to log(n) as τ → 0 . On the other hand, for τ → ∞ for Laplacian and normalized Laplacian the entropy converges to log(k) , where k is the number of connected components of G. For adjacency matrix the limit for non-connected graphs may depend on the form of connected components. Note that by the proposition for connected graph the entropy continuously changes from log(n) to zero, when τ changes from zero to infinity.

General entropy properties
In this section we will present general theorems concerning the entropy's behavior in which we assume only some restrictions on matrix spectra.
Let us begin with a proposition which shows a useful property of d-regular graphs. A d-regular graph is a graph whose all vertices have degree equal to d. For continuous-time quantum walk on d-regular graphs the www.nature.com/scientificreports/ evolution is independent on the choice of either adjacency matrix or Laplacian 6 . It follows from the fact that and hence it affects only the global phase. For a similar reason, in the case of normalized Laplacian it can be seen as a change of time.
It turns out that the proposed entropy reflects this behavior.

Proposition 3 Let G be a d-regular graph. Then S(̺ τ
Proof Let G be a d-regular graph. Then Laplace matrix of G is , where A is the adjacency matrix of G. Now from Lemma 1 we have that . The normalized Laplacian for the d-regular graph takes the form . Therefore again from Lemma 1 we have It turns out that for the normalized Laplacian the entropy may take the values only from the very small interval. Let us first present a result for general Hermitian matrices with bounded spectra. Its proof can be found in the Supplementary Materials in Section 3.1.

Lemma 4 Let H be a matrix with eigenvalues bounded by
Conclusion directly drawn from the above Lemma is stated as a theorem concerning the entropy of a sequence of positive semidefinite matrices with finite spectral norm. For normalized Laplacian we have c 2 = 0 and c 1 = �L� ≤ 2 15 , which give us the situation as in Lemma 4. More specifically, independently on L and τ the bound yields The bound cannot be improved to log n − o(1) for general normalized Laplacians sequence of increasing size. In particular we will show that the deviation from log(n) occurs for a cycle, but also for all complex graphs considered in this paper, see "Random graphs" section.
Note that for Laplacian matrices of graphs with maximal degree we have ≤ �L� ≤ 2 16 . Furthermore, for arbitrary graph we have c 2 = 0 for the Laplacian. Hence if a graph has a bounded degree, then we can simply utilize Theorem 5 in this scenario.
While considering Laplacian matrices we need to assume that a matrix is singular. More specifically, the number of zero eigenvalues is equal to the number of connected components of the graph. We will focus on the case when one of the eigenvalues is equal to zero and the rest of the eigenvalues are strictly positive (i.e. the graph is connected). In the next theorem we restrict ourselves to the case when all the nonzero eigenvalues converge to a positive constant. The proof of the above theorem can be found in the Supplementary Materials in Section 3.2. Now we focus on the case when the spectrum can be unbounded. An example of such a matrix is the Laplacian matrix. While it is singular and positive semidefinite, its norm coincides with the maximum degree of the graph, hence it can be unbounded. In the following theorem, proven in the Supplementary Materials in Section 3.3, we make an assumption only on the behavior of the smallest nonzero eigenvalue.

Theorem 7
Let H n be a singular nonnegative matrix of size n with single zero-eigenvalue and let τ > 0 be a constant. Assume n−1 (H n ) ≫ log n . Then S ̺ H n = o(1). www.nature.com/scientificreports/ The Laplacian matrix of a connected graph does not necessarily satisfy the assumption on n−1 mentioned in Theorem 7, hence the result cannot be generalized into 'arbitrary sequence of Laplacians' , even connected. As an example, the cycle graph C n of size n is known to have eigenvalues 2 − 2 cos( 2πj n ) for j = 0, . . . , n − 1 17 . Hence the spectrum is bounded and we can apply Theorem 5. By this we have S(̺ L(C n ) ) = log n − O(1) . Such behavior shows the difference between Laplacian and normalized Laplacian in the sense of von Neumann entropy of the Gibbs state.

Entropy of specific graph classes
In this section we study the entropy of a few selected classes of graphs. The entropy is calculated for three types of graph matrices: adjacency matrix A, Laplacian matrix L and normalized Laplacian L . Four types of graphs were taken into consideration: empty graph, complete graph, bipartite graphs and cycle graph. An empty graph of order n is denoted by E n . The symbol K n denotes the complete graph. A bipartite graph is a graph whose vertices are partitioned into two disjoint sets, V and W, and any two vertices from the same set cannot be adjacent. When a vertex v ∈ V is adjacent to all vertices from the set W and vice-versa, then the graph is called a complete bipartite graph. Such a complete bipartite graph, where |V | = n 1 and |W| = n 2 , is denoted by K n 1 ,n 2 . Finally, the symbol C n is used to denote a cycle graph.
All the results are presented in Table 1. The proofs can be found in the Supplementary Materials in Section 4. An interesting observation is that in the first three cases the entropy behaves either like log n or converges to zero. For a cycle graph however the result is neither of them. More specifically, the entropy calculated for both adjacency and Laplacian matrices behaves in the same way where I α (x) is the modified Bessel function of the first kind. For the normalized Laplacian of a cycle we obtain It is also worth noting that the entropies calculated for adjacency matrix and Laplacian usually have the same asymptotic properties, that is either log n − o(1) or o(1). Nevertheless, we found an counterexample which is a star graph K n 1 ,1 for which the entropy for adjacency matrix is substantially different than the entropy for Laplacian.

Random graphs
In this section we consider various random graph models. Let us begin with Erdős-Rényi random graphs 1 . The symbol G(n, p) is used to denote a random graph of order n where the probability that any two vertices are adjacent equals p. A generalization of the Erdős-Rényi graph model is the Chung-Lu graph model 18,19 in which we obtain a graph with a specified expected degree sequence (w 1 , . . . , w n ) . The probability that vertices v i and v j are adjacent equals w i w j / k w k .
Watts-Strogatz random graphs 3 are constructed as follows. In the first step we have a regular ring lattice, that is a graph of order n where each vertex is adjacent to K neighbors (K/2 on each side). Then, for each vertex we consider their neighbors from one side and rewire them with probability β to some other vertex. Watts-Strogatz graphs are known to be small-world, meaning that in contrary to Erdős-Rényi graphs all vertices are close to each other. Nevertheless, the degree distribution is highly concentrated around K.
Barabási-Albert random graphs 2 are constructed as follows. We begin with a complete graph with fixed order m 0 . Then we add vertices one after another. Each time, a new vertex is adjacent to m of the already existing vertices. The probability that the new vertex is adjacent to the already-existing vertex v is proportional to the degree of the vertex v.
We will start with analytical results for Erdős-Rényi and Chung-Lu graphs for Laplacian and normalized Laplacian matrices. Then, we will present numerical results for other types of graph matrices and other graph models presented above.

Scientific Reports
Theorem 8 20 The second smallest eigenvalue n−1 of the random Laplacian matrix L from Erdős-Rényi graph G(n, p) with p ≫ log(n)/n satisfies a.a.s.
Moreover, from 12 we have that 1 ∼ np for p ≫ log(n)/n . The next remark follows from Theorem 7.

Remark 9
The von Neumann entropy of Gibbs state of Laplacian of random Erdős-Rényi graph G(n, p) with p ≫ log(n)/n converges a.a.s. to zero.
The main reason of such behavior is the strongly outlying 0 value. The behavior changes when p = �(log(n)/n) . For p < (1 − ε) log(n)/n the graph is almost surely disconnected 1 , and since the dimensionality of the null-space of the Laplacian equals the number of connected components 17 , the graph entropy strongly depends on n. Let For random Erdős-Rényi graphs the above theorem translates to the following remark. Theorem 10 and Remarks 9, 11 give an analytical justification for the effect presented in 4 . The authors pointed that the phase-transition occurs with changing τ . This phase transition is shown in Fig. 1, which shows the value of the entropy of the Gibbs state for an Erdős-Rényi graph with a function of the dimension of the graph and the parameter τ . We show three values of the parameter p 0 , namely p 0 = 10.5, 21, 42 . To make it easier to compare the values for changing dimensionality, the value of the entropy is normalized by dividing by log n . The phase transition is clearly visible. We should also note that for sufficiently large dimension n the normalized entropy does not depend on the dimension n around τ < 1 b . Yet, it still depends on τ as stated by Theorem 10. A more detailed view on this phenomenon is presented in Fig. 2. It depicts this phase transition for the ER, WS and BA models and for all considered graph matrices. The model specific parameters are stated in the legend.
Theorem 10 not only confirms that there is a strong correlation between spectral gap and the critical value of τ but also shows that the transition depends on the order of the graph n. Further numerical investigation shows that the entropy stabilizes with the graph order.
Let us now focus on the normalized Laplacian. It is known that normalized Laplacian of random Erdős-Rényi graph satisfies requirements of Theorem 6 for p ≫ log(n)/n 19 , however, we can go beyond that. The assumption can be relaxed to pn = (1 + ε) log n for ε > 0 by Corollary 1.2 from 20 . We conclude our results with the following remark. Chung-Lu graphs. By Theorem 4 from 19 , normalized Laplacian of a random Chung-Lu graph for which minimum expected degree ω min ≫ log n satisfies the requirement of Theorem 6. Therefore we have the following remark.  www.nature.com/scientificreports/ The following remark concerns the case of adjacency matrix of a Chung-Lu random graph. Its proof can be found in the Supplementary Materials in Section 3.5.

Remark 14 Let
A be an adjacency matrix of a random Chung-Lu graph with the maximum expected degree satisfying ω max > 8 9 log( √ 2n) and d :=

Figure 2.
Illustration of the entropy's phase transition for the ER, WS and BA models and all considered graph matrices. The value of the entropy is normalized by dividing by log n . The dimension is n = 1200 . For WS we choose parameters K = 4 and β = 0.6 . The specific model parameters are stated in the corresponding legends. Each plot is obtained by averaging 100 randomly sampled graphs. The transparency in the plot denotes the size of the subgraph of the originally sampled random graph. In increasing order of opacity, these lines correspond to 33%, 66% and 100% of the total number of nodes of the sampled graph chosen for calculations. Subgraphs were generated by choosing a vertex with the highest degree, and 33% and 66% vertices nearest to it. www.nature.com/scientificreports/ Numerical insight. In this section we will complement the analytical results from previous sections by numerical studies on various random graphs as well as some real-world graphs. Basing on the results in 4 we expect that the information whether the graph describes real-world interactions may be distilled from the location and shape of the phase-transition. We can clearly observe that the entropy function in τ differs among Erdős-Rényi graphs and Watts-Strogatz networks. Nevertheless, in the case of Erdős-Rényi and Barabási-Albert graphs we observe a similar shape of the plots with a single inflection point, however there is a difference in location. Furthermore, in Fig. 2 we also presented the shape of the curve for smaller graphs. We can see that for all values of p, the location of phase transition for Erdős-Rényi graphs goes to larger values of τ , which is contrary to Watts-Strogatz and Barabási-Albert.
We expect to observe similar situation for real-world graphs. More specifically, we focused on co-authorship graphs (HEP-PH, HEP-TH, CA) [21][22][23] , social networks (Facebook FB, Twitch TW) 24,25 , Gnutella graph (GT) 26 and as-caida (CAIDA) 27 graphs. All the plots are presented in the Fig. 3. Moreover, for the sake of comparison we considered Erdős-Rényi graphs chosen so that the number of vertices was the same as in the corresponding real-world graph and the expected number of edges equals the number of edges of the real-world graph. Finally, we also calculated the entropy of subgraphs of real graphs to analyze how the phase transition changes with the graph size.
For some graphs we observe nontrivial changes in the pace of entropy change, similarly to as it was in Watts-Strogatz graphs (see Fig. 2). This is the most prominent in the case of Facebook for Laplacian and Figure 3. Illustration of the entropy's phase transition for real-world graphs. Each graph was turned into a simple undirected graph by replacing directed edges with undirected edges. Then, for each graph we chose the largest connected component. For each real-world graph, we generated ten Erdős-Rényi graphs with parameter p = 2m/n 2 where n, m are the numbers of vertices and edges of the largest connected components of real-world graphs respectively. Finally, we took an average entropy. Subgraphs of real graphs were generated by choosing a vertex with the highest degree, and 33% and 66% vertices nearest to it. www.nature.com/scientificreports/ normalized Laplacian, but for these matrices a similar effect can be observed also for HEP-PH, HEP-TH and GT. It is worth noting that these pace changes occur independently on the type of graph. More precisely, for co-authorship graphs the pace changes are clearly visible for HEP-PH and HEP-TH, while they are not visible for CA. This is even more appealing in the case of social network graph, that is the pace changes are very clear for FB graph while they are not visible for other graph. For all real-world graphs for adjacency matrix, the phase transition occurs for larger values of τ than for the corresponding Erdős-Rényi graphs. Contrary to adjacency matrix, for Laplacians and normalized Laplacians the phase transition starts roughly at the same value of τ for both real-world and Erdős-Rényi graphs. On the other hand, phase transitions usually are more rapid for random graphs. Different behavior can be observed for Erdős-Rényi graphs corresponding to GT and CAIDA graphs. In those cases Erdős-Rényi graphs have many disconnected components and therefore the limit as τ → ∞ is no longer zero.
Finally, there is almost no change in the shape and location of the phase transition of the entropy for real graphs for adjacency matrix. In contrary, for corresponding Erdős-Rényi graphs we observe that with the increasing number of nodes the location of the phase transition moves to higher values of τ . In the case of the Laplacian matrix, we observe that the location of phase transition remains the same for Erdős-Rényi graphs, while for real graphs it clearly goes to larger values of τ . Similar behavior is observed for the normalized Laplacian, however for some real graphs (HEP-PH, HEP-TH) it is less evident compared to the Laplacian. The only case for which the values of entropy was similar to the corresponding Erdős-Rényi graph is the entropy of real graph TW for normalized Laplacian. Finally, the non-trivial shape of the phase transition observed for FB can be found also for subgraphs of FB, however for HEP-PH and HEP-TH it is observed only for the original graph.
All the code used to obtain the results presented here is available on GitHub at https ://githu b.com/iitis /graph -entro py.

Conclusions
This work is focused on studying the entropy of the Gibbs state for various graphs. We made the analysis for three types of graph matrices: adjacency matrix, Laplacian and normalized Laplacian for various graph classes. It turns out that the asymptotic properties of the same graph may differ depending on which graph matrix is taken into consideration. We proved a few general theorems which assume only some constraints on matrix spectra. Moreover, we studied several graph classes like complete graphs, bipartite graphs and cycle graphs, and derived the formulas for their entropy. It turned out that entropy usually takes the values either log n − o(1) or o (1), which implies the shift of the phase transition.
We considered also various random graph models and real-world graphs. We focused on the phase transition in τ of the entropy of Erdős-Rényi, Chung-Lu, Watts-Strogatz, Barabási-Albert random graphs with fixed graph order and some real-world graphs from various domains like co-authorship and social networks. Analysis of real graphs shows that we can indeed distill the information whether the graph represents some real-world interactions. This can be distilled from the position and, in some cases, the shape of the plot. The exact nature of this shift is dependent on the chosen graph matrix, however for adjacency matrix and Laplacian the difference were most evident.