What it does
Community detection finds clusters of nodes in a network that are more densely connected to each other than to the rest. In biology, such clusters in a protein interaction network often correspond to protein complexes or functional modules. Dozens of algorithms exist, and it is hard to know which one to use.
This project benchmarks 21 community detection algorithms and their variants, grouped into five types: stochastic, kernel-based, modularity-based, hierarchical and local search-based. They are tested against known answers in two kinds of network: artificial LFR benchmark networks, whose community structure is controlled through a mixing parameter (μ, the share of each node’s links that leave its community), and eight real-world social networks. The algorithms are also run on human and yeast protein–protein interaction networks and scored by how many enriched Gene Ontology terms their communities contain.
Accuracy is measured mainly by normalised mutual information (NMI, the agreement between found and true communities), alongside granularity (cluster ratio) and computing time. The work draws on the DREAM Disease Module Identification challenge, and the suite includes csbio_iitm-hamming, a method based on the lab’s DiseaseModuleIdentification work.
Why it matters
- Performance falls off a cliff. As μ rises and communities become less distinct, accuracy declines along a sigmoidal curve. Algorithms that find finer-grained clusters stay stable for longer, and computing time does not depend on how modular the network is.
- Size matters. Algorithms tend to do poorly on small networks. On large networks the trade-off between accuracy and computing time becomes more pronounced.
- Practical recommendations. For functional enrichment in protein networks, Shared neighbor and blue_genes found the most significant GO terms in both human and yeast, but they are slow on large networks. MLRMCL is a faster alternative and suits networks whose communities are not well defined.
- One interface for everything. All 21 algorithms, written in Python, R and Java, are wrapped in one Python package with a command-line interface.
Key features
- 21 algorithms behind a single function or command, including Louvain, fast greedy, walktrap, spin glass, label propagation, Girvan–Newman, spectral clustering, MLRMCL, Dcut and csbio_iitm-hamming
- Optional weighted and directed networks, plus algorithm-specific parameters
- Input as an edge list file or a NetworkX graph; output as a list of communities, optionally saved to a text file
- The LFR and social benchmark networks, results, and notebooks (
LFR_Results.ipynb,Social_Results.ipynb,Estimating_mu.ipynb,Gene_enrichment.ipynb) to regenerate the figures
Quick start
| |
| |
The package README lists every algorithm and its parameters. The same team has since looked beyond network topology, at informative node features in AI-based community detection on biological networks (HICSS-60, 2027).
How to cite
If BenchmCommDetection helps your research, please cite:
(2025). Extensive Benchmarking of Community Detection Algorithms. bioRxiv. doi:10.1101/2025.05.07.652778
BibTeX
@article{Sapna2025Extensive,
author = {R Sapna and Harikeshav Karthik and Karthik Raman},
title = {Extensive Benchmarking of Community Detection Algorithms},
journal = {bioRxiv},
year = {2025},
doi = {10.1101/2025.05.07.652778}
}