Unraveling the Potential of Large Language Models in Code Translation: How Far Are We?
Not on the map. Why?
Abstract (arXiv)
While large language models (LLMs) exhibit state-of-the-art performance in various tasks, recent studies have revealed their struggle for code translation. This is because they haven't been extensively pre-trained with parallel multilingual code, which code translation heavily depends on. Moreover, existing benchmarks only cover a limited subset of common programming languages, and thus cannot reflect the full potential of LLMs in code translation. In this paper, we conduct a large-scale empirical study to exploit the capabilities and incapabilities of LLMs in code translation tasks. We first craft a novel benchmark called PolyHumanEval by extending HumanEval to a multilingual benchmark of 14 languages. With PolyHumanEval, we then perform over 110,000 translations with bleeding-edge code LLMs. The result shows LLMs' suboptimal performance on Python to other languages and the negligible impact of widely adopted LLM optimization techniques such as conventional pre-training and instruction tuning on code translation. To further uncover the potential of LLMs in code translation, we propose two methods: (1) intermediary translation which selects an intermediary language between the source and target ones; and (2) self-training which fine-tunes LLMs on self-generated parallel data. Evaluated with CodeLlama-13B, our approach yields an average improvement of 11.7% computation accuracy on Python-to-other translations. Notably, we interestingly find that Go can serve as a lingua franca for translating between any two studied languages.
Key facts. Cited by 17 papers in the map (data through 14 Oct 2026). First posted on arXiv 13 Oct 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 11; 2026: 5.
17 papers.
Sort:
By area:
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2024Multi-Programming Language Sandbox for LLMscited by 10
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languagescited by 5
- 2025FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migrationcited by 5
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translationcited by 5
- 2025Function-to-Style Guidance of LLMs for Code Translationcited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoningcited by 3
5 more
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agentscited by 2
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2025Automated Snippet-Alignment Data Augmentation for Code Translationcited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervisioncited by 0
- 2026Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervision14 Aug 2026
- 2026PhoenixRepair: Rethinking Repair Strategy Exploration in Software Agents21 Jul 2026
- 2026DRAINCODE: Stealthy Energy Consumption Attacks on Retrieval-Augmented Code Generation via Context Poisoning28 Jan 2026
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025EffiReasonTrans: RL-Optimized Reasoning for Code Translation21 Oct 2025
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Automated Snippet-Alignment Data Augmentation for Code Translation16 Oct 2025
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
- 2025FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration6 Oct 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
- 2025Function-to-Style Guidance of LLMs for Code Translation15 Jul 2025
5 more
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languages24 Mar 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Multi-Programming Language Sandbox for LLMs30 Oct 2024
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic Systemcited by 15
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Taskscited by 11
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agentscited by 11
- 2025FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migrationcited by 5
- 2025A Comprehensive Survey on Benchmarks and Solutions in Software Engineering of LLM-Empowered Agentic System10 Oct 2025
- 2025FreshBrew: A Benchmark for Evaluating AI Agents on Java Code Migration6 Oct 2025
- 2025Software Development Life Cycle Perspective: A Survey of Benchmarks for Code Large Language Models and Agents8 May 2025
- 2025Enhancing LLM Performance Through Debate: An Empirical Study on Multi-Agent Debate for Coding Tasks15 Mar 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translationcited by 19
- 2024Multi-Programming Language Sandbox for LLMscited by 10
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completioncited by 7
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languagescited by 5
- 2025Function-to-Style Guidance of LLMs for Code Translationcited by 4
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluationcited by 3
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Frameworkcited by 1
- 2025Automated Snippet-Alignment Data Augmentation for Code Translationcited by 0
- 2026Revisiting the Role of Natural Language Code Comments in Code Translationcited by 0
- 2026AlignCoder: Aligning Retrieval with Target Intent for Repository-Level Code Completion27 Jan 2026
- 2026Revisiting the Role of Natural Language Code Comments in Code Translation23 Jan 2026
- 2025TREAT: A Code LLMs Trustworthiness / Reliability Evaluation and Testing Framework20 Oct 2025
- 2025Automated Snippet-Alignment Data Augmentation for Code Translation16 Oct 2025
- 2025EvoC2Rust: A Skeleton-guided Framework for Project-Level C-to-Rust Translation6 Aug 2025
- 2025Function-to-Style Guidance of LLMs for Code Translation15 Jul 2025
- 2025LLM Benchmarking with LLaMA2: Evaluating Code Development Performance Across Multiple Programming Languages24 Mar 2025
- 2025Skeleton-Guided-Translation: A Benchmarking Framework for Code Repository Translation with Fine-Grained Quality Evaluation27 Jan 2025
- 2024Multi-Programming Language Sandbox for LLMs30 Oct 2024