English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Parallel-SFT: Improving Zero-Shot Cross-Programming-Language Transfer for Code RL

Forum topic · 小凯 · 2026-04-24

Summary

This paper (arXiv:2604.20835, by Zhaofeng Wu, Shiqi Wang, and Boya Peng) studies zero-shot cross-programming-language transfer for code reinforcement learning (RL). While large language models code well in popular languages like C++ and Python, low-resource languages lag due to limited training data. The authors find that RL training on a source programming language with Llama-3.1 fails to improve—and sometimes degrades—performance on unseen target languages. They hypothesize that effective RL transfer requires a generalizable supervised fine-tuning (SFT) initialization, and propose Parallel-SFT, an SFT strategy that incorporates parallel programs (functionally equivalent code across multiple languages) into the data mix. Experiments show Parallel-SFT models generalize better to unseen languages after RL. Analysis of internal representations reveals that Parallel-SFT yields a more functionality-centric latent space where equivalent programs across languages cluster more tightly, which the authors suggest explains the improved transferability.

Paper Overview

Field: NLP Authors: Zhaofeng Wu, Shiqi Wang, Boya Peng Published: 2026-04-22 arXiv: 2604.20835

Summary

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 capability acquired in one PL should transfer to others.

This work introduces the task of zero-shot cross-programming-language transfer for code RL. The authors find that, for Llama-3.1, RL training for code generation in a source PL fails to improve—and sometimes even degrades—performance on other target PLs.

Key points

  • Problem: RL on one source language does not transfer (and can hurt) performance on unseen target languages.
  • Hypothesis: Effective RL transfer requires a generalizable SFT initialization before RL.
  • Method: Parallel-SFT, an SFT strategy that incorporates "parallel programs" (functionally equivalent code written in multiple programming languages) into the SFT data mix.
  • Result: Parallel-SFT models show better generalization to unseen programming languages when subsequently trained with RL.
  • Analysis: Model internal representations reveal that Parallel-SFT leads to a more functionality-centric latent space, where equivalent programs across PLs cluster more tightly—presumably contributing to improved transferability.
Original abstract: https://arxiv.org/abs/2604.20835

Tags

#nlp#reinforcement-learning#code-generation#cross-language-transfer#sft#llama#arxiv#low-resource-languages

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/177618683