Research Papers 论文研究 19h ago Updated 16h ago 更新于 16小时前 49

Selective Left-Shift: Turning Test-Time Compute and Difficulty-based Curation into Training Data for Low-Resource Code Generation 选择性左移:将测试时计算和基于难度的筛选转化为低资源代码生成的训练数据

Introduces "Selective Left-Shift," a three-phase pipeline that decouples syntax acquisition from algorithmic reasoning to address data scarcity in Low-Resource Programming Languages (LRPLs). Utilizes an offline data synthesis engine with iterative compiler and test feedback to generate verified training examples, shifting inference-time compute to the training phase. Applies Reinforcement Learning with Verifiable Rewards (RLVR) grounded in language-agnostic I/O tests, constrained by strong synta 提出“选择性左移”三阶段流水线,将推理时计算离线化以解决低资源编程语言(LRPL)的数据稀缺与训练难题。 通过迭代编译器反馈合成验证数据,先进行SFT嵌入语法先验,再利用可验证奖励的RLVR进行算法推理优化。 在Julia语言上使Qwen3-8B的MultiPL-E pass@1提升7.6分,LiveCodeBench提升14.2分,且仅使用1/3数据和1/6成本。 该方法成功泛化至预训练表示近乎为零的语言Ballerina,证明了解耦语法获取与算法推理的有效性。

65
Hot 热度
75
Quality 质量
70
Impact 影响力

Analysis 深度分析

TL;DR

  • Introduces "Selective Left-Shift," a three-phase pipeline that decouples syntax acquisition from algorithmic reasoning to address data scarcity in Low-Resource Programming Languages (LRPLs).
  • Utilizes an offline data synthesis engine with iterative compiler and test feedback to generate verified training examples, shifting inference-time compute to the training phase.
  • Applies Reinforcement Learning with Verifiable Rewards (RLVR) grounded in language-agnostic I/O tests, constrained by strong syntactic priors learned during Supervised Fine-Tuning (SFT).
  • Achieves significant performance gains on Julia (+7.6 points on MultiPL-E, +14.2 on Agnostics LiveCodeBench) using only 1/3 of the data and 1/6 of the cost compared to prior SOTA.
  • Demonstrates strong generalization to Ballerina, a language with near-zero pretraining representation, achieving 49.7% MultiPL-E Pass@1.

Why It Matters

This research addresses a critical gap in AI for software engineering: the inability of current models to effectively support niche or emerging programming languages due to insufficient training data. By demonstrating that high-quality synthetic data generated through verification can substitute for massive human-curated datasets, it offers a scalable and cost-effective pathway to extend LLM capabilities to the long tail of programming languages. This approach reduces the dependency on expensive inference-time scaling and unstable RL-from-scratch methods, making advanced code generation accessible for low-resource domains.

Technical Details

  • Three-Phase Pipeline: The method consists of (1) Offline Data Synthesis using compiler/test feedback to create verified examples, (2) Supervised Fine-Tuning (SFT) on this synthetic data to embed syntactic priors, and (3) Reinforcement Learning with Verifiable Rewards (RLVR) using I/O tests to refine algorithmic reasoning without syntax errors.
  • Left-Shift Mechanism: Inference-time compute typically used for self-correction or search is moved to an offline synthesis stage, allowing the model to learn from verified, error-free examples rather than struggling with noisy data during training.
  • Model and Benchmarks: Evaluated on Qwen3-8B, the pipeline was tested on Julia and Ballerina using MultiPL-E and Agnostics LiveCodeBench benchmarks.
  • Efficiency Gains: The approach achieved state-of-the-art results while utilizing significantly fewer resources, specifically one-third of the data volume and one-sixth of the computational cost compared to previous methods.
  • Ablation Studies: Confirmations showed that both the SFT phase for syntax grounding and the execution-grounded rewards for RLVR are essential for stable training and performance improvements.

Industry Insight

  • Synthetic Data Quality Over Quantity: For specialized domains like LRPLs, investing in rigorous verification pipelines to generate high-quality synthetic data is more effective than simply scaling up raw data collection.
  • Decoupling Syntax and Logic: Separating syntactic learning from algorithmic reasoning allows for more stable training processes, particularly when using RL, by preventing the model from exploring invalid code spaces.
  • Cost-Effective Model Extension: Organizations can extend existing open-source base models to support new or niche programming languages with minimal infrastructure investment, leveraging offline synthesis rather than expensive continuous inference scaling.

TL;DR

  • 提出“选择性左移”三阶段流水线,将推理时计算离线化以解决低资源编程语言(LRPL)的数据稀缺与训练难题。
  • 通过迭代编译器反馈合成验证数据,先进行SFT嵌入语法先验,再利用可验证奖励的RLVR进行算法推理优化。
  • 在Julia语言上使Qwen3-8B的MultiPL-E pass@1提升7.6分,LiveCodeBench提升14.2分,且仅使用1/3数据和1/6成本。
  • 该方法成功泛化至预训练表示近乎为零的语言Ballerina,证明了解耦语法获取与算法推理的有效性。

为什么值得看

本文针对大模型在低资源编程语言上性能骤降的行业痛点,提供了一套低成本、高效率的改进范式。其“将测试时计算转化为训练数据”的思路为小模型在垂直领域的高效微调提供了重要的技术参考。

技术解析

  • 三阶段解耦架构:首先离线合成经过编译器和测试验证的代码数据;其次对小型语言模型(SLM)进行监督微调(SFT),使其掌握强语法先验;最后应用基于输入/输出测试的可验证奖励强化学习(RLVR),约束探索空间以避免语法错误。
  • 数据合成机制:利用迭代式的编译器错误反馈和单元测试结果,自动生成高质量、已验证的训练样本,解决了LRPL领域真实标注数据匮乏的问题。
  • 性能与效率优势:相比之前的SOTA方法,该流水线在Julia语言任务中显著提升了准确率,同时将数据需求量减少至三分之一,计算成本降低至六分之一。
  • 通用性验证:除了Julia,该方法在Ballerina语言上也取得了49.7%的MultiPL-E Pass@1成绩,证实了其在缺乏预训练基础的语言上的泛化能力。

行业启示

  • 数据合成成为关键杠杆:对于数据稀缺领域,利用工具链(如编译器、测试套件)自动生成高质量验证数据,比单纯依赖人工标注或网络爬取更具性价比。
  • 训练阶段的解耦设计:将语法学习与逻辑推理分离处理,能有效缓解小模型在复杂任务中的稳定性问题,是优化SLM性能的有效策略。
  • 低成本部署可行性:通过离线预处理替代在线推理扩展,可以在保持高性能的同时大幅降低部署成本,有利于LLM在更多小众或边缘场景落地。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Code Generation 代码生成 LLM 大模型 Research 科学研究 Training 训练 Dataset 数据集