EigenTrack : Spectral Activation Feature Tracking for Hallucination and Out-of-Distribution Detection in LLMs and VLMs

Davide Ettori 1 , Nastaran Darabi 1 , Sina Tayebati 1 , Ranganath Krishnan 2 , Mahesh Subedar 3 , Omesh Tickoo 3 , and Amit Ranjan Trivedi 1 · 2025

Read EigenTrack : Spectral Activation Feature Tracking for Hallucination and Out-of-Distribution Detection in LLMs and VLMs by Davide Ettori 1 , Nastaran Darabi 1 , Sina Tayebati 1 , Ranganath Krishnan 2 , Mahesh Subedar 3 , Omesh Tickoo 3 , and Amit Ranjan Trivedi 1 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-15735.txt.

Introduction

Davide Ettori leads a team that spots when a language model starts to go wrong. Models can state false facts or fail on inputs unlike their training. The team read the model's inner signals as it works. Those signals form patterns whose spread holds a compact sign of the model's state.

Their detector, EigenTrack, streams a few summary stats of that spread: how mixed it is, the gaps in it, and its drift from random baselines. A small recurrent classifier reads the stream and flags hallucination or drift early. It needs one pass, with no resampling. It keeps the time order that other inner detectors drop. Users can trade accuracy against delay in a clear way.

Catalog record

CREATORDavide Ettori 1 , Nastaran Darabi 1 , Sina Tayebati 1 , Ranganath Krishnan 2 , Mahesh Subedar 3 , Omesh Tickoo 3 , and Amit Ranjan Trivedi 1
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE19 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2509-15735

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

EigenTrack : Spectral Activation Feature Tracking for Hallucination and Out-of-Distribution Detection in LLMs and VLMs Davide Ettori 1 , Nastaran Darabi 1 , Sina Tayebati 1 , Ranganath Krishnan 2 , Mahesh Subedar 3 , Omesh Tickoo 3 , and Amit Ranjan Trivedi 1 Abstract Large language models (LLMs) offer broad utility but remain prone to hallucination and out-of-distribution (OOD) errors. We propose EigenTrack , an interpretable real-time detector that uses the spectral geometry of hidden activations, a compact global signature of model dynamics. By streaming covariance-spectrum statistics such as entropy, eigenvalue gaps, and KL divergence from random baselines into a lightweight recurrent classifier, EigenTrack tracks temporal shifts in representation structure that signal hallucination and OOD drift before surface errors appear. Unlike black- and grey-box methods, it needs only a single forward pass without resampling. Unlike existing white-box detectors, it preserves temporal context, aggregates global signals, and offers interpretable accuracy–latency trade-offs. I Introduction and Prior Works Large language/vision-language models (LLMs/VLMs) are increasingly applied in domains such as healthcare, law, and finance, but remain unreliable: they hallucinate and degrade sharply on out-of-distribution (OOD) inputs [ 1 , 2 ] . Early detectors used surface signals like softmax confidence [ 3 ] or semantic-entropy surrogates [ 4 ] , but ignored internal dynamics and failed under domain shift. More recent methods differ by access level: black-box approaches (SelfCheckGPT [ 5 ] , CoNLI [ 6 ] , Cost-Effective HD [ 7 ] ) use ensembles or multiple generations, capturing context at the cost of latency; grey-box methods (DetectGPT [ 8 ] , Fast-DetectGPT [ 9 ] , Glimpse [ 10 ] ) exploit log-probability curvature or partial logits, but remain snapshot-based; and white-box detectors probe hidden states but lack generality, e.g., MIND [ 11 ] streams activations without temporal context, LapEigvals [ 12 ] analyzes spectra per step, and ReDeEP [ 13 ] uses retrievals, while [ 14 ] tracks narrow shifts. We argue that spectral signatures provide a principled basis for hallucination and OOD detection by compressing high-dimensional activations into compact descriptors of representation geometry. Eigenvalue distributions, entropy, and spectral gaps are sensitive to low-rank correlations and instabilities that emerge under distribution shift or hallucination. Unlike token-level probabilities, which capture only output-layer uncertainty, spectral statistics integrate across hidden layers and reveal global uncertainty dynamics. Moreover, spectral signatures can also leverage fundamental laws from the random matrix theory such as the Marchenko–Pastur (MP) law [ 15 ] , as shown in [ 16 ] , which describes the eigenvalue distribution of isotropic noise; deviations from it provide a compact indicator of structure and thus hallucination or OOD onset. Figure 1: EigenTrack: Spectral signatures (such as entropy, spectral gap, divergence from random matrix baseline) are extracted from intermediate feed-forward layers and streamed into a recurrent spectral discrepancy detector. By tracking their temporal evolution, the detector generates early warnings of OOD or hallucination. Building on this insight, EigenTrack streams covariance spectra through a sliding window and feeds resulting statistics into a lightweight recurrent classifier (Fig. 1 ). Prior spectral methods such as RankFeat [ 17 ] , SpectralGap [ 18 ] , and SNoJoE [ 19 ] discriminate OOD from in-distribution via singular values or gaps, but operate on static snapshots and ignore temporal evolution. EigenTrack instead converts streaming spectral statistics into low-dimensional trajectories that expose how uncertainty builds over time. Our contributions are: (i) a real-time detector, EigenTrack , that models temporal evolution of multi-layer spectral features to flag hallucination and OOD; (ii) an interpretable set of spectral indicators linking eigenvalue dynamics to latent representation shifts; and (iii) a data-generation pipeline for hallucination detection via multi-LLM interaction. EigenTrack achieves AUROC of 0.82–0.94 for hallucination and 0.85–0.96 for OOD, surpassing prior methods. On LLaMa-7B it reaches 0.89 for hallucinations and 0.92 for OOD, exceeding baselines such as HaloScope, LapEigvals, and SelfCheckGPT with only a lightweight recurrent head. Figure 2: Evolution of spectral features over 80 steps on LLaMa-3B, comparing factual vs. hallucinated sequences, analyzed by the recurrent classifiers. II EigenTrack: Methodology EigenTrack converts hidden activations of LLMs and VLMs into compact spectral descriptors and models their temporal evolution to detect hallucination and OOD behavior. The pipeline has three stages: (i) constructing a sliding-window representation of activations, (ii) extracting spectral features that summarize the geometry and stability of the hidden state space, and (iii) classifying their temporal evolution with a lightweight recurrent model. This design rests on two principles: spectral statistics provide global, low-rank indicators of distributional shift, and temporal modeling enables cross-layer discrepancy identification for early detection before errors appear in the output. Sliding-Window Representation: We select a set of m early transformer layers L=\{\ell_{1},\dots,\ell_{m}\} , each producing activations h^{\ell}_{t}\in\mathbb{R}^{d} at token t . Concatenating across layers yields v_{t}=[h^{\ell_{1}}_{t}\,\|\cdots\|\,h^{\ell_{m}}_{t}]\in\mathbb{R}^{md} . Stacking the last N tokens forms a window matrix H_{t}\in\mathbb{R}^{N\times md} , updated at each step. Spectral Feature Extraction: Instead of forming the covariance C_{t}=\tfrac{1}{N}H_{t}^{\top}H_{t} , we compute a truncated SVD H_{t}=U_{t}\Sigma_{t}V_{t}^{\top} and recover eigenvalues \lambda_{t,i}=\sigma_{t,i}^{2}/N . From these we build a k -dimensional feature vector F_{t} (default k=22 ), including: (i) leading eigenvalues and cumulative variance, (ii) spectral gaps (e.g., \lambda_{t,1}/\lambda_{t,2} ), (iii) entropy S_{t}=-\sum_{i}p_{t,i}\log p_{t,i} with p_{t,i}=\lambda_{t,i}/\sum_{j}\lambda_{t,j} , and (iv) divergence from the Marčenko–Pastur reference law. These capture signal instabilities, indicating hallucination or OOD. Recurrent Classification: The feature sequence (F_{1},\dots,F_{T}) is treated as a multivariate time series and processed by a lightweight recurrent model (RNN, GRU, or LSTM). At each step, F_{t} enters the recurrent cell, hidden states propagate context, and a feed-forward head outputs a binary logit for in-distribution vs. anomalous context. Weight sharing across time keeps the parameter count independent of sequence length, allowing the model to learn spectral signatures. Hyperparameters and Extensions: EigenTrack supports tuning of the monitored layer set L , window length N , number of spectral features k , and recurrent hidden size to balance accuracy and latency. The pipeline also extends to multimodal architectures by constructing H_{t} from cross-modal fusion or vision encoder blocks. III Results and Discussion Experimental Setup: We evaluate EigenTrack on open-source HuggingFace LLMs (1B–8B parameters) from the LLaMa, Qwen, Mistral, and LLaVa families, covering both base and instruction-tuned variants. Each model generates up to 128 tokens. Hidden activations are streamed across layers. Hallucination detection is tested on HaluEval (HotpotQA-based) by pairing each passage with its true question and a random question from LLaMa-8B, producing factual vs. hallucinated outputs. This forms an automatic data-generation pipeline involving three LLMs: a Main Model (the smallest one), a Question Generator , and an Answer Judge . These interact iteratively to yield labeled hallucinated and non-hallucinated responses from a QA-style dataset. For VLMs (e.g., LLaVa), passages are replaced with Flickr8k images. OOD detection uses WebQuestions as in-distribution and Eurlex (legal-domain queries) as OOD, since such data is unseen in pretraining. For VLMs, we use the same questions paired with contextual images from Flickr8k. Again, an Answer Judge is employed to provide the final correctness judgment. EigenTrack converts activations into spectral feature sequences processed by recurrent classifiers (RNN, GRU, LSTM). Each classifier consists of a linear input layer, one recurrent layer, and a binary output head. Detection performance is reported using AUROC curve. AUROC values range from 0.5 (chance) to 1.0 (perfect discrimination). Table I: Comparison of

Read the complete text