Teaching LLM to Reason: Reinforcement Learning from Algorithmic Problems without Code
On the map: LLM reasoning → Reinforcement learning for reasoning
Abstract (arXiv)
Enhancing reasoning capabilities remains a central focus in the LLM reasearch community. A promising direction involves requiring models to simulate code execution step-by-step to derive outputs for given inputs. However, as code is often designed for large-scale systems, direct application leads to over-reliance on complex data structures and algorithms, even for simple cases, resulting in overfitting to algorithmic patterns rather than core reasoning structures. To address this, we propose TeaR, which aims at teaching LLMs to reason better. TeaR leverages careful data curation and reinforcement learning to guide models in discovering optimal reasoning paths through code-related tasks, thereby improving general reasoning abilities. We conduct extensive experiments using two base models and three long-CoT distillation models, with model sizes ranging from 1.5 billion to 32 billion parameters, and across 17 benchmarks spanning Math, Knowledge, Code, and Logical Reasoning. The results consistently show significant performance improvements. Notably, TeaR achieves a 35.9% improvement on Qwen2.5-7B and 5.9% on R1-Distilled-7B.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Placed in Reinforcement learning for reasoning, one of 17 directions in LLM reasoning. Builds on 29 of its 45 references that are in the map. First posted on arXiv 10 Jul 2025.
Builds on
29 of 45 references.
Closest ancestors · 2
Same direction, newest first
- 2025Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model?18 Apr
- 2024Tulu 3: Pushing Frontiers in Open Language Model Post-Training22 Nov
Other references · 27
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2022Learn to Explain: Multimodal Reasoning via Thought Chains for Science Question Answeringcited by 1,919
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,807
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2019DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphscited by 903
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 672
15 more
- 2022Large Language Models Can Self-Improvecited by 664
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2025ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoningcited by 201
- 2023Helping or Herding? Reward Model Ensembles Mitigate but do not Eliminate Reward Hackingcited by 200
- 2024OpenMathInstruct-1: A 1.8 Million Math Instruction Tuning Datasetcited by 143
- 2014Learning to Executecited by 106
- 2024KOR-Bench: Benchmarking Language Models on Knowledge-Orthogonal Reasoning Taskscited by 70
- 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMscited by 70
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Predictioncited by 55
- 2024Evaluating Mathematical Reasoning of Large Language Models: A Focus on Error Identification and Correctioncited by 45
- 2024CYCLE: Learning to Self-Refine the Code Generationcited by 42
- 2024On the Impact of Fine-Tuning on Chain-of-Thought Reasoningcited by 32
- 2025MTR-Bench: A Comprehensive Benchmark for Multi-Turn Reasoning Evaluationcited by 15
- 2025HellaSwag-Pro: A Large-Scale Bilingual Benchmark for Evaluating the Robustness of LLMs in Commonsense Reasoningcited by 7
- 2025Pseudocode-Injection Magic: Enabling LLMs to Tackle Graph Computational Taskscited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
- 2025RLVE: Scaling Up Reinforcement Learning for Language Models with Adaptive Verifiable Environmentscited by 50
- 2026Scaling the Scaling Logic: Agentic Meta-Synthesis of Logic Reasoningcited by 1
- 2026The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesiscited by 0
- 2026The Imitation Game: When LLMs Learn to Reason Like Programs via Code-Centric Reasoning Data Synthesis13 Sep 2026
- 2026Scaling the Scaling Logic: Agentic Meta-Synthesis of Logic Reasoning23 Jan 2026
- 2025RLVE: Scaling Up Reinforcement Learning for Language Models with Adaptive Verifiable Environments10 Nov 2025
Similar, not cited
Close in wording, no citation either way
- 2025LogicPuzzleRL: Cultivating Robust Mathematical Reasoning in LLMs via Reinforcement Learning
- 2024Distilling Algorithmic Reasoning from LLMs via Explaining Solution Programs
- 2025Revisiting Reinforcement Learning for LLM Reasoning from A Cross-Domain Perspective
- 2025Learning to Reason at the Frontier of Learnability
- 2025How Difficulty-Aware Staged Reinforcement Learning Enhances LLMs' Reasoning Capabilities: A Preliminary Experimental Study
- 2025Reasoning Curriculum: Bootstrapping Broad LLM Reasoning from Math
- 2025Curriculum Reinforcement Learning from Easy to Hard Tasks Improves LLM Reasoning
- 2024Multi-Step Reasoning with Large Language Models, a Survey