← Latest papers
💻 computer science

Detecting RAG hallucinations via cascade influence from attention to feedforward networks

This paper introduces CASDET, a training-free method that detects RAG hallucinations by quantifying the cascade influence from attention mechanisms to feedforward networks, demonstrating competitive performance and significantly faster inference times compared to existing baselines.

Original authors: Qiyang Gu, Min Tang, Fei Wang, Hui Chen, Fei Zhang, Pengyu Guo

Published 2026-11-24
📖 4 min read☕ Coffee break read

Original authors: Qiyang Gu, Min Tang, Fei Wang, Hui Chen, Fei Zhang, Pengyu Guo

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Large language models are powerful tools that can write stories, answer questions, and summarize news, but they have a fundamental flaw: they sometimes invent facts. This happens because the models rely on a fixed set of information they learned during training, which is finite and can become outdated. To fix this, engineers developed a system called retrieval-augmented generation. In this setup, when the model is asked a question, it first searches an external library of documents for relevant facts and then uses those facts to craft its answer. This usually works well, but the models are stubborn. Even when they are given the correct information, they sometimes ignore it and fall back on their own internal memories, producing answers that contradict the documents they just read. This specific failure, where the model hallucinates despite having the right evidence, is a major hurdle for trusting these systems in real-world applications.

A team of researchers at the Academy of Military Sciences in Beijing has developed a new way to catch these errors without needing to retrain the models or add extra software. They call their method CASDET. Instead of asking the model to check its own work or generating multiple answers to see which one is consistent, this method looks inside the model's brain while it is working. The researchers discovered that the way a model processes new information follows a specific path. First, the model reads the external documents and updates its internal state. Then, it passes that updated state through a second stage where it decides what words to say next. The researchers found that in a successful answer, the new information from the documents strongly influences this second stage. However, when the model is about to hallucinate, this influence is weak or inconsistent. By measuring exactly how much the external documents change the model's internal decision-making process, they can predict with high accuracy whether the final answer will be a lie or the truth.

The researchers tested this idea by examining the internal mechanics of four different open-source language models. They focused on a specific moment in the model's processing: the transition between reading the external context and generating the next word. They created a controlled experiment where they temporarily removed the contribution of the external documents at this specific stage and watched what happened to the model's predictions. If the model was relying on the documents, removing them caused a noticeable shift in its confidence. If the model was ignoring the documents and relying on its own training, removing them made little difference. They measured this shift across all the layers of the model, calculating how widespread the influence was, how deep it went, and how strong it felt. They combined these measurements into a single risk score. A high score meant the model was listening to the documents, while a low score indicated it was likely hallucinating.

The results were striking. The new method was able to detect hallucinations as accurately as the most sophisticated existing techniques, which often require complex comparisons or multiple generations of text. Yet, it did so much faster. While other methods took thousands of seconds to evaluate a set of answers, this new approach took less than two minutes for the same task. It achieved this speed because it only needed to run the model once, looking at the internal signals during that single pass. The researchers also proved that their method was not just guessing. They gradually restored the external information in their experiments and observed that the model's reaction changed in a smooth, predictable way, confirming that the signal they were measuring was real and directly tied to the presence of the documents.

This work suggests that the key to spotting lies in large language models lies not in the final output, but in the invisible tug-of-war happening inside the machine. When a model is honest, the external facts it reads leave a clear, strong footprint on its internal calculations. When it lies, that footprint is faint or missing. By learning to read these footprints, the researchers have created a fast, reliable tool that can tell us when a machine is making things up, even when it has the truth right in front of it. This is a significant step toward making these powerful tools safe and trustworthy for critical tasks, ensuring that when they speak, they are actually speaking the truth.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →