SpectralEntropy

Entropy of a graph Laplacian's eigenvalues: the diversity of global flow and relaxation modes

Infrastructure · Primitives · brainference 1.0.0

Mechanism

Build the graph Laplacian L. For an undirected graph L = D - A, with D the diagonal degree matrix and A the adjacency matrix. For a directed graph use the incidence matrix B (B_ie = +1 if edge e leaves node i, -1 if it enters, 0 otherwise) and L = B B^T. Take its eigenvalues lambda_i, normalise them to p_i = lambda_i / sum_j lambda_j, and compute H_s = -sum_i p_i log2 p_i, the ShannonEntropy of the spectrum. Because the Laplacian governs diffusion, synchronisation and relaxation on the graph, H_s describes global structure: a spread-out spectrum (high H_s) means many distinct flow modes, a concentrated spectrum (low H_s) means regular, modular or tightly structured topology. It complements local measures such as DegreeEntropy.

Invariants

Failure modes

Where this came from

Builds on

Used by

Identity