title: rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale
    Verified Dataset
summary: Advancing code reasoning in large language models (LLMs) is fundamentally
  limited by the scarcity of high-difficulty datasets, especially those with
  verifiable input-output test cases necessary for rigorous solution validation
  at scale. We introduce rStar-Coder, which significantly improves LLM code
  reasoning capabilities by constructing a large-scale, verified dataset of 418K
  competition-level code problems, 580K long-reasoning solutions along with rich
  test cases of varying difficulty. This is achieved through three core
  contributions: (1) we curate competitive programming code problems and oracle
  solutions to synthesize new, solvable problems; (2) we introduce a reliable
  input-output test case synthesis pipeline that decouples the generation into a
  three-step input generation method and a mutual verification mechanism for
  effective output labeling; (3) we augment problems with high-quality,
  test-case-verified long-reasoning solutions. Extensive experiments on Qwen
  models (1.5B-14B) across various code reasoning benchmarks demonstrate the
  superiority of rStar-Coder dataset, achieving leading performance comparable to
  frontier reasoning LLMs with much smaller model sizes. On LiveCodeBench,
  rStar-Coder improves Qwen2.5-7B from 17.4% to an impressive 57.3%, and
  Qwen2.5-14B from 23.3% to 62.5%, surpassing o3-mini (low) by3.1%. On the more
  challenging USA Computing Olympiad, our 7B model achieves an average pass@1
  accuracy of 16.15%, outperforming the frontier-level QWQ-32B. Code and the
  dataset will be released at https://github.com/microsoft/rStar.
paper_authors._id: 683669a214ebb7ff0cf2d659
paper_authors.name: Yifei Liu
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-05-28T08:58:20.715Z
paper_authors._id: 662d015a2d4c0e85da85ff0c
paper_authors.avatarUrl: /avatars/ff38e82d1371fe9e69bacb9b04cfe444.svg
paper_authors.fullname: Yifei Liu
paper_authors.type: user
paper_authors.user: YF-L
paper_authors._id: 683669a214ebb7ff0cf2d65a
paper_authors.name: Li Lyna Zhang
paper_authors._id: 683669a214ebb7ff0cf2d65b
paper_authors.name: Yi Zhu
paper_authors._id: 683669a214ebb7ff0cf2d65c
paper_authors.name: Bingcheng Dong
paper_authors._id: 683669a214ebb7ff0cf2d65d
paper_authors.name: Xudong Zhou
paper_authors._id: 683669a214ebb7ff0cf2d65e
paper_authors.name: Ning Shang
paper_authors._id: 683669a214ebb7ff0cf2d65f
paper_authors.name: Fan Yang
paper_authors._id: 683669a214ebb7ff0cf2d660
paper_authors.name: Mao Yang
paper_title: rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale
    Verified Dataset
paper_summary: Advancing code reasoning in large language models (LLMs) is fundamentally
  limited by the scarcity of high-difficulty datasets, especially those with
  verifiable input-output test cases necessary for rigorous solution validation
  at scale. We introduce rStar-Coder, which significantly improves LLM code
  reasoning capabilities by constructing a large-scale, verified dataset of 418K
  competition-level code problems, 580K long-reasoning solutions along with rich
  test cases of varying difficulty. This is achieved through three core
  contributions: (1) we curate competitive programming code problems and oracle
  solutions to synthesize new, solvable problems; (2) we introduce a reliable
  input-output test case synthesis pipeline that decouples the generation into a
  three-step input generation method and a mutual verification mechanism for
  effective output labeling; (3) we augment problems with high-quality,
  test-case-verified long-reasoning solutions. Extensive experiments on Qwen
  models (1.5B-14B) across various code reasoning benchmarks demonstrate the
  superiority of rStar-Coder dataset, achieving leading performance comparable to
  frontier reasoning LLMs with much smaller model sizes. On LiveCodeBench,
  rStar-Coder improves Qwen2.5-7B from 17.4% to an impressive 57.3%, and
  Qwen2.5-14B from 23.3% to 62.5%, surpassing o3-mini (low) by3.1%. On the more
  challenging USA Computing Olympiad, our 7B model achieves an average pass@1
  accuracy of 16.15%, outperforming the frontier-level QWQ-32B. Code and the
  dataset will be released at https://github.com/microsoft/rStar.
paper_ai_summary: A large-scale dataset called rStar-Coder enhances code reasoning in LLMs by providing verified code problems and solutions, leading to improved performance on various benchmarks.
paper_ai_keywords: large language models LLMs competition-level code problems long-reasoning solutions test cases input generation output labeling mutual verification Qwen models code reasoning benchmarks LiveCodeBench USA Computing Olympiad pass@1 accuracy