Two-Walks degree assortativity in Graphs and Networks
Degree ssortativity is the tendency for nodes of high degree (resp. low degree) in a graph to be connected to high degree nodes (resp. to low degree ones). It is usually quantified by the Pearson correlation coefficient of the degree-degree correlation. Here we extend this concept to account for the effect of second neighbours to a given node in a graph. That is, we consider the two-walks degree of a node as the sum of all the degrees of its adjacent nodes. The two-walks degree assortativity of a graph is then the Pearson correlation coefficient of the two-walks degree-degree correlation. We found here analytical expression for this two-walks degree assortativity index as a function of contributing subgraphs. We then study all the 261,000 connected graphs with 9 nodes and observe the existence of assortative-assortative and disassortative-disassortative graphs according to degree and two-walks degree, respectively. More surprinsingly, we observe a class of graphs which are degree disassortative and two-walks degree assortative. We explain the existence of some of these graphs due to the presence of certain topological features, such as a node of low-degree connected to high-degree ones. More importantly, we study a series of 49 real-world networks, where we observe the existence of the disassortative-assortative class in several of them. In particular, all biological networks studied here were in this class. We also conclude that no graphs/networks are possible with assortative-disassortative structure.
Networks represent the topological skeleton of a wide range of systems in nature and society [1, 2, 3, 4]. The characterization of their structure is crucial since it shapes the evolutionary, functional, and dynamical processes that take place in those systems [4, 5, 6].
It is well known that links generally do not connect nodes regardless of their characteristics. In social networks, for instance, evidence suggests that individuals prefer to associate with others of similar age, religion, education or occupation as themselves . Assortativity or assortative mixing is a graph metric that refers to the tendency for nodes in networks to be connected to other nodes that are similar (or different) to themselves in some way . Typically, it is determined for the degree (i.e. the number of direct neighbours, k) of the nodes in the network [9, 10, 11, 12]. The tendency for high-degree nodes to associate preferentially with other high-degree nodes plays a major role in many important processes, such as epidemic spreading, synchronization or network robustness, among others [9, 13, 14, 15, 16]. However, assortativity may be applied to any characteristics of a node, including non-topological vertex properties, such as language or race . Most of the research done in this area has been summarized in the review of Noldus et al. . Other extensions to account for interactions beyond the nearest-neighbours have also been proposed in the recent literature .
The aim of this work is to define an assortativity index that captures the influence of first and second neighbours of a node. We then express this two-walks assortativity in terms of the subgraphs contributing to it.
Here we consider simple, undirected graphs , i.e., graphs without multiple edges, self-loops, directions or weights in their edges. The notation used is standard and the reader can check for instance . Let us define some of the measures used in this work in order to make it self-contained. First, we define the degree assortativity index . Mathematically, it is written as:
where and are the degrees at both ends of link and is the number of links. A positive assortativity index indicates the tendency of higher degree nodes in the graph to be connected to other higher degree nodes. On the other hand, indicates the tendency of higher degree nodes to be connected to lower degree nodes. It was previously proved the following result .
Let be a simple graph. Let be the degree of the vertex . Let the number of edges, and the paths of length two and three, respectively, be the number of triangles in . Then, the assortativity coefficient can be written combinatorially as:
Let the ratio , the number of star graphs of four nodes, and . Then:
assortative (): if and only if ,
neutral (): if and only if , and , and
disassortative (): if and only if
It is worth mentioning that the denominator of Eq. 2.2 is non-negative. Consequently, the sign of depends only upon the sign of the numerator, which is determined by the following structural factors: the global clustering coefficient (i.e. ), the intermodular connectivity (i.e. ) and the branching (i.e. ) .
The number of subgraphs contributing to the degree assortativity can be obtained using the following results .
Let be a simple graph. Let be the degree of the vertex . Let be the number of triangles in . Then, the number of edges , path of length two and three are given, respectively by
Let be a simple graph. Let be the degree of the vertex in . Let be the adjacency matrix of . Let and be respectively the number of edges and the number of paths of length two in . Let be the number of subgraphs in (see Table 1). Let be the number of cycles of nodes in . Then, , and are given, respectively by
Let be a simple graph. Let be the degree of the vertex . Let be the adjacency matrix of . Let , , , , and be the number of subgraphs , , , , and , respectively, in (see Table 1). Then,
where , , is an all-x vector and denotes the Hadamard product.
3. Two-Walks Degree assortativity in Graphs and Networks
Let us start by the definition of the degree of a node , . The intuition behind this index is very simple. Every nearest neighbour of the node receives an identical weight of . Then, we sum the weights of every node adjacent to to obtain . Mathematically, this corresponds to obtaining the following vector after assigning the unit weights to every node:
where is an all-ones vector. The intuition behind this index is very simple.
It is customary to consider that not all the neighbours of one particular node are equally important. This is the basis for instance of Katz centrality index , eigenvector centrality , PageRank , subgraph centrality  and so for. Then, we can consider that every neighbour of the node is weighted according to its “importance”. Of course, the definition of that importance will define the way in which we will proceed. In order to consider the current development as an extension of the concept of node degree we simply weight every node by its own degree. That is, now we consider the vector as the weighting vector for the nodes of the graph. Consequently, an extension of the concept of degree is given by applying a similar procedure as in (3.1) to ,
It is straightforward to realize that . Then, obviously, the entries of this new vector represent a new kind of centrality of the nodes which counts the number of two-walks starting at the corresponding node. Consequently, we suggest the name of "two-walks" degree for the entries of . Let us call the th entry of in a graph. Notice that accounts for the degree of the node , i.e., closed walks of length two, as well as for the number of second neighbours of this node. Then,
where is the neighbourhood of the node , i.e., . That is, the two-walks degree represents the number of weighted neighbours that the node has, where the weight of the nodes is given by its own degree.
Let us now define a quantity analogous to the degree assortativity index based on the two-walks degrees instead of on the node degrees.
Let be a connected simple graph with adjacency matrix and let be the two-walks degree of the vertex . The two-walks degree assortativity index of a graph is defined as
Obviously, this quantity tell us how well connected the most important nodes in a graph are. That is, if , the graph is two-walks degree assortative, which means that the most weighted nodes in terms of the degree of their neighbours tend to be connected to each other. On the other hand, if if , the graph is two-walks degree disassortative, which means that the most weighted nodes in terms of the degree of their neighbours tend to be connected to those with least weight. If , neither of these two tendencies is observed and we shall call such graphs neutral.
In Fig. 3.1 we represent a graph which is strongly disassortative for the degree () but it is assortative for the two-walks degree index (). We plot the graph with the nodes weighted by the difference between the degree (resp. two-walks degree) minus the average degree (resp. average two-walks degree). The negative values are colored in red and the positive contributions in blue. The size of the nodes is proportional to the absolute value of this difference. As can be seen in this picture the degree-degree interaction between the nodes (left panel) is dominated by red-blue interactions, which indicates a large number of interactions between high degree nodes (blue ones) with low degree ones (red nodes). This of course results in a negative degree assortativity coefficient. On the other hand, for the two-walks degree plot the graph is dominated by blue-blue and red-red interactions. That is, nodes of high two-walks degree interact with each other, and low two-walks degree nodes also interact preferentially among them. This effects result in a two-walks degree assortativity coefficient.
With the new correlation coefficient introduced here we assess the tendency of neighbourhoods with many interactions to be connected to other ”high-connected” neighbourhoods. However, in order for a graph to display a transition from degree diassortative to two-walks degree assortative it is necessary that there are separator nodes between the high-degree nodes. The graph in Fig. 3.1 has a separator, which is the node of degree 2 connecting both nodes of degree 3 and 5. A separator must be a low-degree node which connects two or more high-degree ones. Notice that if the number of high-degree nodes connected to the separator is too high, it will produce an increase in its own degree, which decreases its chances of being a proper separator. This characteristic–a separator connected to two high-degree nodes–introduces disassortativity to the graph. However, in term of the second-order correlation a separator allow the two-steps interactions between hubs, which results in two-walks degree assortativity. Mathematically, it is not difficult to see that the two-walks degree is related to walks of length two between node.
It is easy to realize that the two-walks degree assortativity can be written in matrix-vector form in the following way:
4. Main Result
Our main result here consists on the determination of the two-walks degree assortativity of a graph in terms of contributing subgraphs of the graph. This allows us to understand this quantity in structural terms for the analysis of real world systems in further sections of this work.
Let be a simple graph. Then, is, in terms of two-walks degree,
i) assortative if ,
ii) neutral if ,
iii) disassortative if ,
and and .
First, we prove that the denominator of the expression (3.5) is always non-negative.
Let be a connected simple graph with adjacency matrix . Let and be vectors of the nodes degrees and a vector of nodes two-walks degrees, respectively. Then,
where is the network’s number of edges, is an all-ones vector and denotes the Hadamard product.
By the Cauchy-Bunyakovsky-Schwarz inequality:
Then, we have
As is a connected simple graph, and the maximum degree in the graph is , then, , and hence the last term is always greater than or equal to zero, which proves the result. ∎
What remains now for the proof of the main result is to express the numerator of the Pearson coefficient of the two-walks degree - two-walks degree correlation in terms of subgraphs of the graph (reminding that when the denominator is equal to zero, the Pearson Correlation coefficient is not defined). We can write as follow
where and are the two-walks degrees of nodes and , respectively, located at both ends of link . We can now rewrite the sums in Eq. (4.5) as:
Let us now find the expressions for the two terms contributing to . The first is given by
where and are the number of paths of order and , respectively, and is the number of fragments which are illustrated in Table 1. We will give formulas for calculating these fragments for the sake of completeness of the paper.
For the second term contributing to we have
Thus, we can rewrite as:
which proves the main result.
Let us now give the formulas for calculating the subgraphs remaining in the expression of the two-walks degree assortativity which have not been previously defined. The proofs of these results are based on the strategy developed and explained in  and are not given here as they are lengthly and technical.
Let be a simple graph. Let be the degree of the vertex . Let be the number of subgraphs (see Table 1). Then,
Let be a simple graph. Then, the number of subgraphs and in are given by, respectively,
5. Computational results
5.1. Small graphs
In this Section we describe the results obtained for all the 261,000 connected graphs with 9 unlabelled nodes. We have calculated the degree and two-walks degree assortativities for these graphs (see Fig. 5.1). As we can see there is no trivial correlation between the two indices, which indicates that the new index does not duplicate the structural information contained in the degree assortativity and consequently gives some new structural insights about graphs. This conclusion is also easily obtained by considering the subgraph contributions to both measures.
According to computer calculations 7% of the networks are assortative-assortative by both measures (AA), 60% are disassorartive-disassortative (DD) and 33% are disassortative by degree and assortative by two-walks degree (DA). The main observation is that there are no graphs which are degree assortative and two-walks degree disassortative (AD). We conjecture that these graphs cannot exist. Computer calculations show that . Therefore, we can express the numerator of the neighbourhood assortativity Eq. (4.10) as follows:
Using the results from , if , then . The intuition behind this result is very simple. Nodes that belong to a degree assortativitive network tend to be linked to other nodes with similar degree. Therefore, their two-walks degrees tend to be similar too.
Generally, the second-neighbour degree assortativity depends on the balance between four structural factors: the weighted sum of subgraphs given by , transitivity (), intermodular connectivity (), relative branching (). The first three produce a positive contribution to the two-walks degree assortativity of a network, while branching is more likely associated with disassortative networks.
5.2. Real-world networks
In this subsection we study of group of 49 real-world networks representing systems in ecological (E), biological (B), social (S), technological (T) and socio-economic (SE) envirnments. The networks are described in the Appendix of this paper. We have calculated the degree and two-walks degree assortativities for these networks (see Fig. 5.2). According to these results 14% of the networks are assortative-assortative (AA) according to both measures, 24% are disassorartive-disassortative (DD) and the majority of networks analyzed (61%) are diassortative-assortative (DA). This confirms our previous observation that there are no graphs/networks which are assortative-disassorartive (AD). The analysis of the networks according to the functions shows the following trends: 53% of the ecological networks analyzed are DD, 27% are DA and 20% are AA; 50% of the social networks analyzed are DA, 30% are AA and 20% are DD; 80% of technological networks are DA, 10% are AA and 10% are DD. Finally, 100% of biological networks considered are DA. They included 9 protein-protein interaction networks (PINs), 3 transcription networks and 3 brain networks. This is a remarkable observation because it is the only single functional class of networks which is formed by one structural class, i.e., DA.
An important characteristic of our current approach is that we can understand the structural causes for the different kinds of assortativity in networks using the interpretation of these quantities in terms of subgraphs of the graph. As we have seen before an important structural feature of graphs allowing the transition from degree disassortative to two-walks degree assortative is the presence of separators. It has to be stressed that this is not a unique structural feature of this kind of networks and more studies are needed to completely understand the structural chracterization of this kind of networks. However, it is easy to visualize the connectors in the small PIN of the bacterium B. subtilis (see left panel in Fig. 5.3). In Fig. 5.3 we also illustrate the degree and two-walks degree of the nodes in the food web of ScotchBroom and in the transcription network of E. coli. All of them displaying DA characteristics.
Here we have proposed an extension of the concept of degree assortativity to one that account for thecorrelation between the degrees of the nodes and their nearest neighbours in graphs and networks. This measure, here named the two-walks degree assortativity, is expressed in terms of subgraphs of the graph. As we have proved here there are a few more fragments contributing to the two-walks degree assortativity than to the degree assortativity. This clearly indicates that the new quantity accounts for more structural information than the previous one. We have seen that both measures are not linearly correlated neither for all the connected graphs with 9 nodes nor for real-world networks. Further studies are needed to understand the role of this quantity in the study of real-world problems, as we have seen here, there are some apparently universal features of some classes of networks in relation to this quantity. For instance, all real-world biological networks studied here are degree disassortative but two-walks assortative. The implications of this observation for the study of the biological processes taking place on these networks is far beyond the scope of this work.
Appendix: Real-world network dataset
The real-world networks used in this paper belong to different domains: ecological (includes food webs and ecosystems), social (networks of friendships, communication networks, corporate relationships), technological (internet, transport, software development networks), informational (vocabulary networks, citations) and biological (protein-protein interaction networks, transcriptional regulation networks). The dataset comprises networks of different sizes, ranging from to nodes. The networks are listed in Table 2.
|49||USA Air 97||technological||332||2126||||-0.208||-0.000|
-  R. Albert and A.-L. Barabási, “Statistical mechanics of complex networks”, Rev. Mod. Phys. 74, 47 (2002).
-  M. E. J. Newman, “The Structure and Function of Complex Networks”, SIAM Rev. 45, 167 (2003).
-  S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and D.-U. Hwang, “Complex networks: Structure and dynamics”, Phys. Rep. 424, 175 (2006).
-  S. H. Strogatz, “Exploring complex networks”, Nature (London) 410, 268 (2001).
-  A. Barrat, M. Barthélemy, and A. Vespignani, Dynamical Processes on Complex Networks (Cambridge University Press,UK, 2008).
-  L. D. F. Costa, F. A. Rodrigues, G. Travieso, and P. R. V. Boas, “Characterization of complex networks: A survey of measurements”, Adv. Phys. 56, 167 (2007).
-  M. McPherson, L. Smith-Lovin and J. M. Cook, “Birds of a feather: Homophily in social networks”, Annual Review of Sociology 27: 415 (2001).
-  M. E. J. Newman, “Mixing patterns in networks”, Phys. Rev. E 67, 026126 (2003)
-  M. E. J. Newman, “Assortative Mixing in Networks”, Phys. Rev. Lett. 89, 208701 (2002).
-  R. Pastor-Satorras, A. Vázquez, and A. Vespignani, “Dynamical and Correlation Properties of the Internet”, Phys. Rev. Lett. 87, 258701 (2001).
-  E. Estrada, “Combinatorial study of degree assortativity in networks”, Phys. Rev. E 84, 047101 (2011).
-  M. Piraveenan, M. Prokopenko and A. Zomaya, “Local assortativeness in scale-free networks”, Europhys. Lett. 84, 28002 (2008).
-  M. E. J. Newman and J. Park, “Why social networks are different from other types of networks”, Phys. Rev. E 68, 036122 (2003).
-  V. M. Eguíluz and K. Klemm, “Epidemic Threshold in Structured Scale-Free Networks”, Phys. Rev. Lett. 89, 108701 (2002).
-  M. Boguñá, R. Pastor-Satorras, and A. Vespignani, “Absence of Epidemic Threshold in Scale-Free Networks with Degree Correlations”, Phys. Rev. Lett. 90, 028701 (2003).
-  M. Di Bernardo, F. Garofalo, and F. Sorrentino, “Effects of degree correlation on the synchronization of networks of oscillators”, Int. J. of Bifurcation and Chaos 17, 3499 (2006).
-  R. Noldus and P. Van Mieghem, “Assortativity in complex networks”, Journal of Complex Networks 3, 507 (2015).
-  A. Allen-Perkins, Javier Galeano, and J. M. Pastor, “Inducing self-organized criticality in a network toy model by neighborhood assortativity”, Phys. Rev. E 94, 052304 (2016).
-  E. Estrada, The structure of complex networks. Theory and Applications (Oxford University Press, UK, 2012).
-  N. Alon, R. Yuster, and U. Zwick, “Finding and counting given length cycles”, Algorithmica 17, 3 (1997).
-  L. Katz, “A new status index derived from sociometric analysis”, Psychometrica 18, 1 (1953).
-  P. Bonacich, “Factoring and weighting approaches to status scores and clique identification”, J. Math. Sociol. 2, 1 (1972).
-  S. Brin and L. Page, “The anatomy of a large-scale hypertextual Web search engine”, Comput. Net. ISDN Syst. 33, 1-7 (1998).
-  E. Estrada and J.A. Rodríguez-Velázquez, “Subgraph centrality in complex networks”, Phys. Rev. E 71, 056103 (2005).
-  E. Estrada, and P. Knight, A First Course on Network Theory (Oxford University Press, UK, 2012).
-  L. Giot, J. S. Bader, C. Brouwer, A. Chaudhuri, B. Kuang, Y. Li, Y. Hao, C. Ooi, B. Godwin, E. Vitols, and others, “ A protein interaction map of drosophila melanogaster”, Science 302, 5651 (2003).
-  C-Y. Lin, C-L. Chen, C-S. Cho, L-M. Wang, C-M. Chang, P-Y. Chen, C-Z. Lo, and C.A. Hsiung, “hp-DPI: Helicobacter pylori database of protein interactomesembracing experimental and inferred interactions”, Bioinformatics 21, 7 (2005).
-  P. Uetz,Y-A. Dong, C. Zeretzke, C. Atzler, A. Baiker, B. Berger, S.V. Rajagopala, M. Roupelieva, D. Rose, E. Fossum, and others, “Herpesviral protein networks and their interaction with the human proteome”, Science 311, 5758 (2006).
-  O. Sporns and R. Kötter, “Motifs in brain networks”, PLoS Biol. 2, 11 (2004).
-  D.J. LaCount, M. Vignali, R. Chettier, A. Phansalkar, R. Bell, J.R. Hesselberth, L.W. Schoenfeld, I. Ota, S. Sahasrabudhe, C. Kurschner, and others, “A protein interaction network of the malaria parasite Plasmodium falciparum”, Nature 438, 7064 (2005).
-  J.G. White, E. Southgate, J.N. Thomson, and S. Brenner, “The structure of the nervous system of the nematode Caenorhabditis elegans”, Philos Trans R Soc Lond B Biol Sci 314, 1165 (1986).
-  M. Motz, I. Kober, C. Girardot, E. Loeser, U. Bauer, M. Albers, G. Moeckel, E. Minch, H. Voss, C. Kilger, and others, “Elucidation of an archaeal replication protein network to generate enhanced PCR enzymes”, Journal of Biological Chemistry 277, 18 (2002).
-  P. Noirot and M.F. Noirot-Gros, “Protein interaction networks in bacteria”, Current opinion in microbiology 7, 5 (2004).
-  G. Butland, J.M. Peregrín-Alvarez, J. Li, W. Yang, X. Yang, V. Canadien, A. Starostine, D. Richards, B. Beattie,N. Krogan, and others, “Interaction network containing conserved and essential protein complexes in Escherichia coli”, Nature 433, 7025 (2005).
-  J.-F. Rual, K. Venkatesan, T. Hao, T. Hirozane-Kishikawa, A. Dricot, N. Li, G. F. Berriz, F. D. Gibbons, M. Dreze, N. Ayivi-Guedehoussou, and others, “Towards a proteome-scale map of the human protein-protein interaction network”, Nature 437, 7062 (2005).
-  R. Milo, S. Itzkovitz, N. Kashtan, R. Levitt,S. Shen-Orr, I. Ayzenshtat, M. Sheffer, and U. Alon, “Superfamilies of evolved and designed networks”, Science 303, 5663 (2004).
-  P. Yodzis, “Diffuse effects in food webs”, Ecology 81, 1 (2000).
-  G.A. Polis, “Complex trophic interactions in deserts: an empirical critique of food-web theory”, The American Naturalist 138,123–155 (1991).
-  C.R. Townsend, “Disturbance, resource supply, and food-web architecture in streams”, Ecology Letters 1,200–2009 (1998).
-  R.R. Christian and J.J. Luczkovich, “Organizing and understanding a winter’s seagrass foodweb network through effective trophic levels”, Ecological modelling 117, 1 (1999).
-  P.H. Warren, “Spatial and temporal variation in the structure of a freshwater food web”, Oikos 299-311 (1989).
-  D.P. Reagan and R.B. Waide, The food web of a tropical rain forest, (University of Chicago Press, 1996).
-  S. Opitz, Trophic interactions in Caribbean coral reefs Vol. 1085, (WorldFish, 1996).
-  J. Memmott, N.D. Martinez and J.E. Cohen, “Predators, parasitoids and pathogens: species richness, trophic generality and body sizes in a natural food web”, Journal of Animal Ecology 69, 1 (2000).
-  J. Link, “Does food web theory work for marine ecosystems?”, Marine ecology progress series 230 (2002).
-  P. Yodzis, “Diffuse effects in food webs”, Ecology 81, 1 (2000).
-  L. Goldwasser and J. Roughgarden, “Construction and analysis of a large Caribbean food web”, Ecology 74, 4 (1993).
-  Neo D. Martinez, “Artifacts or attributes? Effects of resolution on the Little Rock Lake food web”. Ecological Monographs 61, 4 (1991).
-  D. Baird and R.E. Ulanowicz, “The seasonal dynamics of the Chesapeake Bay ecosystem”, Ecological monographs 59, 4 (1989).
-  M. Huxham, S. Beaney, and D. Raffaelli,“Do parasites reduce the chances of triangulation in a real food web?”, Oikos 284-300 (1996).
-  V. Batagelj and A. Mrvar, ”Analysis of large networks”, Pajek workshop at XXVI Sunbelt Conference (2006).
-  V. Batagelj and A. Mrvar, Pajek datasets, url=http://vlado.fmf.uni-lj.si/pub/networks/data/ (2001),
-  J.J. Potterat, L. Phillips-Plummer, S.Q. Muth, R.B. Rothenberg, D.E. Woodhouse, T.S. Maldonado-Long, H.P. Zimmerman, and J.B. Muth, “Risk network structure in the early epidemic phase of HIV transmission in Colorado Springs”, Sexually transmitted infections 78, suppl 1 (2002).
-  G.F. Davis, M. Yoo, and W.E. Baker, “The small world of the American corporate elite, 1982-2001”, Strategic organization 1, 3 (2003).
-  D. Lusseau, K. Schneider, O. Boisseau, P. Haase, E. Slooten, and S.M. Dawson, “The bottlenose dolphin community of Doubtful Sound features a large proportion of long-lasting associations”, Behavioral Ecology and Sociobiology 54, 4 (2003).
-  D. Krackhardt, “The ties that torture: Simmelian tie analysis in organizations”, Research in the Sociology of Organizations 16, 1 (1999).
-  D. MacRae, “Direct factor analysis of sociometric data”, Sociometry 23, 4 (1960).
-  J.H. Michael and J.G. Massey, “Modeling the communication network in a sawmill”, Forest Products Journal 47, 9 (1997).
-  L.D. Zeleny, “Adaptation of research findings in social leadership to college classroom procedures”, Sociometry 13, 4 (1950).
-  W.W. Zachary, “An information flow model for conflict and fission in small groups”, Journal of anthropological research 33, 4 (1977).
-  R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon, “Network motifs: simple building blocks of complex networks”, Science 298, 5594 (2002).
-  D.J. Watts and S.H. Strogatz, “Collective dynamics of small-world networks”, Nature 393, 6684 (1998).
-  C.R Myers, “Software systems as complex networks: Structure, function, and evolvability of software collaboration graphs”, Phys. Rev. E 68, 046116 (2003).