paper-with-me

Papers

Hallucination by Code Generation LLMs: Taxonomy, Benchmarks, Mitigation, and Challenges

2025-04-29 · Yunseo Lee, John Youngeun Song, Dongsun Kim, Jindae Kim, Mijung Kim, Jaechang Nam

Recent technical breakthroughs in large language models (LLMs) have enabled them to fluently generate source code. Software developers often leverage both general-purpose and code-specialized LLMs to revise existing code or even generate a whole function from scratch. These capabilities are also beneficial in no-code or low-code contexts, in which one can write programs without a technical background. However, due to their internal design, LLMs are prone to generating hallucinations, which are incorrect, nonsensical, and not justifiable information but difficult to identify its presence. This problem also occurs when generating source code. Once hallucinated code is produced, it is often challenging for users to identify and fix it, especially when such hallucinations can be identified under specific execution paths. As a result, the hallucinated code may remain unnoticed within the codebase. This survey investigates recent studies and techniques relevant to hallucinations generated by CodeLLMs. We categorize the types of hallucinations in the code generated by CodeLLMs, review existing benchmarks and mitigation strategies, and identify open challenges. Based on these findings, this survey outlines further research directions in the detection and removal of hallucinations produced by CodeLLMs.

📄 PDF Abstract BibTeX arXiv:2504.20799

Code (0)

등록된 구현이 없습니다.

Tasks

Code GenerationHallucinationSurvey

Similar Papers 제목 키워드 기반

Large Language Models Hallucination: A Comprehensive Survey

2025-10-05 · Aisha Alansari, Hamzah Luqman arxiv

Large language models (LLMs) have transformed natural language processing, achieving remarkable performance across diverse tasks. However, their impressive fluency often comes at the cost of producing false or fabricated…

LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigation

2024-09-30 · Ziyao Zhang, Yanlin Wang, Chong Wang, Jiachi Chen 외

Code generation aims to automatically generate code from input requirements, significantly enhancing development efficiency. Recent large language models (LLMs) based approaches have shown promising results and revolutio…

Code GenerationHallucinationRAG

CodeMirage: Hallucinations in Code Generated by Large Language Models

2024-08-14 · Vibhor Agarwal, Yulong Pei, Salwa Alamir, Xiaomo Liu

Large Language Models (LLMs) have shown promising potentials in program generation and no-code automation. However, LLMs are prone to generate hallucinations, i.e., they generate text which sounds plausible but is incorr…

Code GenerationHallucinationHumanEvalmbpp+1

Exploring and Evaluating Hallucinations in LLM-Powered Code Generation

2024-04-01 · Fang Liu, Yang Liu, Lin Shi, Houkun Huang 외

The rise of Large Language Models (LLMs) has significantly advanced many applications on software engineering tasks, particularly in code generation. Despite the promising performance, LLMs are prone to generate hallucin…

Code GenerationHallucinationHallucination EvaluationHumanEval+1

Cognitive Mirage: A Review of Hallucinations in Large Language Models

2023-09-13 · Hongbin Ye, Tong Liu, Aijia Zhang, Wei Hua 외

As large language models continue to develop in the field of AI, text generation systems are susceptible to a worrisome phenomenon known as hallucination. In this study, we summarize recent compelling insights into hallu…

HallucinationText Generation