Node colour = current label Edge = graph connection
drag to pan · scroll to zoom
Convergence history nodes changed   modularity Q

Label Propagation in 2D — Community Detection by Majority Vote

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.