Hallucinations of Large Language Models in Cross-Language Code Translation: Phenomena and Mitigation
20 Oct · Yali Du, Yunji Zhang, Ming Li · arXiv:2610.27868
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…