Structural balance, learned live

A signed-graph neural network learns in your browser; the view behind draws it live.

Press Train. The network then learns here, in your browser, and the view behind follows it live: every vertex, the model's verdict on every edge, the balanced and unbalanced triangles it reads, each vertex where the model places it. Drag to turn, Shift-drag to move, scroll to zoom.
Data and training
Data
Balanced graph

At least one sign in 40 is flipped: with none there is no unbalanced cycle, and the model's unbalanced slot would be empty.

Model
Training

About

What runs here. Nagare's signed-link task, compiled to WebAssembly and run on one thread of your CPU, with the HyMeKo simulator Kawamirai drawing it in WebGPU from the trace lines the run streams. For the same settings both models give the native Nagare command line's losses, AUROC and cells bit for bit. HSiKAN reads each edge through the signed cycles around it; by Heider, Cartwright and Harary, a cycle is balanced when the product of its signs is positive.

The audit. Shuffling the training signs destroys the balance signal while keeping everything else. A model that reasons by balance should then lose its accuracy on held-out edges; one that keeps it was reading something else, such as leaked test signs or degree.

Sources. C. Hajdu and Á. B. Csapó, "HSiKAN and Gömb: A Signed-Graph Neural Network Family with a Compact Cycle Core, Grounded in Structural Balance Theory", CogInfoCom 2026. Bitcoin-Alpha and Bitcoin-OTC: S. Kumar et al., ICDM 2016, via SNAP.