Definition
Given an attention matrix at a layer (after some head-aggregation rule combining multiple heads into one weighted graph over the tokens), form the graph Laplacian (or a normalized variant), with eigenvalues . Four scalar diagnostics reduce this per-layer spectrum to a compact profile:
- Fiedler value / algebraic connectivity — how well- connected the token graph is (low = graph is close to splitting into loosely-connected clusters; high = uniformly well-mixed).
- High-frequency energy ratio (HFER) — treating a hidden-state feature as a graph signal , the fraction of ‘s energy that projects onto high-eigenvalue (rough, rapidly-varying-across-edges) Laplacian eigenvectors, versus low-eigenvalue (smooth) ones.
- Graph-signal smoothness — the Dirichlet-energy quadratic form , small when connected tokens carry similar feature values.
- Spectral entropy — the Shannon entropy of the normalized Laplacian eigenvalue distribution , low when a few eigenvalues dominate (a simple, low-complexity graph structure), high when eigenvalues are spread evenly.
Relative to attention-reference-frame
Attention reference frame (sink-token anchor configuration) also treats attention as a graph and uses the Fiedler value, but as one diagnostic among several used to distinguish reference-frame configuration types (centralized vs. distributed vs. bidirectional token anchoring). This node instead treats the full four-diagnostic spectral profile as a general-purpose, task-agnostic measurement — a per-input, per-layer fingerprint that can be correlated with any downstream property (here: mathematical-proof validity), not tied to any one anchor-point configuration.
Key evidence
Noël (2026) computes this four-diagnostic profile per layer across seven
models from four architecturally-independent families (Llama-3.2-1B/3B,
Llama-3.1-8B, Qwen2.5-0.5B/7B, Phi-3.5-mini, Mistral-7B-v0.1) on
Lean/Isabelle-style formal mathematical proofs, finding statistically
significant differences between spectrally-valid and spectrally-invalid
proofs in every model (effect sizes up to Cohen’s , ),
enabling training-free classification of proof validity at 85.0-95.6%
accuracy from a single calibrated threshold on one spectral metric (no
learned classifier, fine-tuning, or training data required). Global-
attention models (Llama, Qwen, Phi) show their strongest discriminative
signal in HFER; Mistral-7B, the one model using Sliding Window Attention
rather than global attention, shows the signal shift to late-layer
smoothness instead (, Mann-Whitney ) —
evidence that attention-mechanism design determines which spectral
diagnostic carries the reasoning-validity signal, not merely its
magnitude. Robustness controls (model-generated valid-vs-invalid pairs;
human-authored logic-corrupting perturbations holding writing style
fixed) and a label-correction analysis both support that the spectral
signature tracks genuine logical coherence rather than compiler/verifier
acceptance — some proofs the spectral method flags as valid are rejected
by formal verifiers only for technical reasons (timeouts, missing
imports), not logical error. See
attention-graph-spectral-diagnostics-distinguish-valid-from-invalid-mathematical-proofs-across-seven-models-and-four-architecture-families.
How to detect it
Aggregate multi-head attention into a single weighted graph per layer (e.g. average or max over heads), compute the graph Laplacian and its eigendecomposition, then extract the Fiedler value, HFER (energy split at some eigenvalue cutoff), Dirichlet-energy smoothness of a chosen hidden-state signal, and Laplacian spectral entropy. Compare the resulting per-layer profiles between two conditions of interest (e.g. valid vs. invalid reasoning) via effect size and significance testing, checking which diagnostic(s) discriminate and at which layers.
Key papers
- Noël, V. (2026). Geometry of Reason: Spectral Signatures of Valid Mathematical Reasoning. arXiv:2601.00791 — origin of this four- diagnostic attention-graph spectral profile and its application to training-free mathematical-reasoning validity detection.