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

要約

大規模な言語モデル(LLM)の最近の技術的ブレークスルーにより、ソースコードを流fluentに生成することができました。
ソフトウェア開発者は、多くの場合、汎用とコードの両方のLLMSの両方を活用して、既存のコードを修正したり、ゼロから機能全体を生成したりします。
これらの機能は、ノーコードまたは低コードのコンテキストでも有益であり、技術的なバックグラウンドなしでプログラムを作成できます。
ただし、内部設計により、LLMは幻覚を生成する傾向がありますが、幻覚は間違っており、無意味で、正当な情報ではありませんが、その存在を特定するのは困難です。
この問題は、ソースコードを生成するときにも発生します。
特に特定の実行パスでそのような幻覚を特定できる場合、幻覚コードが作成されると、ユーザーがそれを特定して修正することは困難なことがよくあります。
その結果、幻覚コードはコードベース内で気付かれないままになる可能性があります。
この調査では、Codellmsによって生成された幻覚に関連する最近の研究と技術を調査します。
codellmsによって生成されたコードの幻覚の種類を分類し、既存のベンチマークと緩和戦略を確認し、公開課題を特定します。
これらの調査結果に基づいて、この調査では、Codellmsによって生成された幻覚の検出と除去に関するさらなる研究の方向性の概要を説明しています。

要約(オリジナル)

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.

arxiv情報

著者 Yunseo Lee,John Youngeun Song,Dongsun Kim,Jindae Kim,Mijung Kim,Jaechang Nam
発行日 2025-04-29 14:13:57+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.SE パーマリンク