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 page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 23 code samples harvested from 2 repositories linked to this paper: 15 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 1 violated, 8 with no contract checked; 5 where Syntology's instrument failed) · 8 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

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

No sample is linked to this paper from 1 of its repositories that Syntology harvested for other papers:

Levels written between 2026-09-22 and 2026-09-25 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 15 samples that ran has no recorded date.

Unakar/Logic-RL officialmentioned on GitHubpytorchApache-2.0Syntology: 16 samples, 10 ran (3 instrument-failed) · 6 unverified report
OpenLLMAI/OpenLLaMA2 mentioned on GitHubpytorchApache-2.0Syntology: 7 samples, 5 ran (2 instrument-failed) · 2 unverified report
OpenLLMAI/OpenRLHF mentioned on GitHubpytorchApache-2.0Syntology: not harvested report
openrlhf/openrlhf mentioned on GitHubpytorchApache-2.0Syntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to A Regret Minimization Framework on Preference Learning in Large Language Models (arXiv:2606.09124; that paper's own run record: 15 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 1 honoured, 1 violated, 5 with no contract checked; 8 where Syntology's instrument failed) · 3 unverified); nothing checks that they implement this paper's method. 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.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

23 samples harvested: 15 ran (of which 0 constructed an object rather than computing a result; 10 with no instrument failure: 1 honoured, 1 violated, 8 with no contract checked; 5 where Syntology's instrument failed) · 8 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
2ran; the contract check could not run
8ran
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; the list below is grouped by repository, each group headed by its name and what it is to the paper. “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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

Unakar/Logic-RL official repository 16 samples, 10 ran (3 instrument-failed) · 6 unverified
create_huggingface_actor in 18 papers verl/utils/model.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) · 360c671d6041ba3b · report fixture: signature model_name:str/0/str, override_config_kwargs:dict/0/?, automodel_kwargs:dict/0/? · returned MockCausalLMModel · level recorded 2026-09-24
extract_solution in 15 papers eval_kk/compute_score.py ran fingerprinted Apache-2.0 (permissive) · b870fd9007fabd94 · report fixture: signature solution_str:str/0/str · returned tuple · level recorded 2026-09-25
extract_step in 22 papers verl/trainer/fsdp_sft_trainer.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · 216e28c040173a61 · report fixture: signature path:str/0/str · returned int · level recorded, date not recorded
is_transformers_version_in_range in 15 papers verl/models/transformers/monkey_patch.py ran · violated contract Apache-2.0 (permissive) · 42a7954a8cfa89e0 · report fixture: signature min_version:str/0/str, max_version:str/0/str · returned bool · level recorded 2026-09-24
load_jsonl in 179 papers eval_kk/main_eval_instruct.py ran fingerprinted Apache-2.0 (permissive) · 0998b08e39672d66 · report fixture: signature file_path:str/0/str · returned list · level recorded 2026-09-24
parse_cot_eval eval_kk/kk_processor.py ran Apache-2.0 (permissive) · f4e717416b80af20 · report fixture: signature pred_str:str/0/str, ans:str/0/str, conclusion_patterns:list/1/str, verbose:bool/0/bool, finish_patterns:list/1/str, reformat_gold_conditions:NoneType/0/? · returned tuple · level recorded 2026-09-24
parse_model_answer eval_kk/compute_score.py ran Apache-2.0 (permissive) · df0cff7e9a4ca96e · report fixture: signature answer_text:str/0/str, expected_names:list/1/str · returned dict · level recorded 2026-09-24
parse_solution_text_format eval_kk/compute_score.py ran fingerprinted Apache-2.0 (permissive) · a6a2e23358e05581 · report fixture: signature solution_text:str/0/str · returned dict · level recorded 2026-09-24
union_tensor_dict in 69 papers verl/protocol.py ran · our draft was wrong Apache-2.0 (permissive) · 21331a58f93375e4 · report fixture: signature tensor_dict1:TensorDict/1/float, tensor_dict2:TensorDict/1/float · returned TensorDict · level recorded 2026-09-22
unpad_dataproto in 102 papers verl/protocol.py ran · our draft was wrong Apache-2.0 (permissive) · 25f0ea3f460f6ce1 · report fixture: signature data:DataProto/0/?, pad_size:int/0/int · returned DataProto · level recorded 2026-09-22
apply_monkey_patch in 14 papers verl/models/transformers/monkey_patch.py unverified Apache-2.0 (permissive) · 1fb4adb621eefddc · report
get_huggingface_actor_config in 83 papers verl/utils/model.py unverified Apache-2.0 (permissive) · 19472d4343d0a082 · report
get_weight_loader in 93 papers verl/models/weight_loader_registry.py unverified Apache-2.0 (permissive) · 919cf310ad4c189a · report
load_eval_records eval_kk/main_eval_instruct.py unverified Apache-2.0 (permissive) · cbfcdbb8e1ddcaca · report
num_tokens_from_string in 17 papers eval_kk/kk_processor.py unverified Apache-2.0 (permissive) · 26b075196c1c10bf · report
squeeze in 92 papers verl/utils/model.py unverified Apache-2.0 (permissive) · 3b15e2ac7497c441 · report
OpenLLMAI/OpenLLaMA2 community (archive-listed) 7 samples, 5 ran (2 instrument-failed) · 2 unverified
aggregate_loss in 5 papers openrlhf/models/loss.py ran Apache-2.0 (permissive) · 0edeb138e07fbecc · report fixture: signature loss:Tensor/2/float, loss_mask:Tensor/2/float, token_level_loss:bool/0/bool, dp_size:int/0/int, batch_num_tokens:float/0/float, global_batch_size:float/0/float · returned Tensor · level recorded 2026-09-24
compute_approx_kl in 20 papers openrlhf/models/utils.py ran Apache-2.0 (permissive) · c146f3cb0e5259a0 · report fixture: signature log_probs:Tensor/2/float, log_probs_base:Tensor/2/float, log_probs_old:Tensor/2/float, kl_estimator:str/0/str, unbiased_gradient:bool/0/bool · returned Tensor · level recorded 2026-09-24
compute_reward in 26 papers openrlhf/models/utils.py ran Apache-2.0 (permissive) · 812f2e3f5cda7c93 · report fixture: signature r:Tensor/1/float, kl_coef:float/0/float, kl:Tensor/2/float, action_mask:Tensor/2/float, reward_clip_range:tuple/1/float · returned Tensor · level recorded 2026-09-24
get_loss_batch_info openrlhf/utils/loss_utils.py ran · our draft was wrong Apache-2.0 (permissive) · 557aef158c28bb84 · report fixture: signature strategy:MinimalStrategy/0/?, loss_mask:Tensor/2/float, replay_buffer:MinimalReplayBuffer/0/?, step:int/0/int, dynamic_batch:bool/0/bool, batch_num_tokens:NoneType/0/?, global_batch_size:NoneType/0/? · returned dict · level recorded 2026-09-24
log_probs_from_logits in 18 papers openrlhf/models/utils.py ran; the contract check could not run (DEP_MISSING) Apache-2.0 (permissive) · 75afa2affd2a8e36 · report fixture: signature logits:Tensor/3/float, labels:Tensor/2/int, temperature:float/0/float · returned Tensor · level recorded 2026-09-24
get_tensor_in_current_ring_attn_rank openrlhf/models/ring_attn_utils.py unverified Apache-2.0 (permissive) · 5110d3bb195169a8 · report
reset_ring_attn_position_ids in 16 papers openrlhf/models/ring_attn_utils.py 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