TPA: Next Token Probability Attribution for Detecting Hallucinations in RAG

Authors: Pengqian Lu, Jie Lu, Anjin Liu, Guangquan Zhang

Submitted to arXiv on 08 Dec. 2025
Abstract

Detecting hallucinations in Retrieval-Augmented Generation remains a challenge. Prior approaches attribute hallucinations to a binary conflict between internal knowledge stored in FFNs and the retrieved context. However, this perspective is incomplete, failing to account for the impact of other components of the LLM, such as the user query, previously generated tokens, the self token, and the final LayerNorm adjustment. To comprehensively capture the impact of these components on hallucination detection, we propose TPA which mathematically attributes each token's probability to seven distinct sources: Query, RAG Context, Past Token, Self Token, FFN, Final LayerNorm, and Initial Embedding. This attribution quantifies how each source contributes to the generation of the next token. Specifically, we aggregate these attribution scores by Part-of-Speech (POS) tags to quantify the contribution of each model component to the generation of specific linguistic categories within a response. By leveraging these patterns, such as detecting anomalies where Nouns rely heavily on LayerNorm, TPA effectively identifies hallucinated responses. Extensive experiments show that TPA achieves state-of-the-art performance.

The papers around it, by date and closeness

Higher is closer to this paper; left is older. Lines join papers close to each other: groups of lines are sub-topics. Select a point to see why it is there. Back to the summary of this paper

How to read this map? Illustrated guide

Closest papers Prior work it builds on Papers that cite it

Papers around this one

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Review
    Attribution Techniques for Mitigating Hallucinated Information in RAG Systems: A Survey
    Yuqing Zhao, Zi-Yao Liu, Yong-Sen Zheng et al. · 2026 · Digital Signal Processing and Signal Processing Education Workshop · cited 1 time · Not summarized yet

    Attribution Techniques surveys attribution-based methods for detecting hallucinations in RAG, the research area addressed by TPA.

    Abstract

    Large Language Models (LLMs) systems play a critical role in modern AI, demonstrating strong performance across various tasks. However, LLM-generated responses often suffer from hallucinations, unfaithful statements lacking reliable references. Retrieval-Augmented Generation (RAG) frameworks enhance LLM responses by incorporating external references but also introduce new forms of hallucination due to complex interactions between the retriever and generator. To address these challenges, researchers have explored attribution-based techniques that ensure responses are verifiably supported by retrieved content. Despite progress, a unified pipeline for these techniques, along with a clear taxono…

  2. Very close Another approach to the problem
    InterpDetect: Interpretable Signals for Detecting Hallucinations in Retrieval-Augmented Generation
    Likun Tan, Kuan-Wei Huang, Joy Shi et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 3 times · Not summarized yet

    InterpDetect detects RAG hallucinations by scoring context and parametric knowledge contributions, whereas TPA attributes token probabilities to seven sources.

    Abstract

    Retrieval-Augmented Generation (RAG) integrates external knowledge to mitigate hallucinations, yet models often generate outputs inconsistent with retrieved content. Accurate hallucination detection requires disentangling the contributions of external context and parametric knowledge, which prior methods typically conflate. We investigate the mechanisms underlying RAG hallucinations and find they arise when later-layer FFN modules disproportionately inject parametric knowledge into the residual stream. To address this, we explore a mechanistic detection approach based on external context scores and parametric knowledge scores. Using Qwen3-0.6b, we compute these scores across layers and atten…

  3. Very close Another approach to the problem
    LRP4RAG: Detecting Hallucinations in Retrieval-Augmented Generation via Layer-wise Relevance Propagation
    Hai-Chuan Hu, Cong-Qing He, Xiao-Chen Xie et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 23 times · Not summarized yet

    LRP4RAG applies layer-wise relevance propagation to generator inputs and outputs to detect RAG hallucinations, rather than TPA’s seven-source probability attribution.

    Abstract

    Retrieval-Augmented Generation (RAG) has become a primary technique for mitigating hallucinations in large language models (LLMs). However, incomplete knowledge extraction and insufficient understanding can still mislead LLMs to produce irrelevant or even contradictory responses, which means hallucinations persist in RAG. In this paper, we propose LRP4RAG, a method based on the Layer-wise Relevance Propagation (LRP) algorithm for detecting hallucinations in RAG. Specifically, we first utilize LRP to compute the relevance between the input and output of the RAG generator. We then apply further extraction and resampling to the relevance matrix. The processed relevance data are input into multi…

  4. Very close* Same question
    SPAD: Seven-Source Token Probability Attribution with Syntactic Aggregation for Detecting Hallucinations in RAG
    Pengqian Lu, Jie Lu, Anjin Liu et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet

    SPAD targets RAG hallucination detection using seven-source token-probability attribution and syntactic aggregation, matching TPA’s stated task and approach.

  5. Very close Another approach to the problem
    Probabilistic distances-based hallucination detection in LLMs with RAG
    Rodion Oblovatny, A. Kuleshova, Konstantin Polev et al. · 2025 · cited 2 times · Not summarized yet

    Probabilistic distances detects RAG hallucinations by comparing prompt and response token-embedding distributions, rather than attributing next-token probabilities to model sources.

    Abstract

    Detecting hallucinations in large language models (LLMs) is critical for their safety in many applications. Without proper detection, these systems often provide harmful, unreliable answers. In recent years, LLMs have been actively used in retrieval-augmented generation (RAG) settings. However, hallucinations remain even in this setting, and while numerous hallucination detection methods have been proposed, most approaches are not specifically designed for RAG systems. To overcome this limitation, we introduce a hallucination detection method based on estimating the distances between the distributions of prompt token embeddings and language model response token embeddings. The method examine…

  6. Very close Another approach to the problem
    Detecting Hallucinations in Retrieval-Augmented Generation via Semantic-level Internal Reasoning Graph
    Jianpeng Hu, Yanzeng Li, Jia-Lun Zhong et al. · 2026 · Annual Meeting of the Association for Computational Linguistics · cited 4 times · Not summarized yet

    The semantic-level reasoning graph method detects faithfulness hallucinations by extending relevance propagation to semantic units, unlike TPA’s source-based token attribution.

    Abstract

    The Retrieval-augmented generation (RAG) system based on Large language model (LLM) has made significant progress. It can effectively reduce factuality hallucinations, but faithfulness hallucinations still exist. Previous methods for detecting faithfulness hallucinations either neglect to capture the models'internal reasoning processes or handle those features coarsely, making it difficult for discriminators to learn. This paper proposes a semantic-level internal reasoning graph-based method for detecting faithfulness hallucination. Specifically, we first extend the layer-wise relevance propagation algorithm from the token level to the semantic level, constructing an internal reasoning graph…

  7. Very close Another approach to the problem
    RAGognizer: Hallucination-Aware Fine-Tuning via Detection Head Integration
    Fabian Ridder, Laurin Lessel, M. Schilling · 2026 · IEEE International Joint Conference on Neural Network · cited 1 time · Not summarized yet

    RAGognizer integrates a detection head into fine-tuning for closed-domain RAG hallucinations, while TPA detects them through token-probability attribution.

    Abstract

    Retrieval-Augmented Generation (RAG) is widely used to augment the input to Large Language Models (LLMs) with external information, such as recent or domain-specific knowledge. Nonetheless, current models still produce closed-domain hallucinations and generate content that is unsupported by the retrieved context. Current detection approaches typically treat hallucination as a post-hoc problem, relying on black-box consistency checks or probes over frozen internal representations. In this work, we demonstrate that hallucination detection based on internal state representation can also serve as a direct training signal. We introduce RAGognize, a dataset of naturally occurring closed-domain hal…

  8. Very close Broader context
    Detecting Hallucinations in Large Language Model Generation: A Token Probability Approach
    Ernesto Quevedo, Jorge Yero, Rachel Koerner et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 58 times · Not summarized yet

    The token-probability approach detects hallucinations in general LLM generation using probability features, while TPA focuses on source attribution for RAG.

    Abstract

    Concerns regarding the propensity of Large Language Models (LLMs) to produce inaccurate outputs, also known as hallucinations, have escalated. Detecting them is vital for ensuring the reliability of applications relying on LLM-generated content. Current methods often demand substantial resources and rely on extensive LLMs or employ supervised learning with multidimensional features or intricate linguistic and semantic analyses difficult to reproduce and largely depend on using the same LLM that hallucinated. This paper introduces a supervised learning approach employing two simple classifiers utilizing only four numerical features derived from tokens and vocabulary probabilities obtained fro…

Prior work it builds on

  1. Close Broader context Used in depth by this paper
    How to Steer LLM Latents for Hallucination Detection?
    Seongheon Park, Xuefeng Du, Min-Hsuan Yeh et al. · 2025 · Machine Learning · cited 67 times · AI summary available

    How to Steer LLM Latents detects hallucinations by steering representations, addressing LLM hallucination detection beyond TPA’s RAG-specific attribution method.

    Abstract

    Hallucinations in LLMs pose a significant concern to their safe deployment in real-world applications. Recent approaches have leveraged the latent space of LLMs for hallucination detection, but their embeddings, optimized for linguistic coherence rather than factual accuracy, often fail to clearly separate truthful and hallucinated content. To this end, we propose the Truthfulness Separator Vector (TSV), a lightweight and flexible steering vector that reshapes the LLM's representation space during inference to enhance the separation between truthful and hallucinated outputs, without altering model parameters. Our two-stage framework first trains TSV on a small set of labeled exemplars to for…

  2. Close Broader context
    Learning to Reason for Hallucination Span Detection
    Hsuan Su, Ting-Yao Hu, H. Koppula et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 8 times · Not summarized yet

    RL4HS uses chain-of-thought and reinforcement learning to identify hallucinated spans, a different hallucination-detection task from TPA’s RAG response detection.

    Abstract

    Large language models (LLMs) often generate hallucinations -- unsupported content that undermines reliability. While most prior works frame hallucination detection as a binary task, many real-world applications require identifying hallucinated spans, which is a multi-step decision making process. This naturally raises the question of whether explicit reasoning can help the complex task of detecting hallucination spans. To answer this question, we first evaluate pretrained models with and without Chain-of-Thought (CoT) reasoning, and show that CoT reasoning has the potential to generate at least one correct answer when sampled multiple times. Motivated by this, we propose RL4HS, a reinforceme…

  3. Close Broader context Used in depth by this paper
    Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs
    Jannik Kossen, Jiatong Han, Muhammed Razzak et al. · 2024 · arXiv.org · preprint, not peer reviewed · cited 307 times · Not summarized yet

    Semantic Entropy Probes estimate uncertainty from hidden states for general LLM hallucination detection, rather than tracing RAG token probabilities to sources.

    Abstract

    We propose semantic entropy probes (SEPs), a cheap and reliable method for uncertainty quantification in Large Language Models (LLMs). Hallucinations, which are plausible-sounding but factually incorrect and arbitrary model generations, present a major challenge to the practical adoption of LLMs. Recent work by Farquhar et al. (2024) proposes semantic entropy (SE), which can detect hallucinations by estimating uncertainty in the space semantic meaning for a set of model generations. However, the 5-to-10-fold increase in computation cost associated with SE computation hinders practical adoption. To address this, we propose SEPs, which directly approximate SE from the hidden states of a single…

  4. Close Broader context
    Chainpoll: A high efficacy method for LLM hallucination detection
    R. Friel, Atindriyo Sanyal · 2023 · arXiv.org · preprint, not peer reviewed · cited 67 times · Not summarized yet

    ChainPoll introduces a general LLM hallucination metric and benchmark collection, rather than TPA’s component-level attribution method for RAG.

    Abstract

    Large language models (LLMs) have experienced notable advancements in generating coherent and contextually relevant responses. However, hallucinations - incorrect or unfounded claims - are still prevalent, prompting the creation of automated metrics to detect these in LLM outputs. Our contributions include: introducing ChainPoll, an innovative hallucination detection method that excels compared to its counterparts, and unveiling RealHall, a refined collection of benchmark datasets to assess hallucination detection metrics from recent studies. While creating RealHall, we assessed tasks and datasets from previous hallucination detection studies and observed that many are not suitable for the p…

  5. Close Broader context
    InterrogateLLM: Zero-Resource Hallucination Detection in LLM-Generated Answers
    Yakir Yehuda, Itzik Malkiel, Oren Barkan et al. · 2024 · Annual Meeting of the Association for Computational Linguistics · cited 52 times · Not summarized yet

    InterrogateLLM detects hallucinations in generated answers without resources, addressing a broader setting than TPA’s source attribution in RAG.

    Abstract

    Despite the many advances of Large Language Models (LLMs) and their unprecedented rapid evolution, their impact and integration into every facet of our daily lives is limited due to various reasons. One critical factor hindering their widespread adoption is the occurrence of hallucinations, where LLMs invent answers that sound realistic, yet drift away from factual truth. In this paper, we present a novel method for detecting hallucinations in large language models, which tackles a critical issue in the adoption of these models in various real-world scenarios. Through extensive evaluations across multiple datasets and LLMs, including Llama-2, we study the hallucination levels of various rece…

Papers that cite it

  1. Related Broader context
    Balancing Evidence and Interpretation: Historical Grounding Ratio as a Design Parameter for AI-Generated Urban Storytelling
    Fuyang Zhang, M. Benayoun · 2026 · Not summarized yet

    Historical Grounding Ratio measures archive-supported claims in generated urban narratives, sharing an interest in source support but not RAG hallucination detection.

    Abstract

    Location-aware generative systems can now select historical archives and real-time contextual information based on a user's surroundings to automatically generate narratives for urban heritage walks. Yet when multiple sources jointly inform generation, existing systems provide neither a clear representation of how much content from each source actually appears in the output nor an operational means of measuring it. We introduce the Historical Grounding Ratio (HGR), defined as the proportion of claim-bearing information units in a generated narrative that are supported by historical archives. HGR turns the realized share of historical evidence in a narrative into a directly measurable design …

  2. Related Broader context Cited by this paper
    From Query to Counsel: Structured Reasoning with a Multi-Agent Framework and Dataset for Legal Consultation
    Ming Y. Lu, Yi Zhang, Meng-Jia Wu et al. · 2026 · Annual Meeting of the Association for Computational Linguistics · cited 6 times · Not summarized yet

    JurisMA structures legal consultation with agents and statutory grounding, a legal QA application distinct from TPA’s RAG hallucination detection.

    Abstract

    Legal consultation question answering (Legal CQA) presents unique challenges compared to traditional legal QA tasks, including the scarcity of high-quality training data, complex task composition, and strong contextual dependencies. To address these, we construct JurisCQAD, a large-scale dataset of over 43,000 real-world Chinese legal queries annotated with expert-validated positive and negative responses, and design a structured task decomposition that converts each query into a legal element graph integrating entities, events, intents, and legal issues. We further propose JurisMA, a modular multi-agent framework supporting dynamic routing, statutory grounding, and stylistic optimization. C…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 31 October 2026.

The illustrated guide to the papers around a paper