Chapter 6 �Centrality & Assortative Mixing
Summary
Reading
How important is a node in a network?
We can measure nodes importance using so-called centrality.
Bad term: �nothing to do with being central in general
Usage:
Where are you?
It is always possible, once fixed a context, to measure our distance from a “focal” node.
For instance:
Movie Stars:
Researchers:
Are such “focal” nodes really different from the others?
Degree Centrality
k = number of links
1 if i and j are connected,
Ai,j � 0 otherwise
How many neighbors does a node have?
Often enough to find important nodes
(e.g., main characters of a tv series talk with more people)
But not always
g
d
c
e
a
f
b
h
i
k
j
k(g) = 1
k(a) = 4
k(b)=2
Degree Example
Connectivity-based centralities
“influence based on the number of links a node has to other nodes in the network”
Recursive definitions
Recursive importance:
Important nodes are those connected to important nodes
Several centralities based on this idea:
Idea:
xi is the centrality of node i
How to solve it (power method):
Does it converge?
Yes, if the graph is undirected with a single connected component (Perron-Frobenius theorem)
Eigenvector Centrality
A pair of eigenvector (x) and eigenvalue (λ) is defined by the relation:
Ax = λx
Problems:
In case of DiGraphs:
In presences of source nodes (0 in-degree):
g
d
c
e
a
f
b
h
i
k
j
Eigenvector Example�
PageRank
Main idea: The PageRank computation can be interpreted as a Random Walk process with restart
Probability that the RW will be in node i next step depends only on the current node j and the transition probability� j ➝ i determined by the stochastic matrix
g
d
c
e
a
f
b
h
i
k
j
PR(a) = PR(b)/4 + PR(c)/3 + PR(e)/2
PageRank Example
Teleportation probability: the parameter α gives the probability that in the next step of the RW will follow a Markov process or with probability 1-α it will jump to a random node
PageRank (cont’d)
where R is the solution of the equation
PageRank can also be interpreted as the dominant eigenvector of the normalized adjacency matrix
Two improvements w.r.t. eigenvector centrality:
is the ratio between number of links outbound from page j to page i to the total number of outbound links of page j
Katz �Centrality
Measuring the relative degree of influence of a node within a network
CK(i):
for all distances k, for all nodes j, sum the number of different paths i→j of length k (multiplied by an attenuation factor α)
NB: Attenuation factor α must be smaller than 1/|λ| , i.e. the reciprocal of the absolute value of the largest eigenvalue of A.
g
d
c
e
a
f
b
h
i
k
j
CK(g) = 0.26
CK(b) = 0.29
Katz Example�(non normalized)
Geometric Centralities
”importance of a node depends on some function of its distances w.r.t. other nodes”
Closeness Centrality
Farness: average of length of shortest paths to all other nodes
Closeness: inverse of the Farness �(normalized by number of nodes)
Closeness Formula
g
d
c
e
a
f
b
h
i
k
j
C(g) = 1/10 (1+2*3+2*3+4+3*5) � = 3.2
C(a) = 1/10 (4+2*3+3*3) � = 1.9
C(b) = 1/10 (2+2*6+2*3) � = 2
Farness Example
Harmonic Centrality
Harmonic mean of the geodesic �(shorted paths) distances from a given node �to all others.
g
d
c
e
a
f
b
h
i
k
j
CH(g) = 4
CH(b ) =5.6
Harmonic Example�
Betweenness Centrality
Number of shortest paths that go through �a node.
g
d
c
e
a
f
b
h
i
k
j
Cb(g) = 0
Cb(a) = 5*5 +4 = 29
Cb(b) = 4*6 = 24
Betweenness Example�(non normalized)
Cb(d) = 9+7/2 = 12.5
Definition
Normalized def.
Katz
03
PageRank
02
Eigenvector
01
Betweenness
06
Harmonic
05
Closeness
04
Degree
00
Connectivity-based centralities
Geometric� centralities
Each centrality measures is a proxy of an underlying network process.
If such a process is irrelevant for the network than the centrality measure makes no sense
Centrality measures should be used with caution (a) for exploratory purposes and (b) for characterisation
Understanding Centralities
Data and Viz @mathbeveridge�www.networkofthrones.wordpress.com
Node Label: PageRank
Node Size: Betweenness Centrality
Edge Size: #interactions
Colors: Community (with Louvain)
GOT: S1
GOT: S7
Node Label: PageRank
Node Size: Betweenness Centrality
Edge Size: #interactions
Colors: Community (with Louvain)
All characters interactions �(up to the last season… data are coming)
Node Label: PageRank
Node Size: Betweenness Centrality
Edge Size: #interactions
Colors: Community (with Louvain)
More on: www.networkofthrones.wordpress.com
GOT: S1-7
Season 1: Ned
Season 2: Tyrion
Season 3: Rob
Season 4: Tyrion
Season 5: Cersei
Season 6: Sansa
Season 7: Jon
Season 8: Tyrion
Do Birds of a Feather Flock Together?
Homophilic behaviors in complex networks
Homophily
Property of (social) networks that nodes of the same attitude tends to be connected with
a higher probability than expected
Disassortative mixing:
Contrary of homophily: dissimilar nodes tend to be connected �(e.g., sexual networks, predator-prey)
Examples of Vertex properties
age, gender, nationality,�political beliefs, excitatory or inhibitory neuron
Homophily can be a link creation mechanism or consequence of influence (and it is difficult to distinguish)
Assortative Mixing�(Newman’s assortativity)
Quantify homophily while discrete (categoric) node properties are involved
where:
Interpretation
0.621
Newman, Mark EJ. "Mixing patterns in networks."
Physical Review E 67.2 (2003): 026126.
Assortative Mixing�Newman’s assortativity - Example
Compute Newman’s assortativity given the network below:
Newman, Mark EJ. "Mixing patterns in networks."
Physical Review E 67.2 (2003): 026126.
=
=
=
Assortativity Matrix
Assortativity Index
In undirected network ai = bi
Assortative Mixing�(Newman’s assortativity)
Quantify homophily while scalar node properties are involved (e.g., degree assortativity)
where:
l
Degree disassortative
Nodes tends to connect in a star-like topology
Newman, Mark EJ. "Mixing patterns in networks."
Physical Review E 67.2 (2003): 026126.
Assortativity by degree w.r.t. different network types
Degree correlation
(insights)
where
is a degree correlation function, e.g., the average degree of the neighbors of all degree-k nodes.
Clumpiness
Similar (scalar) characteristics are more prominent along short distances
e.g., high-degree nodes are separated by few links
where:
Clumped assortative
Λ increases with the increase of the degrees of the nodes in the network
Clumped disassortative
Λ decreases with the increase in the separation between the degrees of the nodes in the network
Estrada, N. Hatano, A. Gutierrez, “Clumpiness mixing in complex networks”, Journal of Statistical Mechanics: Theory and Experiment.
Examples and Case Study
Case study: Happiness
James H. Fowler, Nicholas A. Christakis.
Dynamic Spread of Happiness in a Large Social Network:
Longitudinal Analysis Over 20 Years in the Framingham Heart Study
British Medical Journal 337 (4 December 2008)
Is a Global Measure enough?
“Sure I can work with the means, but I'd rather party with the outliers...”
Limits of a global assortativity score
Local assortativity of gender in a sample of Facebook friendships (McAuley and Leskovec 2012).
Different regions of the graph exhibit strikingly different patterns, suggesting that a single variable, e.g. global assortativity (Newman’s), would provide a poor description of the system.
Moving toward a multiscale approach to measure assortativity
Five networks (top) of n=40 nodes and m=160 edges with the same global assortativity r=0
Multiscale Mixing Patterns
Idea:
A local measure that captures the mixing patterns within the local neighbourhood of a given node.
Trivial solution:
Consider only the node’s neighbors
Better approximation:
Considering the stable state of a RW (probability to reach a given node) �to weight the edges
Issue:
Need to fix the value of α
Solution:
Integrate over all possible α (multiscale approach)
Peel, Leto, Jean-Charles Delvenne, and Renaud Lambiotte. "Multiscale mixing patterns in networks." Proceedings of the National Academy of Sciences 115.16 (2018): 4057-4062.
Peel’s Quintet: Only A has a random-like assortment distribution
Facebook100�Distribution of local assortativity for the “dorm” node feature
Evaluation on real data
Facebook100�Correlation of local assortativities by dorm and matriculation year (x axis) �and proportion of nodes which are more assortative by dorm than by year (y axis).
Evaluation on real data (cont’d)
Distance matter:�Conformity
Idea:
Random walkers flatten reachability distances: can we weight local assortativity considering shortest paths?
Solution:
Clumpiness like modeling:
Strengths:
Weaknesses:
Costly computation
similarity
distance dumping
G. Rossetti, S. Citraro and L. Milli, "Conformity: a Path-Aware Homophily measure for Node-Attributed Networks" in IEEE Intelligent Systems, vol. , no. 01, pp. 1-1, 5555. 2021
Node colors map categorical attribute values, while node sizes encode the respective
Conformity scores (the smaller the size, the lower the score)
Conformity: Intuition
Peel’s Quintet: Only A has a random-like assortment distribution
A
B
C
D
E
Facebook100�Distribution of local assortativity for the “gender” node feature
Evaluation on real data
GoT Season 6�Node attributes: Houses. Global attribute assortativity: 0.2�Multiscale Mixing (left), Conformity (right)�
Multiscale Mixing Vs. Conformity
Chapter 6 �Conclusion
Take Away Messages
What’s Next
Chapter 7:�Tie Strength & Resilience��
Suggested Readings
Notebook
Chapter 6: Centrality & Assortativity
https://github.com/sna-unipi/SNA_lectures_notebooks