TOPICS
Search

Graph Assortativity


Graph assortativity, also called assortative mixing, is the tendency of adjacent vertices in a graph to have similar attributes. The attributes may be numerical or categorical. For an undirected graph G with m>0 edges, let A=(A_(ij)) be its adjacency matrix, let d_i be the vertex degree of graph vertex v_i, and assign the numerical scalar value x_i to v_i. The mean value at the end of a uniformly chosen edge and, when the corresponding variance is nonzero, the assortativity coefficient for these attributes are

mu_x=1/(2m)sum_(i)d_ix_i,
(1)
r_x=(sum_(ij)A_(ij)(x_i-mu_x)(x_j-mu_x))/(sum_(i)d_i(x_i-mu_x)^2).
(2)

Thus, r_x is the correlation coefficient of the values at the two ends of a randomly oriented edge. Positive, zero, and negative values indicate assortative, neutral, and disassortative mixing, respectively (Newman 2003).

For an unlabeled simple graph, the standard choice is x_i=d_i. The resulting r=r_d is the degree assortativity coefficient: the Pearson correlation coefficient of the vertex degrees at the two ends of an edge (Newman 2002). The Wolfram Language function GraphAssortativity[g] returns r. This degree-based scalar is not the graph modularity of G. Newman's equivalent formula uses the excess degrees d_i-1 (Newman 2003). Subtracting the same constant at both ends does not change a correlation coefficient.

Categorical assortativity, also called discrete assortative mixing, is different. Let A={A_1,...,A_s} be a set partition of the vertex set. Its mixing matrix e=(e_(ab)) and marginal fractions a_a are

e_(ab)=1/(2m)sum_(v_i in A_a)sum_(v_j in A_b)A_(ij)
(3)
a_a=sum_(b)e_(ab)=(vol(A_a))/(2m),
(4)

where vol(A_a) is the sum of the vertex degrees in A_a. When its denominator is nonzero, the categorical assortativity coefficient is

r_(cat)=(sum_(a)e_(aa)-sum_(a)a_a^2)/(1-sum_(a)a_a^2),
(5)
q_A(G)=sum_(a)(e_(aa)-a_a^2)=sum_(A in A)((e(A))/m-(vol(A)^2)/(4m^2)).
(6)

Here, e(A) is the number of edges with both endpoints in A. For categorical data specified by a set partition, GraphAssortativity[g, partition, "Normalized" -> False] returns q_A(G), exactly the graph modularity score of the supplied set partition. The default GraphAssortativity[g, partition] returns r_(cat), dividing this score by its available maximum 1-sum_(a)a_a^2 for the fixed marginal fractions a_a.


See also

Adjacency Matrix, Correlation Coefficient, Graph Modularity, Set Partition, Vertex Degree

Explore with Wolfram|Alpha

References

Newman, M. E. J. "Assortative Mixing in Networks." Phys. Rev. Lett. 89, 208701, 2002. https://doi.org/10.1103/PhysRevLett.89.208701.Newman, M. E. J. "Mixing Patterns in Networks." Phys. Rev. E 67, 026126, 2003. https://doi.org/10.1103/PhysRevE.67.026126.Newman, M. E. J. and Girvan, M. "Finding and Evaluating Community Structure in Networks." Phys. Rev. E 69, 026113, 2004. https://doi.org/10.1103/PhysRevE.69.026113.

Cite this as:

Weisstein, Eric W. "Graph Assortativity." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/GraphAssortativity.html

Subject classifications