Researchers Unveil TOHA Method to Detect AI Hallucinations Using Attention Topology
Developed by Skoltech and Sberbank, the open-source technique flags unsupported LLM outputs without secondary classifier models or heavy compute overhead.

A research team from the Skolkovo Institute of Science and Technology (Skoltech) and Sberbank's Center for Practical Artificial Intelligence has introduced TOHA, a method designed to identify hallucinations in large language models operating within retrieval-augmented generation (RAG) architectures, first reported by TechXplore. Short for TOpology-based HAllucination detector, the framework evaluates the structural properties of a model's internal attention mechanisms to spot outputs that lack support from provided context.
As enterprise developers increasingly rely on RAG pipelines to connect virtual assistants to private corporate repositories and documentation, unverified AI outputs remain a significant risk. Standard hallucination detection mechanisms typically demand training dedicated external classification models or generating multiple alternative responses to cross-check consistency, introducing substantial latency and infrastructure overhead.
TOHA addresses these cost constraints by analyzing attention matrices directly as graph structures. The system calculates a topological metric designated as MTop-Div, which measures structural divergence between subgraphs representing the input context and those representing the generated answer. Researchers identified that elevated divergence values within specific attention heads serve as a reliable indicator that the output contains unsupported information.
The academic findings were published in the Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics in a study led by Alexandra Bazarova alongside co-author Aleksey Zaytsev, associate professor at Skoltech and head of the joint Skoltech–Sberbank Laboratory (LARSS). Across question-answering and text-summarization benchmark tests, TOHA delivered performance comparable to or exceeding existing detection frameworks, matching computationally intensive approaches like SelfCheckGPT while relying on minimal calibration data.
"When language models are used in applied systems, it is important not only to obtain a convincing-sounding answer but also to understand whether it is actually based on the information that was provided to the model," said Zaytsev. "In this work, we show that such a signal can be extracted from the model's internal representation of the text if it is analyzed in the right way. The activation of specific topological features signals potential hallucinations without requiring the training of an additional detector model or repeated response generation."
The underlying technology has been integrated into SIRIN, an open-source software library built by Sberbank's Center for Practical Artificial Intelligence to diagnose contextual inconsistencies in language model deployments. "The fight against AI hallucinations is entering a new stage," said Sergey Ryabov, senior managing director and director of AI transformation at Sberbank. "The TOHA method, developed jointly with Skoltech, demonstrates that reliability does not necessarily require high costs. Instead of large-scale data annotation, we use targeted calibration of the model's attention, making it adhere closely to the context and independently correct inaccuracies."
The open-source deployment targets high-stakes commercial sectors, including banking, legal services, and insurance, where hallucinated LLM responses introduce critical regulatory, financial, and reputational liabilities. Beyond production environments, the authors noted that topological analysis of attention graphs provides researchers with a novel mathematical framework to study how transformer models process context.
Sources
Written by
The Company Wire
Inside the companies building what’s next. Reporting on startups, technology, funding and the people shaping them.



