AIIC AI Intelligence Centre

SOURCE-LINKED INTELLIGENCE

CodeTD: Topology of Attention Detects Hallucinations in Code LLMs

arXiv · AI, language, vision and robotics · article · Sep 7, 2026 · UTC

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 comm

Read original source ↗ Open in workspace

recordType
paper
region
Global

Evidence & attribution

First collected: 2026-09-20T20:32:20.942Z. This is not the publication date.