{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/rstar-coder-scaling-competitive-code","title":"rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale Verified Dataset","arxiv_id":"2505.21297","date":"2025-05-27","proceeding":null,"authors":["Yifei Liu","Li Lyna Zhang","Yi Zhu","Bingcheng Dong","Xudong Zhou","Ning Shang","Fan Yang","Mao Yang"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2505.21297v1","url_pdf":"https://arxiv.org/pdf/2505.21297v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"rstar-coder-scaling-competitive-code","repo_url":"https://github.com/microsoft/rstar","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2505.21297","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.21297"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/rstar","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"dfa792955de79dfa","entry":"calc_error_ratio_penalty_weights","repo":"microsoft/rstar","repo_kind":"official","path":"rstar2_agent/down_sample/roc.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/rstar2_agent/down_sample/roc.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dfa792955de79dfa"}},{"code_sha256_prefix":"d487faf30097b8fa","entry":"calc_format_penalty_weights","repo":"microsoft/rstar","repo_kind":"official","path":"rstar2_agent/down_sample/roc.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/rstar2_agent/down_sample/roc.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d487faf30097b8fa"}},{"code_sha256_prefix":"6b72c80feeab1463","entry":"compute_score","repo":"microsoft/rstar","repo_kind":"official","path":"fused_compute_score/math_verify.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/fused_compute_score/math_verify.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b72c80feeab1463"}},{"code_sha256_prefix":"bb175bff1060d928","entry":"handle_base","repo":"microsoft/rstar","repo_kind":"official","path":"fused_compute_score/prime_math/grader.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/fused_compute_score/prime_math/grader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bb175bff1060d928"}},{"code_sha256_prefix":"2a180d3156997924","entry":"is_digit","repo":"microsoft/rstar","repo_kind":"official","path":"fused_compute_score/prime_math/grader.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/fused_compute_score/prime_math/grader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a180d3156997924"}},{"code_sha256_prefix":"1e5adbd8b9d51c04","entry":"normalize","repo":"microsoft/rstar","repo_kind":"official","path":"fused_compute_score/prime_math/grader.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/fused_compute_score/prime_math/grader.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1e5adbd8b9d51c04"}},{"code_sha256_prefix":"31113f93a6e0e98a","entry":"normalize_answer","repo":"microsoft/rstar","repo_kind":"official","path":"fused_compute_score/prime_math/math_normalize.py","file_url":"https://github.com/microsoft/rstar/blob/HEAD/fused_compute_score/prime_math/math_normalize.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31113f93a6e0e98a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}