Community detection in graphs — main approaches.
hardAnswer
- (1) Modularity optimization: Louvain, Leiden (greedy hierarchical) — scale to millions of nodes, standard default.
- (2) Spectral: eigenvectors of the graph Laplacian → k-means.
- (3) Label propagation (fast, non-deterministic).
- (4) Stochastic Block Models (probabilistic).
- Modern: GNN-based (DeepWalk / Node2Vec + clustering).
- Leiden fixes Louvain's resolution-limit + connected-community issues — usually the default now.
Check yourself — multiple choice
- Only k-means
- Louvain/Leiden (modularity, hierarchical), spectral (Laplacian), label propagation, SBM, GNN embeddings; Leiden = current default
- Same as DBSCAN
- Random
Community detection: Louvain/Leiden default; spectral / SBM / GNN alternatives.
#clustering#applications
Practise Unsupervised Learning
214 interview questions in this topic.