Where Entropy Sees Signs: Balance-Based Change Detection in HCP Connectomes

Network security has a simple, durable trick. Measure how spread out a system's activity is, using entropy, and raise an alarm when that spread suddenly collapses or explodes. Applied to graphs, the trick uses von Neumann graph entropy, a number computed from the eigenvalues of a graph's Laplacian that summarizes how evenly connectivity is distributed. It has detected denial-of-service attacks and structural "bifurcations" in dynamic networks. The obvious next step is to run it on the Human Connectome Project (HCP), where every fMRI scan can be cut into short sliding windows. Each window becomes a brain graph whose edges are correlations between regional activity. This note argues that the obvious transfer fails in a predictable way, and that fixing the failure produces a new detector. The fast approximations that make graph entropy practical depend only on node degrees and squared edge weights. They are therefore blind to whether two brain regions are correlated or anti-correlated. A graph-entropy monitor built this way can be matched by a degree counter, and it is fooled by the neuroimaging equivalent of a "flash crowd": a burst of head motion or global signal that pushes every correlation up at once.

The proposal is to isolate the one part of spectral entropy that does see sign. That part is the third-order term of its expansion, which counts balanced versus unbalanced triangles of positive and negative correlations. We would remove what degree and overall amplitude already explain and use what is left as a within-scan detector of genuine network reorganization. HCP task fMRI provides free ground truth: the logged onsets of task blocks mark real reorganizations, and framewise head-motion traces mark nuisance surges. The test is whether a sign-aware, degree-residualized entropy statistic catches block transitions while ignoring motion and global-signal bursts better than degree trackers, sliding-window matrix distances and hidden-Markov state models do.

Core Claim

Consider a window's signed connectivity matrix $W$ over $n$ regions, with zero diagonal. Define the signed Laplacian $L = D - W$, where $D$ is diagonal with absolute strengths $d_i = \sum_j |w_{ij}|$. This $L$ is positive semi-definite, so $\rho = L/\mathrm{tr}(L)$ is a valid "density matrix," and von Neumann entropy $H = -\mathrm{tr}(\rho \log \rho)$ is well defined for signed graphs. That handles the objection in FINGER, which leaves negative weights as open work. The key observation is what the fast approximation keeps. FINGER-style estimators rely on the quadratic term, and

$$\mathrm{tr}(L^2) = \sum_i d_i^2 + \sum_{i \neq j} w_{ij}^2,$$

which contains no sign information at all. Sign first appears at third order:

$$\mathrm{tr}(L^3) = \sum_i d_i^3 + 3\sum_i d_i \sum_j w_{ij}^2 - \mathrm{tr}(W^3), \qquad \mathrm{tr}(W^3) = 6\sum_{i<j<k} w_{ij} w_{jk} w_{ki}.$$

The only sign-sensitive quantity is the signed triangle sum $\mathrm{tr}(W^3)$. It is positive when triangles are "balanced," meaning all positive or two negatives, as in default-mode versus task-positive antagonism. It is negative when they are frustrated.

Our claim has two parts. First, on brain graphs, any detector built on the quadratic entropy term is equivalent to a strength tracker and inherits its false alarms. Second, the residual of the balance term, after regressing out the strength and squared-weight moments that nuisance surges move, is a sign-aware change statistic. That statistic should detect task-driven reorganization with far fewer motion- and global-signal-driven false alarms.

We do not claim a speed advantage. With 100–400 parcels, exact eigendecomposition takes milliseconds. The expansion serves here as an analysis tool that separates entropy into a degree component and a balance component, not as an accelerator.

Relation to Prior Work

The method comes from the graph-entropy line. First-Order Bifurcation Detection for Dynamic Complex Networks pairs von Neumann entropy with centrality features and a minimum-volume ellipsoid around normal behavior, validated only on intrusion logs and restricted to non-negative graphs. FINGER reduces the entropy to degree and weight sums in linear time and names signed graphs as open. ESSEN uses a Taylor-approximated entropy and a "temperature" to guide link prediction rather than anomaly scoring. We reuse their expansion but reverse its purpose. We keep the term they discard, show algebraically that the retained quadratic term is sign-blind, and test on brain graphs, which none of them touch. The flash-crowd framing comes from Tracking Normalized Network Traffic Entropy to Detect DDoS Attacks in P4, which normalizes entropy so that volume spikes do not trigger alarms. Our degree residualization is the graph analogue of that fix.

On the neuroimaging side, three papers constrain the design. Defining and Benchmarking a Data-Centric Design Space for Brain Graph Construction shows that thresholding away negative correlations and ignoring high-amplitude frames change downstream results. This motivates keeping signs, and we reuse its pipeline through GeQinwen/DataCentricBrainGraphs. A simple but tough-to-beat baseline for fMRI time-series classification finds that a time-averaging MLP matches temporal models and is unaffected by shuffling time. This is a real warning that "dynamics" in fMRI may be noise, so our evaluation targets externally timed events rather than subject-level labels. Behavioural relevance of spontaneous, transient brain network interactions in fMRI points the other way: hidden Markov model (HMM) states over 1,003 HCP subjects carry trait information that static connectivity misses, and amplitude-only variants do worse. That makes the HMM our strongest dynamic competitor. The existing brain anomaly-detection work, NormVAE and Evaluating normative representation learning in generative AI, scores subjects against healthy cohorts using structural reconstruction error. We deliberately do not compete on between-subject normative modeling. The external generalization benchmark shows that connectome models trained on one cohort can collapse to negative $R^2$ on another, so a cross-cohort anomaly claim built on a scalar entropy would be hard to defend. Within-scan change detection avoids that confound.

Research Program

The first step is building the statistic. For each HCP subject and run, we form sliding-window connectivity matrices on the HCP multimodal parcellation and on a Schaefer-style alternative, using both Pearson and Spearman correlation as in the data-centric benchmark. Window length and step are tuned on a held-out subject split. For every window we compute exact signed von Neumann entropy, its quadratic proxy, and the normalized signed triangle sum $B = \mathrm{tr}(W^3)/\left(\sum_{i \neq j} w_{ij}^2\right)^{3/2}$.

The second step is residualization. We regress $B$ on the strength and squared-weight moments, and on the global mean signal amplitude of the window. The regression is fit only on resting-state windows from training subjects, which contain no designed transitions, so it learns how balance co-varies with nuisance. The detector is the absolute first difference of the residual, with a threshold calibrated on resting-state data to a fixed false-alarm rate. We also compute a principled but slower variant: the exact entropy residualized against a strength-preserving signed null model.

The third step is analysis. We ask which region pairs drive balance changes at block onsets, and whether they concentrate on default-mode and task-positive anticorrelations as the sign argument predicts.

Baselines

The naive reference point is a global amplitude monitor. It flags windows where mean BOLD amplitude or framewise displacement exceeds a threshold. It tells us how much "detection" is achievable just from the fact that task onsets often coincide with amplitude changes. The quadratic-entropy tracker, meaning FINGER's proxy on the signed Laplacian as in FINGER, is in effect a strength-and-weight-energy tracker. It is the direct test of whether our third-order ingredient adds anything. The unsigned graph-entropy detector of First-Order Bifurcation Detection is run as published: negative edges are thresholded away, entropy and centralities are computed, and a minimum-volume ellipsoid is fit on resting-state windows. It represents the existing entropy method.

Two baselines are the strongest competitors. The first is a sliding-window matrix distance. It takes the affine-invariant Riemannian (or log-Euclidean) distance between consecutive regularized correlation matrices, the geometry studied in the SPD generalization benchmark. It uses the full matrix rather than one scalar, so it should have the highest raw sensitivity. The second is a group HMM fit as in Vidaurre et al.. Its detection score is the per-frame probability of a state switch. It is the method with the strongest published evidence of capturing real transient network structure in HCP.

All methods see the same windows, parcellations and preprocessing. Each receives the same hyperparameter search budget over window length and its own parameters on the same training subjects. All thresholds are calibrated to the same resting-state false-alarm rate. Every method is also run with and without global signal regression.

Two ablations isolate the key ingredient. The first uses the balance term computed on absolute weights, which removes sign. The second uses the raw balance term without residualization, which removes the flash-crowd correction.

Beating the strongest baseline means one of two results, both on held-out subjects. The first is higher block-transition detection AUROC at a matched false-alarm rate. The second is equal AUROC with significantly fewer alarms on high-motion and global-signal-peak frames.

The file contains no reported result on Lacuna for within-scan block-transition detection on HCP, for any of these methods. The closest reported number concerns whole-scan task identification: GEFF reports 94.8% average task-identification accuracy with 20 subjects per task. This indicates that task states are strongly separable in connectivity space, so a competent full-matrix method should detect transitions well. Our advantage must come from robustness to nuisance, not raw separability.

Why not just…?

Why not just compute exact von Neumann entropy, or its fast proxy, on the connectome? The algebra above shows the quadratic proxy is sign-blind and determined by strengths and squared weights. On brain graphs, it is therefore a degree tracker by another name. Exact entropy mixes the quadratic term with all higher orders and is dominated by the degree part. The quadratic-tracker baseline and the absolute-weight ablation test this directly. If exact entropy matches our residual, the balance decomposition is unnecessary, and we would report that.

Why not just track node strength or global signal amplitude? A global surge from motion or physiology raises every correlation together. A strength tracker cannot distinguish that from reorganization. This is the flash-crowd failure documented for volume counters in Tracking Normalized Network Traffic Entropy. The amplitude monitor and quadratic tracker quantify this failure, measured as the false-alarm rate on high-motion frames.

Why not just apply global signal regression and then use a full-matrix Riemannian distance? This is the real threat. Global signal regression removes much of the shared surge, and a full-matrix distance has more information than any scalar. If regression plus Riemannian distance matches our statistic on both AUROC and motion false alarms, our contribution shrinks to interpretability: telling the user that the change was a shift in balance, and in which triangles. The with/without-regression arms exist to settle this. One caveat cuts in our favor. Global signal regression itself shifts correlations negative and is known to reshape anticorrelations, so its effect on a sign-sensitive statistic is itself something we measure rather than assume.

Why not just use an HMM? HMM switch probabilities are a strong detector. However, they require a group model fit over many subjects and a chosen number of states, and they can switch states on amplitude changes alone. Our statistic is closed-form, per-window and has no training beyond one linear residualization. The head-to-head comparison, and the comparison on motion frames, decides this. A loss on sensitivity with a win on nuisance robustness would be a mixed but publishable result.

Proposed Experiments

The primary experiment uses HCP young-adult task fMRI across all seven paradigms. Windows that straddle a logged block onset or offset are positives, and windows fully inside a block are negatives. We report AUROC and time-to-detection on held-out subjects. We also report false alarms on resting-state and task frames with framewise displacement or global-signal amplitude above the 95th percentile.

Three decisive checks follow. The first is a time-shuffling control in the spirit of meanMLP. If shuffling frames within a run leaves detection above chance, the statistic is reading stationary structure rather than transitions, and the claim fails. The second is a sign-flip control. We randomly permute edge signs while preserving magnitudes, which leaves the quadratic term exactly unchanged. Detection by our statistic should collapse, while the quadratic tracker's should not change. The third is a parcellation and correlation-type robustness sweep, following the data-centric benchmark, because a result that holds on only one atlas would not be worth reporting.

A secondary, exploratory analysis asks whether per-subject rest-to-task balance shifts are reliable across the two HCP sessions. Reliability would be a prerequisite for any later normative use.