論文の概要: Hallucinations of Large Language Models in Cross-Language Code Translation: Phenomena and Mitigation
- arxiv url: http://arxiv.org/abs/2610.27868v1
- Date: Tue, 20 Oct 2026 08:50:39 GMT
- ステータス: 翻訳完了
- システム内更新日: 2026-10-21 21:58:47.724434
- Title: Hallucinations of Large Language Models in Cross-Language Code Translation: Phenomena and Mitigation
- Title(参考訳): 言語間のコード翻訳における大規模言語モデルの幻覚:現象と緩和
- Abstract要約: コード翻訳は、ソースコードをあるプログラミング言語から別の言語に変換し、その機能を保存する。
大きな言語モデル(LLM)はコード翻訳を改善したが、その出力には幻覚が含まれている。
本稿では,コード翻訳におけるLLM幻覚の系統的研究について述べる。
- 参考スコア(独自算出の注目度): 12.69659646930294
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: Code translation converts source code from one programming language to another while preserving its functionality. Although Large Language Models (LLMs) have improved code translation, their outputs still contain hallucinations: generated code that conflicts with the source program, violates target-language facts, or introduces contextually inconsistent dependencies. These failures are especially harmful in translation because small semantic deviations can silently change program behavior. Existing hallucination studies mainly focus on natural-language generation or code generation, leaving the forms, distribution, and mitigation of hallucinations in cross-language code translation insufficiently characterized. This paper presents a systematic empirical study of LLM hallucinations in code translation. Across three benchmark datasets, six language pairs, and seven LLMs, we construct a taxonomy with three major categories: Semantic Consistency Conflicts, Factual Knowledge Conflicts, and Project Context Deviations. We manually annotate 13,919 hallucination cases and analyze how hallucination types vary across models, datasets, and language directions. Guided by the taxonomy, we further propose HaluCodeTran, a mitigation framework that combines BM25-based retrieval of relevant translation examples with taxonomy-aware reflective refinement. The study provides an execution-tested characterization of code-translation hallucinations and a practical baseline for building more reliable LLM-based code migration tools.
- Abstract(参考訳): コード翻訳は、ソースコードをあるプログラミング言語から別の言語に変換し、その機能を保存する。
大きな言語モデル(LLM)はコード翻訳を改善しているが、その出力には幻覚が含まれている。
これらの失敗は、小さな意味的偏差がプログラムの振る舞いを静かに変える可能性があるため、翻訳において特に有害である。
既存の幻覚研究は主に自然言語生成やコード生成に重点を置いており、言語間のコード翻訳における幻覚の形式、分布、緩和は不十分である。
本稿では,コード翻訳におけるLLM幻覚の系統的研究について述べる。
3つのベンチマークデータセット、6つの言語ペア、7つのLDMで、セマンティック一貫性競合(Semantic Consistency Conflicts)、Factual Knowledge Conflicts(Factual Knowledge Conflicts)、Project Context Deviations(Project Context Deviations)という3つの主要なカテゴリで分類を構築します。
13,919件の幻覚症例を手動で注釈し、幻覚のタイプがモデル、データセット、言語方向によってどのように異なるかを分析する。
分類学によって導かれたHaluCodeTranは、BM25に基づく関係翻訳例の検索と分類を意識した反射的改良を組み合わせた緩和フレームワークである。
この研究は、コード翻訳幻覚の実行テストによる特徴付けと、より信頼性の高いLCMベースのコードマイグレーションツールを構築するための実用的なベースラインを提供する。
関連論文リスト
- Tracing Multilingual Representations in LLMs with Cross-Layer Transcoders [51.380449540006985]
大規模言語モデル(LLM)は多くの言語を処理できるが、どのようにして内部的にこの多様性を表現しているのかは不明だ。
言語固有のデコーディングと多言語表現を共有できるのでしょうか?
層間トランスコーダ(CLT)と属性グラフを用いて内部メカニズムを解析する。
論文 参考訳(メタデータ) (2025-11-13T22:51:06Z) - A Systematic Literature Review of Code Hallucinations in LLMs: Characterization, Mitigation Methods, Challenges, and Future Directions for Reliable AI [54.34738767990601]
大規模言語モデルがソフトウェアエンジニアリングタスクに統合されるにつれ、コードの幻覚の理解と緩和が不可欠になる。
コード指向LLMにおける幻覚現象を4つの重要な観点から体系的に検討する。
論文 参考訳(メタデータ) (2025-11-02T02:58:41Z) - Investigating and Scaling up Code-Switching for Multilingual Language Model Pre-Training [58.696660064190475]
コンテクスト内の異なる言語間を交互に交換するコードスイッチの存在が、多言語機能の鍵であることに気付きました。
事前学習における言語アライメントのためのコードスイッチングのパワーをよりよく探求するために,合成コードスイッチングの戦略について検討する。
論文 参考訳(メタデータ) (2025-04-02T15:09:58Z) - ETF: An Entity Tracing Framework for Hallucination Detection in Code Summaries [36.63923402713602]
大型言語モデル(LLM)は幻覚の傾向があり、意図した意味から逸脱する。
コード要約における幻覚検出に特化してキュレートされた10Kサンプルを備えた,ファーストオブザキンドデータセットであるCodeSumEvalを紹介した。
論文 参考訳(メタデータ) (2024-10-17T19:38:55Z) - MLLM can see? Dynamic Correction Decoding for Hallucination Mitigation [50.73561815838431]
MLLM(Multimodal Large Language Models)はしばしば幻覚現象を示す。
実験により,MLLMは最終出力のオブジェクトを誤って生成するが,前層の視覚的オブジェクトを認識できることがわかった。
そこで本研究では,MLLMs DeCoの動的補正復号法を提案する。この手法は,適切な先行層を適応的に選択し,最終層に知識を比例的に統合し,出力ロジットを調整する。
論文 参考訳(メタデータ) (2024-10-15T16:57:44Z)
関連論文リストは本サイト内にある論文のタイトル・アブストラクトから自動的に作成しています。
指定された論文の情報です。
本サイトの運営者は本サイト(すべての情報・翻訳含む)の品質を保証せず、本サイト(すべての情報・翻訳含む)を使用して発生したあらゆる結果について一切の責任を負いません。