This thesis addresses two persistent and closely related challenges in modern deep learning, reliability and efficiency, through a unified framework grounded in Spectral Geometry and Random Matrix Theory (RMT). As deep networks and large language models continue to scale, their internal behavior becomes increasingly opaque, leading to hallucinations, fragile generalization under distribution shift, and growing computational and energy demands. By analyzing the eigenvalue dynamics of hidden activations across layers and inputs, this work shows that spectral statistics provide a compact, stable, and interpretable lens on model behavior, capable of separating structured, causal representations from noise-dominated variability. Within this framework, the first contribution, EigenTrack, introduces a real-time method for detecting hallucinations and out-of-distribution behavior in large language and vision-language models. EigenTrack transforms streaming activations into spectral descriptors such as entropy, variance, and deviations from the Marchenko–Pastur baseline, and models their temporal evolution using lightweight recurrent classifiers, enabling early detection of reliability failures before they appear in model outputs while offering interpretable insight into representation dynamics. The second contribution, RMT-KD, presents a principled approach to compressing deep networks via random matrix theoretic knowledge distillation. By interpreting outlier eigenvalues in activation spectra as carriers of task-relevant information, RMT-KD progressively projects networks onto lower-dimensional subspaces through iterative self-distillation, yielding significantly more compact and energy-efficient models while preserving accuracy and dense, hardware-friendly structure. Together, these contributions establish spectral geometry as a coherent foundation for diagnosing uncertainty and guiding compression in large-scale neural networks, demonstrating how Random Matrix Theory provides mathematically grounded tools for building deep learning systems that are more reliable, efficient, and trustworthy in high-stakes settings.
Questa tesi affronta due problemi chiave del deep learning contemporaneo, affidabilità ed efficienza, proponendo un quadro unificato basato sulla Geometria Spettrale e sulla Random Matrix Theory (RMT). Con l’aumento di scala complessità dei Large Language Models, il loro funzionamento interno diventa sempre meno trasparente, dando origine a fenomeni come allucinazioni, scarsa robustezza ai cambi di distribuzione e costi computazionali ed energetici sempre più elevati. Studiando le dinamiche spettrali delle attivazioni interne, questo lavoro mostra che le statistiche sugli autovalori offrono una descrizione compatta, stabile e interpretabile del comportamento dei modelli, capace di distinguere rappresentazioni informative e strutturate da componenti prevalentemente di rumuore. In questo contesto, il primo contributo, EigenTrack, introduce un metodo in tempo reale per il rilevamento di allucinazioni e comportamenti out-of-distribution in large language models e vision-language models. EigenTrack trasforma le attivazioni dei modelli in descrittori spettrali sugli autovalori, come entropia, varianza e deviazioni dalla legge di Marchenko–Pastur, e ne analizza l’evoluzione temporale tramite modelli ricorrenti, individuando precocemente situazioni di inaffidabilità prima che emergano negli output del modello. Il secondo contributo, RMT-KD, propone un approccio rigoroso alla compressione delle reti neurali basato sulla knowledge distillation, guidato dalla RMT. Interpretando gli autovalori outlier degli spettri di attivazione come portatori di informazione rilevante per l'obiettivo, RMT-KD riduce progressivamente la dimensionalità dei modelli tramite auto-distillazione iterativa, ottenendo modelli molto più compatti ed efficienti dal punto di vista energetico senza sacrificare l’accuratezza né la struttura densa, favorevole all’hardware. Questi contributi mostrano come la prospettiva spettrale possa costituire una base coerente sia per analizzare l’affidabilità sia per guidare la compressione dei modelli su larga scala, dimostrando che la RMT può tradursi in strumenti matematicamente solidi per costruire sistemi di deep learning più affidabili ed efficienti.
Structure and redundancy in Large Language Models: a spectral study via Random Matrix Theory
Ettori, Davide
2025/2026
Abstract
This thesis addresses two persistent and closely related challenges in modern deep learning, reliability and efficiency, through a unified framework grounded in Spectral Geometry and Random Matrix Theory (RMT). As deep networks and large language models continue to scale, their internal behavior becomes increasingly opaque, leading to hallucinations, fragile generalization under distribution shift, and growing computational and energy demands. By analyzing the eigenvalue dynamics of hidden activations across layers and inputs, this work shows that spectral statistics provide a compact, stable, and interpretable lens on model behavior, capable of separating structured, causal representations from noise-dominated variability. Within this framework, the first contribution, EigenTrack, introduces a real-time method for detecting hallucinations and out-of-distribution behavior in large language and vision-language models. EigenTrack transforms streaming activations into spectral descriptors such as entropy, variance, and deviations from the Marchenko–Pastur baseline, and models their temporal evolution using lightweight recurrent classifiers, enabling early detection of reliability failures before they appear in model outputs while offering interpretable insight into representation dynamics. The second contribution, RMT-KD, presents a principled approach to compressing deep networks via random matrix theoretic knowledge distillation. By interpreting outlier eigenvalues in activation spectra as carriers of task-relevant information, RMT-KD progressively projects networks onto lower-dimensional subspaces through iterative self-distillation, yielding significantly more compact and energy-efficient models while preserving accuracy and dense, hardware-friendly structure. Together, these contributions establish spectral geometry as a coherent foundation for diagnosing uncertainty and guiding compression in large-scale neural networks, demonstrating how Random Matrix Theory provides mathematically grounded tools for building deep learning systems that are more reliable, efficient, and trustworthy in high-stakes settings.| File | Dimensione | Formato | |
|---|---|---|---|
|
2026_02_Ettori_Tesi_01.pdf
accessibile in internet per tutti
Dimensione
7.42 MB
Formato
Adobe PDF
|
7.42 MB | Adobe PDF | Visualizza/Apri |
|
2026_02_Ettori_Executive_Summary_01.pdf
accessibile in internet per tutti
Dimensione
6.45 MB
Formato
Adobe PDF
|
6.45 MB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/252626