Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generation

📅 2026-07-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the limited code generation performance of small language models on low-resource programming languages such as Julia and Ballerina, which stems from scarce training data and inefficient reinforcement learning. The authors propose a three-stage approach: first, offline synthesis of verifiable code using compiler and test feedback; second, supervised fine-tuning to instill syntactic correctness; and third, language-agnostic input/output-based reinforcement learning to avoid unproductive exploration. By shifting inference computation to the offline phase and decoupling syntactic learning from algorithmic reasoning, the method substantially reduces training costs. Experiments demonstrate that with only one-third of the data and one-sixth of the compute budget, the approach achieves a 7.6-point gain in pass@1 on MultiPL-E and a 14.2-point improvement on Agnostic LiveCodeBench for Julia, while attaining 49.7% pass@1 for Ballerina—surpassing all existing state-of-the-art methods.
📝 Abstract
Large Language Models achieve strong code generation for high resource languages like Python and Java but suffer sharp performance drops on Low-Resource Programming Languages~(LRPLs) such as Julia. Improving Small Language Models~(SLMs) for these languages faces a trilemma: Supervised Fine-Tuning~(SFT) is bottlenecked by data scarcity, inference-time scaling is too expensive for deployment, and Reinforcement Learning from scratch yields near zero advantages. We propose a three-phase pipeline that resolves this trilemma by decoupling syntax acquisition from algorithmic reasoning. First, we \emph{left-shift} inference-time compute to an offline data synthesis engine that uses iterative compiler and test feedback to generate verified training examples. Second, we fine-tune an SLM on this synthetic, verified data to embed strong syntactic priors. Third, we apply Reinforcement Learning with Verifiable Reward~(RLVR) grounded by language-agnostic Input/Output tests, where the SFT prior constrains exploration away from syntax errors. Applied to Qwen3-8B, our pipeline improves pass@1 by up to +7.6 points on MultiPL-E and +14.2 points on the Agnostics LiveCodeBench for Julia compared to SOTA results. Furthermore, the pipeline only used $\frac{1}{3}$ data and $\frac{1}{6}$ cost over the previous state-of-the-art. We further demonstrate that the pipeline generalizes to Ballerina achieving 49.7\% MultiPL-E Pass@1, a language with near-zero pretraining representation. Ablations confirm that both the SFT phase and execution-grounded rewards are necessary for stable training.
Problem

Research questions and friction points this paper is trying to address.

Low-Resource Programming Languages
Code Generation
Data Scarcity
Small Language Models
Performance Drop
Innovation

Methods, ideas, or system contributions that make the work stand out.

Selective Left-Shift
Low-Resource Programming Languages
Synthetic Data Generation
Reinforcement Learning with Verifiable Reward
Small Language Models