Table of Contents
Fetching ...

X-Coder: Advancing Competitive Programming with Fully Synthetic Tasks, Solutions, and Tests

Jie Wu, Haoling Li, Xin Zhang, Jiani Guo, Jane Luo, Steven Liu, Yangyu Huang, Ruihang Chu, Scarlett Li, Yujiu Yang

TL;DR

The paper tackles the data scarcity challenge in competitive programming for Code LLMs by proposing a fully synthetic data pipeline, SynthSmith, to generate tasks, solutions, and tests. Building on SynthSmith, the X-Coder series trains models with an SFT-then-RL paradigm and demonstrates significant performance gains on LiveCodeBench without relying on real-world data, including strong results for a 7B parameter backbone and scaling benefits with larger backbones. Key contributions include a competition-oriented feature extraction process, a dual-verification data curation strategy, and an RL infrastructure (GRPO) that supports efficient, scalable code testing. The work provides actionable insights into scaling synthetic data, the role of long-CoT reasoning, the utility of test-case generation, and the resilience of code RL to noisy supervision, ultimately suggesting that synthetic data can meaningfully advance code reasoning while mitigating data leakage and real-world data requirements.

Abstract

Competitive programming presents great challenges for Code LLMs due to its intensive reasoning demands and high logical complexity. However, current Code LLMs still rely heavily on real-world data, which limits their scalability. In this paper, we explore a fully synthetic approach: training Code LLMs with entirely generated tasks, solutions, and test cases, to empower code reasoning models without relying on real-world data. To support this, we leverage feature-based synthesis to propose a novel data synthesis pipeline called SynthSmith. SynthSmith shows strong potential in producing diverse and challenging tasks, along with verified solutions and tests, supporting both supervised fine-tuning and reinforcement learning. Based on the proposed synthetic SFT and RL datasets, we introduce the X-Coder model series, which achieves a notable pass rate of 62.9 avg@8 on LiveCodeBench v5 and 55.8 on v6, outperforming DeepCoder-14B-Preview and AReal-boba2-14B despite having only 7B parameters. In-depth analysis reveals that scaling laws hold on our synthetic dataset, and we explore which dimensions are more effective to scale. We further provide insights into code-centric reinforcement learning and highlight the key factors that shape performance through detailed ablations and analysis. Our findings demonstrate that scaling high-quality synthetic data and adopting staged training can greatly advance code reasoning, while mitigating reliance on real-world coding data.

X-Coder: Advancing Competitive Programming with Fully Synthetic Tasks, Solutions, and Tests

TL;DR

The paper tackles the data scarcity challenge in competitive programming for Code LLMs by proposing a fully synthetic data pipeline, SynthSmith, to generate tasks, solutions, and tests. Building on SynthSmith, the X-Coder series trains models with an SFT-then-RL paradigm and demonstrates significant performance gains on LiveCodeBench without relying on real-world data, including strong results for a 7B parameter backbone and scaling benefits with larger backbones. Key contributions include a competition-oriented feature extraction process, a dual-verification data curation strategy, and an RL infrastructure (GRPO) that supports efficient, scalable code testing. The work provides actionable insights into scaling synthetic data, the role of long-CoT reasoning, the utility of test-case generation, and the resilience of code RL to noisy supervision, ultimately suggesting that synthetic data can meaningfully advance code reasoning while mitigating data leakage and real-world data requirements.

Abstract

Competitive programming presents great challenges for Code LLMs due to its intensive reasoning demands and high logical complexity. However, current Code LLMs still rely heavily on real-world data, which limits their scalability. In this paper, we explore a fully synthetic approach: training Code LLMs with entirely generated tasks, solutions, and test cases, to empower code reasoning models without relying on real-world data. To support this, we leverage feature-based synthesis to propose a novel data synthesis pipeline called SynthSmith. SynthSmith shows strong potential in producing diverse and challenging tasks, along with verified solutions and tests, supporting both supervised fine-tuning and reinforcement learning. Based on the proposed synthetic SFT and RL datasets, we introduce the X-Coder model series, which achieves a notable pass rate of 62.9 avg@8 on LiveCodeBench v5 and 55.8 on v6, outperforming DeepCoder-14B-Preview and AReal-boba2-14B despite having only 7B parameters. In-depth analysis reveals that scaling laws hold on our synthetic dataset, and we explore which dimensions are more effective to scale. We further provide insights into code-centric reinforcement learning and highlight the key factors that shape performance through detailed ablations and analysis. Our findings demonstrate that scaling high-quality synthetic data and adopting staged training can greatly advance code reasoning, while mitigating reliance on real-world coding data.
Paper Structure (47 sections, 6 equations, 19 figures, 21 tables, 1 algorithm)

This paper contains 47 sections, 6 equations, 19 figures, 21 tables, 1 algorithm.

Figures (19)

  • Figure 1: Left: SynthSmith generates high-quality synthetic tasks, solutions, and test cases to support both SFT and RL training. Right: Avg@8 results on LiveCodeBench. X-Coder achieves significant performance gains on competitive programming using fully synthetic data.
  • Figure 2: Framework of SynthSmith. SynthSmith first extracts and evolves competitive programming related features from small-scale code instruction data and merges them into tree structures. It then samples subtrees from the feature tree, selects a compatible feature set, and formulates a scenario that naturally integrates these consistent features. Novel tasks are generated based on a proposed scenario according to specific styles. Advanced reasoning models are used to synthesize solutions and tests for the generated tasks, which are further cross-verified using the proposed dual-verification strategy to yield reliable test outputs and the top solution.
  • Figure 3: Scaling laws on the SFT dataset generated by SynthSmith. Left: Performance comparison of on LiveCodebench v5 to examine scaling trend. Right: Performance comparison across scaling unique tasks and scaling solutions per task.
  • Figure 4: Reward comparison of weak and strong SFT models as RL initializer.
  • Figure 5: Ablations on verification, task style, and task sources.
  • ...and 14 more figures