@inproceedings{voronkova-etal-2026-codetd,
title = "{C}ode{TD}: Topology of Attention Detects Hallucinations in Code {LLM}s",
author = "Voronkova, Daria and
Trofimov, Ilya and
Dmitriev, Anton and
Tulchinskii, Eduard and
Burnaev, Evgeny and
Barannikov, Serguei",
editor = "Lee, Hung-Yi and
Dev, Sunipa and
Li, Jessy and
Elliott, Desmond",
booktitle = "Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing",
month = oct,
year = "2026",
address = "Budapest, Hungary",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.emnlp-main.529/",
pages = "12204--12232",
ISBN = "979-8-89176-459-0",
abstract = "As the AI-code assistant tools become widespread, automatic assessment of the correctness of the generated code becomes a significant challenge. Code LLMs are prone to hallucinations, which may lead to code that does not solve a 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 LLM attention maps. Our method quantifies prompt-generation mismatch from topological patterns of attention maps. We carry out experiments with common benchmarks (HumanEval, MBPP, BigCodeBench, MultiPL-E), 5 programming languages and 10 Code LLMs of size up to 34B parameters. The experimental results show that the proposed method is better than recent baselines. Moreover, CodeTD is transferable between coding benchmarks."
}<?xml version="1.0" encoding="UTF-8"?>
<modsCollection xmlns="http://www.loc.gov/mods/v3">
<mods ID="voronkova-etal-2026-codetd">
<titleInfo>
<title>CodeTD: Topology of Attention Detects Hallucinations in Code LLMs</title>
</titleInfo>
<name type="personal">
<namePart type="given">Daria</namePart>
<namePart type="family">Voronkova</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Ilya</namePart>
<namePart type="family">Trofimov</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Anton</namePart>
<namePart type="family">Dmitriev</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Eduard</namePart>
<namePart type="family">Tulchinskii</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Evgeny</namePart>
<namePart type="family">Burnaev</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Serguei</namePart>
<namePart type="family">Barannikov</namePart>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
</role>
</name>
<originInfo>
<dateIssued>2026-10</dateIssued>
</originInfo>
<typeOfResource>text</typeOfResource>
<relatedItem type="host">
<titleInfo>
<title>Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing</title>
</titleInfo>
<name type="personal">
<namePart type="given">Hung-Yi</namePart>
<namePart type="family">Lee</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Sunipa</namePart>
<namePart type="family">Dev</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Jessy</namePart>
<namePart type="family">Li</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<name type="personal">
<namePart type="given">Desmond</namePart>
<namePart type="family">Elliott</namePart>
<role>
<roleTerm authority="marcrelator" type="text">editor</roleTerm>
</role>
</name>
<originInfo>
<publisher>Association for Computational Linguistics</publisher>
<place>
<placeTerm type="text">Budapest, Hungary</placeTerm>
</place>
</originInfo>
<genre authority="marcgt">conference publication</genre>
<identifier type="isbn">979-8-89176-459-0</identifier>
</relatedItem>
<abstract>As the AI-code assistant tools become widespread, automatic assessment of the correctness of the generated code becomes a significant challenge. Code LLMs are prone to hallucinations, which may lead to code that does not solve a 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 LLM attention maps. Our method quantifies prompt-generation mismatch from topological patterns of attention maps. We carry out experiments with common benchmarks (HumanEval, MBPP, BigCodeBench, MultiPL-E), 5 programming languages and 10 Code LLMs of size up to 34B parameters. The experimental results show that the proposed method is better than recent baselines. Moreover, CodeTD is transferable between coding benchmarks.</abstract>
<identifier type="citekey">voronkova-etal-2026-codetd</identifier>
<location>
<url>https://aclanthology.org/2026.emnlp-main.529/</url>
</location>
<part>
<date>2026-10</date>
<extent unit="page">
<start>12204</start>
<end>12232</end>
</extent>
</part>
</mods>
</modsCollection>
%0 Conference Proceedings
%T CodeTD: Topology of Attention Detects Hallucinations in Code LLMs
%A Voronkova, Daria
%A Trofimov, Ilya
%A Dmitriev, Anton
%A Tulchinskii, Eduard
%A Burnaev, Evgeny
%A Barannikov, Serguei
%Y Lee, Hung-Yi
%Y Dev, Sunipa
%Y Li, Jessy
%Y Elliott, Desmond
%S Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
%D 2026
%8 October
%I Association for Computational Linguistics
%C Budapest, Hungary
%@ 979-8-89176-459-0
%F voronkova-etal-2026-codetd
%X As the AI-code assistant tools become widespread, automatic assessment of the correctness of the generated code becomes a significant challenge. Code LLMs are prone to hallucinations, which may lead to code that does not solve a 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 LLM attention maps. Our method quantifies prompt-generation mismatch from topological patterns of attention maps. We carry out experiments with common benchmarks (HumanEval, MBPP, BigCodeBench, MultiPL-E), 5 programming languages and 10 Code LLMs of size up to 34B parameters. The experimental results show that the proposed method is better than recent baselines. Moreover, CodeTD is transferable between coding benchmarks.
%U https://aclanthology.org/2026.emnlp-main.529/
%P 12204-12232
Markdown (Informal)
[CodeTD: Topology of Attention Detects Hallucinations in Code LLMs](https://aclanthology.org/2026.emnlp-main.529/) (Voronkova et al., EMNLP 2026)
ACL
- Daria Voronkova, Ilya Trofimov, Anton Dmitriev, Eduard Tulchinskii, Evgeny Burnaev, and Serguei Barannikov. 2026. CodeTD: Topology of Attention Detects Hallucinations in Code LLMs. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 12204–12232, Budapest, Hungary. Association for Computational Linguistics.