Towards Effective Code-Integrated Reasoning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bai, Fei, Min, Yingqian, Zhang, Beichen, Chen, Zhipeng, Zhao, Wayne Xin, Fang, Lei, Liu, Zheng, Wang, Zhongyuan, Wen, Ji-Rong
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916768767803392
author Bai, Fei
Min, Yingqian
Zhang, Beichen
Chen, Zhipeng
Zhao, Wayne Xin
Fang, Lei
Liu, Zheng
Wang, Zhongyuan
Wen, Ji-Rong
author_facet Bai, Fei
Min, Yingqian
Zhang, Beichen
Chen, Zhipeng
Zhao, Wayne Xin
Fang, Lei
Liu, Zheng
Wang, Zhongyuan
Wen, Ji-Rong
contents In this paper, we investigate code-integrated reasoning, 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) through interactive learning. 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 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 and effect 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. All data and code for reproducing this work are available at: https://github.com/RUCAIBox/CIR.
format Preprint
id arxiv_https___arxiv_org_abs_2505_24480
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Towards Effective Code-Integrated Reasoning
Bai, Fei
Min, Yingqian
Zhang, Beichen
Chen, Zhipeng
Zhao, Wayne Xin
Fang, Lei
Liu, Zheng
Wang, Zhongyuan
Wen, Ji-Rong
Computation and Language
Artificial Intelligence
Machine Learning
In this paper, we investigate code-integrated reasoning, 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) through interactive learning. 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 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 and effect 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. All data and code for reproducing this work are available at: https://github.com/RUCAIBox/CIR.
title Towards Effective Code-Integrated Reasoning
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2505.24480