Geometry of Reason: Spectral Signatures of Valid Mathematical Reasoning
Valentin NOËL
Abstract
Validating mathematical reasoning in large language models currently requires a trade-off between computationally expensive learned verifiers and the unreliability of output-based heuristics. We therefore propose a training-free, mechanistic alternative: spectral analysis of attention topology. By treating attention matrices as dynamic graphs over tokens, we extract four interpretable spectral diagnostics, Fiedler value, High-Frequency Energy Ratio (HFER), spectral entropy, and graph smoothness, that differentiate valid reasoning from hallucinated outputs without any learned parameters. We perform experiments across seven models from four architectural families (Llama, Qwen, Phi, Mistral) yield effect sizes up to Cohen's $d = 3.30$ ($p < 10^{-116}$), enabling $85$--$96\%$ classification accuracy with a single threshold. We discover that spectral analysis detects logical coherence rather than compiler acceptance: proofs rejected by formal verifiers due to timeouts or missing imports are correctly identified as valid, a phenomenon we term "Platonic validity". Furthermore, causal ablation studies confirm that this spectral signature reflects the functional health of induction head circuits, establishing a mechanistic basis for the method. We also identify an architectural dependency: Sliding Window Attention shifts the discriminative signal from HFER to late-layer smoothness ($d = 2.09$, $p < 10^{-48}$), demonstrating that attention mechanism design determines which spectral features capture reasoning validity. The method generalizes to informal chain-of-thought reasoning ($d = 0.78$, $p < 10^{-3}$). These findings establish spectral graph analysis as a principled framework for reasoning verification, with immediate applications to hallucination detection and real-time safety monitoring.
Successful Page Load