REVIEW 5 cited by
CodeMirage: Hallucinations in Code Generated by Large Language Models
Not yet reviewed by Pith; the record is open.
This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.
SPECIMEN: schema-true, not a live event
T0 review · schema-true
One-sentence machine reading of the paper's core claim.
pith:XXXXXXXX · record.json · timestamp
read the original abstract
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 incorrect. Although there has been a recent surge in research on LLM hallucinations for text generation, similar hallucination phenomenon can happen in code generation. Sometimes the generated code can have syntactical or logical errors as well as more advanced issues like security vulnerabilities, memory leaks, etc. Given the wide adaptation of LLMs to enhance efficiency in code generation and development in general, it becomes imperative to investigate hallucinations in code generation. To the best of our knowledge, this is the first attempt at studying hallucinations in the code generated by LLMs. We start by introducing the code hallucination definition and a comprehensive taxonomy of code hallucination types. We propose the first benchmark CodeMirage dataset for code hallucinations. The benchmark contains 1,137 GPT-3.5 generated hallucinated code snippets for Python programming problems from two base datasets - HumanEval and MBPP. We then propose the methodology for code hallucination detection and experiment with open source LLMs such as CodeLLaMA as well as OpenAI's GPT-3.5 and GPT-4 models using one-shot prompt. We find that GPT-4 performs the best on HumanEval dataset and gives comparable results to the fine-tuned CodeBERT baseline on MBPP dataset. Towards the end, we discuss various mitigation strategies for code hallucinations and conclude our work.
Forward citations
Cited by 5 Pith papers
-
Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs
Code-MUE measures Code LLM uncertainty via execution-based Semantic Interaction Graphs and Von Neumann entropy, correlating strongly with functional correctness on eight models.
-
SetupBench: Assessing Software Engineering Agents' Ability to Bootstrap Development Environments
SetupBench, a 93-instance environment-bootstrap benchmark, finds coding agents succeed on only 34.4-62.4% of setup tasks, with database configuration and repo setup being the hardest.
-
Securing LLM-Generated Embedded Firmware through AI Agent-Driven Validation and Patching
An iterative fuzz-test, static-analysis, and LLM-patch loop with three AI agents is claimed to raise firmware vulnerability remediation from 67.3% to 92.4% in QEMU-run FreeRTOS tasks.
-
Conversation Kernels: A Flexible Mechanism to Learn Relevant Context for Online Conversation Understanding
Conversation Kernels retrieve small tree-neighborhood windows around a post and feed them to RoBERTa, improving Slashdot comment label prediction over standard text-only baselines.
-
A comprehensive taxonomy of hallucinations in Large Language Models
A survey that organizes LLM hallucination types, causes, benchmarks, and mitigations, and restates the theorem that hallucination is inevitable for computable LLMs.
Discussion (0). Continue with ORCID to comment.