Community detection identifies latent groups in a graph by finding nodes that connect more densely to one another than to nodes outside the group. It is an unsupervised, node-focused task that uses graph topology and relationships without labels. section 9.2 section 9.2.3
A practical analysis pipeline separates connectivity from community structure:
- Represent the relevant nodes and relationships as a graph or in-memory graph projection. section 4.2.2
- Use weakly connected components to find disconnected subgraphs when simple reachability defines group membership. section 4.2.2
- Use Louvain modularity when groups should reflect denser internal connections than expected in a random network; it can reveal communities at multiple scales. section 4.2.2
- Inspect community sizes, modularity, distributions, and representative members rather than treating assignments as self-explanatory. section 4.2.2
Protein–protein interaction network
A Neo4j analysis marks proteins connected through INTERACTS_WITH, projects an undirected PPI graph, and runs WCC. The 21,559 proteins form 27 connected components, including one component of 21,521 proteins. Louvain then produces 48 communities with modularity 0.5464; querying the largest groups returns member counts and highly connected representative proteins. section 4.2.2
Figure 9.4 Flow of community detection. The input is a graph, and the output is a mapping between nodes and groups (circled in the image).
Shows community detection as a graph-to-group-mapping process, clarifying the expected input and output. section 9.2.3



