Spectral Geometry for Deep Learning: Compression and Hallucination Detection via Random Matrix Theory
Davide Ettori
TL;DR
This work tackles two central challenges in large neural networks: reliability (hallucinations and out-of-distribution behavior) and efficiency (computational cost). It introduces a unified spectral framework based on spectral geometry and Random Matrix Theory, deploying EigenTrack to detect reliability issues via temporal evolution of activation spectra and RMT-KD to compress models by retaining only outlier-driven causal directions. Empirical results show EigenTrack achieves strong AUROC for hallucination and OOD detection across language and vision-language models, while RMT-KD attains substantial parameter reductions (up to ~81%) with maintained or improved accuracy and notable inference speedups. By linking eigenvalue statistics to representation quality, the approach provides interpretable, principled tools for monitoring uncertainty and guiding compression, enabling safer and more sustainable deployment of large-scale AI systems.
Abstract
Large language models and deep neural networks achieve strong performance but suffer from reliability issues and high computational cost. This thesis proposes a unified framework based on spectral geometry and random matrix theory to address both problems by analyzing the eigenvalue structure of hidden activations. The first contribution, EigenTrack, is a real-time method for detecting hallucinations and out-of-distribution behavior in language and vision-language models using spectral features and their temporal dynamics. The second contribution, RMT-KD, is a principled compression method that identifies informative spectral components and applies iterative knowledge distillation to produce compact and efficient models while preserving accuracy. Together, these results show that spectral statistics provide interpretable and robust signals for monitoring uncertainty and guiding compression in large-scale neural networks.
