Towards Effective Code-Integrated Reasoning
Fei Bai, Yingqian Min, Beichen Zhang, Zhipeng Chen, Xin Zhao, Lei Fang, Zheng Liu, Zhongyuan Wang, Hongteng Xu
Abstract
In this paper, we investigate code-integrated reasoning (CIR), where models generate code when necessary and integrate feedback by executing it through a code interpreter. To acquire this capability, models must learn when and how to use external code tools effectively, which is supported by tool-augmented reinforcement learning (RL). Despite its benefits, tool-augmented RL can still suffer from potential instability in the learning dynamics. In light of this challenge, we present a systematic approach ETIR (Effective TIR) to improving the training effectiveness and stability of tool-augmented RL for code-integrated reasoning. Specifically, we develop enhanced training strategies that balance exploration and stability, progressively building tool-use capabilities while improving reasoning performance. Through extensive experiments on five mainstream mathematical reasoning benchmarks, our model demonstrates significant performance improvements over multiple competitive baselines. Furthermore, we conduct an in-depth analysis of the mechanism of code-integrated reasoning, revealing several key insights, such as the extension of model’s capability boundaries and the simultaneous improvement of reasoning efficiency through code integration. These findings underscore the potential of code-integrated reasoning as a scalable paradigm for advancing robust and efficient language model reasoning.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
6 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement Learning cites SimpleTIR: End-to-End Reinforcement Learning for Multi-Turn Tool-Integrated Reasoning
- Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement Learning cites ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving
- Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement Learning cites ReTool: Reinforcement Learning for Strategic Tool Use in LLMs
- Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement Learning cites Training language models to follow instructions with human feedback
- Reasoning with Exploration: An Entropy Perspective cites Training language models to follow instructions with human feedback
- Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model? cites Training language models to follow instructions with human feedback
- Incentivizing Agentic Reasoning in LLM Judges via Tool-Integrated Reinforcement Learning cites SimpleTIR: End-to-End Reinforcement Learning for Multi-Turn Tool-Integrated Reasoning
- ReTool: Reinforcement Learning for Strategic Tool Use in LLMs cites Training language models to follow instructions with human feedback
Cited by top-tier papers6
- SimpleTIR: End-to-End Reinforcement Learning for Multi-Turn Tool-Integrated ReasoningZhenghai Xue, Longtao Zheng, Qian Liu, Yingru Li et al.ICLR 2026 · 152 citations
- Incentivizing Agentic Reasoning in LLM Judges via Tool-Integrated Reinforcement LearningRan Xu, Jingjing Chen, Jiayu Ye, Yu Wu et al.ICLR 2026 · 17 citations
- Learn the Ropes, Then Trust the Wins: Self-imitation with Progressive Exploration for Agentic Reinforcement LearningYulei Qin, Xiaoyu Tan, Zhengbao He, Gang Li et al.ICLR 2026 · 9 citations
- How Many Code and Test Cases Are Enough? Evaluating Test Cases Generation from a Binary-Matrix PerspectiveXianzhen Luo, Jinyang Huang, Wenzhen Zheng, Qingfu Zhu et al.ICLR 2026 · 5 citations
- Learning from the Irrecoverable: Error-Localized Policy Optimization for Tool-Integrated LLM ReasoningQiao Liang, Yuke Zhu, Chao Ge, Lei Yang et al.ACL 2026 · 4 citations
Builds on12
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Does Reinforcement Learning Really Incentivize Reasoning Capacity in LLMs Beyond the Base Model?Zhiqi Chen, Rui Lu, Andrew Zhao, Zhaokai Wang et al.NeurIPS 2025 · 1,109 citations
- ReTool: Reinforcement Learning for Strategic Tool Use in LLMsJiazhan Feng, Shijue Huang, Xingwei Qu, Ge Zhang et al.ICLR 2026 · 406 citations
- ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem SolvingZhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen et al.ICLR 2024 · 289 citations
- Reasoning with Exploration: An Entropy PerspectiveDaixuan Cheng, Shaohan Huang, Xuekai Zhu, Bo Dai et al.AAAI 2026 · 216 citations
Related papers
- Agentic RL Scaling Law: Spontaneous Code Execution for Mathematical Problem SolvingXinji Mai, Haotian Xu, Xing W, Weinong Wang et al.NeurIPS 2025 · 7 citations
- THOR: Tool-Integrated Hierarchical Optimization via RL for Mathematical ReasoningQikai Chang, Zhenrong Zhang, Pengfei Hu, Jun Du et al.ICLR 2026 · 8 citations
- When to Trust Tools? Adaptive Tool Trust Calibration For Tool-Integrated Math ReasoningRuotao Xu, Yixin Ji, Yu Luo, Jinpeng Li et al.ACL Findings 2026
- TInR: Exploring Tool-Internalized Reasoning in Large Language ModelsQiancheng Xu, Yongqi Li, Fan Liu, Hongru Wang et al.ACL 2026
- Toward Effective Tool-Integrated Reasoning via Self-Evolved Preference LearningYifei Chen, Guanting Dong, Zhicheng DouICLR 2026 · 18 citations
