Enhancing Mathematical Problem Solving in Large Language Models through Tool-Integrated Reasoning and Python Code Execution

Mathematical problem solving remains a significant challenge for large language models (LLMs) due to the inherent complexity of mathematical reasoning and the precision required in calculations. This paper introduces a novel approach that leverages Tool-Integrated Reasoning (TIR) and Python code execution to address these challenges and enhance the mathematical reasoning capabilities of LLMs. We fine-tune the DeepSeekMath-Base 7B model using a two-stage process. The first stage involves training on a diverse dataset of natural language mathematical problems using a Chain of Thought (CoT) template, improving the model’s understanding of reasoning paths. In the second stage, we introduce a synthetic dataset that includes examples of tool-integrated reasoning, enabling the model to generate and execute Python code as part of its problem-solving process. Our results demonstrate significant performance improvements, with the model achieving an accuracy of 0.7782 and a maj@N score of 0.7344, outperforming existing models in the domain. This research not only advances the state of mathematical reasoning in LLMs but also provides a framework for integrating external tools to improve reasoning and decision-making processes in AI systems.

Authors

Institutions

Publication Details

Published
2024-09-20
DOI
https://doi.org/10.1109/icbase63199.2024.10762312
Citations
8
Primary Topic
Intelligent Tutoring Systems and Adaptive Learning
Type
article
Field-Weighted Citation Impact
2.78
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Mathematical Problem Solving in Large Language Models through Tool-Integrated Reasoning and Python Code Execution

Suo Li
8 citations
Intelligent Tutoring Systems and Adaptive Learning
2.78
article

Enhancing Mathematical Problem Solving in Large Language Models through Tool-Integrated Reasoning and Python Code Execution

Suo Li
article en
8 citations

Abstract

Mathematical problem solving remains a significant challenge for large language models (LLMs) due to the inherent complexity of mathematical reasoning and the precision required in calculations. This paper introduces a novel approach that leverages Tool-Integrated Reasoning (TIR) and Python code execution to address these challenges and enhance the mathematical reasoning capabilities of LLMs. We fine-tune the DeepSeekMath-Base 7B model using a two-stage process. The first stage involves training on a diverse dataset of natural language mathematical problems using a Chain of Thought (CoT) template, improving the model’s understanding of reasoning paths. In the second stage, we introduce a synthetic dataset that includes examples of tool-integrated reasoning, enabling the model to generate and execute Python code as part of its problem-solving process. Our results demonstrate significant performance improvements, with the model achieving an accuracy of 0.7782 and a maj@N score of 0.7344, outperforming existing models in the domain. This research not only advances the state of mathematical reasoning in LLMs but also provides a framework for integrating external tools to improve reasoning and decision-making processes in AI systems.

Northeastern University (US)
Openalex Percentile: Top 8%
Intelligent Tutoring Systems and Adaptive Learning
2.78
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.