Beyond Next Token Probabilities: Learnable, Fast Detection of Hallucinations and Data Contamination on LLM Output Distributions
Not on the map. Why?
Abstract (arXiv)
The automated detection of hallucinations and training data contamination is pivotal to the safe deployment of Large Language Models (LLMs). These tasks are particularly challenging in settings where no access to model internals is available. Current approaches in this setup typically leverage only the probabilities of actual tokens in the text, relying on simple task-specific heuristics. Crucially, they overlook the information contained in the full sequence of next-token probability distributions. We propose to go beyond hand-crafted decision rules by learning directly from the complete observable output of LLMs -- consisting not only of next-token probabilities, but also the full sequence of next-token distributions. We refer to this as the LLM Output Signature (LOS), and treat it as a reference data type for detecting hallucinations and data contamination. To that end, we introduce LOS-Net, a lightweight attention-based architecture trained on an efficient encoding of the LOS, which can provably approximate a broad class of existing techniques for both tasks. Empirically, LOS-Net achieves superior performance across diverse benchmarks and LLMs, while maintaining extremely low detection latency. Furthermore, it demonstrates promising transfer capabilities across datasets and LLMs. Full code is available at https://github.com/BarSGuy/Beyond-next-token-probabilities.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Builds on 49 of its 65 references that are in the map. First posted on arXiv 18 Mar 2025.
Builds on
49 of 65 references.
References · 49
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Mistral 7Bcited by 3,065
- 2016Membership Inference Attacks against Machine Learning Modelscited by 2,221
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2020Extracting Training Data from Large Language Modelscited by 2,144
- 2024Qwen2 Technical Reportcited by 2,076
37 more
- 2022Survey of Hallucination in Natural Language Generationcited by 2,056
- 2022Language Models (Mostly) Know What They Knowcited by 1,783
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,582
- 2023Inference-Time Intervention: Eliciting Truthful Answers from a Language Modelcited by 1,259
- 2022Atlas: Few-shot Learning with Retrieval Augmented Language Modelscited by 940
- 2020On Faithfulness and Factuality in Abstractive Summarizationcited by 895
- 2018The Secret Sharer: Evaluating and Testing Unintended Memorization in Neural Networkscited by 847
- 2021Membership Inference Attacks From First Principlescited by 839
- 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
- 2023Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generationcited by 795
- 2019Designing and Interpreting Probes with Control Taskscited by 608
- 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 404
- 2023Detecting Pretraining Data from Large Language Modelscited by 375
- 2024A Comprehensive Survey of Hallucination Mitigation Techniques in Large Language Modelscited by 266
- 2023Membership Inference Attacks against Language Models via Neighbourhood Comparisoncited by 249
- 2024LLMs Know More Than They Show: On the Intrinsic Representation of LLM Hallucinationscited by 230
- 2023A Stitch in Time Saves Nine: Detecting and Mitigating Hallucinations of LLMs by Validating Low-Confidence Generationcited by 202
- 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 137
- 2023The Troubling Emergence of Hallucination in Large Language Models -- An Extensive Definition, Quantification, and Prescriptive Remediationscited by 130
- 2023Speak, Memory: An Archaeology of Books Known to ChatGPT/GPT-4cited by 123
- 2024Min-K%++: Improved Baseline for Detecting Pre-Training Data from Large Language Modelscited by 102
- 2023Ghostbuster: Detecting Text Ghostwritten by Large Language Modelscited by 90
- 2023XLM-V: Overcoming the Vocabulary Bottleneck in Multilingual Masked Language Modelscited by 88
- 2022Looking for a Needle in a Haystack: A Comprehensive Study of Hallucinations in Neural Machine Translationcited by 60
- 2023On Early Detection of Hallucinations in Factual Question Answeringcited by 54
- 2024Spectral Editing of Activations for Large Language Model Alignmentcited by 54
- 2024Enhancing Contextual Understanding in Large Language Models through Contrastive Decodingcited by 49
- 2023Detecting and Mitigating Hallucinations in Multilingual Summarisationcited by 48
- 2023An Open Source Data Contamination Report for Large Language Modelscited by 47
- 2024Characterizing Truthfulness in Large Language Model Generations with Local Intrinsic Dimensioncited by 45
- 2023LLMDet: A Third Party Large Language Models Generated Text Detection Toolcited by 44
- 2022"That Is a Suspicious Reaction!": Interpreting Logits Variation to Detect NLP Adversarial Attackscited by 24
- 2023Weakly Supervised Detection of Hallucinations in LLM Activationscited by 20
- 2024Cost-Effective Hallucination Detection for LLMscited by 16
- 2025Tag&Tab: Pretraining Data Detection in Large Language Models Using Keyword-Based Membership Inference Attackcited by 5
- 2023Learning with Rejection for Abstractive Text Summarizationcited by 3
Built on by
Citing papers per year: 2025: 3; 2026: 8.
11 papers.
- 2026HALT: Hallucination Assessment via Log-probs as Time seriescited by 8
- 2025Detecting Data Contamination in LLMs via In-Context Learningcited by 7
- 2025Behavioral Fingerprinting of Large Language Modelscited by 5
- 2025Neural Message-Passing on Attention Graphs for Hallucination Detectioncited by 5
- 2026LLM Performance Predictors: Learning When to Escalate in Hybrid Human-AI Moderation Systemscited by 4
- 2026Low-Cost Black-Box Detection of LLM Hallucinations via Dynamical System Predictioncited by 3
- 2026Evidential Transformation Network: Turning Pretrained Models into Evidential Models for Post-hoc Uncertainty Estimationcited by 2
- 2026Discovering Hidden Gems in Model Repositoriescited by 0
- 2026LogitDynamics: Reliable ViT Error Detection from Layerwise Logit Trajectoriescited by 0
- 2026UniProbe: A Learnable Token-Level Hallucination Detector for Large VLMs using Multi-Structural Internal Representationscited by 0
- 2026ActMap: Single-Pass Uncertainty Quantification from Generation-Time Activation Mapscited by 0
- 2026ActMap: Single-Pass Uncertainty Quantification from Generation-Time Activation Maps10 Sep 2026
- 2026UniProbe: A Learnable Token-Level Hallucination Detector for Large VLMs using Multi-Structural Internal Representations11 Aug 2026
- 2026Low-Cost Black-Box Detection of LLM Hallucinations via Dynamical System Prediction6 May 2026
- 2026LogitDynamics: Reliable ViT Error Detection from Layerwise Logit Trajectories12 Apr 2026
- 2026Evidential Transformation Network: Turning Pretrained Models into Evidential Models for Post-hoc Uncertainty Estimation9 Apr 2026
- 2026HALT: Hallucination Assessment via Log-probs as Time series2 Feb 2026
- 2026Discovering Hidden Gems in Model Repositories29 Jan 2026
- 2026LLM Performance Predictors: Learning When to Escalate in Hybrid Human-AI Moderation Systems11 Jan 2026
- 2025Detecting Data Contamination in LLMs via In-Context Learning30 Oct 2025
- 2025Neural Message-Passing on Attention Graphs for Hallucination Detection29 Sep 2025
- 2025Behavioral Fingerprinting of Large Language Models2 Sep 2025