Label Propagation in 2D — Community Detection by Majority Vote
Watch the Raghavan-Albert-Kumara label propagation algorithm find communities live on a 2D, pannable, zoomable node-link graph: every node repeatedly adopts the label held by the majority of its neighbours, with no global objective, until the labels stop changing.
This simulator generates a 2D network with ground-truth clusters (a stochastic block model) and runs the real label propagation algorithm on it live: every node starts with its own unique label, and on each sweep every node switches to whichever label the majority of its neighbours currently hold. There is no modularity score being maximized and no global view of the graph — just local majority votes — yet the labels reliably converge into the same handful of communities the graph was built from, visible as the node palette collapsing from dozens of colours down to a few. Drag to pan and scroll to zoom the graph, tune the node count, the number of planted communities and how blurred the boundaries between them are, then step through sweeps (or auto-run them at your chosen speed) and watch the iteration count, live label count, per-step change count and modularity settle in the strip chart as the algorithm converges.
Watch the Raghavan-Albert-Kumara label propagation algorithm find communities live on a 2D, pannable, zoomable node-link graph built from a stochastic block model: every node repeatedly adopts the label held by the majority of its neighbours, with no global objective, until the labels stop changing.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install