Characterization and comparison of large directed graphs through the spectra of the magnetic Laplacian
CCharacterization and comparison of large directed graphs through the spectraof the magnetic Laplacian
Bruno Messias F. de Resende a) and Luciano da F. Costa Physics Institute of SΛao Carlos, University of SΛao Paulo, SΛao Carlos, SP 13566-590,Brazil (Dated: 20 July 2020)
In this paper we investigated the possibility to use the magnetic Laplacian to characterize directed graphs(a.k.a. networks). Many interesting results are obtained, including the finding that community structure isrelated to rotational symmetry in the spectral measurements for a type of stochastic block model. Due thehermiticity property of the magnetic Laplacian we show here how to scale our approach to larger networkscontaining hundreds of thousands of nodes using the Kernel Polynomial Method (KPM). We also proposeto combine the KPM with the Wasserstein metric in order to measure distances between networks evenwhen these networks are directed, large and have different sizes, a hard problem which cannot be tackledby previous methods presented in the literature. In addition, our python package is publicly available atgithub.com/stdogpkg/emate. The codes can run in both CPU and GPU and can estimate the spectral densityand related trace functions, such as entropy and Estrada index, even in directed or undirected networks withmillion of nodes.
The Laplacian operator of a directed network isnot Hermitian. This property hampers the in-terpretation of the spectral measurements andrestricts the use of computational methods de-veloped in network science. In this work, wepropose a framework and novel measures basedon the spectrum of the magnetic Laplacian tostudy directed networks. By using the proper-ties of circulant matrices, we show analyticallythat novel measurements are able to grasp infor-mation about the structure of directed networks.It shows that the number of modular structuresin networks is related to the rotational symmetryof the spectrum, and therefore can contribute tocharacterize the parameters of the directed net-works. To infer the generative parameters of net-works, we propose the application of the Wasser-stein metric to measure the distance between thespectra of the magnetic Laplacian, allowing net-works to be compared. All the proposed methodsdepend on the diagonalization of the magneticLaplacian operator, which implies a high com-putational cost. Therefore, the calculations canbecome unfeasible. To overcome this limitation,we implemented the Kernel Polynomial Method(KPM) using TensorFlow package. This methodapproximates the spectrum density of Hermitianmatrices with a lower computational cost, allow-ing the spectral characterization of large directednetworks containing hundreds of thousands ofnodes. a) Electronic mail: [email protected]
I. INTRODUCTION
In the seminal work
Can one hear the shape of adrum? Mark Kack discusses the relationship betweena membrane and the set of eigenvalues (spectrum) of theLaplacian operator. However, this relationship was iden-tified to be not unique , in the sense that two distinctmembranes (non-isometric manifolds) can have the samespectrum. Nevertheless, despite such degeneracies, spec-tral information can provide valuable insights about thereal world. For instance, spectral geometry has been usedto study physical phenomena such as quantum gravity and provided the basis for developing algorithms in com-puter science .Although the analysis of continuous regions such asthose considered by Kack remains an interesting issue,several phenomena in nature and society need to be mod-eled in terms of discrete structures such as networks. Inthis case, we can adapt Kackβs question as Can one hearthe shape of a network?
The answer to this question isanalogous to what has been verified for the original ques-tion, i.e., two nonisomorphic networks can share the samespectrum . Despite such a limitation, the spectral ap-proach to discrete structures can still be useful in somepractical and theoretical problems . An example of aspectral approach that has been applied to characterizenetworks is the von-Neumann entropy .More recently, the concept of entropy of a graph hasbeen used to measure the similarity between two givennetworks . Examples of this approach include the en-tropic similarity applied to the inference of parametersof network models . However, this measure cannotbe immediately extended to directed networks and, ashas been shown in , the directed edges have substantialimplications in dynamics on graphs.In addition, the entropic similarity depends on theproduct of the matrices associated with the given net-works. This implies that this similarity measurement is a r X i v : . [ c s . S I] J u l not invariant with respect to permutations of the indicesassociated with the nodes. Given these dependencies,such measurements are not well defined when the nodescannot be associated with fixed indices.Given that directed networks can accurately modelseveral real-world problems, it is essential to develop newmethodologies capable of dealing with network direction-ality. An immediate difficulty implied by this scenario isthat the associated Laplacian operator will often havecomplex values, because the adjacency matrix associatedwith the directed networks is non-symmetric. A promis-ing approach to address this problem consists of studyingdirected complex networks while considering their mag-netic Laplacian operator . As an example, in theauthors showed that the results of community detectionalgorithms could be improved by considering the mag-netic Laplacian associated with the directed network.In this work, we show that the magnetic Laplacian ap-proach can be used to characterize complex networks,including those with hundreds of thousands of nodes. Bycharacterization, we mean that measurements taken fromthis operator contribute to identify the network model re-sponsible for generating a given network, as well as per-forming the inference of parameters responsible for gen-erating a given specific network configuration. Several re-sults were obtained. First, for simpler models (i.e., mod-ular regular networks), the number of modular structuresis related to the specific heat rotational symmetry. Sub-sequently, we showed that these spectral measurementscombined with the Wasserstein distance between spectraldensities , can provide valuable contributions to inferthe original parameters used for getting those networks,with relative errors smaller than 1%. II. METHODSA. Magnetic Laplacian
A directed network can be expressed by a tuple πΊ =( π, πΈ, π€ ), where π is the set of vertices, and | π | stands forthe number of the vertices; πΈ is the set of edges such thatfor each π’, π£ β π the ordered tuple π = ( π’, π£ ) β πΈ assignsa directed edge from vertex π’ to π£ and π€ : πΈ β R . Adirected network can be associated with an undirectedcounterpart πΊ ( π ) = ( π, πΈ ( π ) , π€ ( π ) ), where π€ ( π ) ( π’, π£ ) = π€ ( π’,π£ )+ π€ ( π£,π’ )2 . However, the directionality of πΊ is lostin πΊ ( π ) .In order to preserve the Hermiticity and the informa-tion about directionality , define πΎ , as πΎ : πΈ β π’ , where π’ is a group, such that πΎ ( π’, π£ ) β = πΎ ( π£, π’ ), choosing π’ = π (1) and expressing πΎ as πΎ π ( π’, π£ ) = exp(2 ππππ ( π’, π£ )) , (1)where π β [0 ,
1] and π ( π’, π£ ) = π€ ( π’, π£ ) β π€ ( π£, π’ ) representsthe flow in a given vertex π’ due to another vertex π£ . The symmetric network equipped with πΎ π has infor-mation about directed edges and, at the same time, theadjacency matrix is Hermitian.Now, we consider the following operator, associatedwith ( πΊ ( π ) , πΎ π ) where β is the Hadamard product: L π = D β Ξ π β W ( π ) , (2)where D is the degre matrix which contains the node de-grees along its main diagonal; [ Ξ π ] π’,π£ = [ Ξ β π ] π£,π’ = πΎ π ( π’, π£ )and [ π ( π ) ] π’,π£ = [ π ( π ) ] π£,π’ = π€ ( π ) ( π’, π£ ) .It is interesting to observe that this operator corre-sponds to the magnetic Laplacian , πΏ π . The reasonfor the term magnetic is that the operator can be used todescribe the phenomenology of a quantum particle sub-ject to the action of a magnetic field . Due to this phys-ical context, the parameter π is named charge.By construction, D and W ( π ) are both symmetric and Ξ π is Hermitian. Consequently, L π is Hermitian. In ad-dition, it is sometimes convenient to use a normalizedversion of L π , which is given by H π = β D β L π β D β , (3)where the H π is defined only if the network is at leastweakly connected.A given eigenvector of H π , | π π,π β© β C | π | , can be ob-tained as solution of H π | π π,π β© = π π,π | π π,π β© (4)where π π,π β R and π ,π β€ π π,π β€ Β· Β· Β· β€ π | π | ,π It is possible to enhance the analogy with physical sys-tems by including a temperature parameter π β R + . Byusing this parameter, the network properties can be stud-ied from the statistical mechanics viewpoint.Here, we adopted the Boltzmann-Gibbs statistical me-chanics formulation as a means to associate the partitionfunction π ( π, π ) = | π | βοΈ π =1 π β ππ,ππ (5)with πΊ .By using Eq.(5), the expected value at temperature Tof a operator π can be expressed in terms of its eigenval-ues { π π } as β¨ π β© = 1 π ( π, π ) | π | βοΈ π =1 π β ππ,ππ π π . (6)In this work, we use Eq.(6) to define the measure of spe-cific heat, π π , associated with a network. This novel mea-surement is given by π π ( π, π ) = β¨ π» π β© β β¨ π» π β© π . (7) FIG. 1. In (a), (b) and (c) we have a SF, ER and BA network. The color maps, π ππ is the indegree of a given node. In (d),(e) and (f) it is shown the specific heat in terms of the charge 2 ππ (polar coordinates) and temperature (radial coordinate)for a Bollobas et al. scale-free network , ER , and BA network respectively. The parameters used to generate those networkswere | π | = 1000; the edge probability for ER was π = 0 . π = 3.The temperature range and charge are uniformly sampled form interval [0 . , .
15] and [0 , /
2] with 30 points each. As canbe noted the π π shows a specific pattern for each network. This fingerprint pattern for each network explains why the SOM(Self-Organization Map) was so successful in the task of organizing networks belonging to the same classes onto the samegroups using only the specific heat, without any knowledge about that classes. It follows from Eq.(1) that the eigenvalues, andtherefore π π are symmetric with respect to the addition of integer values to the charge πΎ π = πΎ π + π β π β Z , reflecting in thebilateral symmetry with respect to the horizontal axis in (d), (e) and (f). The Eq.(7) has two free parameters, namely π and π .Because of this free choice of parameters and, owing tothe fact that we have a rotation associated with directededges ( πΎ π ), we plot π π in two dimensions , setting 2 ππ asthe polar coordinate, and π as the radial one. Regard-ing the interpretation and justification of physics-relatedquantities such as the specific heat it is directly relatedto the variance of the eigenvalue spectrum. As a conse-quence, that quantity provides a signature of the spec-trum properties, contributing to the characterization ofthe network structure. B. Directed modular networks
In this work, we resort to a type of directed stochas-tic block model in order to obtain a good control of thenetwork properties such as community size, and also be-cause of its potential for facilitating analytical studies.The adopted stochastic block model networks were ob-tained as follows1. Split the set π onto π π equal-size sets( π , π , . . . , π π π ).2. For each π’, π£ β π π create a directed edge ( π’, π£ ) withprobability π π .3. For each π’ β π π and a π£ β π π +1 (assuming π π π +1 = π ), create a directed edge ( π’, π£ ) with probability π π . C. Spectral entropy of directed networks
Recent works reported how to use entropic measure-ments to quantify the similarity between two undirectednetworks . The entropy of a network is derived fromthe usual Laplacian spectrum (all eigenvalues are real).By contrast, these measurements cannot be used in thecase of directed networks because the adjacency ma-trix is not Hermitian. However, the magnetic Laplacianmethodology yields a Hermitian operator π» π , which ishere used to define an entropic measurement for directednetworks.Recall that a quantum system at finite temperature, π ,is defined by its respective density matrix, π ( π ) . For anetwork πΊ and charge π , this operator can be expressedin terms of the eigenvalues and eigenvectors associatedto π» π as π π ( π ) 1 π ( π, π ) | π | βοΈ π =1 π β ππ,ππ | π π,π β©β¨ π π,π | . (8)The previously defined density matrix can be used inorder to define measurements associated with a directed(or undirected) network. For instance, by using the pre-vious definition, the concepts of spectral entropy of anetwork can be extended for the directed case by usingthe following equation π ( πΊ, π, π ) = Tr [ π π ( π )Log π π ( π )] , (9)where Log is the matrix logarithm and Tr corresponds tothe trace operation.Given the definition of spectral entropy, we can extendthe entropic dissimilarity between two directed networks,Λ πΊ and πΊ , as π π ( Λ πΊ, πΊ, π, π ) = π ( Λ πΊ, π, π ) β Tr [ Λ π π ( π )Log π π ( π )] . (10)
012 3( a ) 012 3( b ) FIG. 2. The networks in (a) and (b) are isomorphic in thesense that they can be mapped one into the other by changingthe indexes 0 β , β However, as can be noted the term within the tracedepends on the product of distinct matrices. Thus, evenif two networks presented in Fig.2 are isomorphic, themeasure of entropic dissimilarity is nonzero when it de-sirable be null. Another issue related with the entropicsimilarity approach is that measure cannot be used tocompare networks with different number of nodes. Thisis interesting also because the largest weakly connectedcomponent generated by a model does not necessarilyhave the same size as the overall number of nodes. Atthe same time, such measure has a high computationalcost.In this work, we suggest the application of the kernelpolynomial method jointly with the Wasserstein metricin order to quantify the dissimilarity between the directednetworks. It should be emphasized that this combinationof approaches is only possible given that the the magneticLaplacian is a Hermitian operator.
D. Comparasion of large directed networks: The KPMmethod and the Wasserstein Metric
In order to compute the spectral distance between twonetworks it is necessary to compute the spectral density, π π ( π ) = 1 | π | | π | βοΈ π =1 πΏ ( π β π π,π ) (11) which has complexity order π ( | π | ). As such, this ap-proach becomes unfeasible for larger networks ( | π | > ). Fortunately, the magnetic Laplacian matrix is Her-mitian and often sparse, so that the method known askernel polynomial (KPM) can be considered for esti-mating the π π .The KPM objective consists in calculating a simplex { p β R π + : π βοΈ π =1 π π = 1 } which allows to define a discretemeasure πΌ π = π βοΈ π =1 π π,π πΏ π π,π (12)that approximates the Eq.(11) with enough accuracy.This method is based in two approximations. Thefirst is that any continuous real function in an interval[ β ,
1] can be expanded in terms of Chebyshev polyno-mials , allowing the spectral density to be approximatedby π terms. The second approximation consists in eval-uating the traces associated with the terms of that ex-pansion using Hutchinsonβs approach . In essence, thetrace of a sparse matrix function can be aproximatedby the product of this function by a set of random vec-tors. The oscilations induced by these approximationscan be smoothed by subsequently applying a known ker-nel, which in the present work corresponds to the Jack-son kernel . Therefore, the KPM allows the spectrum ofmagnetic Laplacian to be estimated by using algorithmswith near-linear computational cost. In this way, it be-comes possible to estimate the spectral density and mea-surements such as entropy and specific heat even in thecase of very large networks containing million of nodes.Given that it is possible to effectively estimate themagnetic Laplacian spectral density, we can employWasserstein metric in order to define distances betweendirected networks.For instance, let the set of admissible couplings of twoprobability distributions πΌ π and Λ πΌ π , given as π ( πΌ, Λ πΌ ) = { U β R | π |Γ| Λ π | + : U1 | Λ π | = p , U π | π | = Λp } (13)For a π β₯ π π ( π, Λ π, π ) = ββ min π β π ( πΌ, Λ πΌ ) β‘β£βοΈ π,π | π π,π β Λ π π,π | π π π,π β€β¦ββ /π . (14)This function has several desired characteristics, such as:it is a metric, it can be applied to networks with differentnumber of nodes, it has relaxed implementations thatallow the distance value to be obtained with a smallercomputational cost.The task of estimating the value of a parameter usedto generate a given network, such as the connecting prob-ability in the ER model, can be approached by seekingfor a minimum Wasserstein distance between the origi-nal network and a set of π ππ₯π networks synthesized byconsidering several parameters. In this work, we chose aset of π π charges from which the magnetic Laplacians ofeach candidate network is obtained, then KPM is usedto obtain the respective spectra, and the minimal dis-tance between the latter and the original is determinedby using the Wasserstein distance β¨ π π β© ( π ) = 1 π ππ₯π βοΈ π β π ββ π π βοΈ π β π π π ( π, Λ π, π ) ββ . (15) III. RESULTSA. Community structures in network and spectralsymmetries
As a first step to address the problem of characterizingdirected complex networks by using the magnetic Lapla-cian formalism, we derive some analytic and numericalresults relating network structure and the spectrum ofthe magnetic Laplacian operator.First, we aim at studying the influence of communitystructure in directed networks on the magnetic Lapla-cian spectrum and, consequently, on the specific heat, π π .We assume that the connections within the communities, W in , as well as between the communities, W out , are notdifferentiated between the structures. Under this hypoth-esis, the adjacency matrix can be organized as follows,assuming π π communities (henceforth, we take π π > W = β‘β’β’β’β£ W in W out π π . . . π π π π W in W out . . . π π ... ... ... . . . ... W out π π π π . . . W in β€β₯β₯β₯β¦ , (16)where π π is a null matrix π π Γ π π . For generalityβs sake W in and W out can be constructed in arbitrary form.The magnetic Laplacian expressed as discussed abovehas the following organization: H π = β‘β’β’β’β£ H in H out π π . . . H out β H out β H in H out . . . π π ... ... ... . . . ... H out π π π π . . . H in β€β₯β₯β₯β¦ , (17)note that this matrix is circulant, i.e. H π = β‘β’β’β’β£ h h . . . h π π β h π π β h . . . h π π β ... ... . . . ... h h . . . h β€β₯β₯β₯β¦ . (18) Observe that H π is a specific case of a Toepltiz matrix ,so that the eigenvalues can be obtained considering theproperty that all the columns in the original matrix canbe expressed as cyclic permutations of the first column.Our objective now is to find the set { π π’ } such that H π | π π’ β© = π π’ | π π’ β© . (19)As known from literature , the eigenvectors of a cyclicmatrix can be obtained as | π π’ β© = β‘β’β’β’β£ | π β© π π’ | π β© ... π π π β π’ | π β© β€β₯β₯β₯β¦ , (20)where π’ β { , . . . , π π β } and π π’ = π βπ π β π’ = exp( πππ’π π ).Substituting this eigenvector Eq.(20) into Eq.(19), allowsthe block equation induced by the first row to be solvedas ΛH π’ | π π’ β© = π π β βοΈ π =0 h π π π Β· π’ | π π’ β© = π π’ | π π’ β© , (21)The above equation can be simplified introducing thevariable π π = {οΈ π π +12 if π π is odd , π π if π π is even , (22)and by taking into account that H N is Hermitian conse-quently h π = h β π π β π .The simplified version is given as ΛH π’ = h + π π β βοΈ π =1 (οΈ h π π π Β· π’ + h β π π βπ Β· π’ )οΈ + Ξ , (23)where Ξ = {οΈ π π if π π is odd , ( β π’ h π π if π π is even . (24)Since in the flow structure Ξ = π π , and only threeinstances h π’ are non-null, we have ΛH π’ = h + h π π’ + h β π βπ’ , (25)Replacing the operators h by their respective counter-parts in equation Eq.(17), we obtain the following expres-sion for the π’ -th matrix in a network with π π blocks, ΛH π’ = H in + π πππ’ππ H out + π β πππ’ππ H out β . (26)In the following sections we will investigate how distinct H in influence π π . FIG. 3. Specific heat (shown in colors) in terms of the charge2 ππ (polar coordinates) and temperature (radial coordinate)for π π = 3(a), 4(b) and 5(c), assuming π π = 45. This plotwas derived from Equation Eq.(33).
1. Uniform Connections
Uniform connection is characterized by having the de-gree of each vertex given as [ D ππ ] = π = 2 π π β
1. Conse-quently, the intrablock of the magnetic Laplacian is H in = I π π (1 + π ) β π π π , (27)and the interblock defining the connections between themodular structures is given as H out = β exp(2 πππ )2 π π π . (28)Substituting the two previous equations into Eq.(26), ΛH π’ can be obtained as ΛH π’ = I π π (1 + π ) β π π π β π ( π’π π β π ))2 π π π , (29)observe that ΛH π’ is a circulant matrix. Due that let π£ β{ , ..., π π β } , and define π π = {οΈ π π +12 if π π is odd , π π if π π is even , (30)the eigenvalues of ΛH π’ can be obtained as π π’,π£ = β + π π β βοΈ π =1 (οΈ β π π π Β· π£ + β β π π βπ Β· π£ )οΈ + Ξ . (31)where Ξ = {οΈ π π is odd , ( β π£ β π π if π π is even . (32)Replacing β π by their counterparts in Eq.(31) the follow-ing eigenvalue equation can be obtained π π’,π£ = 1 β cos(2 π ( π’π π β π )) π + 2 π (οΈ π ( π’π π β π )) )οΈ π ( π£, π π , π π ) + Ξ , (33) where π ( π£, π π , π π ) = π π β βοΈ π =1 cos( ππ£ππ π ), such that π ( π£, π π , π π ) = {οΈ π π if π£ = 0 , sin( ππ£ππππ )sin( ππ£ππ ) cos( ππ£π π ( π π β . (34)The Eq.(33) indicates a rotation symmetry related tothe charge parameter in the modular directed network.These symmetries also reflect the behavior of the specificheat petal structure shown in Fig.3.
2. Asymmetries in the specific heat petal structures
The results obtained in the previous section helps tounderstand the relationship between the modular struc-tures and the magnetic Laplacian spectrum, as well asthe specific heat symmetry. However, these results as-sume that the inner structures H in are undirected. Theeffect of directionality can be inferred by generating ran-dom directions inside the intrablocks, i.e. by imposingthat [ W in ] π’,π£ has probability π π < π π = 30%, we calculate the specific heatby using numeric diagonalization, yielding the structuresin Fig.4. We can observe the obtained petals are notsymmetric, unlike what had been observed for uniformconnections. B. Model characterization of directed graphs
FIG. 4. Specific heat (colors) in terms of the charge 2 ππ (angle) and temperature (radius), for π π = 3(a), 4(b) and5(c), assuming π π = 45. The networks were generated ran-domly, imposing the probability of having a directed edgeas π π = 30%. Observe the obtained asymmetric petals con-trasting with the results obtained previously for the uniformconnections. In this section we address the task of characterizationof distinct networks models through the spectra of mag-netic Laplacian. In particular, given a set of measure-ments obtained from a graph, can we infer which modelcreated that graph? In this work, we opted to use thespecific heat, π π , as a feature of measurement of graphs,in order to address the question above. As shown inFig.1, the π π measures yielded specific behavior for dif-ferent models, therefore providing valuable informationthat can be use to identify and discriminate between dif-ferent complex networks models.In order to evaluate the efficiency of using π π as a fin-gerprint of a directed network, we built a dataset with2000 network samples with types ErdΛosβRΒ΄enyi (ER),BarabΒ΄asi (BA), BollobΒ΄asβs et al scale-free model (SF),Watts-Strogatz (WS), and SBM with 3 and 4 blocks.Then, self organizing maps (SOMs), namely a methodfor non-supervised clustering , were trained with the ob-tained π π values and the obtained regions were subse-quently labeled. This was done by feeding each trainingdata into the SOM and choosing the neuron that exhib-ited highest activation. As indicated by the results shownin Fig.5, networks belonging to the same class have beenmapped into nearby neurons, defining respective clusters.So, the SOM was able, without previous knowledge tofind the patterns of π π associated to the considered typesof networks.From what we have seen, we can conclude that the sug-gested magnetic Laplacian approach is able, at least forthe considered cases, to properly characterize the modelof given networks. For this reason, in a similar man-ner to that which has been applied in condensed mat-ter physics, βSOMβ proved to be a powerful techniquefor characterizing complex networks when we see thesenetworks through the lens of statistical mechanics andmagnetic Laplacians. neuron index x n e u r o n i n d e x y BAERSFWSflux3flux4 U - m a t r i x d i s t a n c e FIG. 5. SOM mapping of six types of complex networks rep-resented by the specific heat approach. The neuron index x and neuron index y correspond to neurons in the SOM cor-tical space. The distances between neighboring neurons (U-matrix) are indicated in gray. A good separation between thetypes of networks can be observed.
Given that many real-world networks contain a largenumber of nodes, a question arises regarding the feasi-bility using spectral quantities for their characterization.As described in the methodology section, thanks to themagnetic Laplacian formalism, KPM can be used as ameans to estimate spectral density measurements. For .
100 0 .
125 0 .
150 0 .
175 0 .
200 0 .
225 0 . T c Ξ» q = 0 q = 1 / q = 1 / FIG. 6. Approximated specific heat for a network with | π | = 3000, π π = 3, π π = 0 .
25 and π π = 0 .
5. In the ap-plication of KPM method the expansion was truncated at40 first terms and the stochastic trace approximation used25 random vectors. The error-bars represent the deviationbetween the exact value (obtained numerically) and the ap-proximated value calculated by the KPM method and usingnumerical integration. instance, given a modular directed network we obtainedthe exact and KPM-approximated values of the specificheat for different temperatures and charge values. Theapproximated specific heat is shown in Fig.6. The errorbars indicate a small dispersion, corroborating the po-tential of the KPM approach for studying the spectralproperties of complex networks.
C. Directed network parameter Inference
The results shown in Fig.5 indicates that, given a net-work Λ πΊ , we can infer which model was responsible forgenerating it. In addition, to complete the task of char-acterizing a network it is necessary to find the networkwhich most closely resembles Λ πΊ among several networkscreated with distinct parameters while fixing the model.In this section, we explore the problem of inferring theparameters of models using the spectra of the magneticLaplacian..In order to argue that the Wasserstein metric can beused combined with the KPM approach as a means toestimate the network model parameters with sufficientprecision, we study the problem of infering the conectingprobabilities Λ π of ER networks and the out-degree Λ π ofBA networks, both with approximately 10 nodes.In Fig.7 the continuous vertical lines show the correctvalue of the parameter and the vertical dashed lines iden-tify the position of the minimal of Eq.(15), which is theinferred value of the parameter. By using KPM with the100 first terms of the Chebyshev polynomial and approx-imating the trace by using 20 random vectors, we observethe parameters can be inferred with good accuracy. m . . . . . h W i (a) Λ m =2 ; m min =2Λ m =5 ; m min =5 0 . . . . p Γ β (b) Λ p =2 e β ; p min =2 . e β p =4 e β ; p min =3 . e β FIG. 7. The curves in (a) and (b) represent the mean of 1-Wasserstein distances Eq.(15), respectively to BA and ER,in terms of the parameters adopted for network generation,considering π ππ₯π = 5, | π | = 10 , and π = { , / } . Forspectral estimation using the KPM was used 100 terms ofexpansion and 20 random vectors. IV. CONCLUSIONS
Directed networks can be used to represent severalreal-world structures and problems. As a consequence,several approaches have been proposed aimed at charac-terizing and comparing directed networks. Among theseapproaches, spectral methods present some particularlyinteresting properties, such as bearing a direct relation-ship with the structural and dynamical aspects of givennetworks. However, when applied to directed networks,the usual Laplacian operator yields complex eigenvalues,which are difficult to treat and interpret. Nevertheless,the hermiticity property of the magnetic Laplacian al-lows a set of real eigenvalues to be associated with aweighted directed network. We showed here that realeigenvalues and the associated charge parameter conveyinformation about the network, more specifically regard-ing its mesoscale structures and the spectral and specificheat symmetry.In order to extend the proposed methodology to largernetworks containing hundreds of thousands of nodes, weshowed the KPM method can be combined with the mag-netic Laplacian approach. This combination allowed toestimate the spectral density of the magnetic operatorwith remarkable efficiency and accuracy. Given thatwe could estimate the spectral density of the magneticLaplacian, we showed that the study of spectral geome-try under the Wasserstein metric can be used as a toolto infer parameters of networks with low relative errors.The reported contributions pave the way to a num-ber of future developments and applications involvingdirected complex networks. For instance, these meth-ods can be applied to study several other theoretical andreal world structures, including fake news dissemination,metabolic networks, neuronal systems, to name but afew possibilities. It would also be interesting to performstudies using random matrix theory in order to infer rela-tionships between topology and spectra for more generalcomplex networks. Since we deal only with spectral in-formation, the results presented in this paper could alsobe immediately applied to multiplex networks.
ACKNOWLEDGEMENTS
The authors thank Thomas Peron, Henrique F. de Ar-ruda, Paulo E. P. Burke and Filipi N. Silva for all sug-gestions and useful discussions. Bruno Messias thanksCAPES for financial support. Luciano da F. Costathanks CNPq (grant no. 307085/2018-0) and NAP-PRP-USP for sponsorship. This work has been supported alsoby FAPESP grant 15/22308-2. Research carried out us-ing the computational resources of the Center for Math-ematical Sciences Applied to Industry (CeMEAI) fundedby FAPESP (grant 2013/07375-0).
DATA AVAILABLITY
Data sharing is not applicable to this article as no newdata were created or analyzed in this study. However,our implementation of KPM method it is available atgithub.com/stdogpkg/emate. In addition eMaTe also al-lows to estimate trace functions of symmetric adjacencymatrices with a good accuracy and computational effi-ciency. M. Kac, βCan one hear the shape of a drum?β The AmericanMathematical Monthly , 1β23 (1966). O. Giraud and K. Thas, βHearing shapes of drums: Mathemati-cal and physical aspects of isospectrality,β Rev. Mod. Phys. ,2213β2255 (2010). D. Aasen, T. Bhamre, and A. Kempf, βShape from sound: To-ward new tools for quantum gravity,β Physical Review Letters (2013), 10.1103/physrevlett.110.121301. L. Cosmo, M. Panine, A. Rampini, M. Ovsjanikov, M. M. Bron-stein, and E. Rodol`a, βIsospectralization, or how to hear shape,style, and correspondence,β (2018). D. M. CvetkoviΒ΄c, βGraphs and their spectra,β Publikacije Elek-trotehniΛckog fakulteta. Serija Matematika i fizika , 1β50 (1971). E. R. van Dam and W. H. Haemers, βWhich graphs are deter-mined by their spectrum?β Linear Algebra and its Applications , 241β272 (2003). C. Sarkar and S. Jalan, βSpectral properties of complex net-works,β Chaos: An Interdisciplinary Journal of Nonlinear Science , 102101 (2018). J. Wang, R. C. Wilson, and E. R. Hancock, βDetectingalzheimerβs disease using directed graphs,β in
Graph-Based Rep-resentations in Pattern Recognition (Springer International Pub-lishing, 2017) pp. 94β104. K. Anand and G. Bianconi, βEntropy measures for networks:Toward an information theory of complex topologies,β Phys. Rev.E , 045102 (2009). M. Dehmer and A. Mowshowitz, βA history of graph entropymeasures,β Information Sciences , 57β78 (2011). C. Ye, C. H. Comin, T. K. D. Peron, F. N. Silva, F. A. Rodrigues,L. d. F. Costa, A. Torsello, and E. R. Hancock, βThermody-namic characterization of networks using graph polynomials,βPhys. Rev. E , 032810 (2015). M. De Domenico and J. Biamonte, βSpectral entropies asinformation-theoretic tools for complex network comparison,βPhys. Rev. X , 041062 (2016). C. Nicolini, V. Vlasov, and A. Bifone, βThermodynamics of net-work model fitting with spectral entropies,β Phys. Rev. E ,022322 (2018). J. D. Hart, J. P. Pade, T. Pereira, T. E. Murphy, and R. Roy,βAdding connections can hinder network synchronization of time-delayed oscillators,β Phys. Rev. E , 022804 (2015). G. Berkolaiko, βNodal count of graph eigenfunctions via magneticperturbation,β Analysis & PDE , 1213β1233 (2013). M. Fanuel, C. M. AlaΒ΄Δ±z, and J. A. K. Suykens, βMagnetic eigen-maps for community detection in directed networks,β Phys. Rev.E , 022302 (2017). S. Furutani, T. Shibahara, M. Akiyama, K. Hato, and M. Aida,βGraph signal processing for directed graphs based on the her-mitian laplacian,β in
Machine Learning and Knowledge Discov-ery in Databases , edited by U. Brefeld, E. Fromont, A. Hotho,A. Knobbe, M. Maathuis, and C. Robardet (Springer Interna-tional Publishing, Cham, 2020) pp. 447β463. L. Kantorovitch, βOn the translocation of masses.β C. R. (Dokl.)Acad. Sci. URSS, n. Ser. , 199β201 (1942). V. I. Bogachev and A. V. Kolesnikov, βThe monge-kantorovichproblem: achievements, connections, and perspectives,β RussianMathematical Surveys , 785β890 (2012). G. PeyrΒ΄e and M. Cuturi, βComputational optimal transport,βFoundations and Trends R β in Machine Learning , 355β206(2019). B. BollobΒ΄as, C. Borgs, J. Chayes, and O. Riordan, βDirectedscale-free graphs,β in
Proceedings of the fourteenth annual ACM-SIAM symposium on Discrete algorithms (Society for Industrialand Applied Mathematics, 2003) pp. 132β139. Y. C. de Verdi`ere, βMagnetic interpretation of the nodal defecton graphs,β Analysis & PDE , 1235β1242 (2013). E. H. Lieb and M. Loss, βFluxes, laplacians, and kasteleynβs theo-rem,β in
Statistical Mechanics (Springer Berlin Heidelberg, 1993) pp. 457β483. K. Blum,
Density matrix theory and applications , Vol. 64(Springer Science & Business Media, 2012). A. WeiΓe, G. Wellein, A. Alvermann, and H. Fehske, βThe kernelpolynomial method,β Rev. Mod. Phys. , 275β306 (2006). J. P. Boyd,
Chebyshev and Fourier Spectral Methods: SecondRevised Edition (Dover Books on Mathematics) (Dover Publica-tions, 2001). M. Hutchinson, βA stochastic estimator of the trace of the influ-ence matrix for laplacian smoothing splines,β Communicationsin Statistics - Simulation and Computation , 433β450 (1990). D. Jackson, βOn approximation by trigonometric sums and poly-nomials,β Transactions of the American Mathematical Society , 491β491 (1912). R. M. Gray, βToeplitz and circulant matrices: A review,β Founda-tions and Trends R β in Communications and Information Theory , 155β239 (2005). B. BollobΒ΄as, C. Borgs, J. Chayes, and O. Riordan, βDirectedscale-free graphs,β in
Proceedings of the Fourteenth AnnualACM-SIAM Symposium on Discrete Algorithms , SODA β03 (So-ciety for Industrial and Applied Mathematics, Philadelphia, PA,USA, 2003) pp. 132β139. A. A. Shirinyan, V. K. Kozin, J. Hellsvik, M. Pereiro, O. Eriks-son, and D. Yudin, βSelf-organizing maps as a method for de-tecting phase transitions and phase identification,β Phys. Rev. B99