CODEPIVOT: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning with Reduced Reliance on Parallel Corpora

Shangyu LI, Juyong Jiang, Meibo Ren, Sizhe Zhong, Huiri Tan, Yunhao Gou, Xu Han, Chun Yong Chong, Yun Peng, Jiasi Shen


Abstract
Transpilation, or code translation, aims to convert source code from one programming language (PL) to another. Recent large language model (LLM)-based approaches have demonstrated immense potential for code translation. Training-based methods are important because LLMs currently do not effectively adapt to domain-specific settings that suffer from a lack of knowledge without targeted training. However, existing training-based approaches rely on a pairwise transpilation paradigm, making it impractical to support a diverse range of PLs. Furthermore, these methods shape the reinforcement learning (RL) reward linearly in the test-case pass rate, which underweights the earliest partial progress. To address these limitations, we propose CodePivot, a training framework that leverages Python as an intermediate representation (IR), augmented by a novel RL reward mechanism, Aggressive-Partial-Functional reward, to bootstrap the model’s multilingual transpilation ability with reduced reliance on parallel corpora. Experiments involving 10 PLs show that the resulting 7B model, trained on Python-to-Others tasks, consistently improves performance across both general and low-resource PL-related transpilation tasks. It outperforms substantially larger mainstream models with hundreds of billions more parameters, such as DeepSeek-R1 and Qwen3-235B-A22B-Instruct-2507, on Python-to-Others tasks and Others-to-All tasks, respectively, and surpasses its counterpart trained directly on Any-to-Any tasks on general transpilation tasks. Code and data: https://github.com/lishangyu-hkust/CodePivot.
Anthology ID:
2026.findings-emnlp.1640
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
34889–34909
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.1640/
DOI:
Bibkey:
Cite (ACL):
Shangyu LI, Juyong Jiang, Meibo Ren, Sizhe Zhong, Huiri Tan, Yunhao Gou, Xu Han, Chun Yong Chong, Yun Peng, and Jiasi Shen. 2026. CODEPIVOT: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning with Reduced Reliance on Parallel Corpora. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 34889–34909, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
CODEPIVOT: Bootstrapping Multilingual Transpilation in LLMs via Reinforcement Learning with Reduced Reliance on Parallel Corpora (LI et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.1640.pdf