[Paper Review] On Comparing and Enhancing Common Approaches to Network Community Detection
This paper implements and enhances four common network community detection algorithms—Agglomerative Hierarchical Clustering, Girvan-Newman, Fastgreedy, and Louvain—focusing on implementation-level optimizations. It introduces self-neighboring for improved cluster cohesion, a deterministic faster Louvain variant with smaller larger clusters, and optimized data structures for Fastgreedy, all validated on standard datasets with open-source code for reproducibility.
In this work, we explore four common algorithms for community detection in networks, namely Agglomerative Hierarchical Clustering, Divisive Hierarchical Clustering (Girvan-Newman), Fastgreedy and the Louvain Method. We investigate their mechanics and compare their differences in terms of implementation and results of the clustering behavior on a standard dataset. We further propose some enhancements to these algorithms that show promising results in our evaluations, such as self-neighboring for Neighbor Matrix constructions, a deterministic slightly faster version of the Louvain Method that favors less bigger clusters and various implementation changes to the Fastgreedy algorithm.
Motivation & Objective
- To investigate and compare the technical implementation and clustering behavior of four widely used community detection algorithms: Agglomerative Hierarchical Clustering, Girvan-Newman, Fastgreedy, and Louvain.
- To identify implementation-level inefficiencies and inconsistencies in existing algorithms, particularly in modularity calculation and data structure usage.
- To propose and evaluate targeted enhancements that improve runtime, determinism, and clustering quality without altering the core algorithmic paradigms.
- To ensure reproducibility by releasing all source code, enabling future research to build upon the implementations and findings.
- To provide a deeper technical understanding of how algorithmic choices—such as distance functions, linkage criteria, and modularity formulas—affect final clustering outcomes.
Proposed method
- Implemented all four algorithms from scratch to enable direct comparison and experimentation with internal mechanics.
- Introduced self-neighboring in Agglomerative Hierarchical Clustering to close gaps in cluster cohesion by modifying neighbor matrix construction.
- Proposed a deterministic variant of the Louvain Method that omits the merging step and prioritizes smaller, more balanced clusters, improving speed and consistency.
- Optimized the Fastgreedy algorithm using compressed sparse row (CSR) matrices and max-heaps for efficient row slicing and community updates.
- Evaluated different modularity calculation methods in the Louvain algorithm, comparing partial vs. full modularity formulas and their impact on runtime and modularity scores.
- Validated Meghanathan’s optimization for the Girvan-Newman algorithm on the Karate Club dataset, confirming improved runtime performance.
Experimental results
Research questions
- RQ1How do implementation-level choices—such as distance functions, linkage criteria, and modularity formulas—affect the clustering behavior and results of community detection algorithms?
- RQ2Can self-neighboring in Agglomerative Hierarchical Clustering effectively close gaps in cluster cohesion that arise from standard neighbor matrix construction?
- RQ3Does a deterministic version of the Louvain Method with an omitted merging step yield faster, more consistent results while maintaining or improving modularity?
- RQ4To what extent can data structure optimizations (e.g., CSR matrices, max-heaps, dictionaries) improve the performance of the Fastgreedy algorithm without increasing memory usage beyond acceptable limits?
- RQ5What is the impact of using the full modularity formula versus the partial formula in the Louvain algorithm, and does omitting the merging step lead to indefinite loops or degraded performance?
Key findings
- Self-neighboring significantly improves cluster cohesion in Agglomerative Hierarchical Clustering by eliminating gaps between clusters that occur with standard neighbor matrix construction.
- The deterministic Louvain variant reduced average runtime to 3.349ms on the Karate Club dataset (vs. 3.899ms for the original) and produced consistently identical results across runs, with a modularity score of 0.37443.
- Omitting the merging step in the Louvain algorithm led to a dramatic increase in runtime (up to 1966.91ms) and lower modularity scores, indicating that the merging step is essential for performance and result quality.
- Using the full modularity formula in the Louvain algorithm increased runtime from 3.899ms to 440.799ms, showing that the partial formula is critical for efficiency, though both yield similar modularity scores.
- The optimized Fastgreedy implementation using CSR matrices and max-heaps achieved better performance than the original, with faster row operations and reduced complexity, though at the cost of higher memory usage.
- The Girvan-Newman algorithm’s performance was successfully improved by adopting Meghanathan’s adaptation, confirming its viability for faster edge betweenness computation in large-scale networks.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.