Abstract
Identifying community structure in networks is an issue of particular interest in network science. The modularity introduced by Newman and Girvan is the most popular quality function for community detection in networks. In this study, we identify a problem in the concept of modularity and suggest a solution to overcome this problem. Specifically, we obtain a new quality function for community detection. We refer to the function as Z-modularity because it measures the Z-score of a given partition with respect to the fraction of the number of edges within communities. Our theoretical analysis shows that Z-modularity mitigates the resolution limit of the original modularity in certain cases. Computational experiments using both artificial networks and well-known real-world networks demonstrate the validity and reliability of the proposed quality function.
Introduction
Community detection—the process of clustering nodes into groups with dense internal connections—is a fundamental task in network science. For over a decade, the Newman-Girvan modularity has served as the standard metric for evaluating the quality of these partitions. However, modularity suffers from a well-documented resolution limit. As a network grows, modularity-maximizing algorithms often fail to detect small, tightly-knit communities, merging them into larger clusters because the global expected number of edges becomes disproportionately high. This paper introduces Z-modularity, a novel quality function designed to overcome this limitation by incorporating statistical variance into the evaluation of community structures.
Methodology: Defining Z-Modularity
The authors propose Z-modularity ($Z(\mathcal{C})$), which treats the edge distribution within a partition as a random process under a configuration model. Unlike standard modularity, which only considers the difference between observed and expected edge fractions, Z-modularity calculates the Z-score of a partition. This is defined as the number of standard deviations the observed internal edge fraction deviates from the mean:
$$Z(\mathcal{C}) = \frac{Q(\mathcal{C})}{\sqrt{Var}}$$
where $Q(\mathcal{C})$ is the standard modularity and the denominator represents the standard deviation of the edge fraction under the null model. By dividing by the standard deviation, the function rewards partitions that are statistically "rare" or improbable, effectively highlighting small, dense clusters that standard modularity would overlook. Optimization is achieved through a simulated annealing algorithm to find the partition that maximizes this Z-score.
Experimental Setup and Datasets
The efficacy of Z-modularity was tested using both synthetic benchmarks and real-world networks:
- Synthetic Benchmarks: Tests included the Planted $l$-partition and LFR models. In large-scale LFR benchmarks (5,000 nodes), Z-modularity significantly outperformed standard modularity in recovering ground-truth communities across various noise levels. On the Hanoi Graph, which has a strict hierarchical structure, Z-modularity identified 27 distinct communities, revealing a much finer structure compared to the 9 communities found by standard modularity.
- Real-World Networks: The authors evaluated the method on classic datasets like Zachary’s Karate Club and Les Misérables. Notably, on the American College Football network, Z-modularity correctly identified 7 out of 12 conferences, whereas standard modularity typically recovered only 4, often merging smaller conferences together.
Key Insights and Discussion
The core innovation of Z-modularity lies in using statistical rarity as a proxy for community quality. Theoretically, the authors demonstrate that Z-modularity can avoid merging adjacent cliques in a "ring of cliques" network—a classic failure case for standard modularity—regardless of the network's total size. Because the variance term is partition-dependent, the metric effectively self-tunes to the scale of the communities, providing a multi-scale detection capability that standard modularity lacks.
Conclusion and Future Directions
While Z-modularity offers a robust solution to the resolution limit, it introduces computational challenges. The current implementation relies on simulated annealing, which is more computationally intensive than heuristic methods like the Louvain algorithm. Future research will focus on developing more efficient optimization techniques compatible with the Z-modularity denominator and exploring its application to massive, "big data" networks. Additionally, the physical interpretation of maximizing a Z-score remains an intriguing area for further theoretical exploration.
Summary updated