CoRT: 思考内コード統合理論
CoRT: Code-integrated Reasoning within Thinking
June 11, 2025
著者: Chengpeng Li, Zhengyang Tang, Ziniu Li, Mingfeng Xue, Keqin Bao, Tian Ding, Ruoyu Sun, Benyou Wang, Xiang Wang, Junyang Lin, Dayiheng Liu
cs.AI
要旨
o1やDeepSeek-R1のような大規模推論モデル(LRM)は、長い連鎖思考(CoT)を用いた自然言語推論において顕著な進歩を示していますが、複雑な数学的操作を扱う際には非効率または不正確なままです。計算ライブラリやシンボリックソルバーなどの計算ツールを用いてこれらの制約に対処することは有望ですが、技術的な課題を引き起こします:コードインタプリタ(CI)は、モデルの内部テキスト表現を超える外部知識をもたらすため、直接的な組み合わせは効率的ではありません。本論文では、LRMがCIを効果的かつ効率的に活用することを教えるためのポストトレーニングフレームワークであるCoRTを紹介します。最初のステップとして、ヒントエンジニアリングを通じてコード統合型推論データを合成し、LRMとCIの相互作用を最適化するために適切な位置に異なるヒントを戦略的に挿入することで、データ不足の問題に対処します。我々は30の高品質なサンプルを手動で作成し、それらを用いて1.5Bから32Bパラメータのモデルを、教師ありファインチューニング、拒否ファインチューニング、強化学習を用いてポストトレーニングします。実験結果は、ヒントエンジニアリングモデルがDeepSeek-R1-Distill-Qwen-32BとDeepSeek-R1-Distill-Qwen-1.5Bにおいて、それぞれ4%と8%の絶対的な改善を、5つの挑戦的な数学的推論データセットで達成することを示しています。さらに、ヒントエンジニアリングモデルは、32Bモデルでは約30%、1.5Bモデルでは約50%少ないトークンを使用します。モデルとコードはhttps://github.com/ChengpengLi1003/CoRTで利用可能です。
English
Large Reasoning Models (LRMs) like o1 and DeepSeek-R1 have shown remarkable
progress in natural language reasoning with long chain-of-thought (CoT), yet
they remain inefficient or inaccurate when handling complex mathematical
operations. Addressing these limitations through computational tools (e.g.,
computation libraries and symbolic solvers) is promising, but it introduces a
technical challenge: Code Interpreter (CI) brings external knowledge beyond the
model's internal text representations, thus the direct combination is not
efficient. This paper introduces CoRT, a post-training framework for teaching
LRMs to leverage CI effectively and efficiently. As a first step, we address
the data scarcity issue by synthesizing code-integrated reasoning data through
Hint-Engineering, which strategically inserts different hints at appropriate
positions to optimize LRM-CI interaction. We manually create 30 high-quality
samples, upon which we post-train models ranging from 1.5B to 32B parameters,
with supervised fine-tuning, rejection fine-tuning and reinforcement learning.
Our experimental results demonstrate that Hint-Engineering models achieve 4\%
and 8\% absolute improvements on DeepSeek-R1-Distill-Qwen-32B and
DeepSeek-R1-Distill-Qwen-1.5B respectively, across five challenging
mathematical reasoning datasets. Furthermore, Hint-Engineering models use about
30\% fewer tokens for the 32B model and 50\% fewer tokens for the 1.5B model
compared with the natural language models. The models and code are available at
https://github.com/ChengpengLi1003/CoRT.