←All posts

Community Detection Part 2 — Higher-Order Structures, Dynamic Networks, and the Frontier

Community detection methods for structure that edge density misses: higher-order (motif-based) detection, tracking communities in dynamic networks, and multiplex network analysis, presented in the order the research developed, with interactive visualizations.

Graph TheoryCommunity DetectionNetwork ScienceHigher-OrderDynamic Networks

Introduction — Assumptions Shared by Part 1's Methods

Part 1 covered the fundamentals of community detection: its history, the formulation of Modularity Q, standard algorithms (Louvain, Leiden, Infomap, SBM), and fundamental difficulties such as the resolution limit and the detectability threshold.

The methods in Part 1 implicitly assume three things:

  1. Only pairwise edges — Communities defined solely by whether edges exist between pairs of nodes
  2. Static (single snapshot) graphs — The network is assumed not to change over time
  3. Single type of relationship — Only one kind of connection between nodes

Real-world networks break all three. In social networks, triadic closure occurs ("a friend of a friend is a friend"), relationships change over time, and the same people may be linked by friendship, work, and shared hobbies at once.

This article covers three lines of research, each of which drops one of these assumptions:

  • Higher-order community detection — motifs, hypergraphs, simplicial complexes
  • Dynamic network community detection — tracking communities in evolving graphs
  • Multiplex network community detection — integrating multiple relationship layers

Timeline: Higher-Order & Dynamic Community Detection

Key work since the mid-2000s on overlapping, higher-order, dynamic, and multiplex community detection.

2005Palla — CPM (Overlapping)

Palla et al. propose the Clique Percolation Method (CPM), an early representative method that defines communities as chains of adjacent k-cliques and can detect overlapping communities.

2010Ahn — Link Communities

Ahn, Bagrow & Lehmann propose clustering links (edges) rather than nodes. A node whose links fall into several communities belongs to all of them.

2010Mucha — Multislice Networks

Mucha et al. unify community detection in time-dependent, multiscale, and multiplex networks with Multislice Modularity, a generalization of Modularity (published in Science).

2013De Domenico — Tensor Framework

De Domenico et al. propose a tensorial framework for multiplex networks, explicitly handling inter-layer coupling.

2013Yang & Leskovec — BigCLAM

Scalable overlapping community detection for large networks using non-negative matrix factorization.

2014Gauvin — Non-Negative Tensor Factorization

Gauvin et al. apply non-negative tensor factorization (NTF) to face-to-face contact networks, estimating community membership and temporal activity patterns together.

2016Benson — Higher-Order Motifs

Benson, Gleich & Leskovec propose motif-based community detection (published in Science). Considers subgraph patterns like triangles, not just edges.

2016Benson — Motif Cheeger Inequality

The same paper proves a Cheeger-like inequality for spectral clustering with the motif-weighted Laplacian. It holds for motifs with three anchor nodes, such as triangles, and bounds the quality of the resulting partition.

2019Rossetti — CDlib

Rossetti, Milli & Cazabet release CDlib, a Python library that bundles many detection algorithms, including overlapping ones, with tools to evaluate, compare, and visualize the results.

2021Magnani — Multiplex Survey

Survey by Magnani, Hanteer, Interdonato, Rossi & Tagarelli (ACM Computing Surveys) that classifies multiplex methods by how they handle layers: flattening, layer-by-layer, and multilayer.

2023GNN-Based Methods Rise

Research on Graph Neural Network (GNN)-based community detection grows; for example, DMoN (Tsitsulin et al., JMLR) relaxes Modularity into a differentiable form and predicts community assignments directly with a GNN.

Part I: Higher-Order Community Detection

Why Edges Alone Are Insufficient

Most algorithms from Part 1, including Modularity-based methods, define communities as "subgraphs with dense edges." That definition cannot tell these two graphs apart:

  • Graph A: 6 nodes, 9 edges. Every edge belongs to a triangle
  • Graph B: 6 nodes, 9 edges. Zero triangles. A complete bipartite graph K3,3K_{3,3}

Edge Density vs Triangle Density — Same Edge Count, Different Structure

Graphs A and B have the same numbers of nodes and edges, but every edge of A lies in a triangle, while B has no triangles at all. Edge density alone cannot tell them apart.

Graph A6 nodes · 9 edges · 4 trianglesvsGraph B6 nodes · 9 edges · 0 triangles
Graph A—Every edge lies in a triangle. Strong local cohesion from triadic closure ('a friend of a friend is a friend').
Graph B—No triangles. The complete bipartite graph K₃,₃ has no odd cycles, so despite the same edge density it has no triangles.

With the same node and edge counts, the two have the same edge density. Graph A, however, has strong local cohesion from triadic closure — in social-network terms, friends of friends become friends. Graph B has no triangles at all.

To capture this difference, researchers turned to methods that account for higher-order structures such as triangles.

Clique Percolation Method (CPM) — An Early Higher-Order Method

One of the earliest well-known methods built on higher-order structures is the Clique Percolation Method (CPM) by Palla, Derényi, Farkas & Vicsek (2005). CPM finds communities as follows:

  1. Enumerate all kk-cliques (complete subgraphs on kk nodes) in the network
  2. Consider two kk-cliques "adjacent" if they share k−1k-1 nodes
  3. Define a community as the union of all kk-cliques reachable through adjacent kk-cliques

For example, in a protein-protein interaction (PPI) network, applying CPM with k=4k=4 uses sets of four mutually interacting proteins as building blocks to detect larger functional modules.

CPM can also detect overlapping communities, where a node belongs to several communities at once. Chains of kk-cliques can share nodes, so a node that sits in several chains belongs to each chain's community. In social networks, one person usually belongs to several groups, such as work colleagues, university friends, and a hobby group, so this property fits real structure.

Results depend heavily on the choice of kk, though, and in sparse networks kk-cliques may barely exist. CPM is also limited to kk-cliques as its higher-order structure. The motif-based methods covered next generalize this to arbitrary network motifs.

Network Motifs: Foundations

A network motif is a small subgraph pattern that occurs in a network significantly more often than in randomized networks. The concept was established by Uri Alon and colleagues (Milo et al., 2002), who showed that patterns such as feed-forward loops appear far more often in E. coli gene regulatory networks than in random networks.

Catalog of Network Motifs

Representative motifs (small subgraph patterns) used in higher-order community detection.

Triangle (M₃)

The most basic higher-order structure: 3 mutually connected nodes. Corresponds to 'a friend of a friend is a friend' (triadic closure) in social networks.

4-Cycle (M₄)

Frequent in bipartite-like structures; underlies collaborative filtering in user–product networks.

Feed-Forward Loop

Directed motif common in gene regulatory networks and neural circuits; filters signals in gene regulation.

4-Clique (K₄)

Complete graph of 4 nodes. Indicator of strong group cohesion. Building block of CPM with k = 4.

Motifs are worth looking at because they carry functional meaning:

  • Triangles: Trust and information transfer efficiency in social networks. "If A trusts B and B trusts C, then A is likely to trust C"
  • Feed-forward loops: Signal filtering in gene regulation
  • 4-cycles: Foundation for collaborative filtering in bipartite networks (user–product)

Benson-Gleich-Leskovec: Motif-Based Community Detection (2016)

A widely cited work on higher-order community detection is Benson, Gleich & Leskovec's "Higher-order organization of complex networks" (Science, 2016). The basic idea:

Define communities based on motif density, not edge density.

The Central Measure: Motif Conductance

Conductance, as defined in Part 1:

ϕ(S)=cut(S,Sˉ)min⁡(vol(S),vol(Sˉ))\phi(S) = \frac{\text{cut}(S, \bar{S})}{\min(\text{vol}(S), \text{vol}(\bar{S}))}

Benson et al. extended this to Motif Conductance for motif MM:

ϕM(S)=cutM(S,Sˉ)min⁡(volM(S),volM(Sˉ))\phi_M(S) = \frac{\text{cut}_M(S, \bar{S})}{\min(\text{vol}_M(S), \text{vol}_M(\bar{S}))}

Where:

  • cutM(S,Sˉ)\text{cut}_M(S, \bar{S}): Number of motif MM instances with nodes in both SS and Sˉ\bar{S} ("boundary-crossing motifs")
  • volM(S)\text{vol}_M(S): Sum of motif-weighted degrees of nodes in SS. Formally, volM(S)=∑i∈Sdi(M)\text{vol}_M(S) = \sum_{i \in S} d_i^{(M)}, where di(M)=∑jWij(M)d_i^{(M)} = \sum_j W_{ij}^{(M)} (row sum of the motif-weighted adjacency matrix defined below)

A smaller ϕM(S)\phi_M(S) means motif MM is dense inside community SS and few motif instances cross its boundary.

Motif-Weighted Adjacency Matrix

Finding the set that exactly minimizes Motif Conductance is computationally hard, so Benson et al. construct the motif-weighted adjacency matrix W(M)W^{(M)} and approximate the minimization with a spectral method:

Wij(M)=(number of instances of motif M containing nodes i and j in the chosen anchor set)W^{(M)}_{ij} = \text{(number of instances of motif } M \text{ containing nodes } i \text{ and } j \text{ in the chosen anchor set)}

Building the Motif-Weighted Adjacency Matrix

The standard adjacency matrix records whether an edge exists (0/1); the motif-weighted adjacency matrix records how many instances of the motif (here, triangles) contain both nodes i and j.

① Original Graph

01234

Count triangles

→

for weights

② Motif-Weighted Adjacency Matrix W(M₃)

01234
001100
110210
212010
301100
400000

Edge (1,2) is in triangles {0,1,2} and {1,2,3}, so its weight is 2; edge (0,4) is in no triangle, so its weight is 0

The anchor set is the subset of a motif's nodes whose co-occurrences are counted. When all of a motif's nodes are anchors, as with triangles, Wij(M)W^{(M)}_{ij} is simply the number of instances containing the pair (i,j)(i,j); for motifs anchored on only some of their nodes, the choice of anchors changes the counts. This matrix is used to build the motif-weighted Laplacian for spectral clustering:

L(M)=D(M)−W(M)L^{(M)} = D^{(M)} - W^{(M)}

where D(M)D^{(M)} is the diagonal degree matrix of W(M)W^{(M)}.

Benson et al. (2016) proved a Cheeger-like inequality for its normalized form L(M)=(D(M))−1/2L(M)(D(M))−1/2\mathcal{L}^{(M)} = (D^{(M)})^{-1/2} L^{(M)} (D^{(M)})^{-1/2}. For motifs with three anchor nodes, such as triangles, Motif Conductance equals ordinary Conductance on the graph weighted by W(M)W^{(M)}, and the following holds:

λ2(M)2≤ϕM∗≤2λ2(M)\frac{\lambda_2^{(M)}}{2} \leq \phi_M^* \leq \sqrt{2 \lambda_2^{(M)}}

where λ2(M)\lambda_2^{(M)} is the second smallest eigenvalue of L(M)\mathcal{L}^{(M)} and ϕM∗\phi_M^* is the optimal Motif Conductance. The cluster SS found by the spectral method satisfies ϕM(S)≤4ϕM∗\phi_M(S) \leq 4\sqrt{\phi_M^*}, so its distance from the optimum is bounded. This mirrors the classical Cheeger inequality for spectral clustering from Part 1.

The following demo walks through triangle-motif-based community detection:

Motif-Based Community Detection Steps

Visualizing the process of detecting communities based on triangle motif density.

01234567
Graph Overview

Original graph: 8 nodes, 13 edges. The left cluster A {0,1,2,3} and the right cluster B {4,5,6,7} are connected by edge 3-4. Both clusters are dense in edges.

1 / 6

Advantages of Motif-Based Methods

Compared to edge-based methods, motif-based methods offer:

  1. More information: In addition to pairwise edges, they use patterns of 3 or more nodes
  2. Domain knowledge integration: Choose motifs suited to your domain — feed-forward loops for biology, triangles for social networks
  3. Noise robustness: Random edges rarely form motifs, so motif density is less affected by random noise

Hypergraph Community Detection

Motif-based methods count higher-order patterns built from a graph's edges. Hypergraph-based approaches instead represent multi-body relationships directly in the data.

In standard graphs, edges connect exactly 2 nodes. In hypergraphs, a hyperedge directly connects any number of nodes:

e={v1,v2,...,vk},k≥2e = \{v_1, v_2, ..., v_k\}, \quad k \geq 2

Examples of multi-body relationships that hyperedges can represent:

  • Paper co-authorship (3+ authors)
  • Email CC (multiple recipients)
  • Chemical reactions (multiple reactants)

The main approaches to community detection on hypergraphs are:

Clique Expansion: Convert each hyperedge e={v1,...,vk}e = \{v_1, ..., v_k\} into (k2)\binom{k}{2} pairwise edges and process as a standard graph. This conversion loses the fact that everyone was involved at the same time: 4 people in a single meeting (one hyperedge) and 4 people having 6 separate pairwise conversations (6 edges) look identical after conversion.

Direct Hypergraph Methods: Spectral clustering on hypergraphs uses the following hypergraph Laplacian:

ΔH=Dv−HWeDe−1HT\Delta_H = D_v - H W_e D_e^{-1} H^T

where HH is the incidence matrix (node × hyperedge), DvD_v is the node degree matrix, WeW_e is the hyperedge weight matrix, and DeD_e is the diagonal matrix of hyperedge degrees (sizes). Zhou, Huang & Schölkopf (2006) introduced its normalized form, I−Dv−1/2HWeDe−1HTDv−1/2I - D_v^{-1/2} H W_e D_e^{-1} H^T D_v^{-1/2}, obtained by multiplying by Dv−1/2D_v^{-1/2} on both sides.

Kumar et al. (2020) proposed a method that keeps the hyperedges intact while iteratively maximizing a weighted modularity whose definition reflects hyperedge sizes.

Simplicial Complex Approaches

A simplicial complex is a concept from topology that can be viewed as a hypergraph with an added inclusion condition. A kk-simplex is a set of k+1k+1 nodes, and a simplicial complex also contains every subset of each of its simplices as a simplex.

  • 0-simplex: node
  • 1-simplex: edge
  • 2-simplex: triangle (3 nodes + 3 edges)
  • kk-simplex: complete graph on (k+1)(k+1) nodes (plus all faces)

On a simplicial complex, boundary operators define the Hodge Laplacian, which measures the "smoothness" of kk-chains (assignments of values to kk-simplices). Since 1-chains correspond to flows on edges, it can be used for community detection based on edge flows. Schaub et al. (2020) connected random walks on simplicial complexes to the normalized Hodge 1-Laplacian.

The methods in Part I widened the kinds of relationships that can be represented: edges → cliques → motifs → hyperedges → simplices. All of them, however, work on static graphs that do not change over time.

Part II: Dynamic Network Community Detection

Formulating Dynamic Networks

A network whose structure changes over time — friendships forming and dissolving, papers being published and cited, protein expression patterns shifting — is called a dynamic network.

Two main representations exist:

Discrete snapshot model: A sequence of graph snapshots G1,G2,...,GTG_1, G_2, ..., G_T at times t1,t2,...,tTt_1, t_2, ..., t_T. Each Gt=(Vt,Et)G_t = (V_t, E_t) is a static graph.

Continuous-time model: Edge appearances and disappearances treated as timestamped events (i,j,tstart,tend)(i, j, t_{\text{start}}, t_{\text{end}}). Retains more detail but complicates analysis.

The snapshot model is widely used in practice, but results can change considerably with the time granularity (snapshot interval).

Community Lifecycle

In dynamic networks it is not enough to find communities at each time step; communities must also be tracked through time. Communities go through lifecycle events such as these:

Community Lifecycle Events

The main changes a community can go through between consecutive snapshots.

●
Birth

A new community emerges

▲
Growth

Members join an existing community

▽
Shrink

Members leave and the community shrinks

⟨
Split

One community splits into two or more

⟩
Merge

Two or more communities merge

✕
Death

The community ceases to exist

These events are identified by matching communities across consecutive snapshots.

The following demo shows community lifecycle events in a dynamic network:

Community Lifecycle in Dynamic Networks

Track how communities are born, grow, split, merge, and die over time.

t = 1Initial
ABCDEF

t=1: Initial state. Two communities (blue, red) exist. Edge C-D bridges them.

1 / 6

Approach 1: Independent Detection + Matching (Two-Stage)

The simplest method applies community detection independently to each snapshot, then matches communities across consecutive time steps:

Two-Stage Approach:
  1. Detect communities C_t = {C_t^1, C_t^2, ...} independently at each time t
  2. Match between adjacent times t, t+1 using Jaccard coefficient:
     J(C_t^i, C_{t+1}^j) = |C_t^i ∩ C_{t+1}^j| / |C_t^i ∪ C_{t+1}^j|
  3. Identify lifecycle events from matching:
     - C_t^i with no match → Death
     - C_{t+1}^j with no source → Birth
     - 1-to-many → Split
     - Many-to-1 → Merge

This approach lets you use static community detection algorithms unchanged. Louvain, Leiden, Infomap, or any other method from Part 1 can be applied to each snapshot.

On the other hand, temporal coherence is not guaranteed. A few edges added or removed can change the detected community structure substantially, so communities that are actually stable may appear to fluctuate wildly.

Approach 2: Evolutionary Clustering (2006)

Chakrabarti, Kumar & Tomkins (KDD 2006) proposed Evolutionary Clustering, which builds temporal coherence into the objective function.

Specifically, it maximizes a weighted sum of fit to the current snapshot and similarity to the previous partition:

St=α⋅quality(Ct,Gt)+(1−α)⋅similarity(Ct,Ct−1)\mathcal{S}_t = \alpha \cdot \text{quality}(C_t, G_t) + (1 - \alpha) \cdot \text{similarity}(C_t, C_{t-1})
  • quality(Ct,Gt)\text{quality}(C_t, G_t): Quality of partition CtC_t for graph GtG_t (e.g., Modularity Q)
  • similarity(Ct,Ct−1)\text{similarity}(C_t, C_{t-1}): Similarity to previous partition (e.g., normalized mutual information (NMI) or the Jaccard coefficient)
  • α∈[0,1]\alpha \in [0, 1]: Trade-off between "fitting current data" and "consistency with past"

α=1\alpha = 1 means fully independent detection (ignoring history); α=0\alpha = 0 means keeping the exact same structure (ignoring new data).

The practical difficulty is setting α\alpha. During periods of rapid change (e.g., a global event on social media) α\alpha should be large, and during stable periods small, but deciding when to switch is itself hard.

Evolutionary Clustering was the first systematic formulation of dynamic community detection as an explicit optimization problem, influencing many subsequent methods.

Approach 3: Multislice Modularity (Mucha et al., 2010)

Mucha, Richardson, Macon, Porter & Onnela's "Community Structure in Time-Dependent, Multiscale, and Multiplex Networks" (Science, 2010) introduced one of the most widely used frameworks for dynamic community detection.

The method stacks time snapshots as "slices" and treats them as one large graph in which copies of the same node are linked by inter-slice coupling edges. On this graph it defines Multislice Modularity:

Qmultislice=12μ∑ijsr[(Aijs−γskiskjs2ms)δsr+δijωjsr]δ(gis,gjr)Q_{\text{multislice}} = \frac{1}{2\mu} \sum_{ijsr} \left[ \left( A_{ijs} - \gamma_s \frac{k_{is} k_{js}}{2m_s} \right) \delta_{sr} + \delta_{ij} \omega_{jsr} \right] \delta(g_{is}, g_{jr})

What each symbol and term means:

Index meanings:

  • i,ji, j: nodes
  • s,rs, r: slices (time step or layer index)
  • gisg_{is}: community assignment of node ii in slice ss

Term 1: (Aijs−γskiskjs2ms)δsr\left( A_{ijs} - \gamma_s \frac{k_{is} k_{js}}{2m_s} \right) \delta_{sr}

This is the "intra-slice" Modularity. The δsr\delta_{sr} restricts it to same-slice pairs (s=rs = r). γs\gamma_s is the resolution parameter (from Part 1), which can vary per slice.

Term 2: δijωjsr\delta_{ij} \omega_{jsr}

This is the term Mucha et al.'s formulation adds. δij\delta_{ij} restricts it to the "same node," and ωjsr\omega_{jsr} is the inter-slice coupling strength. Intuitively, it "connects node ii at time ss to the same node ii at time rr with a virtual edge."

Choices for ωjsr\omega_{jsr}:

  • Couple only temporally adjacent snapshots: ωjsr=ω\omega_{jsr} = \omega if ∣s−r∣=1|s - r| = 1
  • Couple all snapshots uniformly: ωjsr=ω\omega_{jsr} = \omega for all s≠rs \neq r
  • Node- and time-dependent coupling: ωjsr\omega_{jsr} depends on j,s,rj, s, r

Larger ω\omega strengthens temporal coherence ("the same node should stay in the same community across time"); smaller ω\omega gives more independence to each snapshot.

Normalization: 2μ=∑jrκjr2\mu = \sum_{jr} \kappa_{jr}, where κjr=kjr+cjr\kappa_{jr} = k_{jr} + c_{jr} (node jj's degree in slice rr plus its inter-slice coupling strength)

This formulation has the following properties:

  1. Unifies dynamic and multiplex networks: Interpret slices as "time steps" for dynamic, or "layers" for multiplex
  2. Reuses existing methods: This extended Modularity can be optimized with Louvain/Leiden-style greedy algorithms
  3. Multiscale analysis: Varying γs\gamma_s and ω\omega explores structures at different scales

Approach 4: Tensor Decomposition

De Domenico et al. (2013) proposed a mathematical framework representing multiplex/dynamic networks as tensors.

A multiplex network with LL layers (or time snapshots) can be represented as a 4th-order tensor M\mathcal{M}:

Mijαβ\mathcal{M}_{ij\alpha\beta}
  • i,ji, j: nodes
  • α,β\alpha, \beta: layers
  • Mijαα\mathcal{M}_{ij\alpha\alpha}: edge weight between ii and jj in layer α\alpha
  • Miiαβ\mathcal{M}_{ii\alpha\beta}: coupling of node ii between layers α\alpha and β\beta

Tensor decomposition (CP or Tucker decomposition) is applied to this tensor to extract community structure. It is the multi-dimensional counterpart of matrix decomposition (PCA, NMF) and captures structure in both node and layer dimensions at once.

The tensor representation is mathematically general but scales poorly to large networks. Gauvin, Panisson & Cattuto (2014) applied non-negative tensor factorization (NTF) to face-to-face contact networks and estimated community membership and temporal activity patterns together.

If slices are read as relationship types rather than time steps, Multislice Modularity and tensor decomposition apply unchanged to multiplex networks.

Part III: Multiplex Network Community Detection

What Is a Multiplex Network?

A multiplex network has multiple types of relationships (layers) among the same set of nodes.

Multiplex Network Structure

The same nodes are connected by different types of relationships (layers), and each layer can have a different community structure.

Layer 1: Friendship

ABCD

Layer 2: Work

ABCD

Layer 3: Shared Hobbies

ABCD
💡 Nodes A–D are shared across all layers, but the edges differ from layer to layer. Multiplex methods differ in how they combine the layers.

Examples:

  • Social media: "follow," "message," "like" as separate layers
  • Transportation: "rail," "bus," "air" as separate layers
  • Biology: "protein-protein interaction," "gene regulation," "metabolic pathway" as separate layers

Multiplex networks are a kind of multilayer network. The general formulation of multilayer networks is summarized in Kivelä et al.'s (2014) survey; those whose node set is the same across all layers are called multiplex networks.

Approach 1: Layer Aggregation

The simplest method aggregates all layer adjacency matrices into a single graph and applies standard community detection:

Aagg=∑α=1LwαA(α)A_{\text{agg}} = \sum_{\alpha=1}^{L} w_\alpha A^{(\alpha)}

where A(α)A^{(\alpha)} is layer α\alpha's adjacency matrix and wαw_\alpha is its weight.

This is easy to implement but loses layer-specific information. If a node belongs to community A in one layer and community B in another, the aggregated graph keeps no trace of that difference.

Approach 2: Multislice Modularity (Revisited)

The Multislice Modularity from Part II (Mucha et al., 2010) applies to multiplex networks simply by reading slices as "layers."

The coupling parameter ω\omega controls cross-layer community consistency. Larger ω\omega means the same node tends to belong to the same community across all layers.

Approach 3: Merging Per-Layer Results

Another option is to detect communities in each layer independently and then merge the results. The survey by Magnani, Hanteer, Interdonato, Rossi & Tagarelli (2021) groups multiplex methods that find communities across the whole network into three classes by how they handle the layers:

  1. Flattening: Merge the layers into a single graph, then apply ordinary community detection
  2. Layer-by-layer: Process each layer independently, then merge the results
  3. Multilayer: Consider all layers at the same time

Layer aggregation (Approach 1) is a flattening method, the approach in this section is layer-by-layer, and Multislice Modularity (Approach 2) is a multilayer method. Multilayer methods use information from all layers at once, at a higher computational cost.

GenLouvain: Practical Multislice Implementation

GenLouvain (Jutla, Jeub & Mucha, 2011–) is a widely used implementation for optimizing Multislice Modularity:

GenLouvain:
  Input: Multiplex/dynamic network (adjacency matrices A^(s), coupling ω)
  1. Build Multislice Modularity matrix B:
     B_{isjs} = A_{ijs} - γ_s * k_{is}*k_{js}/(2*m_s)  (intra-slice)
     B_{isir} = ω_{isr}                                  (inter-slice, same node)
  2. Apply Louvain local-moving + aggregation on matrix B
  3. Maximize Q_multislice
  → Community assignment for each node in each slice

Part IV: The Current Frontier

GNN-Based Community Detection

Research on Graph Neural Network (GNN)-based community detection has grown in the 2020s.

DMoN (Tsitsulin et al., 2023): Relaxes Modularity into a differentiable form and predicts the community assignment matrix directly from node embeddings produced by a GNN encoder. The loss function:

L=−12mTr(CTBC)+kn∥CT1n∥−1\mathcal{L} = -\frac{1}{2m} \text{Tr}(C^T B C) + \frac{\sqrt{k}}{n} \left\| C^T \mathbf{1}_n \right\| - 1
  • Term 1: Modularity maximization (negated for minimization)
  • Term 2: Collapse regularization. CT1nC^T \mathbf{1}_n is the cluster size vector s\mathbf{s} (number of nodes assigned to each cluster). Minimized (value 0) when all clusters have equal size (si=n/ks_i = n/k); penalizes concentration of all nodes into one cluster
  • CC: Soft community assignment matrix (n×kn \times k) output by the GNN
  • BB: Modularity matrix (Bij=Aij−kikj/2mB_{ij} = A_{ij} - k_i k_j / 2m)

MinCutPool (Bianchi et al., 2020): A graph pooling layer trained with a relaxed normalized-cut loss. Stacking pooling layers groups nodes hierarchically.

GNN-based methods can use node features — social media profiles, paper text, protein sequences — together with graph structure. Challenges remain:

  • Interpretability: GNN intermediate representations are opaque
  • Generalization: Unclear whether models transfer to structurally different graphs
  • Scalability: Training costs on large graphs

Flow-Based Dynamic Community Detection

Some work handles changing communities by following the flow of information. Rosvall & Bergstrom (2010) clustered each snapshot with Infomap, assessed the significance of the communities by bootstrap resampling, and visualized changes between time points with alluvial diagrams.

Inter-slice coupling was built into the Map Equation by the multilayer Map Equation of De Domenico, Lancichinetti, Arenas & Rosvall (2015). A random walker moves within a slice and, with some probability, moves to the same node in another slice. It expresses the same kind of inter-slice coupling as Mucha et al.'s Multislice Modularity, but in an information-theoretic framework.

Streaming Algorithms

Community detection in streaming settings, where edges arrive one at a time, is another line of research, aimed mainly at real-time detection in large social networks.

OSLOM (Lancichinetti, Radicchi, Ramasco & Fortunato, 2011) finds statistically significant communities with a local order-statistics test and mainly targets static graphs. The test can be reused in incremental or dynamic settings, but repeated p-value testing makes it comparatively expensive.

Method Comparison and Selection Guide

Comparison of Higher-Order and Dynamic Methods

Comparing key algorithms for higher-order, dynamic, and multiplex networks.

MethodEraTypeBasisProsCons
CPM (Clique Percolation)2005–Overlappingk-clique adjacencyNaturally detects overlapChoosing k is hard; weak on sparse graphs
Multislice Modularity2010–Dynamic / MultiplexTime/layer-coupled ModularityUnified formulationCoupling parameter ω selection
Motif Conductance2016–Higher-OrderMotif-weighted ConductanceDetects higher-order patternsMotif enumeration is costly
Evolutionary Clustering2006–DynamicSnapshot quality + temporal smoothingExtends existing methods to dynamic networksSetting the trade-off parameter α
Tensor Decomposition2013–Dynamic / MultiplexTensor decomposition (CP / Tucker)Captures inter-layer correlationsScales poorly to large networks
GNN (DMoN, MinCutPool, etc.)2020–General / Learning-basedGradient descent on differentiable objectivesCan use node featuresInterpretability and generalization issues

Practical Algorithm Selection Guide

This adds higher-order, dynamic, and multiplex cases to Part 1's guide:

ScenarioRecommended Approach
Triangle density matters (social networks)Motif-based Spectral (Benson et al., 2016)
Need to model multi-body relationships directlyHypergraph methods
Evolving network, coherence priorityMultislice Modularity (Mucha et al., 2010)
Snapshot quality priorityIndependent detection + matching
Multi-layer integrated analysisGenLouvain (Multislice Modularity implementation)
Rich node features availableGNN-based (DMoN, etc.)
Real-time processing neededStreaming algorithms (TILES, LabelRankT, delta-screening, etc.)
Multiscale + multiplexTensor decomposition
Communities may overlapCPM (Palla et al., 2005) / BigCLAM (Yang & Leskovec, 2013)

Conclusion — How Community Detection Has Developed

The research covered in Part 1 and this article falls roughly into three generations.

Generation 1 (1970s–early 2000s): From graph partitioning to social network analysis. The Girvan-Newman method and the Modularity formulation. The "static, single-layer, pairwise" framework based on edge density.

Generation 2 (late 2000s–early 2010s): Louvain's scalability (with its refinement, Leiden, following in 2019), SBM statistical inference, and the discovery of the resolution limit and the detectability threshold. Methods improved, and the difficulty of the problem itself became clearer.

Generation 3 (from the mid-2000s, especially late 2010s–present): Methods that use information beyond edge density:

  • Higher-order structure (motifs, hypergraphs, simplicial complexes)
  • Temporal dynamics (Evolutionary Clustering, Multislice Modularity)
  • Multiple relationship types (multiplex networks, tensor approaches)
  • Deep learning (GNN-based methods)

Community detection has no single correct answer. Edge density, motif density, information compression efficiency, statistical significance, temporal coherence, and cross-layer consistency each correspond to a different definition of "community." Each method is a tool for looking at network structure from a different angle.

Active research directions include:

  1. Hypergraph GNNs: Unsupervised community detection using Hypergraph Neural Networks (HGNN)
  2. Causal communities: Defining communities based on node/edge temporal causal relationships
  3. Scalable dynamic methods: Real-time processing at billion-node scale
  4. Extended theoretical guarantees: Detectability thresholds for higher-order and dynamic settings

Part 1's conclusion — "perfect community detection is impossible in principle" — applies even more strongly in higher-order, dynamic, and multiplex settings, because the choice of motif and of α\alpha or ω\omega changes the results. In exchange, these methods can analyze structure that edge density alone cannot capture: triadic closure, change over time, and multiple types of relationships. The next article continues from the dynamic-network discussion here to the stricter streaming setting, where edges arrive or disappear one event at a time.

References

  • Milo, R., Shen-Orr, S., Itzkovitz, S., Kashtan, N., Chklovskii, D., & Alon, U. (2002). Network motifs: simple building blocks of complex networks. Science, 298(5594), 824–827.
  • Palla, G., Derényi, I., Farkas, I., & Vicsek, T. (2005). Uncovering the overlapping community structure of complex networks in nature and society. Nature, 435(7043), 814-818.
  • Chakrabarti, D., Kumar, R., & Tomkins, A. (2006). Evolutionary clustering. KDD 2006, 554–560.
  • Mucha, P. J., Richardson, T., Macon, K., Porter, M. A., & Onnela, J.-P. (2010). Community structure in time-dependent, multiscale, and multiplex networks. Science, 328(5980), 876–878.
  • Rosvall, M., & Bergstrom, C. T. (2010). Mapping change in large networks. PLoS ONE, 5(1), e8694.
  • Lancichinetti, A., Radicchi, F., Ramasco, J. J., & Fortunato, S. (2011). Finding statistically significant communities in networks. PLoS ONE, 6(4), e18961.
  • De Domenico, M., Solé-Ribalta, A., Cozzo, E., Kivelä, M., Moreno, Y., Porter, M. A., Gómez, S., & Arenas, A. (2013). Mathematical formulation of multilayer networks. Physical Review X, 3(4), 041022.
  • Yang, J., & Leskovec, J. (2013). Overlapping community detection at scale: a nonnegative matrix factorization approach. WSDM 2013, 587-596.
  • Kivelä, M., Arenas, A., Barthelemy, M., Gleeson, J. P., Moreno, Y., & Porter, M. A. (2014). Multilayer networks. Journal of Complex Networks, 2(3), 203–271.
  • Gauvin, L., Panisson, A., & Cattuto, C. (2014). Detecting the community structure and activity patterns of temporal networks: a non-negative tensor factorization approach. PLoS ONE, 9(1), e86028.
  • De Domenico, M., Lancichinetti, A., Arenas, A., & Rosvall, M. (2015). Identifying modular flows on multilayer networks reveals highly overlapping organization in interconnected systems. Physical Review X, 5(1), 011027.
  • Benson, A. R., Gleich, D. F., & Leskovec, J. (2016). Higher-order organization of complex networks. Science, 353(6295), 163–166.
  • Bianchi, F. M., Grattarola, D., & Alippi, C. (2020). Spectral clustering with graph neural networks for graph pooling. ICML 2020.
  • Kumar, T., Vaidyanathan, S., Ananthapadmanabhan, H., Parthasarathy, S., & Ravindran, B. (2020). Hypergraph clustering by iteratively reweighted modularity maximization. Applied Network Science, 5, 52.
  • Schaub, M. T., Benson, A. R., Horn, P., Lippner, G., & Jadbabaie, A. (2020). Random walks on simplicial complexes and the normalized Hodge 1-Laplacian. SIAM Review, 62(2), 353–391.
  • Magnani, M., Hanteer, O., Interdonato, R., Rossi, L., & Tagarelli, A. (2021). Community detection in multiplex networks. ACM Computing Surveys, 54(3), Article 48, 1–35.
  • Tsitsulin, A., Palowitch, J., Perozzi, B., & Müller, E. (2023). Graph clustering with graph neural networks. JMLR, 24(127), 1–21.
  • Zhou, D., Huang, J., & Schölkopf, B. (2006). Learning with Hypergraphs: Clustering, Classification, and Embedding. NeurIPS 2006.
  • Jutla, I. S., Jeub, L. G. S., & Mucha, P. J. (2011–). A generalized Louvain method for community detection implemented in MATLAB. http://netwiki.amath.unc.edu/GenLouvain

Further Reading

  • Ahn, Y.-Y., Bagrow, J. P., & Lehmann, S. (2010). Link communities reveal multiscale complexity in networks. Nature, 466(7307), 761-764.
  • Benson, A. R., Gleich, D. F., & Lim, L.-H. (2017). The spacey random walk: a stochastic process for higher-order data. SIAM Review, 59(2), 321–345.
  • Rossetti, G., Milli, L., & Cazabet, R. (2019). CDLIB: a python library to extract, compare and evaluate communities from complex networks. Applied Network Science, 4, 52.
  • Fortunato, S. (2010). Community detection in graphs. Physics Reports, 486(3-5), 75-174.
  • Fortunato, S., & Hric, D. (2016). Community detection in networks: A user guide. Physics Reports, 659, 1-44.