arXiv:0908.1062v2 [physics.soc-ph] 16 Sep 2010

12
Community detection algorithms: a comparative analysis Andrea Lancichinetti 1, 2 and Santo Fortunato 1 1 Complex Networks and Systems, Institute for Scientific Interchange (ISI), Viale S. Severo 65, 10133, Torino, Italy 2 Physics Department, Politecnico di Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy Uncovering the community structure exhibited by real networks is a crucial step towards an understanding of complex systems that goes beyond the local organization of their constituents. Many algorithms have been proposed so far, but none of them has been subjected to strict tests to evaluate their performance. Most of the sporadic tests performed so far involved small networks with known community structure and/or artificial graphs with a simplified structure, which is very uncommon in real systems. Here we test several methods against a recently introduced class of benchmark graphs, with heterogeneous distributions of degree and community size. The methods are also tested against the benchmark by Girvan and Newman and on random graphs. As a result of our analysis, three recent algorithms introduced by Rosvall and Bergstrom, Blondel et al. and Ronhovde and Nussinov, respectively, have an excellent performance, with the additional advantage of low computational complexity, which enables one to analyze large systems. PACS numbers: 89.75.-k, 89.75.Hc Keywords: Networks, community structure I. INTRODUCTION The modern science of networks is probably the most active field within the new interdisciplinary science of complex systems. Many complex systems can be repre- sented as networks, where the elementary parts of a sys- tem and their mutual interactions are nodes and links, respectively [1, 2]. Complex systems are usually orga- nized in compartments, which have their own role and/or function. In the network representation, such compart- ments appear as sets of nodes with a high density of in- ternal links, whereas links between compartments have a comparatively lower density. These subgraphs are called communities, or modules, and occur in a wide variety of networked systems [3, 4]. Finding compartments may shed light on the organiza- tion of complex systems and on their function. Therefore detecting communities in networks has become a funda- mental problem in network science. Many methods have been developed, using tools and techniques from disci- plines like physics, biology, applied mathematics, com- puter and social sciences. However, it is still not clear which algorithms are reliable and shall be used in ap- plications. The question of the reliability itself is tricky, as it requires shared definitions of community and parti- tion which are, at present, still missing. This essentially means that, despite the huge literature on the topic, there is still no agreement among scholars on what a network with communities looks like. Nevertheless, there has been a silent acceptance of a simple network model, the planted -partition model [5], which is often used in the literature in various versions. In this model one “plants” a partition, consisting of a certain number of groups of nodes. Each node has a probability p in of being con- nected to nodes of its group and a probability p out of being connected to nodes of different groups. As long as p in >p out the groups are communities, whereas when p in p out the network is essentially a random graph, without community structure. The most popular version of the planted -partition model was proposed by Girvan and Newman (GN benchmark) [3]. Here the graph con- sists of 128 nodes, each with expected degree 16, which are divided into four groups of 32. The GN benchmark is regularly used to test algorithms for community detec- tion. Indeed, algorithms can be compared based on their performance on this benchmark. This has been done by Danon et al. [6]. However, the GN benchmark has two drawbacks: 1) all nodes have the same expected degree; 2) all communities have equal size. These features are unrealistic, as complex networks are known to be charac- terized by heterogeneous distributions of degree [1, 2, 7] and community sizes [8–12]. In recent papers [13, 14], we have introduced a new class of benchmark graphs (LFR benchmark), that generalize the GN benchmark by in- troducing power law distributions of degree and commu- nity size. The new graphs are a real generalization, in that the GN benchmark is recovered in the limit case in which the exponents of the distributions of degree and community sizes go to infinity. Most community detec- tion algorithms perform very well on the GN benchmark, due to the simplicity of its structure. The LFR bench- mark, instead, poses a much harder test to algorithms, and makes it easier to disclose their limits. Moreover, the LFR benchmark graphs can be built very quickly: the complexity of the construction algorithms is linear in the number of links of the graph, so one can perform tests on very large systems, provided the method at study is fast enough to analyze them. For these reasons, we believe that a serious assessment of the goodness of community detection algorithms can be made by evaluating their performance on the LFR benchmark. In this paper we propose a comparative analysis of this kind. After explaining briefly the LFR benchmark and how to compare partitions quantitatively we will pass to the description the algorithms that we ex- amined. We will present the analysis of the algorithms’ arXiv:0908.1062v2 [physics.soc-ph] 16 Sep 2010

Transcript of arXiv:0908.1062v2 [physics.soc-ph] 16 Sep 2010

Community detection algorithms: a comparative analysis

Andrea Lancichinetti1, 2 and Santo Fortunato1

1Complex Networks and Systems, Institute for Scientific Interchange (ISI), Viale S. Severo 65, 10133, Torino, Italy2Physics Department, Politecnico di Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy

Uncovering the community structure exhibited by real networks is a crucial step towards anunderstanding of complex systems that goes beyond the local organization of their constituents.Many algorithms have been proposed so far, but none of them has been subjected to strict teststo evaluate their performance. Most of the sporadic tests performed so far involved small networkswith known community structure and/or artificial graphs with a simplified structure, which is veryuncommon in real systems. Here we test several methods against a recently introduced class ofbenchmark graphs, with heterogeneous distributions of degree and community size. The methodsare also tested against the benchmark by Girvan and Newman and on random graphs. As a resultof our analysis, three recent algorithms introduced by Rosvall and Bergstrom, Blondel et al. andRonhovde and Nussinov, respectively, have an excellent performance, with the additional advantageof low computational complexity, which enables one to analyze large systems.

PACS numbers: 89.75.-k, 89.75.HcKeywords: Networks, community structure

I. INTRODUCTION

The modern science of networks is probably the mostactive field within the new interdisciplinary science ofcomplex systems. Many complex systems can be repre-sented as networks, where the elementary parts of a sys-tem and their mutual interactions are nodes and links,respectively [1, 2]. Complex systems are usually orga-nized in compartments, which have their own role and/orfunction. In the network representation, such compart-ments appear as sets of nodes with a high density of in-ternal links, whereas links between compartments have acomparatively lower density. These subgraphs are calledcommunities, or modules, and occur in a wide variety ofnetworked systems [3, 4].

Finding compartments may shed light on the organiza-tion of complex systems and on their function. Thereforedetecting communities in networks has become a funda-mental problem in network science. Many methods havebeen developed, using tools and techniques from disci-plines like physics, biology, applied mathematics, com-puter and social sciences. However, it is still not clearwhich algorithms are reliable and shall be used in ap-plications. The question of the reliability itself is tricky,as it requires shared definitions of community and parti-tion which are, at present, still missing. This essentiallymeans that, despite the huge literature on the topic, thereis still no agreement among scholars on what a networkwith communities looks like. Nevertheless, there hasbeen a silent acceptance of a simple network model, theplanted `-partition model [5], which is often used in theliterature in various versions. In this model one “plants”a partition, consisting of a certain number of groups ofnodes. Each node has a probability pin of being con-nected to nodes of its group and a probability pout ofbeing connected to nodes of different groups. As long aspin > pout the groups are communities, whereas whenpin ≤ pout the network is essentially a random graph,

without community structure. The most popular versionof the planted `-partition model was proposed by Girvanand Newman (GN benchmark) [3]. Here the graph con-sists of 128 nodes, each with expected degree 16, whichare divided into four groups of 32. The GN benchmarkis regularly used to test algorithms for community detec-tion. Indeed, algorithms can be compared based on theirperformance on this benchmark. This has been done byDanon et al. [6]. However, the GN benchmark has twodrawbacks: 1) all nodes have the same expected degree;2) all communities have equal size. These features areunrealistic, as complex networks are known to be charac-terized by heterogeneous distributions of degree [1, 2, 7]and community sizes [8–12]. In recent papers [13, 14], wehave introduced a new class of benchmark graphs (LFRbenchmark), that generalize the GN benchmark by in-troducing power law distributions of degree and commu-nity size. The new graphs are a real generalization, inthat the GN benchmark is recovered in the limit case inwhich the exponents of the distributions of degree andcommunity sizes go to infinity. Most community detec-tion algorithms perform very well on the GN benchmark,due to the simplicity of its structure. The LFR bench-mark, instead, poses a much harder test to algorithms,and makes it easier to disclose their limits. Moreover,the LFR benchmark graphs can be built very quickly:the complexity of the construction algorithms is linear inthe number of links of the graph, so one can perform testson very large systems, provided the method at study isfast enough to analyze them.

For these reasons, we believe that a serious assessmentof the goodness of community detection algorithms canbe made by evaluating their performance on the LFRbenchmark. In this paper we propose a comparativeanalysis of this kind. After explaining briefly the LFRbenchmark and how to compare partitions quantitativelywe will pass to the description the algorithms that we ex-amined. We will present the analysis of the algorithms’

arX

iv:0

908.

1062

v2 [

phys

ics.

soc-

ph]

16

Sep

2010

2

performance first on the GN benchmark and then onthe LFR benchmark, in its various versions includingweighted and directed graphs, along with graphs withoverlapping communities. Finally we will consider theissue of whether the algorithms are able to give a nullresult, i. e. how they handle networks without expectedcommunity structure, like random graphs. Our analysiswill reveal that there are, at present, algorithms whichare fast and reliable in many situations. We will concludewith a summary of our results and their consequences.

II. THE LFR BENCHMARK

The LFR benchmark [13, 14] is a special case of theplanted `-partition model, in which groups are of differ-ent sizes and nodes have different degrees. The nodedegrees are distributed according to a power law withexponent τ1; the community sizes also obey a power lawdistribution, with exponent τ2. In the following, N in-dicates the number of nodes of the network. In the con-struction of the benchmark graphs, each node receivesits degree once and for all, and keeps it fixed until theend. In this way, the two parameters pin and pout of theplanted `-partition model in this case are not indepen-dent. Once the value of pin is set one obtains the valueof pout and viceversa. It is more practical to choose asindependent parameter the mixing parameter µ, whichexpresses the ratio between the external degree of a nodewith respect to its community and the total degree ofthe node. Of course, in general one may take differentvalues for the mixing parameter for different nodes, butwe will assume, for simplicity, that µ is the same for allnodes, consistently with the standard hypotheses of theplanted `-partition model. By construction, the groupsare communities when pin > pout. This condition can betranslated into a condition on the mixing parameter µ.Let us label kini and kouti the internal and external degreeof node i with respect to its community (which we denotewith c). By definition, kini is the number of neighbors ofi that belong to its community c and kouti the numberof neighbors of i that belong to the other communities.The number of available connections koutc (kinc ) outside(inside) c is given by the sum of the degrees of the nodesoutside (inside) the community. If the numbers of nodesinside and outside c are not too small, the sum of theirdegrees can be approximated by the product of the av-erage degree 〈k〉 by the number of nodes. We indicatewith nc the number of nodes of the community c of nodei, so we have that koutc ∼ (N − nc)〈k〉 and kinc ∼ nc〈k〉.By definition of the linking probabilities pin and pout wededuce that

pout =kouti

koutc

∼ kouti

(N − nc)〈k〉, (1)

and

pin =kinikinc∼ kininc〈k〉

. (2)

In this way, the condition for the existence of communi-ties pin > pout becomes

kininc〈k〉

>kouti

(N − nc)〈k〉, (3)

from which we get

kini >nck

outi

N − nc. (4)

On the other hand, by definition we have that

µ =kouti

kini + kouti

. (5)

By comparing Eq. 5 with Eq. 4 we obtain the desiredcondition on µ

µ <N − ncN

. (6)

The condition expressed in Eq. 6 is general, and appliesto any version of the planted `-partition model. Whencommunities are different in size, the upper bound onµ depends on the specific community at hand. How-ever, if nmax

c is the size of the largest community, wecan safely assume that, whenever µ < (N − nmax

c )/N ,all communities are well defined. In the GN benchmark,where nc = 32 and 128, the condition becomes µ < 3/4.This is interesting, as in most works using the GN bench-mark, one usually assumes that communities are there aslong as µ < 1/2, whereas they are not well defined forµ > 1/2. Instead, we see that communities are there, atleast in principle, up until µ = 3/4. However, we stressthat, even if communities are there, methods may beunable to detect them. The reason is that, due to fluctu-ations in the distribution of links in the graphs, alreadybefore the limit imposed by the planted partition modelit may be impossible to detect the communities and themodel graphs may look similar to random graphs. Thisissue of the actual significance of communities and theirdetectability a priori is very important and has been re-cently discussed in the literature [15–17]. We notice that,on large networks, when nc � N , the limit value of µ be-low which communities are defined approaches 1. In ourtests with the LFR benchmark, we will often be in thisregime.

III. COMPARING PARTITIONS

Testing an algorithm on any graph with built-in com-munity structure also implies defining a quantitative cri-terion to estimate the goodness of the answer given bythe algorithm as compared to the real answer that isexpected. This can be done by using suitable similar-ity measures. For reviews of similarity measures seeRefs. [18–20]. In the first tests of community detection al-gorithms, one used a measure called fraction of correctly

3

identified nodes, introduced by Girvan and Newman [3].However, it is not well defined in some cases (e. g. whena detected community is a merger of two or more “real”communities), so in the last years other measures havebeen used. In particular, measures borrowed from infor-mation theory have proved to be reliable.

To evaluate the Shannon information content [21] ofa partition, one starts by considering the communityassignments {xi} and {yi}, where xi and yi indicatethe cluster labels of vertex i in partition X and Y, re-spectively. One assumes that the labels x and y arevalues of two random variables X and Y , with jointdistribution P (x, y) = P (X = x, Y = y) = nxy/n,which implies that P (x) = P (X = x) = nXx /n andP (y) = P (Y = y) = nYy /n, where nXx , nYy and nxy arethe sizes of the clusters labeled by x, y and of their over-lap, respectively. The mutual information I(X,Y ) of tworandom variables is defined as

I(X,Y ) =∑x

∑y

P (x, y) logP (x, y)

P (x)P (y). (7)

The measure I(X,Y ) tells how much we learn aboutX if we know Y , and viceversa. Actually I(X,Y ) =H(X) − H(X|Y ), where H(X) = −

∑x P (x) logP (x)

is the Shannon entropy of X and H(X|Y ) =−∑

x,y P (x, y) logP (x|y) is the conditional entropy of Xgiven Y . The mutual information is not ideal as a simi-larity measure: in fact, given a partition X , all partitionsderived from X by further partitioning (some of) its clus-ters would all have the same mutual information withX , even though they could be very different from eachother. In this case the mutual information would simplyequal the entropy H(X), because the conditional entropywould be systematically zero. To avoid that, Danon etal. adopted the normalized mutual information [6]

Inorm(X ,Y) =2I(X,Y )

H(X) +H(Y ), (8)

which equals 1 if the partitions are identical, whereas ithas an expected value of 0 if the partitions are indepen-dent. The normalized mutual information is currentlyvery often used in tests of community detection algo-rithms. We have recently proposed a definition of themeasure to evaluate the similarity of covers, i. e. of divi-sions of the network in overlapping communities, whichone needs for the tests of Section VI D. The details canbe found in the Appendix of Ref. [12]. We stress thatour definition is not a proper extension of the normal-ized mutual information, in the sense that it does notrecover exactly the same value of the original measurefor the comparison of proper partitions without overlap,even though the values are close. For consistency we usedour definition in all tests, although in the tests involvingbenchmarks without overlapping communities the clas-sic expression of Eq. 8 could be used. For this reason,we warn that in the plots showing the performance ofthe algorithms on the GN benchmark, the curves are not

identical to those already seen in previous papers (for,e. g., modularity-based methods), where Eq. 8 was used,although they are rather close.

IV. THE ALGORITHMS

We have tested a wide spectrum of community detec-tion methods. In some cases the software to implementthe algorithms was publicly available, in other cases theoriginal developers have let us use their own code, other-wise we have created the software on our own. We wantedto have a representative subset of algorithms, that exploitsome of the most interesting ideas and techniques thathave been developed over the last years. Obviously wecould not by any means perform an analysis of all existingtechniques, as their number is huge. Some of them wereexcluded a priori, if particularly slow, as our tests involvegraphs with a few thousand nodes, which old methods areunable to handle. On the other hand, the code to createthe LFR benchmark is freely available [22] and scholarsare welcome to test their algorithms on it and comparetheir performance with that of the algorithms analyzedhere. Here is the list of the algorithms we considered.

• Algorithm of Girvan and Newman [3, 23]. It is thefirst algorithm of the modern age of community de-tection in graphs. It is a hierarchical divisive algo-rithm, in which links are iteratively removed basedon the value of their betweenness, which expressesthe number of shortest paths between pairs of nodesthat pass through the link. In its most popu-lar implementation, the procedure of link removalends when the modularity of the resulting parti-tion reaches a maximum. The modularity of New-man and Girvan is a well known quality functionthat estimates the goodness of a partition based onthe comparison between the graph at hand and anull model, which is a class of random graphs withthe same expected degree sequence of the originalgraph. The algorithm has a complexity O(N3) ona sparse graph. In the following we will refer to itas GN.

• Fast greedy modularity optimization by Clauset,Newman and Moore [11]. This method is essen-tially a fast implementation of a previous techniqueproposed by Newman [24]. Starting from a set ofisolated nodes, the links of the original graph are it-eratively added such to produce the largest possibleincrease of the modularity of Newman and Girvanat each step. The fast version of Clauset, Newmanand Moore, which uses more efficient data struc-tures, has a complexity of O(N log2N) on sparsegraphs.

• Exhaustive modularity optimization via simulatedannealing [25–28]. The goal is the same as in theprevious algorithm, but the precision of the final

4

estimate of the maximum is far higher, due to theexhaustive optimization, at the expense of the com-putational speed. The latter cannot be expressedin closed form, as in the cases above, as it dependson the parameters used for the optimization. Wewill stick to the procedure used by Guimera andAmaral [28].

• Fast modularity optimization by Blondel et al. [29].This is a multistep technique based on a local op-timization of Newman-Girvan modularity in theneighborhood of each node. After a partition isidentified in this way, communities are replaced bysupernodes, yielding a smaller weighted network.The procedure is then iterated, until modularity(which is always computed with respect to the orig-inal graph) does not increase any further. Thismethod offers a fair compromise between the accu-racy of the estimate of the modularity maximum,which is better than that delivered by greedy tech-niques like the one by Clauset et al. above, andcomputational complexity, which is essentially lin-ear in the number of links of the graph.

• Algorithm by Radicchi et al. [30]. This algorithm isin the spirit of that by Girvan and Newman above.In fact, it is a divisive hierarchical method, wherelinks are iteratively removed based on the value oftheir edge clustering coefficient, which is defined asthe ratio between the number of loops based on thelink and the largest possible number of loops thatcan be based on the link. The edge clustering co-efficient is a local measure, so its computation isnot so heavy as that of edge betweenness, whichyields a significant improvement in the complex-ity of the algorithm, which is O(N2) on a sparsegraph. Another major difference from the GN al-gorithm is the stopping criterion of the procedure,which depends on the properties of the communi-ties themselves and not on the values of a qualityfunction like modularity. Radicchi et al. consideredtwo types of communities: strong communities aregroups of nodes such that the internal degree ofeach node exceeds its external degree; weak com-munities are groups of nodes such that the totalinternal degree of the nodes of the group exceedstheir total external degree.

• Cfinder [8]. This is a local algorithm proposed byPalla et al. that looks for communities that mayoverlap, i.e. share nodes. It was the first paper inthe physics literature on community detection toaddress this problem, which is important in manysystems like, e. g., social networks. Communitiesare defined as the largest possible subgraphs thatcan be explored by rolling k-cliques across the net-work, where a k-clique rolls by rotating about anyof its component (k − 1)-cliques (which are linkswhen k = 3). The complexity of this procedure can

be high, as the computational time needed to findall k-cliques of a graph is an exponentially growingfunction of the graph size [31], but in practical ap-plications the method is rather fast, enabling oneto analyze systems with up to 105 nodes.

• Markov Cluster Algorithm [32]. This is an algo-rithm developed by S. Van Dongen, which simu-lates a peculiar diffusion process on the graph. Onestarts from the right stochastic matrix (or diffusionmatrix) of the graph, which is obtained from theadjacency matrix of the original graph by dividingthe elements of each row by their sum. Then onecomputes an integer power of this matrix (usuallythe square), which yields the probability matrix ofa random walk after a number of steps equal to thenumber of powers of the right stochastic matrixconsidered. This step is called expansion. Next,each element of the matrix is raised to some powerα, in order to enhance (artificially) the probabilityof the walker to be trapped within a community.This step is called inflation. The expansion andinflation steps are iterated until one obtains theadjacency matrix of a forest (i. e. a disconnectedtree), whose components are the communities. Thismethod, widely used in bioinformatics, is stronglydependent on the choice of the parameter α. Itscomplexity can be lowered to O(Nk2) if, after eachinflation steps, only the k largest elements of theresulting matrix are kept, whereas the others areset to zero. In the following we will refer to themethod as MCL.

• Structural algorithm by Rosvall and Bergstrom [33].Here the problem of finding the best cluster struc-ture of a graph is turned into the problem of op-timally compressing the information on the struc-ture of the graph, so that one can recover as closelyas possible the original structure when the com-pressed information is decoded. This is achievedby computing the minimum of a function whichexpresses the best tradeoff between the minimalconditional information between the original andthe compressed information (maximal faithfulnessto the original information) and the maximal com-pression (least possible information to transmit).The optimization of the function is carried out viasimulated annealing, which makes the algorithmquite slow, although one could always go for a fasterand less accurate optimization. In the following wewill refer to the method as Infomod.

• Dynamic algorithm by Rosvall and Bergstrom [34].This technique is based on the same principle as theprevious one. The difference is that before one wascompressing the information on the structure of thegraph, here one wishes to compress the informationof a dynamic process taking place on the graph,namely a random walk. The optimal compression

5

is achieved again by optimizing a quality function,which is the Minimum Description Length [35, 36]of the random walk. Such optimization can becarried out rather quickly with a combination ofgreedy search and simulated annealing. In the fol-lowing we will refer to the method as Infomap.

• Spectral algorithm by Donetti and Munoz [37]. Thisis a method based on spectral properties of thegraph. The idea is that eigenvector componentscorresponding to nodes in the same communityshould have similar values, if communities are wellidentified. Donetti and Munoz focused on theeigenvectors of the Laplacian matrix. They consid-ered a limited number of eigenvectors, say g, andrepresented each node of the graph as a geometricpoint in an Euclidean g-dimensional space, whosecoordinates are the eigenvector components corre-sponding to the node. The points are then groupedwith traditional hierarchical clustering techniques.Of the resulting partitions, one picks the one thatmaximizes the modularity by Newman and Girvan.The method is rather quick when only a few eigen-vectors are computed, which is usually the case, asthis can be done via the Lanczos method [38]. Inthe following we will refer to the method as DM.

• Expectation-maximization algorithm by Newmanand Leicht [39]. Here Bayesian inference is used todeduce the best fit of a given model to the datarepresented by the actual graph structure. Thegoodness of the fit is expressed by a likelihoodthat is maximized by means of the expectation-maximization technique [40]. This leads to a sys-tem of self-consistent equations, that can be solvedby iteration starting from suitable initial condi-tions. The equations can be solved rather quicklyand fairly large systems can be analyzed in this way(up until 106 nodes). A nice feature of the methodis that it finds the most relevant group structureof the graph, whether the groups are communitiesor not (in graphs with multipartite structure theclasses are rather anti-communities, as there arevery few links inside the groups). A drawback ofthe method is the fact that one needs to feed thenumber of groups, which is usually not known apriori. In the following we will refer to the methodas EM.

• Potts model approach by Ronhovde and Nussi-nov [41]. This method is based on the minimiza-tion of the Hamiltonian of a Potts-like spin model,where the spin state represents the membershipof the node in a given community. A resolutionparameter enables one to span several communityscales, from very small to very large communities.The relevant scales are identified by checking forthe stability of the partitions obtained for givenvalues of the resolution parameter. This is done by

computing the similarity of partitions obtained forthe same resolution parameter but starting fromdifferent initial conditions. Peaks in the similarityspectrum correspond to stable/relevant partitions.The method is rather fast, its complexity is slightlysuperlinear in the number of links of the graph. Inthe following we will refer to the method as RN.

V. TESTS ON THE GN BENCHMARK

We begin by showing the performance of the algo-rithms on the GN benchmark. As we have explained inSection II, for the GN benchmark communities are welldefined (in principle) up until a value 3/4 = 0.75 for themixing parameter. We will indicate the mixing parame-ter with the symbol µt to mean that we refer to topology.In Section VI C we will focus instead on the mixing pa-rameter µw, which considers the weights of the links. InFig. 1 we show the results of our analysis. Each point ofevery curve corresponds to an average over 100 realiza-tions of the benchmark. For the algorithms by Radicchiet al. and by Newman and Leicht (EM), we have put twocurves instead of one (likewise in Section VI A). In thefirst case, we showed the outcome of the method whenone uses both possible stopping criteria, corresponding toa partition consisting of strong (black curve) and weak(red curve) communities, respectively. In the case of theEM method, we show the curves delivered by the itera-tive solution of the EM equations when one starts from arandom partition (red), and from the planted partition ofthe benchmark (black curve). As one can see, results aredifferent in these cases, even if they are solutions of thesame equation. This shows how sensitive the solutionis to the choice of the initial condition. Moreover, themaximum likelihood achieved when one makes the “in-telligent guess” of the real partition is higher comparedto the maximum likelihood obtained starting from a ran-dom partition. This indicates that the greedy approachto the solution of the EM equations suggested by New-man and Leicht is not an efficient way to maximize thelikelihood, as one may expect.

Most methods perform rather well, although all ofthem start to fail much earlier than the expected thresh-old of 3/4. The Cfinder fails to detect the communi-ties even when µt ∼ 0, when they are very well identi-fied. This is due to the fact that, even when µt is small,the probe clique that explores the system manages topass from one group to the other and yields much largergroups, often spanning the whole graph. The methodby Radicchi et al. does not have a remarkable perfor-mance either, as it also starts to fail for low values of µt,although it does better than the Cfinder. The MCL isbetter than the method by Radicchi et al., but is out-performed by modularity-based methods (simulated an-nealing, Clauset et al., Blondel et al.), which generallydo quite well on the GN benchmark, something that wasalready known from the literature. The DM and RN

6

0 0.1 0.2 0.3 0.4 0.5 0.600.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.5 0.600.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.5 0.6 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

0 0.1 0.2 0.3 0.4 0.5 0.600.20.40.60.8

1

Blondel et al. MCL

Infomod Infomap

0 0.1 0.2 0.3 0.4 0.5 0.600.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.5 0.600.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.5 0.6 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

StrongWeak

0 0.1 0.2 0.3 0.4 0.5 0.60.40.50.60.70.80.9

1

Cfinder Clauset et al.

Radicchi et al.

Sim. ann.

0 0.1 0.2 0.3 0.4 0.500.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.500.20.40.60.8

1

0 0.1 0.2 0.3 0.4 0.5 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

0 0.1 0.2 0.3 0.4 0.500.20.40.60.8

1

GN DM

EMRN

FIG. 1: Tests of the algorithms on the GN benchmark.

methods have a comparable performance as the exhaus-tive optimization of modularity via simulated annealing.The GN algorithm performs about as well as the MCL.Both methods by Rosvall and Bergstrom have a goodperformance. In fact, up until µt ∼ 0.4, they alwaysguess the planted partition in four clusters.

VI. TESTS ON THE LFR BENCHMARK

In this section we will present the tests on the LFRbenchmark. For a thorough analysis, we have consid-ered various versions of the benchmark, in which linkscan have or not weights and/or direction. We have alsoexamined the version which allows for community over-laps. In each test, we have averaged the value of thenormalized mutual information over 100 realizations foreach value of the mixing parameter.

A. Undirected and unweighted graphs

The plots of Fig. 2 illustrate the results of the analy-sis. The following input parameters are the same for allbenchmark graphs used here, as well as in Sections VI B,VI C and VI D: the average degree is 20, the maximumdegree 50, the exponent of the degree distribution is −2and that of the community size distribution is −1. Ineach plot, except for the GN and the EM algorithms,we show four curves, corresponding to two different net-work sizes (1000 and 5000 nodes) and, for a given size,to two different ranges for the community sizes, indicatedby the letters S and B: S (stays for “small”) means thatcommunities have between 10 and 50 nodes, B (stays for“big”) means that communities have between 20 and 100nodes. For the GN algorithm we show only the curvescorresponding to the smaller network size, as it wouldhave taken too long to accumulate enough statistics topresent clean plots for networks of 5000 nodes, due to thehigh computational complexity of the method. For theEM method we have plotted eight curves as for each set ofbenchmark graphs we have considered the two outcomesof the algorithm corrsponding to the different choices ofinitial conditions we have mentioned in the previous sec-tion, namely random (bottom curves) and planted parti-tion (top curves). In this case, the difference in the per-formance of the algorithm in the two cases is remarkable.The fact that, by starting from the planted partition,the final likelihood is actually higher as compared witha random start, as we have seen in the previous section,confirms that the method has a great potential, if onlyone could find a better way to estimate the maximumlikelihood than the greedy approach currently adopted.Nevertheless we remind that the EM also has the bigdrawback to require as input the number of groups to befound, which is usually unknown in applications.

As a general remark, we see that the LFR bench-mark enables one to discriminate the performances ofthe algorithms much better than the GN benchmark,as expected. Modularity-based methods have a ratherpoor performance, which worsens for larger systems andsmaller communities, due to the well known resolutionlimit of the measure [42]. The only exception is repre-sented by the algorithm by Blondel et al., whose per-formance is very good, probably because the estimatedmodularity maximum is not a very good approximation

7

0.2 0.4 0.6 0.800.20.40.60.8

1

0.2 0.4 0.6 0.800.20.40.60.8

1

0.2 0.4 0.6 0.8 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

0.2 0.4 0.6 0.800.20.40.60.8

1

N=1000, SN=1000, BN=5000, SN=5000, B

Blondel et al. MCL

Infomod Infomap

0.2 0.4 0.6 0.800.20.40.60.8

1

0.2 0.4 0.6 0.800.20.40.60.8

1

0.2 0.4 0.6 0.8 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

0.2 0.4 0.6 0.800.20.40.60.8

1

N=1000, SN=1000, BN=5000, SN=5000, B

Cfinder

Clauset et al.

Radicchi et al. Sim. ann.

0 0.2 0.4 0.6 0.800.20.40.60.8

1

0 0.2 0.4 0.6 0.800.20.40.60.8

1

0 0.2 0.4 0.6 0.8 Mixing parameter µt

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

0 0.2 0.4 0.6 0.800.20.40.60.8

1

N=1000, SN=1000, BN=5000, SN=5000, B

GN DM

EM RN

FIG. 2: Tests of the algorithms on the LFR benchmark withundirected and unweighted links.

of the real one, which is more likely found by simulatedannealing. The Cfinder, the MCL and the method byRadicchi et al. do not have impressive performances ei-ther, and display a similar pattern, i.e. the performanceis severely affected by the size of the communities (forlarger communities it gets worse, whereas for small com-munities it is decent), whereas it looks rather insensitive

to the size of the network. The DM has a fair perfor-mance, but it gets worse if the network size increases.The same trend is shown by Infomod, where the perfor-mance worsens considerably with the increase of the net-work size. Infomap and RN have the best performances,with the same pattern with respect to the size of the net-work and of the communities: up to values of µt ∼ 1/2both methods are capable to derive the planted partitionin the 100% of cases.

We conclude that Infomap, the RN method and themethod by Blondel et al. are the best performing algo-rithms on the LFR undirected and unweighted bench-mark. Since Infomap and the method by Blondel et al.are also very fast, essentially linear in the network size,we wonder how good their performance is on much largergraphs than those considered in Fig. 2. For this reason wecarried out another set of tests of these two algorithms onthe LFR benchmark, by considering graphs with 50000and 100000 nodes. We have done so also because in thetests that can be found in the literature on communitydetection one typically uses very small graphs, and theperformance can change considerably on large graphs.In Fig. 3 we show the performance of the two methods.Due to the large network size, we decided to pick a broadrange of community sizes, from 20 to 1000 nodes. In thisway, the heterogeneity of the community sizes is manifest.The maximum degree here was fixed to 200. Remarkably,the performance of the method by Blondel et al. is worsethan on the smaller graphs of Fig. 2, whereas that ofInfomap is stable and does not seem to be affected.

0 0.2 0.4 0.6 0.8 1 Mixing parameter µt

0

0.2

0.4

0.6

0.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

N=50000N=100000

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1Blondel et al. Infomap

FIG. 3: Tests of the algorithm by Blondel et al. and In-fomap on large LFR benchmark graphs with undirected andunweighted links.

B. Directed and unweighted graphs

Directedness is an essential features of many real net-works. Ignoring direction, as one often does or is forcedto do, may reduce considerably the information that onecan extract from the network structure. In particular,neglecting link directedness when looking for communi-ties may lead to partial, or even misleading, results. In

8

the literature there has been no benchmark for directedgraphs with communities for a long time. However, wehave recently extended the LFR benchmark to directednetworks [14], so we are in the position to evaluate theperformance of community detection algorithms in thiscase. The presence of directed links is a serious obsta-cle towards a generalization of an algorithm for commu-nity detection. Therefore, very few algorithms currentlyavailable are able to handle directed graphs. In the setof methods we consider here, only five can be used aswell for directed networks: Clauset et al., simulated an-nealing for modularity, Cfinder, Infomap, EM. For someof the other algorithms one may think of possible ex-tensions which are, at present, still missing. The EMmethod, in its original definition of Ref. [39], has ac-tually problems to deal with directed graphs [43]. Wepresent here a comparison of the performances of twomethods, exhaustive modularity optimization via simu-lated annealing and Infomap. The results are in Fig. 4.Here the topological mixing parameter µt refers to theindegree of the nodes, which are distributed accordingto a power law as in the original undirected benchmark,while the outdegree is kept constant for all nodes, a choicemade to avoid an unnecessary proliferation of input pa-rameters. Again, we considered two different networksizes and ranges for the community size, which are thesame as those in Fig. 2. The other input parameters forthe benchmark are the same that we have given in Sec-tion VI A. As expected, modularity optimization showsthe same limits that emerged in Fig. 2. On the otherhand, the performance of Infomap is still very good.

0 0.2 0.4 0.6 0.8 Mixing parameter µt

0

0.2

0.4

0.6

0.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

N=1000, SN=1000, BN=5000, SN=5000, B

0 0.2 0.4 0.6 0.80

0.2

0.4

0.6

0.8

1

Infomap

Sim. ann.

FIG. 4: Tests of Infomap and of the exhaustive modularityoptimization via simulated annealing on the LFR benchmarkwith directed and unweighted links.

C. Undirected and weighted graphs

In this section we focus on undirected graphs withweighted links. Weights are also precious sources of infor-mation [44]. Just as in the case of link directedness above,neglecting weights may imply a significant limitation ofthe information on a graph’s properties, concealing fea-

0 0.2 0.4 0.6 0.800.20.40.60.8

1

0 0.2 0.4 0.6 0.800.20.40.60.8

1

0 0.2 0.4 0.6 0.8 Mixing parameter µw

00.20.40.60.8

1

Nor

mal

ized

Mut

ual I

nfor

mat

ion

N=5000, µt=0.5, SN=5000, µt=0.5, BN=5000, µt=0.8, SN=5000, µt=0.8, B

Infomap MCL

Sim. ann.

FIG. 5: Tests of Infomap, MCL and of the exhaustivemodularity optimization via simulated annealing on the LFRbenchmark with undirected and weighted links.

tures of real systems which may be very important andnot deducible from the mere topology. Ideally, one shouldexploit the information from both topology and weightsfor a reliable analysis of a network. The LFR benchmarkhas been extended to weighted graphs as well [14]. Nowthere are two mixing parameters, one for topology, whichis the same µt we have defined and used so far, and theother for the weights, µw, which is the weighted counter-part of µt, i. e. it expresses the fraction of the strengthof the node that lies on links connecting the node to thenodes outside its community, with respect to the totalstrength of the node. We remind that the strength ofthe node is the sum of the weights of its links. Moreover,there is an additional parameter, i. e. the exponent of thedistribution for the strength: we have set it to 1.5 for allrealizations. All other parameters are the same specifiedin Section VI A. Since we wish to show the results of thetest on 2-dimensional plots, as we have done so far, weneed to keep fixed one of the two parameters and studythe dependence on the other. Here we freeze the topo-logical mixing parameter µt and study the dependenceof the results on µw, so that we see how the performanceof an algorithm varies when only the weights are redis-tributed, but the topology is fixed. The results are inFig. 5, where we consider only three methods: Infomap,MCL and exhaustive modularity optimization via simu-lated annealing. The other methods have no weightedcounterpart or the code for the weighted version was notavailable. In each plot we show four curves, correspond-ing to two choices for the topological mixing parameterµt and the two usual ranges of small (S) and big (B)communities that we have used so far. The network sizeis 5000 nodes in each case. The Infomap by Rosvall andBergstrom has, once more, a remarkable performance, al-though it worsens if communities are topologically moremixed (higher µt) and larger in size (B). The MCL has afair performance only in one case, for µt = 0.5 and small

9

communities, whereas in the other extreme of big topo-logical mixture and big communities it fails for any valueof µw. Modularity optimization seems to be more sensi-tive to the community size than to the other parameters.

D. Undirected and unweighted graphs withoverlapping communities

The fact that communities in real systems often over-lap has attracted a lot of attention in the last years, lead-ing to the creation of new algorithms able to deal withthis special circumstance, starting from the first work byPalla et al. [8]. Meanwhile, a few methods have beendeveloped [12, 39, 45–50], but none of them has beenthoroughly tested, except on a bunch of specific networkstaken from the real world. Indeed, there have been nosuitable benchmark graphs with overlapping communitystructure, until recently [14, 51]. In particular, the LFRbenchmark has been extended to the case of overlappingcommunities [14], and we use it here. Of our set of al-gorithms, only the Cfinder is able to find overlappingcommunities. In principle also the EM method assignsto each node the probability that it belongs to any com-munity, but then one would need a criterion to definewhich, among such probability values, is significant andshall be taken or is not significant and shall be neglected.For this reason we report the results of tests carried outwith the Cfinder only.

0 0.1 0.2 0.3 0.4 0.50

0.2

0.4

0.6

0.8

1

Nor

mal

ized

mut

ual i

nfor

mat

ion

0 0.1 0.2 0.3 0.4 0.50

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 0.5 Fraction of Overlapping Nodes

0

0.2

0.4

0.6

0.8

13-clique4-clique5-clique6-clique

0 0.1 0.2 0.3 0.4 0.50

0.2

0.4

0.6

0.8

1

N=1000smin=10smax=50

µt = 0.1

N=1000smin=20smax=100

µt = 0.1 µt = 0.3

µt = 0.3

FIG. 6: Tests of the Cfinder on the LFR benchmark withundirected and unweighted links and overlapping communi-ties. The variable on the x-axis is the fraction of overlappingnodes. The networks have 1000 nodes, the other parametersare τ1 = 2, τ2 = 1, 〈k〉 = 20 and kmax = 50.

In Figs. 6 and 7 we show the results. The topologicalmixing parameter µt is fixed and one varies the fractionof overlapping nodes between communities. We have runthe Cfinder for different types of k-cliques (k indicatesthe number of nodes of the clique), with k = 3, 4, 5, 6. In

0 0.1 0.2 0.3 0.40

0.2

0.4

0.6

0.8

1

Nor

mal

ized

mut

ual i

nfor

mat

ion

0 0.1 0.2 0.3 0.40

0.2

0.4

0.6

0.8

1

0 0.1 0.2 0.3 0.4 Fraction of Overlapping Nodes

0

0.2

0.4

0.6

0.8

13-clique4-clique5-clique6-clique

0 0.1 0.2 0.3 0.40

0.2

0.4

0.6

0.8

1

N=5000smin=10smax=50

µt = 0.1

N=5000smin=20smax=100

µt = 0.1 µt = 0.3

µt = 0.3

FIG. 7: Tests of the Cfinder on the LFR benchmark withundirected and unweighted links and overlapping communi-ties. The variable on the x-axis is the fraction of overlappingnodes. The networks have 5000 nodes, the other parametersare the same used for the graphs of Fig. 6.

general we notice that triangles (k = 3) yield the worstperformance, whereas 4- and 5-cliques give better results.In the two top diagrams community sizes range between10 and 50 nodes, whereas in the bottom diagrams therange goes from 20 to 100 nodes. By comparing the di-agrams in the top with those in the bottom we see thatthe algorithm performs better when communities are (onaverage) smaller. The networks used to produce Fig. 6consist of 1000 nodes, whereas those of Fig. 7 consist of5000 nodes. From the comparison of Fig. 6 with Fig. 7we see that the algorithm performs better on networks oflarger size.

VII. TESTS ON RANDOM GRAPHS

An important test of community detection algorithms,usually ignored in the literature, consists in applyingthem to random graphs. In random graphs, by defini-tion, the linking probabilities of the nodes are indepen-dent of each other. In this way one does not expect thatthere will be inhomogeneity in the density of links on thegraphs, i. e. there should be no communities. Thingsare not that simple, though. It is certainly true thaton average this is what happens. On the other hand,specific realizations of random graphs may display pseu-docommunities, i. e., clusters produced by fluctuationsin the link density. This is why, for instance, the max-imum modularity of partitions in random graphs is notsmall [25, 52–54]. However, a good method should distin-guish between such pseudocommunities and meaningfulmodules. This is why we still expect to find no com-munities in random graphs. We considered two types ofgraphs: random graphs a la Erdos-Renyi [55], which have

10

0 20 40 60 80 1000100200300400500

0 20 40 60 80 1000200400600800

1000

0 20 40 60 80 100 Average degree

0

10

20

30

40

N

umbe

r of M

odul

es

0 20 40 60 80 100010203040506070

S-F graphsE-R graphs

Blondel et al. MCL

Infomod Infomap

0 20 40 60 80 1000

1000

2000

3000

0 20 40 60 80 1000

5

10

15

20

0 20 40 60 80 100 Average degree

0.5

1

1.5

2

N

umbe

r of M

odul

es

0 20 40 60 80 1003

4

5

6

S-F graphsE-R graphs

Cfinder Clauset et al.

Radicchi et al. Sim. ann.

0 20 40 60 80 100 Average degree

2

3

4

5

6

Num

ber o

f Mod

ules

E-R graphsS-F graphs

20 40 60 80 1000

100

200

300

400

DM RN

FIG. 8: Tests of the algorithms on random graphs a la Erdos-Renyi (E-R) and scale free (S-F) random graphs.

a binomial degree distribution, and random graphs withpower law degree distributions (scale free). The latterhave been built via the configuration model [56], startingfrom a fixed degree sequence for the nodes obeying thepredefinite power law distribution. The exponent of thedistribution is −2, the maximum degree was fixed to 200.The size of all graphs, Erdos-Renyi and scale free, is fixedto 1000 nodes. In Fig. 8 we show the number of modulesfound by various algorithms as a function of the average

degree of the graph. Each point corresponds to an av-erage over 100 graph realizations. We do not show theresults of the EM method, because the number of mod-ules must be given by input, and of the GN algorithmbecause it is too slow to be used for the analysis.

The best performance is that of the method by Radic-chi et al., which always finds a single cluster comprisingall nodes. Another reasonable answer is to find as manyclusters as there are nodes, like the MCL. Here, how-ever, the answer depends on the average degree 〈k〉 ofthe graph: if 〈k〉 is very low or very large the number ofmodules is smaller than 1000, i.e. the method finds smallgroups of nodes. This is particularly evident for scalefree graphs. Modularity-based methods, like Clauset etal., the exhaustive optimization via simulated annealing,and the algorithm by Blondel et al. are not so good,as they always find a few clusters, even in the limit oflarge 〈k〉: this is actually well known [53]. This is alsothe case for the DM method, which performs a sort ofmodularity optimization, on the restricted set of parti-tions delivered by hierarchical clustering. Infomod andthe RN method find non-trivial partitions for any valueof 〈k〉. The Cfinder finds a single module for very low val-ues of 〈k〉 and then a rapidly rising number of modules as〈k〉 increases. Since the modules are strongly overlappingin this case, they may exceed the number of nodes, as wesee from the plot. Instead, Infomap always finds a singlemodule comprising all nodes, except when 〈k〉 is low.

VIII. SUMMARY

We have carried out a comparative analysis of the per-formances of algorithms for community detection on var-ious graphs: the GN and LFR benchmarks and randomgraphs. Link direction, weights and the possibility forcommunities to overlap have been taken into account indedicated tests. We conclude that the Infomap methodby Rosvall and Bergstrom [34] is the best performing onthe set of benchmarks we have examined here. In partic-ular, its results on the LFR benchmark graphs, which aremuch more difficult to examine than the GN benchmarkgraphs, as clearly shown by Figs. 1 and 2, are encour-aging about the reliability of the method in applicationsto real graphs. Among the other things, the methodcan be applied to weighted and directed graphs as well,with excellent performances, so it has a large spectrumof potential applications. The algorithms by Blondel etal. [29] and by Ronhovde and Nussinov (RN) [41] alsolook very good from our analysis and could be used aswell. In fact, for a study of the community structure inreal graphs, one could think of using all three methods,to be able to extract some algorithm-independent infor-mation. Furthermore, as we have seen in Section IV,these methods have a low computational complexity, soone could use them on graphs with millions of nodes andlinks. On the other hand, the algorithms are not ableto account for overlapping communities, so they need to

11

be properly refined to deal with this possibility, which iscommon in many real systems.

One may object that, despite the features planted inthe LFR benchmark, i. e. the fat-tailed distributions ofdegree and community size, which are actually observedin real networks, our artificial graphs are still differentfrom real systems. For instance, the clustering coeffi-cient [57] of the LFR benchmark is very low, due to thevery small number of triangles, whereas real networksare characterized by many triangles and consequentlya high clustering coefficient. On the one hand the GNbenchmark also has very few triangles and low clusteringcoefficient (the LFR benchmark is just a generalizationof the GN benchmark), nevertheless people have used itextensively for testing algorithms. On the other hand,nothing forbids to modify the building mechanism of theLFR benchmark so that it does include triangles. Thisis actually a potentially interesting improvement of thebenchmark, that deserves some attention in the future.

Another important remark is in order. Our whole anal-ysis has made use of graphs with a “flat” communitystructure, without hierarchy. Many real networks insteadhave a hierarchical community structure, with communi-ties inside other communities. Good methods must be

able to understand when a network has no communities,a flat or a hierarchical community structure. For an anal-ysis of this kind we would need hierarchical benchmarks.There is actually a hierarchical version of the GN bench-mark [58], not yet one of the LFR benchmark, which issorely needed. Methods to find communities in multipar-tite graphs have yet to be tested as well.

From all of the above it is clear that this manuscriptdoes not “kill” the issue of the actual efficiency and re-liability of community detection methods. Our analysisrepresents a first step, but it is clear that much moreneeds to be done along these lines.

Acknowledgments

We thank L. Donetti, R. Lambiotte, F. Radicchi, P.Ronhovde and M. Rosvall for kindly providing theircode. We are also grateful to V. Latora, T. Nepusz, A.Pluchino, A. Rapisarda, M. Sales-Pardo, C. Wiggins foruseful suggestions. We gratefully acknowledge ICTeCol-lective, grant number 238597 of the European Commis-sion.

[1] M. E. J. Newman, SIAM Rev. 45, 167 (2003).[2] S. Boccaletti, V. Latora, Y. Moreno, M. Chavez, and

D. U. Hwang, Phys. Rep. 424, 175 (2006).[3] M. Girvan and M. E. Newman, Proc. Natl. Acad. Sci.

USA 99, 7821 (2002).[4] S. Fortunato (2009), arXiv:0906.0612.[5] A. Condon and R. M. Karp, Random Struct. Algor. 18,

116 (2001).[6] L. Danon, A. Dıaz-Guilera, J. Duch, and A. Arenas, J.

Stat. Mech. 9, 8 (2005).[7] R. Albert, H. Jeong, and A.-L. Barabasi, Nature 401,

130 (1999).[8] G. Palla, I. Derenyi, I. Farkas, and T. Vicsek, Nature

435, 814 (2005).[9] R. Guimera, L. Danon, A. Dıaz-Guilera, F. Giralt, and

A. Arenas, Phys. Rev. E 68, 065103 (2003).[10] L. Danon, J. Duch, A. Arenas, and A. Dıaz-Guilera, in

Large Scale Structure and Dynamics of Complex Net-works: From Information Technology to Finance andNatural Science, edited by C. G. and V. A. (World Sci-entific, Singapore, 2007), pp. 93–114.

[11] A. Clauset, M. E. Newman, and C. Moore, Phys. Rev. E70, 066111 (2004).

[12] A. Lancichinetti, S. Fortunato, and J. Kertesz, New J.Phys. 11, 033015 (2009).

[13] A. Lancichinetti, S. Fortunato, and F. Radicchi, Phys.Rev. E 78, 046110 (2008).

[14] A. Lancichinetti and S. Fortunato, Phys. Rev. E 80,016118 (2009).

[15] G. Bianconi, P. Pin, and M. Marsili, Proc. Natl. Acad.Sci. USA 106, 11433 (2009).

[16] J. Reichardt and M. Leone, Phys. Rev. Lett. 101, 078701(2008).

[17] A. Lancichinetti, F. Radicchi, and J. J. Ramasco (2009),arXiv:0907.3708.

[18] S. Fortunato and C. Castellano, in Encyclopedia ofComplexity and Systems Science, edited by R. A.Meyers (Springer, Berlin, Germany, 2009), vol. 1,arXiv:0712.2716.

[19] M. Meila, J. Multivar. Anal. 98, 873 (2007).[20] A. L. Traud, E. D. Kelsic, P. J. Mucha, and M. A. Porter

(2008), arXiv:0809.0690.[21] D. J. C. Mackay, Information Theory, Inference, and

Learning Algorithms (Cambridge University Press, Cam-bridge, UK, 2003).

[22] The software can be downloaded fromhttp://santo.fortunato.googlepages.com/inthepress2.

[23] M. E. J. Newman and M. Girvan, Phys. Rev. E 69,026113 (2004).

[24] M. E. J. Newman, Phys. Rev. E 69, 066133 (2004).[25] R. Guimera, M. Sales-Pardo, and L. A. N. Amaral, Phys.

Rev. E 70, 025101 (2004).[26] C. P. Massen and J. P. Doye, Phys. Rev. E 71, 046101

(2005).[27] A. Medus, G. Acuna, and C. O. Dorso, Physica A 358,

593 (2005).[28] R. Guimera and L. A. N. Amaral, Nature 433, 895

(2005).[29] V. D. Blondel, J.-L. Guillaume, R. Lambiotte, and

E. Lefebvre, J. Stat. Mech. P10008 (2008).[30] F. Radicchi, C. Castellano, F. Cecconi, V. Loreto, and

D. Parisi, Proc. Natl. Acad. Sci. USA 101, 2658 (2004).[31] C. Bron and J. Kerbosch, Commun. ACM 16, 575 (1973).[32] S. van Dongen, Ph.D. thesis, Dutch National Research

Institute for Mathematics and Computer Science, Uni-versity of Utrecht, Netherlands (2000).

12

[33] M. Rosvall and C. T. Bergstrom, Proc. Natl. Acad. Sci.USA 104, 7327 (2007).

[34] M. Rosvall and C. T. Bergstrom, Proc. Natl. Acad. Sci.USA 105, 1118 (2008).

[35] J. Rissanen, Automatica 14, 465 (1978).[36] P. D. Grunwald, I. J. Myung, and M. A. Pitt, Advances in

Minimum Description Length: Theory and Applications(MIT Press, Cambridge, USA, 2005).

[37] L. Donetti and M. A. Munoz, J. Stat. Mech. P10012(2004).

[38] C. Lanczos, J. Res. Natl. Bur. Stand. 45, 255 (1950).[39] M. E. J. Newman and E. A. Leicht, Proc. Natl. Acad.

Sci. USA 104, 9564 (2007).[40] A. P. Dempster, N. M. Laird, and D. B. Rdin, J. Roy.

Stat. Soc. B 39, 1 (1977).[41] P. Ronhovde and Z. Nussinov, Phys. Rev. E 80, 016109

(2009).[42] S. Fortunato and M. Barthelemy, Proc. Natl. Acad. Sci.

USA 104, 36 (2007).[43] J. J. Ramasco and M. Mungan, Phys. Rev. E 77, 036122

(2008).[44] A. Barrat, M. Barthelemy, R. Pastor-Satorras, and

A. Vespignani, Proc. Natl. Acad. Sci. USA 101, 3747(2004).

[45] J. Baumes, M. K. Goldberg, M. S. Krishnamoorthy,M. M. Ismail, and N. Preston, in IADIS AC, edited byN. Guimaraes and P. T. Isaias (IADIS, 2005), pp. 97–104.

[46] S. Zhang, R.-S. Wang, and X.-S. Zhang, Physica A 374,483 (2007).

[47] T. Nepusz, A. Petroczi, L. Negyessy, and F. Bazso, Phys.Rev. E 77, 016107 (2008).

[48] T. S. Evans and R. Lambiotte (2009), arXiv:0903.2181.[49] Y.-Y. Ahn, J. P. Bagrow, and S. Lehmann (2009),

arXiv:0903.3178.[50] S. Gregory, in Complex Networks, edited by S. Fortu-

nato, R. Menezes, G. Mangioni, and V. Nicosia (Springer,Berlin, Germany, 2009), vol. 207 of Studies on Computa-tional Intelligence, pp. 47–62.

[51] E. N. Sawardecker, M. Sales-Pardo, and L. A. N. Amaral,Eur. Phys. J. B 67, 277 (2009).

[52] J. Reichardt and S. Bornholdt, Phys. Rev. E 74, 016110(2006).

[53] J. Reichardt and S. Bornholdt, Physica D 224, 20 (2006).[54] J. Reichardt and S. Bornholdt, Phys. Rev. E 76, 015102

(2007).[55] P. Erdos and A. Renyi, Publ. Math. Debrecen 6, 290

(1959).[56] M. Molloy and B. Reed, Random Struct. Algor. 6, 161

(1995).[57] D. Watts and S. Strogatz, Nature 393, 440 (1998).[58] A. Arenas, A. Dıaz-Guilera, and C. J. Perez-Vicente,

Phys. Rev. Lett. 96, 114102 (2006).