ChatPaper.aiChatPaper

THOR: 수학적 추론을 위한 도구 통합 계층적 최적화 기반 강화 학습

THOR: Tool-Integrated Hierarchical Optimization via RL for Mathematical Reasoning

September 17, 2025
저자: Qikai Chang, Zhenrong Zhang, Pengfei Hu, Jiefeng Ma, Yicheng Pan, Jianshu Zhang, Jun Du, Quan Liu, Jianqing Gao
cs.AI

초록

대규모 언어 모델(LLMs)은 수학적 추론에서 놀라운 진전을 이루었지만, 수치 계산 및 형식적 기호 조작과 같은 고정밀 작업에서는 여전히 어려움을 겪고 있습니다. 이러한 격차를 해소하기 위해 외부 도구를 통합하는 접근 방식이 유망한 방법으로 부상했습니다. 최근의 발전에도 불구하고, 기존 방법들은 세 가지 주요 과제에 직면해 있습니다: 도구 통합 추론 데이터 구축, 세밀한 최적화 수행, 그리고 추론 강화입니다. 이러한 한계를 극복하기 위해, 우리는 THOR(Tool-Integrated Hierarchical Optimization via RL)를 제안합니다. 먼저, 우리는 TIRGen이라는 다중 에이전트 액터-크리틱 기반 파이프라인을 소개합니다. 이 파이프라인은 정책에 부합하며 다양한 모델에서 잘 일반화되는 도구 통합 추론 경로의 고품질 데이터셋을 구축합니다. 둘째, 세밀한 계층적 최적화를 수행하기 위해, 우리는 궤적 수준의 문제 해결과 단계 수준의 코드 생성을 동시에 최적화하는 RL 전략을 도입합니다. 이는 중간 도구 호출의 성공이 최종 답변의 정확성을 강력하게 예측한다는 우리의 주요 통찰에서 비롯되었습니다. 마지막으로, THOR는 즉각적인 도구 피드백을 활용하여 추론 중 오류가 있는 추론 경로를 동적으로 수정하는 자기 수정 메커니즘을 통합합니다. 우리의 접근 방식은 다양한 모델에서 강력한 일반화를 보여주며, 추론 및 비추론 모델 모두에서 효과적으로 작동합니다. 또한, 유사 규모의 모델에 대해 여러 수학 벤치마크에서 최첨단 성능을 달성하는 동시에 코드 벤치마크에서도 일관된 개선을 제공합니다. 우리의 코드는 https://github.com/JingMog/THOR에서 공개될 예정입니다.
English
Large Language Models (LLMs) have made remarkable progress in mathematical reasoning, but still continue to struggle with high-precision tasks like numerical computation and formal symbolic manipulation. Integrating external tools has emerged as a promising approach to bridge this gap. Despite recent advances, existing methods struggle with three key challenges: constructing tool-integrated reasoning data, performing fine-grained optimization, and enhancing inference. To overcome these limitations, we propose THOR (Tool-Integrated Hierarchical Optimization via RL). First, we introduce TIRGen, a multi-agent actor-critic-based pipeline for constructing high-quality datasets of tool-integrated reasoning paths, aligning with the policy and generalizing well across diverse models. Second, to perform fine-grained hierarchical optimization, we introduce an RL strategy that jointly optimizes for both trajectory-level problem solving and step-level code generation. This is motivated by our key insight that the success of an intermediate tool call is a strong predictor of the final answer's correctness. Finally, THOR incorporates a self-correction mechanism that leverages immediate tool feedback to dynamically revise erroneous reasoning paths during inference. Our approach demonstrates strong generalization across diverse models, performing effectively in both reasoning and non-reasoning models. It further achieves state-of-the-art performance for models of a similar scale on multiple mathematical benchmarks, while also delivering consistent improvements on code benchmarks. Our code will be publicly available at https://github.com/JingMog/THOR.
PDF61September 18, 2025