acceptodds
Under review as a conference paper at ICLR 2027

LatticeSpike: Real-Time Token-Level Hallucination Detection via Box Embeddings and Spiking Dynamics

Abstract

Language models hallucinate mid-generation, yet most detectors only judge text after generation is complete. To address this gap, we propose LatticeSpike, a biologically inspired lightweight detector that runs alongside a frozen language model and scores every token as it is produced, using only the tokens generated so far. At each step, signals read from the language model are embedded as a box whose volume reflects the model's semantic spread. A recurrent spiking neural network, with dynamics modulated by that volume, continuously predicts its own next state. Hallucinated spans break this rhythm and the resulting prediction error, trained against token labels with a ranking objective, is the detection score. Furthermore, we release two human-validated and statistically tested benchmark datasets, spanning two distinct language model families, comprising 10,915 and 10,919 examples with token-level labels from a six-judge LM panel; we call these datasets THRIVE-Llama and THRIVE-Gemma, respectively. We evaluate LatticeSpike against twelve baselines, on four corpora: THRIVE-Llama, THRIVE-Gemma, RAGTruth, and TriviaQA, under a strictly causal protocol. Notably, across the four corpora and multiple generator families, LatticeSpike outperforms all tested baselines in 96/101 individual evaluation cells (95% win rate) spanning average precision (AP) and AUROC, as well as recall, precision, and F1 score at variable false-positive rates (0.1%-5%), under full-corpus and cross-task evaluation protocols. We also provide extensive ablation experiments showing which components are most important to LatticeSpike's success, and statistical testing to show where LatticeSpike's advantage is significant and where it should not be overinterpreted. The code for the project and the released benchmarks can be found at: https://anonymous.4open.science/r/LatticeSpike-8EB2.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.