Papers › Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning

Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning

8 Feb 2024arXiv:2402.05808archive 2025-07-28

Zhiheng Xi, Wenxiang Chen, Boyang Hong, Senjie Jin, Rui Zheng, wei he, Yiwen Ding, Shichun Liu, Xin Guo, Junzhe Wang, Honglin Guo, Wei Shen, Xiaoran Fan, Yuhao Zhou, Shihan Dou, Xiao Wang, Xinbo Zhang, Peng Sun, Tao Gui, Qi Zhang, Xuanjing Huang

In this paper, we propose R³: Learning Reasoning through Reverse Curriculum Reinforcement Learning (RL), a novel method that employs only outcome supervision to achieve the benefits of process supervision for large language models. The core challenge in applying RL to complex reasoning is to identify a sequence of actions that result in positive rewards and provide appropriate supervision for optimization. Outcome supervision provides sparse rewards for final results without identifying error locations, whereas process supervision offers step-wise rewards but requires extensive manual annotation. R³ overcomes these limitations by learning from correct demonstrations. Specifically, R³ progressively slides the start state of reasoning from a demonstration's end to its beginning, facilitating easier model exploration at all stages. Thus, R³ establishes a step-wise curriculum, allowing outcome supervision to offer step-level signals and precisely pinpoint errors. Using Llama2-7B, our method surpasses RL baseline on eight reasoning tasks by $4.1$ points on average. Notebaly, in program-based reasoning on GSM8K, it exceeds the baseline by $4.2$ points across three backbone models, and without any extra data, Codellama-7B + R³ performs comparable to larger models or closed-source models.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.05808")

Code

Syntology Ran 7 of 19 code samples harvested from 1 repository linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · fixture could not drive it; 6 ran with no contract checked.

By repository: official repository: 19 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

woooodyy/llm-reverse-curriculum-rl officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 7 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · fixture could not drive it
6ran
12unverified

Licence: 19 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from woooodyy/llm-reverse-curriculum-rl. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

discount_cumsum woooodyy/llm-reverse-curriculum-rl/R3_math/src/utils.py official repository ran fingerprinted no licence file found · pointer only · 7ffa253a733f9bfc · report
format_code woooodyy/llm-reverse-curriculum-rl/R3_math/src/python_stdout_engine.py official repository ran fingerprinted no licence file found · pointer only · b425aefc590684dc · report
gather_log_probs woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/rlhf/ppo_trainer.py official repository ran · fixture could not drive it no licence file found · pointer only · 2f0a690c70d11c23 · report
number_it woooodyy/llm-reverse-curriculum-rl/R3_math/src/python_stdout_engine.py official repository ran fingerprinted no licence file found · pointer only · 1af181bffd7c0355 · report
process_code woooodyy/llm-reverse-curriculum-rl/R3_math/src/python_engine.py official repository ran fingerprinted no licence file found · pointer only · 2221a9c4d6aaccc3 · report
run_python_code woooodyy/llm-reverse-curriculum-rl/R3_math/src/python_engine.py official repository ran no licence file found · pointer only · 23907c9b2306bf66 · report
test_answer_for_reward woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/rlhf/ppo_trainer.py official repository ran no licence file found · pointer only · add7bb376d093e6a · report
calculate_flops woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/perf.py official repository unverified no licence file found · pointer only · 069f56cb00324e10 · report
causal_lm_model_to_fp32_loss woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/model/model_utils.py official repository unverified no licence file found · pointer only · b6934717c02ba140 · report
do_gather woooodyy/llm-reverse-curriculum-rl/R3_math/src/utils.py official repository unverified no licence file found · pointer only · 32851be78f5ecd4c · report
floatify woooodyy/llm-reverse-curriculum-rl/R3_math/src/python_stdout_engine.py official repository unverified no licence file found · pointer only · f8cd262700389f42 · report
get_eval_ds_config woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/ds_utils.py official repository unverified no licence file found · pointer only · 792e87a1badc5642 · report
get_hf_configs woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/perf.py official repository unverified no licence file found · pointer only · df20c2f4083d17af · report
get_tokenizer woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/utils.py official repository unverified no licence file found · pointer only · 60da16ae2ccbd130 · report
is_numeric woooodyy/llm-reverse-curriculum-rl/R3_math/src/utils.py official repository unverified no licence file found · pointer only · c3b86a3bceec86cd · report
load_hf_tokenizer woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/utils.py official repository unverified no licence file found · pointer only · 51909067f349309c · report
log_init woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/rlhf/rlhf_engine.py official repository unverified no licence file found · pointer only · 429d42a3bf925da5 · report
only_optimize_lora_parameters woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/module/lora.py official repository unverified no licence file found · pointer only · 7d082cd1b7edc2aa · report
to_device woooodyy/llm-reverse-curriculum-rl/R3_others/dschat/utils/utils.py official repository unverified no licence file found · pointer only · 387b9e6c4f21dd62 · report

Tasks

GSM8KReinforcement Learning (RL)reinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections