Metraipolis › archive › dc_15e15820ec66

CodeTD: Topology of Attention Detects Hallucinations in Code LLMs — arXiv:2609.07779

Source
arXiv (en)
Original
https://arxiv.org/abs/2609.07779
License (as archived)
CC0-1.0
Archived
2026-10-16T05:24:34.093Z
SHA-256 of the archived text
2eb16409074a741f461ac2d50ba181918776457a006eec09c35743d060e6783e
Stable URL of this page
https://metraipolis.com/documento/dc_15e15820ec66

How to cite

CodeTD: Topology of Attention Detects Hallucinations in Code LLMs — arXiv:2609.07779 — arXiv (en), https://arxiv.org/abs/2609.07779 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_15e15820ec66 (Metraipolis archive dc_15e15820ec66, sha256 2eb16409074a741f461ac2d50ba181918776457a006eec09c35743d060e6783e)
BibTeX
@misc{dc15e15820ec66,
  title = {CodeTD: Topology of Attention Detects Hallucinations in Code LLMs — arXiv:2609.07779},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2609.07779},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_15e15820ec66; sha256 2eb16409074a741f461ac2d50ba181918776457a006eec09c35743d060e6783e},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2609.07779. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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 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 outperforms recent baselines. Moreover, CodeTD is transferable between coding benchmarks.

Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-09-11 in cs.AI).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI); Computation and Language (cs.CL); Machine Learning (cs.LG); Algebraic Topology (math.AT).
Pagina del lavoro: https://arxiv.org/abs/2609.07779 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T05:17:52.063Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-09-11?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).