Papers › Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning

Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning

20 Feb 2025arXiv:2502.14768archive 2025-07-28

Tian Xie, Zitian Gao, Qingnan Ren, Haoming Luo, Yuqian Hong, Bryan Dai, Joey Zhou, Kai Qiu, Zhirong Wu, Chong Luo

Inspired by the success of DeepSeek-R1, we explore the potential of rule-based reinforcement learning (RL) in large reasoning models. To analyze reasoning dynamics, we use synthetic logic puzzles as training data due to their controllable complexity and straightforward answer verification. We make some key technical contributions that lead to effective and stable RL training: a system prompt that emphasizes the thinking and answering process, a stringent format reward function that penalizes outputs for taking shortcuts, and a straightforward training recipe that achieves stable convergence. Our 7B model develops advanced reasoning skills-such as reflection, verification, and summarization-that are absent from the logic corpus. Remarkably, after training on just 5K logic problems, it demonstrates generalization abilities to the challenging math benchmarks AIME and AMC.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

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="2502.14768")

Code

Syntology Ran 15 of 23 code samples harvested from 2 repositories linked to this paper; 8 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 12 ran with no contract checked.

By repository: official repository: 16 samples from 1 repository, 10 ran; community (archive-listed): 7 samples from 1 repository, 5 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Unakar/Logic-RL officialmentioned on GitHubpytorchApache-2.0 report
OpenLLMAI/OpenLLaMA2 mentioned on GitHubpytorchApache-2.0 report
OpenLLMAI/OpenRLHF mentioned on GitHubpytorchApache-2.0 report
openrlhf/openrlhf mentioned on GitHubpytorchApache-2.0 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

23 samples harvested; 15 ran; 1 honoured the contract we drafted; 8 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

1ran · honoured contract
1ran · our draft was wrong
1ran · fixture could not drive it
12ran
8unverified

Licence: 0 of the 23 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 2 repositories linked to this paper, official or community; each sample names its own and says which. “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.

create_huggingface_actor Unakar/Logic-RL/verl/utils/model.py official repository ran Apache-2.0 (permissive) · 360c671d6041ba3b · report
extract_solution Unakar/Logic-RL/eval_kk/compute_score.py official repository ran fingerprinted Apache-2.0 (permissive) · b870fd9007fabd94 · report
extract_step Unakar/Logic-RL/verl/trainer/fsdp_sft_trainer.py official repository ran · honoured contract fingerprinted Apache-2.0 (permissive) · 216e28c040173a61 · report
is_transformers_version_in_range Unakar/Logic-RL/verl/models/transformers/monkey_patch.py official repository ran Apache-2.0 (permissive) · 42a7954a8cfa89e0 · report
load_jsonl Unakar/Logic-RL/eval_kk/main_eval_instruct.py official repository ran Apache-2.0 (permissive) · 0998b08e39672d66 · report
parse_cot_eval Unakar/Logic-RL/eval_kk/kk_processor.py official repository ran Apache-2.0 (permissive) · f4e717416b80af20 · report
parse_model_answer Unakar/Logic-RL/eval_kk/compute_score.py official repository ran Apache-2.0 (permissive) · df0cff7e9a4ca96e · report
parse_solution_text_format Unakar/Logic-RL/eval_kk/compute_score.py official repository ran fingerprinted Apache-2.0 (permissive) · a6a2e23358e05581 · report
union_tensor_dict Unakar/Logic-RL/verl/protocol.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · 21331a58f93375e4 · report
unpad_dataproto Unakar/Logic-RL/verl/protocol.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 25f0ea3f460f6ce1 · report
apply_monkey_patch Unakar/Logic-RL/verl/models/transformers/monkey_patch.py official repository unverified Apache-2.0 (permissive) · 1fb4adb621eefddc · report
get_huggingface_actor_config Unakar/Logic-RL/verl/utils/model.py official repository unverified Apache-2.0 (permissive) · 19472d4343d0a082 · report
get_weight_loader Unakar/Logic-RL/verl/models/weight_loader_registry.py official repository unverified Apache-2.0 (permissive) · 919cf310ad4c189a · report
load_eval_records Unakar/Logic-RL/eval_kk/main_eval_instruct.py official repository unverified Apache-2.0 (permissive) · cbfcdbb8e1ddcaca · report
num_tokens_from_string Unakar/Logic-RL/eval_kk/kk_processor.py official repository unverified Apache-2.0 (permissive) · 26b075196c1c10bf · report
squeeze Unakar/Logic-RL/verl/utils/model.py official repository unverified Apache-2.0 (permissive) · 3b15e2ac7497c441 · report
aggregate_loss OpenLLMAI/OpenLLaMA2/openrlhf/models/loss.py community (archive-listed) ran Apache-2.0 (permissive) · 0edeb138e07fbecc · report
compute_approx_kl OpenLLMAI/OpenLLaMA2/openrlhf/models/utils.py community (archive-listed) ran Apache-2.0 (permissive) · c146f3cb0e5259a0 · report
compute_reward OpenLLMAI/OpenLLaMA2/openrlhf/models/utils.py community (archive-listed) ran Apache-2.0 (permissive) · 812f2e3f5cda7c93 · report
get_loss_batch_info OpenLLMAI/OpenLLaMA2/openrlhf/utils/loss_utils.py community (archive-listed) ran Apache-2.0 (permissive) · 557aef158c28bb84 · report
log_probs_from_logits OpenLLMAI/OpenLLaMA2/openrlhf/models/utils.py community (archive-listed) ran Apache-2.0 (permissive) · 75afa2affd2a8e36 · report
get_tensor_in_current_ring_attn_rank OpenLLMAI/OpenLLaMA2/openrlhf/models/ring_attn_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 5110d3bb195169a8 · report
reset_ring_attn_position_ids OpenLLMAI/OpenLLaMA2/openrlhf/models/ring_attn_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · e93117d99aa6b210 · report

Tasks

MathReinforcement LearningReinforcement 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