Collu-Bench: A Benchmark for Predicting Language Model Hallucinations in Code
Not on the map. Why?
Abstract (arXiv)
Despite their success, large language models (LLMs) face the critical challenge of hallucinations, generating plausible but incorrect content. While much research has focused on hallucinations in multiple modalities including images and natural language text, less attention has been given to hallucinations in source code, which leads to incorrect and vulnerable code that causes significant financial loss. To pave the way for research in LLMs' hallucinations in code, we introduce Collu-Bench, a benchmark for predicting code hallucinations of LLMs across code generation (CG) and automated program repair (APR) tasks. Collu-Bench includes 13,234 code hallucination instances collected from five datasets and 11 diverse LLMs, ranging from open-source models to commercial ones. To better understand and predict code hallucinations, Collu-Bench provides detailed features such as the per-step log probabilities of LLMs' output, token types, and the execution feedback of LLMs' generated code for in-depth analysis. In addition, we conduct experiments to predict hallucination on Collu-Bench, using both traditional machine learning techniques and neural networks, which achieves 22.03 -- 33.15% accuracy. Our experiments draw insightful findings of code hallucination patterns, reveal the challenge of accurately localizing LLMs' hallucinations, and highlight the need for more sophisticated techniques.
Key facts. Cited by 13 papers in the map (data through 7 Oct 2026). Builds on 30 of its 39 references that are in the map. First posted on arXiv 13 Oct 2024.
Builds on
30 of 39 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
- 2022Survey of Hallucination in Natural Language Generationcited by 2,056
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
18 more
- 2023Mitigating Hallucination in Large Multi-Modal Models via Robust Instruction Tuningcited by 439
- 2023HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Modelscited by 329
- 2023Chain-of-Verification Reduces Hallucination in Large Language Modelscited by 317
- 2022RARR: Researching and Revising What Language Models Say, Using Language Modelscited by 286
- 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 137
- 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
- 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
- 2021Pretrained Language Models for Text Generation: A Surveycited by 95
- 2023Impact of Code Language Models on Automated Program Repaircited by 85
- 2024Unified Hallucination Detection for Multimodal Large Language Modelscited by 75
- 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 72
- 2023FELM: Benchmarking Factuality Evaluation of Large Language Modelscited by 66
- 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
- 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
- 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
- 2023Halo: Estimation and Reduction of Hallucinations in Open-Source Weak Large Language Modelscited by 36
- 2023LLMMaps -- A Visual Metaphor for Stratified Evaluation of Large Language Modelscited by 6
- 2024Assessing the Latent Automated Program Repair Capabilities of Large Language Models using Round-Trip Translationcited by 3
Built on by
Citing papers per year: 2025: 5; 2026: 8.
13 papers.
Sort:
By area:
- 2025SetupBench: Assessing Software Engineering Agents' Ability to Bootstrap Development Environmentscited by 18
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metricscited by 12
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challengescited by 9
- 2025A Benchmark for Localizing Code and Non-Code Issues in Software Projectscited by 4
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2026PRISM: Probing Reasoning, Instruction, and Source Memory in LLM Hallucinationscited by 3
- 2026Functional Entropy: Predicting Functional Correctness in LLM-Generated Code with Uncertainty Quantificationcited by 3
- 2026Neurosymbolic Repo-level Code Localizationcited by 1
- 2026FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinementcited by 1
- 2026Beyond Document Grounding: Span-Level Hallucination Detection over Code, Tool Output, and Documentscited by 1
- 2026An Empirical Analysis of Static Analysis Methods for Detection and Mitigation of Code Library Hallucinationscited by 0
- 2026Knowledge-Enhanced Agentic Vulnerability Repaircited by 0
1 more
- 2026CodeTD: Topology of Attention Detects Hallucinations in Code LLMs7 Sep 2026
- 2026Beyond Document Grounding: Span-Level Hallucination Detection over Code, Tool Output, and Documents1 Jul 2026
- 2026Knowledge-Enhanced Agentic Vulnerability Repair1 Jul 2026
- 2026FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement2 Jun 2026
- 2026Functional Entropy: Predicting Functional Correctness in LLM-Generated Code with Uncertainty Quantification27 May 2026
- 2026PRISM: Probing Reasoning, Instruction, and Source Memory in LLM Hallucinations18 Apr 2026
- 2026Neurosymbolic Repo-level Code Localization17 Apr 2026
- 2026An Empirical Analysis of Static Analysis Methods for Detection and Mitigation of Code Library Hallucinations9 Apr 2026
- 2025A Benchmark for Localizing Code and Non-Code Issues in Software Projects26 Sep 2025
- 2025SetupBench: Assessing Software Engineering Agents' Ability to Bootstrap Development Environments11 Jul 2025
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metrics24 May 2025
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challenges29 Apr 2025
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metricscited by 12
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challengescited by 9
- 2025A Benchmark for Localizing Code and Non-Code Issues in Software Projectscited by 4
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2026Functional Entropy: Predicting Functional Correctness in LLM-Generated Code with Uncertainty Quantificationcited by 3
- 2026Neurosymbolic Repo-level Code Localizationcited by 1
- 2026FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinementcited by 1
- 2026An Empirical Analysis of Static Analysis Methods for Detection and Mitigation of Code Library Hallucinationscited by 0
- 2026CodeTD: Topology of Attention Detects Hallucinations in Code LLMscited by 0
- 2026CodeTD: Topology of Attention Detects Hallucinations in Code LLMs7 Sep 2026
- 2026FLARE: Fine-Grained Diagnostic Feedback for LLM Code Refinement2 Jun 2026
- 2026Functional Entropy: Predicting Functional Correctness in LLM-Generated Code with Uncertainty Quantification27 May 2026
- 2026Neurosymbolic Repo-level Code Localization17 Apr 2026
- 2026An Empirical Analysis of Static Analysis Methods for Detection and Mitigation of Code Library Hallucinations9 Apr 2026
- 2025A Benchmark for Localizing Code and Non-Code Issues in Software Projects26 Sep 2025
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metrics24 May 2025
- 2025Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challenges29 Apr 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025