Faster unfolding of communities: Speeding up the Louvain algorithm

V. A. Traag
Phys. Rev. E 92, 032801 – Published 3 September 2015

Abstract

Many complex networks exhibit a modular structure of densely connected groups of nodes. Usually, such a modular structure is uncovered by the optimization of some quality function. Although flawed, modularity remains one of the most popular quality functions. The Louvain algorithm was originally developed for optimizing modularity, but has been applied to a variety of methods. As such, speeding up the Louvain algorithm enables the analysis of larger graphs in a shorter time for various methods. We here suggest to consider moving nodes to a random neighbor community, instead of the best neighbor community. Although incredibly simple, it reduces the theoretical runtime complexity from O(m) to O(nlogk) in networks with a clear community structure. In benchmark networks, it speeds up the algorithm roughly 2–3 times, while in some real networks it even reaches 10 times faster runtimes. This improvement is due to two factors: (1) a random neighbor is likely to be in a “good” community and (2) random neighbors are likely to be hubs, helping the convergence. Finally, the performance gain only slightly diminishes the quality, especially for modularity, thus providing a good quality-performance ratio. However, these gains are less pronounced, or even disappear, for some other measures such as significance or surprise.

  • Figure
  • Figure
  • Figure
  • Figure
  • Figure
  • Received 4 March 2015
  • Revised 31 July 2015

DOI:https://doi.org/10.1103/PhysRevE.92.032801

©2015 American Physical Society

Authors & Affiliations

V. A. Traag*

  • Royal Netherlands Institute of Southeast Asian and Caribbean Studies, Reuvensplaats 2, 2311 BE Leiden, the Netherlands and e-Humanities group, Royal Netherlands Academy of Arts and Sciences, Joan Muyskenweg 25, 1096 CJ Amsterdam, the Netherlands

  • *traag@kitlv.nl

Article Text (Subscription Required)

Click to Expand

References (Subscription Required)

Click to Expand
Issue

Vol. 92, Iss. 3 — September 2015

Reuse & Permissions
Access Options
Author publication services for translation and copyediting assistance advertisement

Authorization Required


×
×

Images

×

Sign up to receive regular email alerts from Physical Review E

Log In

Cancel
×

Search


Article Lookup

Paste a citation or DOI

Enter a citation
×