Table of Contents
Fetching ...

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.

Spectral Geometry for Deep Learning: Compression and Hallucination Detection via Random Matrix Theory

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.
Paper Structure (64 sections, 14 equations, 22 figures, 3 tables)

This paper contains 64 sections, 14 equations, 22 figures, 3 tables.

Figures (22)

  • Figure 1: Neural network (NN): features pass through hidden layers and nonlinear activations, producing the output.
  • Figure 2: CNN: convolutional filters extract features, pooling layers reduce resolution, and linear layers classify. (Stanford CS231 Notes)
  • Figure 3: Transformer architecture vaswani2017attention. Each encoder–decoder block is composed of multi-head self-attention layers that model contextual dependencies, followed by position-wise feed-forward networks. Residual connections and layer normalization ensure stable training and effective gradient flow, enabling scalability to very large models.
  • Figure 4: Vision-language model (VLM) schematic. CLIP (Contrastive Language–Image Pretraining) radford2021learning aligns images and text by projecting them into a shared latent space. The architecture consists of two encoders: a Vision Transformer (or CNN) for images and a Transformer for text. During training, the model learns to maximize the cosine similarity between embeddings of matching image-text pairs while minimizing it for mismatched pairs, using a contrastive loss. This enables zero-shot classification by comparing the similarity of an image's embedding to embeddings of text descriptions of potential classes. CLIP's ability to generalize to unseen tasks without fine-tuning has made it a cornerstone for multimodal AI.
  • Figure 5: Wigner semicircle law: eigenvalue density of large symmetric random matrices.
  • ...and 17 more figures