Maximizing Modularity is hard
U. Brandes, D. Delling, M. Gaertler, R. Goerke, M. Hoefer, Z. Nikoloski, D. Wagner
TL;DR
The paper proves that maximizing the modularity quality index for graph clusterings is strongly NP-complete, by a reduction from 3-Partition that builds a graph with multiple cliques and element vertices. This establishes that no polynomial-time algorithm can guarantee optimal modularity except if P = NP, thereby justifying heuristic and approximation approaches. The authors also show the result extends to weighted graphs, underscoring the broad computational intractability of modularity optimization. The findings provide a theoretical foundation for the reliance on heuristics in community detection and motivate future work on approximation guarantees and deeper analysis of modularity properties.
Abstract
Several algorithms have been proposed to compute partitions of networks into communities that score high on a graph clustering index called modularity. While publications on these algorithms typically contain experimental evaluations to emphasize the plausibility of results, none of these algorithms has been shown to actually compute optimal partitions. We here settle the unknown complexity status of modularity maximization by showing that the corresponding decision version is NP-complete in the strong sense. As a consequence, any efficient, i.e. polynomial-time, algorithm is only heuristic and yields suboptimal partitions on many instances.
