Elamur Research⌕
☰
home / papers / 2026 / HalluZig: Hallucination Detection using Zigzag Persistence

HalluZig: Hallucination Detection using Zigzag Persistence

Paper · 2026 · Shreyas N. Samaga, Gilberto Gonzalez Arroyo and Tamal K. Dey

Summary

Large language models often produce confident but false content, and most existing detectors look only at the final text or at simple token statistics. HalluZig instead examines how attention structure changes as information moves through the network. For each layer, the authors average attention across heads. They then build a graph over tokens that keeps only the strongest (top-k percentile) attention weights. Consecutive layer graphs are linked into a zigzag filtration, which allows edges to appear and disappear. Zigzag persistence, a Topological Data Analysis tool, tracks when connected components and cycles appear and vanish across layers. The resulting persistence diagram is turned into a vector, for example a persistence image, Betti curve or persistence entropy, and a classifier uses it to separate factual from hallucinated answers. Evaluation used human-annotated benchmarks and QA data labelled with LLM-as-a-judge. HalluZig beat strong baselines. Its signatures also transferred between models without retraining and worked using only part of the network depth. This points to inexpensive internal monitoring of LLM reliability.

Key points

  • Experiments use Llama-3-8b and Vicuna-7b; for the cross-model and depth analyses, the authors draw on Mishra et al.'s (2024) FAVA Annotated Dataset.
  • Modelling dynamics across layers matters. Against a static baseline that applies persistent homology to each layer separately, HalluZig reaches F1 82.35% versus 69.57% (+12.78). Its TPR at 5% FPR is 25.42% versus 12.96%.
  • Zero-shot transfer between Llama-3-8b and Vicuna-7b works in both directions. It surpasses the Attn-Score baseline (Sriramanan et al., 2024) by about 3% in one direction and 7% in the other.
  • Using only the first 70% of layers gives over 98% of the full-model F1, suggesting that hallucination signals take shape in the middle layers.
  • The main stated limitation is the cost of computing persistent homology on large attention graphs from long sequences.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Shreyas N. Samaga, Gilberto Gonzalez Arroyo and Tamal K. Dey. 2026. HalluZig: Hallucination Detection using Zigzag Persistence. Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2026.eacl-long.159

@inproceedings{samaga2026halluzig,
  title = {{HalluZig: Hallucination Detection using Zigzag Persistence}},
  author = {Shreyas N. Samaga, Gilberto Gonzalez Arroyo and Tamal K. Dey},
  booktitle = {Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers)},
  year = {2026},
  doi = {10.18653/v1/2026.eacl-long.159},
  url = {https://doi.org/10.18653/v1/2026.eacl-long.159}
}

References

50 references, 15 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Josh Alman, Ran Duan, Virginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, and Renfei Zhou. 2025. More Asymmetry Yields Faster Matrix Multiplication, pages 2005–2039. find
  2. Nieves Atienza, Rocio Gonzalez-DÃaz, and Manuel Soriano-Trigueros. 2020. On the stability of persistent entropy and new summary functions for topological data analysis. Pattern Recognition, 107:107509. find
  3. Amos Azaria and Tom Mitchell. 2023. The internal state of an LLM knows when it’s lying. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 967–976, Singapore. Association for Computational Linguistics.
  4. Alexandra Bazarova, Aleksandr Yugay, Andrey Shulga, Alina Ermilova, Andrei Volodichev, Konstantin Polev, Julia Belikova, Rauf Parchiev, Dmitry Simakov, Maxim Savchenko, Andrey Savchenko, Serguei Barannikov, and Alexey Zaytsev. 2025. Hallucination detection in llms with topological divergence on atte… find
  5. Jakub Binkowski, Denis Janiak, Albert Sawczyn, Bogdan Gabrys, and Tomasz Kajdanowicz. 2025. Hallucination detection in llms using spectral features of attention maps. Preprint, arXiv:2502.17598.
  6. Peter Bubenik. 2015. Statistical topological data analysis using persistence landscapes. J. Mach. Learn. Res., 16:77–102. find
  7. Gunnar Carlsson and Vin de Silva. 2010. Zigzag persistence. Foundations of computational mathematics, 10(4):367–405. find
  8. Gunnar Carlsson, Vin De Silva, Sara Kališnik, and Dmitriy Morozov. 2019. Parametrized homology via zigzag persistence. Algebraic & Geometric Topology, 19(2):657–700. find
  9. Mathieu Carrière, Gard Spreemann, and Wojciech Reise. 2025. Persistence representations scikit-learn like interface. In GUDHI User and Reference Manual, 3.11.0 edition. GUDHI Editorial Board. find
  10. Sky CH-Wang, Benjamin Van Durme, Jason Eisner, and Chris Kedzie. 2024. Do androids know they’re only dreaming of electric sheep? In Findings of the Association for Computational Linguistics: ACL 2024, pages 4401–4420, Bangkok, Thailand. Association for Computational Linguistics. find
  11. Peter Gabriel. 1972. Unzerlegbare darstellungen. Manuscripta Mathematica, 6(1):71–103. find
  12. Chao Chen, Kai Liu, Ze Chen, Yi Gu, Yue Wu, Mingyuan Tao, Zhihang Fu, and Jieping Ye. 2024. INSIDE: LLMs’ Internal States Retain the Power of Hallucination Detection. In The Twelfth International Conference on Learning Representations. find
  13. Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, Amy Yang, Angela Fan, Anirudh Goyal, Anthony Hartshorn, Aobo Yang, Archi Mitra, Archie Sravankumar, Artem Korenev, Arthur Hinsvark, and 542 o… — The Llama 3 Herd of Models
  14. Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. 2023. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality. find
  15. Yung-Sung Chuang, Linlu Qiu, Cheng-Yu Hsieh, Ranjay Krishna, Yoon Kim, and James R. Glass. 2024. Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Maps. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Proces…
  16. Tamal K. Dey and Tao Hou. 2021. Computing zigzag persistence on graphs in near-linear time. In 37th International Symposium on Computational Geometry, SoCG 2021, June 7-11, 2021, Buffalo, NY, USA (Virtual Conference), volume 189 of LIPIcs, pages 30:1–30:15. Schloss Dagstuhl - Leibniz-Zentrum für Inf… find
  17. Tamal K. Dey and Tao Hou. 2022. Fast Computation of Zigzag Persistence. In 30th Annual European Symposium on Algorithms (ESA 2022), volume 244 of Leibniz International Proceedings in Informatics (LIPIcs), pages 43:1–43:15, Dagstuhl, Germany. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. find
  18. Tamal K. Dey and Yusu Wang. 2022. Computational Topology for Data Analysis. Cambridge University Press. find
  19. Xuefeng Du, Chaowei Xiao, and Yixuan Li. 2024. Halo-Scope: Harnessing Unlabeled LLM Generations for Hallucination Detection. find
  20. Herbert Edelsbrunner and John Harer. 2010. Computational Topology: An Introduction. Applied Mathematics. American Mathematical Society. find
  21. Ekaterina Fadeeva, Aleksandr Rubashevskii, Artem Shelmanov, Sergey Petrakov, Haonan Li, Hamdy Mubarak, Evgenii Tsymbalov, Gleb Kuzmin, Alexander Panchenko, Timothy Baldwin, and 1 others. 2024. Fact-checking the output of large language models via token-level uncertainty quantification. In Findings o…
  22. Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn, and Yarin Gal. 2024. Detecting hallucinations in large language models using semantic entropy. Nature, 630(8017):625–630. find
  23. Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng, Haotian Wang, Qianglong Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, and Ting Liu. 2025. A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM Trans. Inf. Syst., 43(2).
  24. Aaron Hurst, Adam Lerer, Adam P. Goucher, Adam Perelman, Aditya Ramesh, Aidan Clark, AJ Ostrow, Akila Welihinda, Alan Hayes, Alec Radford, Aleksander M adry, Alex Baker-Whitcomb, Alex Beutel, Alex Borzunov, Alex Carney, Alex Chow, Alex Kirillov, Alex Nichol, Alex Paino, and 399 others. 2024. Gpt-4o…
  25. Albert Q. Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, Lélio Renard Lavaud, Marie-Anne Lachaux, Pierre Stock, Teven Le Scao, Thibaut Lavril, Thomas Wang, Timothée Lacroix,… find
  26. Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez, Nicholas Schiefer, Zac Hatfield-Dodds, Nova DasSarma, Eli Tran-Johnson, Scott Johnston, Sheer El-Showk, Andy Jones, Nelson Elhage, Tristan Hume, Anna Chen, Yuntao Bai, Sam Bowman, Stanislav Fort, and 17 others. 2022.… find
  27. Jannik Kossen, Jiatong Han, Muhammed Razzak, Lisa Schut, Shreshth Malik, and Yarin Gal. 2024. Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs. arXiv preprint. ArXiv:2406.15927 [cs]. — [arXiv:2406.15927](https://arxiv.org/abs/2406.15927) find
  28. Lorenz Kuhn, Yarin Gal, and Sebastian Farquhar. 2023. Semantic uncertainty: Linguistic invariances for uncertainty estimation in natural language generation. In The Eleventh International Conference on Learning Representations. find
  29. Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. 2019. Natural…
  30. Stephanie Lin, Jacob Hilton, and Owain Evans. 2022. TruthfulQA: Measuring how models mimic human falsehoods. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 3214–3252.
  31. Andrey Malinin and Mark Gales. 2021. Uncertainty estimation in autoregressive structured prediction. In International Conference on Learning Representations. find
  32. Potsawee Manakul, Adian Liusie, and Mark Gales. 2023. SelfcheckGPT: Zero-resource black-box hallucination detection for generative large language models. In The 2023 Conference on Empirical Methods in Natural Language Processing. find
  33. Gaurang Sriramanan, Siddhant Bharti, Vinu Sankar Sadasivan, Shoumik Saha, Priyatham Kattakinda, and Soheil Feizi. 2024. LLM-check: Investigating detection of hallucinations in large language models. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. find
  34. Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, and 1 others. 2023. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288.
  35. Yuhei Umeda. 2017. Time series classification via topological data analysis. Transactions of the Japanese Society for Artificial Intelligence, 32:D–G72_1. find
  36. Clément Maria and Steve Oudot. 2016. Computing zigzag persistent cohomology. arXiv preprint arXiv:1608.06039. — [arXiv:1608.06039](https://arxiv.org/abs/1608.06039) find
  37. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems, 30.
  38. Abhika Mishra, Akari Asai, Vidhisha Balachandran, Yizhong Wang, Graham Neubig, Yulia Tsvetkov, and Hannaneh Hajishirzi. 2024. Fine-grained hallucination detection and editing for language models. In First Conference on Language Modeling.
  39. Yanling Wang, Haoyang Li, Hao Zou, Jing Zhang, Xinlei He, Qi Li, and Ke Xu. 2024. Hidden Question Representations Tell Non-Factuality Within and Across Large Language Models. arXiv preprint. ArXiv:2406.05328 [cs]. — [arXiv:2406.05328](https://arxiv.org/abs/2406.05328) find
  40. Alexander Nikitin, Jannik Kossen, Yarin Gal, and Pekka Marttinen. 2024. Kernel language entropy: Fine-grained uncertainty quantification for llms from semantic similarities. Advances in Neural Information Processing Systems, 37:8901–8929. find
  41. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier-ric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, and 3 others. 2020. Transf…
  42. Cheng Niu, Yuanhao Wu, Juno Zhu, Siliang Xu, Kashun Shum, Randy Zhong, Juntong Song, and Tong Zhang. 2024. Ragtruth: A hallucination corpus for developing trustworthy retrieval-augmented language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volu…
  43. Hadas Orgad, Michael Toker, Zorik Gekhman, Roi Reichart, Idan Szpektor, Hadas Kotek, and Yonatan Belinkov. 2025. LLMs Know More Than They Show: On the Intrinsic Representation of LLM Hallucinations. In The Thirteenth International Conference on Learning Representations. find
  44. Xin Qiu and Risto Miikkulainen. 2024. Semantic density: Uncertainty quantification for large language models through confidence measurement in semantic space. In The Thirty-eighth Annual Conference on Neural Information Processing Systems. find
  45. Pranab Sahoo, Prabhash Meharia, Akash Ghosh, Sriparna Saha, Vinija Jain, and Aman Chadha. 2024. A comprehensive survey of hallucination in large language, image, video and audio foundation models. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 11709–11724. find
  46. Claude Elwood Shannon. 1948. A mathematical theory of communication. The Bell System Technical Journal, 27:379–423. find
  47. Tianhang Zhang, Lin Qiu, Qipeng Guo, Cheng Deng, Yue Zhang, Zheng Zhang, Chenghu Zhou, Xinbing Wang, and Luoyi Fu. 2023. Enhancing Uncertainty-Based Hallucination Detection with Stronger Focus. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 915–932,… find
  48. Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric P. Xing, Hao Zhang, Joseph E. Gonzalez, and Ion Stoica. 2023. Judging LLM-as-a-judge with MT-bench and Chatbot Arena. In Proceedings of the 37th International Conference on Neu…
  49. Xiaoling Zhou, Mingjie Zhang, Zhemg Lee, Wei Ye, and Shikun Zhang. 2025. Hademif: Hallucination detection and mitigation in large language models. In The Thirteenth International Conference on Learning Representations. find
  50. Afra Zomorodian and Gunnar Carlsson. 2004. Computing persistent homology. In Proceedings of the Twentieth Annual Symposium on Computational Geometry, SCG ’04, page 347–356, New York, NY, USA. Association for Computing Machinery. find

Updated

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/samaga-2026-halluzig-hallucination-detection-zigzag-persistence/