Skip to content
Preprint

Bootstrapping Niche Multilingual Code Translation via Reinforcement Learning with Execution-Based Verifiable Supervision

Aug 2026 · 0 citations · 14 references
Computer Science

TL;DR

This study establishes a reliable approach of data generation, training, and benchmarking, paving the way toward further bootstrapping the quality of many-to-many translation for programming languages.

Abstract

Code translation must preserve executable behavior across many programming languages, yet neural code translation has largely focused on a few popular languages such as C++, Java, and Python. This leaves a niche, many-to-many setting where parallel supervision is sparse, producing plausible but non-executable translations. We address this setting with preference-based reinforcement learning driven by execution-based supervision. Our pipeline firstly expands verifiable seed Python programs into a multilingual pool of execution-validated codes. Using the pool, a base LLM generates translation candidates across language pairs, which we label by their execution outcomes. The resulting preferences are used to train a reward model that scores cross-language translation quality. Finally, we optimize our base LLMs with GRPO over 600 directed language pairs (25 x 24) using the reward model as a signal. To evaluate the niche translation capability, we introduce HumanEval-X++, an execution-based benchmark that extends HumanEval-X to a broad many-to-many language space. We evaluate our approach using Qwen-3.5 4B and 9B models. On HumanEval-X++ and existing benchmarks, it yields consistent gains over the untrained baselines. In particular, the 4B model achieves an average improvement of 13% across all languages on HumanEval-X++, with a gain of 21% on mid-tier languages. Our study establishes a reliable approach of data generation, training, and benchmarking, paving the way toward further bootstrapping the quality of many-to-many translation for programming languages.

View source

Similar papers

Jul 2026

Towards Reliable C-to-Rust Translation with Rule-Guided Reasoning and Reinforcement Learning

A Translation fRAmework Via rule-guided reasoning and rEinforcement Learning, namely TRAVEL, consisting of two modules that employs Monte Carlo Tree Search-based reasoning path construction guided by Rust-specific rules, and introduces reinforcement learning that couples execution feedback with reasoning-quality signals.

Feng Luo, Jiachen Liu, Cuiyun Gao et al. · 0 citations

Multi-Agent Strategies for Bridging Programming Language Gaps in Code Generation

Real-world software systems are inherently multilingual, but current large language models are not equally consistent across programming languages. This mismatch limits code generation usefulness, especially for underrepresented languages. Existing approaches improve code generation through fine-tuning, multi-agent reasoning, or translation, but remain language-specific, assume existing source code, or rely on per-language test suites. We introduce XL-CoGen, a three-stage multilingual code-generation pipeline that starts from a natural-language specification and a shared test list to generate correct implementations across multiple target languages. XL-CoGen first validates direct generation by constructing and correcting the test harness; when it fails, it transfers through empirically selected intermediate languages and translates validated solutions; it then repairs the best candidate through diagnosis and minimal patching. This design requires neither target-language training nor language-specific test suites. Across two benchmarks and multiple LLMs, XL-CoGen consistently improves over direct generation, with the largest gains on low-performing languages. In our Rust fine-tuning case study, XL-CoGen outperforms the best fine-tuned baseline by 22 percentage points and improves challenging languages by up to 33 points on multilingual benchmarks. Ablation results show that transfer and repair are complementary: repair suffices on easier tasks, whereas transfer becomes more important as difficulty increases, especially for weak target languages.

Micheline Bénédicte Moumoula, Serge Lionel Nikiema, Albérick Euraste Djiré et al. · 0 citations
Open access Aug 2026

Quantitative Evaluation of Automatic Translation Between Industrial Robot Programming Languages Using Machine Learning

This paper presents a quantitative evaluation of an automatic translation system between industrial robot programming languages based on a sequence-to-sequence (Seq2Seq) neural architecture using Long Short-Term Memory (LSTM) networks. The study addresses the interoperability problem between proprietary robot programming languages by proposing a data-driven approach capable of learning correspondences between structured code instructions. A parallel dataset of 28,000 aligned instruction pairs was constructed and preprocessed through tokenization and normalization to enable structured sequence learning. The model was trained under four configurations (50,100, 150 and 200 epochs) to analyze the impact of training duration on performance and generalization capability. The system was evaluated using multiple quantitative metrics, including accuracy, loss, BLEU, and Exact Match (EM), allowing assessment of both structural similarity and exact sequence correctness. Experimental results demonstrate that the 200-epoch configuration improves the performance across all metrics, achieving an accuracy of 0.9943, a BLEU score of 0.682, and an Exact Match of 0.970 on the test set. These results indicate that the model is capable of generating both structurally consistent and syntactically correct translations. The analysis shows that while BLEU captures structural similarity, EM provides a stricter evaluation of exact sequence correctness, which is critical in structured code translation tasks where minor variations may affect execution. The proposed approach demonstrates the feasibility of applying neural machine translation techniques to industrial robot programming, contributing to improved interoperability and reduced manual effort in multi-platform robotic environments.

Nathaniel Morales-Centla, Richard Torrealba-Meléndez, E. I. Tamariz-Flores et al. · 0 citations
Jul 2026

Reasoning Before Translation: Enhancing Legal Machine Translation with Structured Reasoning

The results show that the quality of small ``base'' models can be greatly enhanced, and that reinforcement learning with verifiable rewards can be applied to NMT in the legal domain and surpasses the translation quality of supervised fine-tuning.

Aixiu An, Michael Jungo, Eloi Eynard et al. · 0 citations
Preprint Aug 2026

When the API Speaks the Wrong Language: Revisiting Post-Training for Multilingual Tool Use

It is found that, in this benchmark, supervised fine-tuning (SFT) provides a strong baseline, substantially improving argument language consistency and end-to-end function call accuracy and, under consistent model selection, SFT achieves performance comparable to, and sometimes exceeding more complex reinforcement learning (RL) approaches.

Siddharth Chauhan, Thomas Butler, Abhishek Singhania et al. · 0 citations
Jul 2026

DHRCL:Training Code LLMs with Dense Hierarchical Rewards and Curriculum Learning

DHRCL decomposes feedback into syntax validation, execution success, unit-test pass rate, and AST-based structural similarity, and organizes these signals through a three-stage Syntax, Execution, Pass&Structural curriculum, and introduces stage-aware probability-based token credit redistribution.

Shuhang Wang, Ziming Li, Huijuan Cheng · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.