mlsanityData to 7 Oct 2026

Collu-Bench: A Benchmark for Predicting Language Model Hallucinations in Code

arXiv 2410.09997 ↗First posted 13 Oct 2024cs.SE cs.AI cs.CLcited by 13

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2021TruthfulQA: Measuring How Models Mimic Human Falsehoodscited by 2,919
  7. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
  8. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
  9. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  10. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  11. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  12. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
18 more
  1. 2023Mitigating Hallucination in Large Multi-Modal Models via Robust Instruction Tuningcited by 439
  2. 2023HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Modelscited by 329
  3. 2023Chain-of-Verification Reduces Hallucination in Large Language Modelscited by 317
  4. 2022RARR: Researching and Revising What Language Models Say, Using Language Modelscited by 286
  5. 2021A Token-level Reference-free Hallucination Detection Benchmark for Free-form Text Generationcited by 137
  6. 2022Practical Program Repair in the Era of Large Pre-trained Language Modelscited by 133
  7. 2024Beyond Functional Correctness: Exploring Hallucinations in LLM-Generated Codecited by 106
  8. 2021Pretrained Language Models for Text Generation: A Surveycited by 95
  9. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  10. 2024Unified Hallucination Detection for Multimodal Large Language Modelscited by 75
  11. 2023Can ChatGPT replace StackOverflow? A Study on Robustness and Reliability of Large Language Model Code Generationcited by 72
  12. 2023FELM: Benchmarking Factuality Evaluation of Large Language Modelscited by 66
  13. 2023RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repaircited by 50
  14. 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
  15. 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39
  16. 2023Halo: Estimation and Reduction of Hallucinations in Open-Source Weak Large Language Modelscited by 36
  17. 2023LLMMaps -- A Visual Metaphor for Stratified Evaluation of Large Language Modelscited by 6
  18. 2024Assessing the Latent Automated Program Repair Capabilities of Large Language Models using Round-Trip Translationcited by 3

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 8.

13 papers.

Sort:

By area: