Louvain Method
   HOME

TheInfoList



OR:

The Louvain method for community detection is a method to extract non-overlapping communities from large networks created by Blondel ''et al''. from the
University of Louvain A university () is an institution of higher (or tertiary) education and research which awards academic degrees in several academic disciplines. Universities typically offer both undergraduate and postgraduate programs. In the United States, the ...
(the source of this method's name). The method is a greedy optimization method that appears to run in time O(n \cdot \log n) where n is the number of nodes in the network.


Modularity optimization

The inspiration for this method of community detection is the optimization of
modularity Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. The concept of modularity is used primarily to reduce complexity by breaking a sy ...
as the algorithm progresses. Modularity is a scale value between −0.5 (non-modular clustering) and 1 (fully modular clustering) that measures the relative density of edges inside communities with respect to edges outside communities. Optimizing this value theoretically results in the best possible grouping of the nodes of a given network. But because going through all possible iterations of the nodes into groups is impractical, heuristic algorithms are used. In the Louvain Method of community detection, first small communities are found by optimizing modularity locally on all nodes, then each small community is grouped into one node and the first step is repeated. The method is similar to the earlier method by Clauset, Newman and Moore that connects communities whose amalgamation produces the largest increase in modularity.


Algorithm

The value to be optimized is
modularity Broadly speaking, modularity is the degree to which a system's components may be separated and recombined, often with the benefit of flexibility and variety in use. The concept of modularity is used primarily to reduce complexity by breaking a sy ...
, defined as a value in the range 1/2,1/math> that measures the density of links inside communities compared to links between communities. For a weighted graph, modularity is defined as: Q = \frac\sum\limits_\bigg _ - \frac\biggdelta (c_i,c_j), where * A_ represents the edge weight between nodes i and j; * k_i and k_j are the sum of the weights of the edges attached to nodes i and j, respectively; * m is the sum of all of the edge weights in the graph; * c_i and c_j are the communities of the nodes; and * \delta is
Kronecker delta function In mathematics, the Kronecker delta (named after Leopold Kronecker) is a function of two variables, usually just non-negative integers. The function is 1 if the variables are equal, and 0 otherwise: \delta_ = \begin 0 &\text i \neq j, \\ 1 &\t ...
(\delta (x,y)= 1 if x=y, 0 otherwise). Based on the above equation, the modularity of a community c can be calculated as: Q_c = \frac - (\frac)^2, where * \Sigma_ is the sum of edge weights between nodes within the community c (each edge is considered twice); and * \Sigma_ is the sum of all edge weights for nodes within the community (including edges which link to other communities). In order to maximize modularity efficiently, the Louvain Method has two phases that are repeated iteratively. First, each node in the network is assigned to its own community. Then for each node i, the change in modularity is calculated for removing i from its own community and moving it into the community of each neighbor j of i. This value is easily calculated by two steps: (1) removing i from its original community, and (2) inserting i to the community of j. The two equations are quite similar, and the equation for step (2) is: \Delta Q = \bigg \frac - \bigg(\frac\bigg)^2 \bigg\bigg frac - \bigg(\frac\bigg)^2-\bigg(\frac\bigg)^2\bigg Where \Sigma_ is sum of all the weights of the links inside the community i is moving into, \Sigma_ is the sum of all the weights of the links to nodes in the community i is moving into, k_i is the weighted degree of i, k_ is the sum of the weights of the links between i and other nodes in the community that i is moving into, and m is the sum of the weights of all links in the network. Then, once this value is calculated for all communities i is connected to, i is placed into the community that resulted in the greatest modularity increase. If no increase is possible, i remains in its original community. This process is applied repeatedly and sequentially to all nodes until no modularity increase can occur. Once this local maximum of modularity is hit, the first phase has ended. In the second phase of the algorithm, it groups all of the nodes in the same community and builds a new network where nodes are the communities from the previous phase. Any links between nodes of the same community are now represented by self-loops on the new community node and links from multiple nodes in the same community to a node in a different community are represented by weighted edges between communities. Once the new network is created, the second phase has ended and the first phase can be re-applied to the new network.


Previous uses

*Twitter social Network (2.4 Million nodes, 38 million links) by Josep Pujol, Vijay Erramilli, and Pablo Rodriguez: The authors explore the problem of partitioning Online Social Networks onto different machines. *Mobile phone Network (4 Million nodes, 100 Million links) by Derek Greene, Donal Doyle, and Padraig Cunningham: Community-tracking strategies for identifying dynamic communities of different dynamic social networks. *Detecting species in network-based dynamical model.


Disadvantages

It is important to emphasize that Louvain produces only non-overlapping communities, which means that each node can belong to at most one community. This is highly unrealistic in many real-world applications. For example, in social networks, most people belong to multiple communities: their family, their friends, their co-workers, old school buddies, etc. In biological networks, most genes or proteins belong to more than one pathway or complex. Furthermore, Louvain has been shown to sometimes produce arbitrarily badly connected communities, and has been effectively superseded (at least in the non-overlapping case) by the Leiden algorithm.


Comparison to other methods of non-overlapping community detection

When comparing modularity optimization methods, the two measures of importance are the speed and the resulting modularity value. A higher speed is better as it shows a method is more efficient than others and a higher modularity value is desirable as it points to having better-defined communities. The compared methods are, the algorithm of Clauset, Newman, and Moore, Pons and Latapy, and Wakita and Tsurumi. -/- in the table refers to a method that took over 24hrs to run. This table (from) shows that the Louvain method outperforms many similar modularity optimization methods in both the modularity and the time categories.


See also

*
Modularity (networks) Modularity is a measure of the structure of networks or graphs which measures the strength of division of a network into modules (also called groups, clusters or communities). Networks with high modularity have dense connections between the nod ...
* Community structure * Network science *
K-means clustering ''k''-means clustering is a method of vector quantization, originally from signal processing, that aims to partition ''n'' observations into ''k'' clusters in which each observation belongs to the cluster with the nearest mean (cluster centers or ...


References

*"The Louvain method for community detection in large networks" Vincent Blondel http://perso.uclouvain.be/vincent.blondel/research/louvain.html {{Universities of Louvain Network theory