On Clustering Coefficients in Complex Networks
On Clustering Coefficients in Complex Networks
Alexander I Nesterov∗
Departamento de Fı́sica, CUCEI, Universidad de Guadalajara, Guadalajara, CP 44430, Jalisco, México
(Dated: January 9, 2024)
The clustering coefficient is a valuable tool for understanding the structure of complex networks.
It is widely used to analyze social networks, biological networks, and other complex systems. While
there is generally a single common definition for the local clustering coefficient, there are two different
ways to calculate the global clustering coefficient. The first approach takes the average of the local
clustering coefficients for each node in the network. The second one is based on the ratio of closed
triplets to all triplets. It is shown that these two definitions of the global clustering coefficients are
arXiv:2401.02999v1 [physics.soc-ph] 4 Jan 2024
strongly inequivalent and may significantly impact the accuracy of the outcome.
Keywords: complex networks; statistical mechanics; graph ensembles; clustering coefficient; hidden variables;
graph temperature
In network science, a measure called the clustering co- the fermionic exponential random graph model (ERGM)
efficient shows how many nodes in a network tend to with hidden variables to prove this claim. We show that
group. It provides insight into the local cohesiveness of the coefficient C2 yields an expected behavior for the
connections in a network. A high clustering coefficient lower-temperature regime, while C1 gives an “incorrect”
indicates a network with a community structure where answer.
nodes form tightly interconnected groups. In contrast, a Model. – We consider an undirected fermionic graph
low clustering coefficient implies a more random or de- with a fixed number of nodes and a varying number of
centralized network structure [1–21]. links. The model belongs to the class of ERGMs and is
A local clustering coefficient (LCC) of a node i is the extensively explained in [28]. The connection probability
ratio of the number of connections between the neighbors of the link between nodes i and j is given by
of the node to the total possible connections among them:
1
pij = , (4)
2 × number of triangles centered on node i eβ(εij −µ) +1
ci = (1)
degree of i · ( degree of i − 1) where β = 1/T is the inverse temperature of the network,
µ is the chemical potential; εij = εi + εj and εi is an
The global clustering coefficient (GCC) measures the ten-
“energy” assigned to each node i. It is supposed that
dency for nodes in a graph to cluster together. The GCC
0 ≤ εi ≤ µ.
ranges from 0 to 1, with 0 indicating that the graph is
entirely unclustered, while one suggests that every node PThe expected degree of a node i is given by k̄i =
is part of a closed triangle [7, 12, 22, 23]. j pij . Denoting the average
P
node degree in the whole
There are two possible definitions of the GCC [24, 25]. network with hki = (1/N ) i k̄i , we obtain
The first one is the definition of the GCC as the aver- 2 X 1
age of the local clustering coefficients of all nodes in the hki = β(ε
. (5)
N i<j e ij −µ) +1
network:
1 X For NP≫ 1 Rone can replace P the sums RR by integrals:
C1 = ci , (2) 1
→ and 2
→ . In the con-
N i (N −1) i N (N −1) i<j
tinuous limit, the expected degree of a node with energy
where N is the number of nodes and ci is the LCC of the ε and the average node degree in the whole network can
node i. The second definition is as follows: be recast as
Z
3 × number of triangles k̄(ε) = (N − 1) p(ε, ε′ )ρ(ε′ )dε′ , (6)
C2 = . (3)
number of connected triples ZZ
The definitions for the GCCs introduced above are non- hki = (N − 1) p(ε, ε′ )ρ(ε)ρ(ε′ )dεdε′ , (7)
equivalent, i.e., in some situations, one can obtain C1 = 1
and C2 = 0 (see, for instance, the discussion in Refs. where
[26, 27]). 1
In this Letter, we show that these two definitions p(ε, ε′ ) = , (8)
eβ(ε+ε′ −µ) +1
of the GCCs are strongly inequivalent. We consider
and ρ(ε) denotes the density of states given by
αβeαβ(ε−µ/2)
ρ(ε) = . (9)
∗ [email protected] 2 sinh(aβµ/2)
2
Here α = βc (γ − 1)/β, 0R ≤ ε ≤ µ, and the standard Results. – We find that in a low-temperature regime,
µ
normalization condition, 0 ρ(ε)dε = 1 is imposed. the clustering coefficients behave as
The expected node degree and the average node degree
per node, κ = hki/(N − 1), are given by [28]: 1
C1 = 1 − + O(α2 ), (20)
8 sinh δ
N −1
δ coth δ
eαβµ/2 2 F1 1, α; 1 + α; −eβε
k̄(ε) = C2 = + O(α2 ), (21)
2 sinh(αβµ/2) 2 sinh δ
−αβµ/2 β(ε−µ)
−e 2 F1 1, α; 1 + α; −e , (10)
where δ = µ0 βc (γ − 1)/2 and µ0 = µ(0).
1 In Figs. 1 – 2, the results of numerical simulations
eαβµ 3 F2 1, α, α; 1 + α, 1 + α; −eβµ
κ= 2
4 sinh (αβµ/2) are presented. For illustrative purposes, we consider a
model with temperature-independent chemical potential.
− 23 F2 1, α, α; 1 + α, 1 + α; −1
Outcomes in Fig. 1 confirm our analytical predictions
+ e−αβµ 3 F2 1, α, α; 1 + α, 1 + α; −e−βµ , (11) for the behavior of average node degree per node (for
details, see Ref. [28]). As one can see, κ → 1/2 for
where p Fq (a1 , . . . , ap ; b1 , . . . , bq ; z) is the generalized hy- T ≫ Tc . The behavior of the average node degree near
pergeometric function [29, 30]. zero temperature is described by Eq. (13).
Using the asymptotic properties of the generalized hy-
pergeometric function and relation,
2 ∂
1
3 F2 1, a, a; 1 + a, 1 + a; z = −a 2 F1 1, a; 1 + a; z ,
∂a a
(12)
δ + e−δ − 1
κ= + O(α2 ), (13)
4 sinh2 (δ/2)
[1] Duncan J. Watts, Small Worlds: The Dynamics of Net- Newman, “Identity and search in social networks,”
works between Order and Randomness (Princeton Uni- Science 296, 1302–1305 (2002).
versity Press, Princeton, 1999). [19] M. E. J. Newman, “Clustering and pref-
[2] Dorogovtsev, S.N. and Mendes, J. F. F. , Evolution erential attachment in growing networks,”
of Networks: From Biological Nets to the Internet and Phys. Rev. E 64, 025102 (2001).
WWW (Oxford University Press, Oxford, 2003). [20] Santo Fortunato, “Community detection in graphs,”
[3] A. Barrat, M. Barthelemy, and A. Vespignani, Dynami- Physics Reports 486, 75–174 (2010).
cal Processes on Complex Networks (Cambridge Univer- [21] Omar F. Robledo, Xiu-Xiu Zhan, Alan Hanjalic,
sity Press, Cambridge, 2008). and Huijuan Wang, “Influence of clustering coef-
[4] Guido Caldarelli, Scale-Free Networks: Complex Webs in ficient on network embedding in link prediction,”
Nature, and Technology (Oxford University Press, Ox- Applied Network Science 7, 35 (2022).
ford, 2007). [22] M. E. J. Newman, S. H. Strogatz, and D. J. Watts,
[5] Albert-László Barabási, “Scale-free networks: A decade “Random graphs with arbitrary degree distributions and
and beyond,” Science 325, 412–413 (2009). their applications,” Phys. Rev. E 64, 026118 (2001).
[6] Albert-Laszlo Barabási, Network Science (Cambridge [23] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and
University Press, Cambridge, 2016). D.-U. Hwang, “Complex networks: Structure and dy-
[7] Réka Albert and Albert-László Barabási, namics,” Physics Reports 424, 175 – 308 (2006).
“Statistical mechanics of complex networks,” [24] A. Barrat and M. Weigt, “On the prop-
Rev. Mod. Phys. 74, 47–97 (2002). erties of small-world network models,”
[8] Jaroslaw Kwapień and Stanislaw Drozdz, The European Physical Journal B - Condensed Matter and Complex
“Physical approach to complex systems,” [25] Juyong Park and M. E. J. Newman, “Statistical mechan-
Physics Reports 515, 115 – 226 (2012). ics of networks,” Phys. Rev. E 70, 066117 (2004).
[9] Mark Newman, Networks (Oxford University Press, Ox- [26] Béla Bollobás and Oliver M. Riordan, “Mathematical re-
ford, 2018). sults on scale-free random graphs,” in Handbook of graphs
[10] M. Girvan and M. E. J. Newman, “Commu- and networks: from the genome to the Internet, edited
nity structure in social and biological networks,” by Stefan Bornholdt and Heinz Georg Schuster (Wiley-
Proceedings of the National Academy of Sciences 99, 7821–7826 VCH, Weinheim, 2003).
(2002).
[11] Ivan Voitalov, Pim van der Hoorn, Remco van der Hof- [27] Yu Wang, Eshwar Ghumare, Rik Vandenberghe,
stad, and Dmitri Krioukov, “Scale-free networks well and Patrick Dupont, “Comparison of Different
done,” Phys. Rev. Research 1, 033034 (2019). Generalizations of Clustering Coefficient and Lo-
[12] Duncan J. Watts and Steven H. Strogatz, cal Efficiency for Weighted Undirected Graphs,”
“Collective dynamics of ‘small-world’networks,” Neural Computation 29, 313–331 (2017).
Nature 393, 440 – 442 (1998). [28] Alexander Nesterov and Pablo Héctor Mata Vil-
[13] Ginestra Bianconi, “Entropy of network ensembles,” lafuerte, “Critical phenomena in complex net-
Phys. Rev. E 79, 036114 (2009). works: from scale-free to random networks,”
[14] Claudio Castellano, Santo Fortunato, and Vitto- The European Physical Journal B 96, 143 (2023).
rio Loreto, “Statistical physics of social dynamics,” [29] A. Erdéley, W. Magnus, and F. Oberhettinger, Higher
Rev. Mod. Phys. 81, 591–646 (2009). Transcendental Functions, Vol. I. (McGraw-Hill, New
[15] Albert-László Barabási, Natali Gulbahce, York, NY, USA, 1953).
and Joseph Loscalzo, “Network medicine: a [30] Frank W. J. Olver, Daniel W. Lozier, Ronald F. Boisvert,
network-based approach to human disease,” and Charles W. Clark, NIST Handbook of Mathemati-
Nature Reviews Genetics 12, 56–68 (2011). cal Functions (Cambridge University Press, Cambridge,
[16] Steven H. Strogatz, “Exploring complex networks,” 2010).
Nature 410, 268–276 (2001). [31] Marián Boguñá and Romualdo Pastor-Satorras, “Class
[17] M. E. J. Newman, “The structure and function of com- of correlated random networks with hidden variables,”
plex networks,” SIAM Review 45, 167–256 (2003). Phys. Rev. E 68, 036112 (2003).
[18] Duncan J. Watts, Peter Sheridan Dodds, and M. E. J.