Paper Overview
Field: NLP Authors: Zhaofeng Wu, Shiqi Wang, Boya Peng Published: 2026-04-22 arXiv: 2604.20835
Abstract
Modern language models demonstrate impressive coding capabilities in common programming languages (PLs), such as C++ and Python, but their performance in lower-resource PLs is often limited by training data availability. In principle, however, most programming skills are universal across PLs, so the capability acquired in one PL should transfer to others. In this work, we propose the task of zero-shot cross-programming-language transfer for code RL. We find that, for Llama-3.1, RL training for code generation in a source PL fails to improve, and sometimes even degrades, the performance on other target PLs. To address this, we hypothesize that effective RL transfer requires a generalizable SFT initialization before RL. We thus propose Parallel-SFT, an SFT strategy that incorporates "parallel programs"—i.e., functionally equivalent code in multiple programming languages—into the data mix.
Key Findings
- RL training on a source programming language does not reliably transfer to other languages for Llama-3.1; performance on unseen target PLs can stagnate or degrade.
- Effective RL transfer appears to depend on a generalizable SFT initialization before RL.
- Parallel-SFT includes functionally equivalent implementations across multiple languages in the SFT data mix.
- RL applied after Parallel-SFT shows better zero-shot generalization to unseen programming languages.
- Representation analysis shows Parallel-SFT yields a more function-centric latent space, where cross-language equivalent programs cluster more tightly—hypothesized to be the mechanism behind improved transferability.
Discussion
This work suggests that how models are initialized via SFT strongly shapes whether downstream RL capabilities generalize across programming languages, offering a practical recipe for extending strong coding performance to lower-resource PLs.
---
*Auto-collected on 2026-04-24.*