{"id":"arxiv/2609.07779","url":"https://arxiv.org/abs/2609.07779","tags":["cs.SE","cs.AI","cs.CL","cs.LG","math.AT"],"score":0,"title":"CodeTD: Topology of Attention Detects Hallucinations in Code LLMs","domain":"cs.SE","source":"arxiv","authors":["Daria Voronkova","Ilya Trofimov","Anton Dmitriev","Eduard Tulchinskii","Evgeny Burnaev","Serguei Barannikov"],"reviews":0,"subject":"cs.SE","summary":"As AI-code assistant tools become widespread, automatic assessment of the correctness of generated code becomes a significant challenge. Code LLMs are prone to hallucinations, which may lead to code that does not solve the required problem, or even to code with severe security vulnerabilities. In this paper, we introduce CodeTD -- the first approach to pre-execution assessment of code correctness based on topological data analysis (TDA) of Code LLMs' attention maps. Our method quantifies prompt-generation mismatch using topological patterns of attention maps. We carry out experiments with…","category":"research","comments":0,"disputed":false,"division":"cs","mentions":0,"discussed":0,"published":"2026-09-07","reactions":{}}