Mixture-of-Expert Blocks Contain Strong Hallucination Detection Signals
This paper introduces InnerExpert, a novel per-token hallucination detection method that leverages unique internal signals from Mixture-of-Experts (MoE) architectures—such as router entropy and expert disagreement—to achieve superior performance across multiple datasets while requiring only a single forward pass.
Original paper licensed under CC BY 4.0 (http://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 the engines behind a new generation of artificial intelligence, capable of writing essays, solving problems, and holding conversations that feel remarkably human. Yet, beneath this fluency lies a persistent flaw: these machines sometimes invent facts with total confidence. This phenomenon, known as hallucination, occurs when a model generates content that sounds plausible but is entirely false. While these errors are often harmless in casual chat, they become dangerous when the model is used for medical advice, legal research, or news reporting. The core challenge for scientists is not just to spot these lies after the fact, but to catch them the moment they happen, ideally identifying the exact word where the truth begins to unravel.
For years, researchers have tried to solve this by asking the model to repeat its answer multiple times or by checking if different versions of the story agree with each other. These methods work, but they are slow and expensive, requiring the computer to do the same work several times over just to find a single mistake. A newer approach looks inside the model's own brain while it is thinking, searching for subtle signs of uncertainty in its internal calculations. However, most of these internal checks are limited to standard models. A different, more powerful type of architecture, called a Mixture-of-Experts, has recently become popular because it is faster and more efficient. This design works like a team of specialists, where a central manager decides which specific expert to call upon for each word being generated. Until now, the signals from this team dynamic were largely ignored for the purpose of catching lies.
In a new study, researchers from Portugal have developed a method called InnerExpert that finally puts these internal team signals to work. Instead of asking the model to repeat itself or waiting until the end of a sentence to check for errors, InnerExpert watches the model's internal routing process in real time. As the model generates a response, a small router decides which "expert" network should handle the current word. The researchers found that when the model is about to hallucinate, this router shows signs of confusion. The experts might disagree with one another, or the router might struggle to decide which specialist is best suited for the task. By tracking these moments of hesitation and disagreement, along with standard signals about how the model is focusing its attention, InnerExpert can assign a confidence score to every single word as it is created.
The team trained their system using a clever, automated approach. They fed the model thousands of questions and had a separate, highly capable artificial intelligence act as a judge to label which answers were true and which were made up. This allowed them to teach InnerExpert to recognize the specific patterns of internal signals that precede a hallucination, without needing any human to manually read and correct the data. Once trained, the system acts as a lightweight detector that runs alongside the main model, requiring only a single pass of data to produce a result. It does not need to slow down the model or ask it to generate extra text.
When tested on five different datasets and two different types of large models, InnerExpert proved to be remarkably effective. It successfully identified hallucinated answers with an accuracy score of up to 0.91 at the sentence level and 0.76 at the individual word level. These numbers represent a significant improvement over existing methods, which often struggle to pinpoint exactly where a lie begins. The system was able to generalize well, performing strongly even on questions about events that happened after the model was originally trained, a common scenario where hallucinations are most frequent. Crucially, it achieved this high level of detection while adding only a tiny amount of computational cost, making it practical for real-world use.
The study also revealed that no single signal from the model's internal team was enough to catch all the lies on its own. Some signals were better at detecting errors on one type of model, while others worked better on a different type. The true power of InnerExpert came from combining all these different signals—router confusion, expert disagreement, and usage patterns—into a single, unified score. This combination allowed the system to see a clearer picture of the model's confidence than any single metric could provide. The researchers demonstrated that by listening to the internal chatter of the model's experts, they could detect uncertainty with a precision that was previously impossible without slowing the system down.
This work suggests that the path to more reliable artificial intelligence may not require building larger models or more complex verification systems. Instead, it may lie in paying closer attention to the signals the models are already producing but ignoring. By learning to read the subtle signs of hesitation in a model's internal decision-making, we can build systems that know when they are guessing and when they are sure. The researchers note that while their method is highly effective, it is not a perfect solution, and future work will need to explore how well these techniques translate to different languages and more diverse tasks. For now, however, the study provides a clear and efficient way to catch hallucinations the moment they occur, offering a practical tool to make the outputs of artificial intelligence more trustworthy.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.