mlsanityData to 7 Oct 2026

InterTrans: Leveraging Transitive Intermediate Translations to Enhance LLM-based Code Translation

arXiv 2411.01063 ↗First posted 1 Nov 2024cs.SE cs.AIcited by 15

Not on the map. Why?

Abstract (arXiv)

Code translation aims to convert a program from one programming language (PL) to another. This long-standing software engineering task is crucial for modernizing legacy systems, ensuring cross-platform compatibility, enhancing performance, and more. However, automating this process remains challenging due to many syntactic and semantic differences between PLs. Recent studies show that even advanced techniques such as large language models (LLMs), especially open-source LLMs, still struggle with the task. Currently, code LLMs are trained with source code from multiple programming languages, thus presenting multilingual capabilities. In this paper, we investigate whether such multilingual capabilities can be harnessed to enhance code translation. To achieve this goal, we introduce InterTrans, an LLM-based automated code translation approach that, in contrast to existing approaches, leverages intermediate translations across PLs to bridge the syntactic and semantic gaps between source and target PLs. InterTrans contains two stages. It first utilizes a novel Tree of Code Translation (ToCT) algorithm to plan transitive intermediate translation sequences between a given source and target PL, then validates them in a specific order. We evaluate InterTrans with three open LLMs on three benchmarks (i.e., CodeNet, HumanEval-X, and TransCoder) involving six PLs. Results show an absolute improvement between 18.3% to 43.3% in Computation Accuracy (CA) for InterTrans over Direct Translation with 10 attempts. The best-performing variant of InterTrans (with Magicoder LLM) achieved an average CA of 87.3%-95.4% on three benchmarks.

Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 23 of its 40 references that are in the map. First posted on arXiv 1 Nov 2024.

Builds on

23 of 40 references.

References · 23

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  7. 2020Beyond English-Centric Multilingual Machine Translationcited by 559
  8. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
  9. 2020Unsupervised Translation of Programming Languagescited by 262
  10. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 199
  11. 2023Large Language Models for Software Engineering: Survey and Open Problemscited by 178
  12. 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 101
11 more
  1. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
  2. 2024HumanEval-XL: A Multilingual Code Generation Benchmark for Cross-lingual Natural Language Generalizationcited by 84
  3. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  4. 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
  5. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  6. 2022Code Translation with Compiler Representationscited by 42
  7. 2024McEval: Massively Multilingual Code Evaluationcited by 42
  8. 2019Pivot-based Transfer Learning for Neural Machine Translation between Non-English Languagescited by 36
  9. 2023On the Evaluation of Neural Code Translation: Taxonomy and Benchmarkcited by 23
  10. 2024Unprecedented Code Change Automation: The Fusion of LLMs and Transformation by Examplecited by 15
  11. 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 9; 2026: 5.

15 papers.

Sort:

By area: