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

Tian Xie, Zitian Gao, Qingnan Ren, Haoming Luo, Yuqian Hong +5 more
2/20/2025
cs.CLcs.AI

No official code found. Best implementation: Unakar/Logic-RL (2,450 stars, Apache-2.0, last commit 2025-03-20).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

Unakar/Logic-RLCommunity100%
Apache-2.0

Reproduce R1 Zero on Logic Puzzle

2,450163Shell, PythonFeb 2, 20251 years agoApache-2.0

Similar Papers

Cite this paper

@article{xie2025logicrl,
  title  = {Logic-RL: Unleashing LLM Reasoning with Rule-Based Reinforcement Learning},
  author = {Tian Xie and Zitian Gao and Qingnan Ren and Haoming Luo and Yuqian Hong and Bryan Dai and Joey Zhou and Kai Qiu and Zhirong Wu and Chong Luo},
  year   = {2025},
  eprint = {2502.14768},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.14768v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.14768.svg)](https://codeofpaper.com/paper/2502.14768)

Discussion