paper-with-me

홈 › Papers

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

2024-11-01 · Marcos Macedo, Yuan Tian, Pengyu Nie, Filipe R. Cogo, Bram Adams

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.

📄 PDF Abstract BibTeX arXiv:2411.01063

Code (1)

RISElabQueens/InterTrans 공식 구현

Tasks

Code TranslationHumanEvalTranslation

Similar Papers 제목 키워드 기반

On the Intertranslatability of Argumentation Semantics

2014-01-16 · Wolfgang Dvorak, Stefan Woltran

Translations between different nonmonotonic formalisms always have been an important topic in the field, in particular to understand the knowledge-representation capabilities those formalisms offer. We provide such an in…

Abstract Argumentation

Explaining Groups of Points in Low-Dimensional Representations

2020-03-03 · ICML 2020 1 · Gregory Plumb, Jonathan Terhorst, Sriram Sankararaman, Ameet Talwalkar

A common workflow in data exploration is to learn a low-dimensional representation of the data, identify groups of points in that representation, and examine the differences between the groups to determine what they repr…

compressed sensingcounterfactualCounterfactual ExplanationInterpretable Machine Learning

Ordinal Potential-based Player Rating

2023-06-08 · Nelson Vadori, Rahul Savani

It was recently observed that Elo ratings fail at preserving transitive relations among strategies and therefore cannot correctly extract the transitive component of a game. We provide a characterization of transitive ga…

Worse WER, but Better BLEU? Leveraging Word Embedding as Intermediate in Multitask End-to-End Speech Translation

2020-05-21 · ACL 2020 6 · Shun-Po Chuang, Tzu-Wei Sung, Alexander H. Liu, Hung-Yi Lee

Speech translation (ST) aims to learn transformations from speech in the source language to the text in the target language. Previous works show that multitask learning improves the ST performance, in which the recogniti…

DecoderTranslation

SALAD: Smart AI Language Assistant Daily

2024-02-12 · Ragib Amin Nihal, Tran Dong Huu Quoc, Lin Zirui, Xu Yimimg 외

SALAD is an AI-driven language-learning application designed to help foreigners learn Japanese. It offers translations in Kanji-Kana-Romaji, speech recognition, translated audio, vocabulary tracking, grammar explanations…

Language Acquisitionspeech-recognitionSpeech Recognition