paper-with-me

홈 › Papers

TRANSAGENT: An LLM-Based Multi-Agent System for Code Translation

2024-09-30 · Zhiqiang Yuan, Weitong Chen, Hanlin Wang, Kai Yu, Xin Peng, Yiling Lou

Code translation converts code from one programming language to another while maintaining its original functionality, which is crucial for software migration, system refactoring, and cross-platform development. Traditional rule-based methods rely on manually-written rules, which can be time-consuming and often result in less readable code. To overcome this, learning-based methods have been developed, leveraging parallel data to train models for automated code translation. More recently, the advance of Large Language Models (LLMs) further boosts learning-based code translation. Although promising, LLM-translated program still suffers from diverse quality issues (e.g., syntax errors and semantic errors). In particular, it can be challenging for LLMs to self-debug these errors when simply provided with the corresponding error messages. In this work, we propose a novel LLM-based multi-agent system TRANSAGENT, which enhances LLM-based code translation by fixing the syntax errors and semantic errors with the synergy between four LLM-based agents, including Initial Code Translator, Syntax Error Fixer, Code Aligner, and Semantic Error Fixer. The main insight of TRANSAGENT is to first localize the error code block in the target program based on the execution alignment between the target and source program, which can narrow down the fixing space and thus lower down the fixing difficulties. To evaluate TRANSAGENT, we first construct a new benchmark from recent programming tasks to mitigate the potential data leakage issue. On our benchmark, TRANSAGENT outperforms the latest LLM-based code translation technique UniTrans in both translation effectiveness and efficiency; additionally, our evaluation on different LLMs show the generalization of TRANSAGENT and our ablation study shows the contribution of each agent.

📄 PDF Abstract BibTeX arXiv:2409.19894

Code (0)

등록된 구현이 없습니다.

Tasks

Code TranslationTranslation

Similar Papers 제목 키워드 기반

(Perhaps) Beyond Human Translation: Harnessing Multi-Agent Collaboration for Translating Ultra-Long Literary Texts

2024-05-20 · Minghao Wu, Jiahao Xu, Yulin Yuan, Gholamreza Haffari 외

Literary translation remains one of the most challenging frontiers in machine translation due to the complexity of capturing figurative language, cultural nuances, and unique stylistic elements. In this work, we introduc…

Machine TranslationTranslation

TransAgent: Transfer Vision-Language Foundation Models with Heterogeneous Agent Collaboration

2024-10-16 · Yiwei Guo, Shaobin Zhuang, Kunchang Li, Yu Qiao 외

Vision-language foundation models (such as CLIP) have recently shown their power in transfer learning, owing to large-scale image-text pre-training. However, target domain data in the downstream tasks can be highly diffe…

Knowledge DistillationTransfer Learning

BabelCoder: Agentic Code Translation with Specification Alignment

2025-12-07 · Fazle Rabbi, Soumit Kanti Saha, Tri Minh Triet Pham, Song Wang 외 arxiv

As software systems evolve, developers increasingly work across multiple programming languages and often face the need to migrate code from one language to another. While automatic code translation offers a promising sol…

Code Translation

ViDove: A Translation Agent System with Multimodal Context and Memory-Augmented Reasoning

2025-07-09 · Yichen Lu, Wei Dai, Jiaen Liu, Ching Wing Kwok 외 arxiv

LLM-based translation agents have achieved highly human-like translation results and are capable of handling longer and more complex contexts with greater efficiency. However, they are typically limited to text-only inpu…

ReCodeAgent: A Multi-Agent Workflow for Language-agnostic Translation and Validation of Large-scale Repositories

2026-04-08 · Ali Reza Ibrahimzada, Brandon Paulsen, Daniel Kroening, Reyhaneh Jabbarvand arxiv

Most repository-level code translation and validation techniques have been evaluated on a single source-target programming language (PL) pair, owing to the complex engineering effort required to adapt new PL pairs. Progr…

Code Translation