Abstract
Large Language Models (LLMs) frequently struggle with mathematical reasoning due to linguistic "brittleness"—a phenomenon where minor variations in problem phrasing lead to inconsistent or incorrect outputs. This paper introduces RM-PoT, a novel framework that integrates Problem Reformulation (RM) with Program of Thoughts (PoT) to address these vulnerabilities. By paraphrasing input problems into multiple linguistic forms and solving them via executable Python code, RM-PoT decouples logical reasoning from arithmetic execution. Experimental results on competitive benchmarks including GSM8K, AQuA, and SVAMP show that RM-PoT achieves state-of-the-art performance, significantly outperforming traditional Chain-of-Thought (CoT) and vanilla PoT approaches.
Introduction
Despite the impressive general capabilities of LLMs, their performance in mathematics is often hindered by a reliance on surface-level linguistic patterns rather than a deep structural understanding. A model might correctly solve a problem in one instance but fail when the same logic is presented with different wording. Furthermore, while Chain-of-Thought (CoT) prompting encourages step-by-step reasoning, it remains prone to arithmetic errors in complex calculations. RM-PoT aims to bridge this gap by ensuring robust problem comprehension through reformulation and precise computation through code execution.
Methodology
The RM-PoT framework consists of a three-stage pipeline designed to maximize both understanding and accuracy:
- Reformulation (RM): The system generates $K$ paraphrased versions of the original problem. This process acts as a linguistic regularizer, helping the model identify the core mathematical structure independent of specific phrasing.
- Domain-Aware Few-Shot Learning: Problems are classified by domain (e.g., algebra, arithmetic), and the top-5 semantically similar examples are retrieved from a curated question bank using Sentence-BERT embeddings to guide the model.
- Program of Thoughts (PoT) & Voting: For every reformulated problem, the LLM generates Python code. This code is executed by an interpreter to handle calculations. A final voting mechanism aggregates the results from all $K$ versions to select the most consistent answer.
Experimental Results
RM-PoT was evaluated using the GLM-4-9B model on three major benchmarks: GSM8K (grade school math), AQuA (GMAT/GRE algebra), and SVAMP (arithmetic operations). The framework demonstrated superior performance across the board:
- GSM8K: 80.4% accuracy (vs. 75.6% for CoT and 78.9% for vanilla PoT).
- AQuA: 69.1% accuracy (vs. 63.2% for CoT).
- SVAMP: 88.0% accuracy.
A key insight from the study is the power of linguistic diversity. Even if a specific reformulation is individually more difficult for the model, the ensemble of multiple perspectives leads to a more robust consensus. As shown in the figure below, reformulating a problem into a clearer or more structured format can nearly double the solve rate.
Discussion and Conclusion
RM-PoT effectively decouples the "recipe" (logic) from the "cooking" (arithmetic). By offloading computation to Python and using reformulation to stabilize logic, the framework mitigates the inherent brittleness of LLMs. While the framework shows significant gains, future work will explore expanding this approach to more complex domains like geometry and calculus, which require integrating visual data and advanced symbolic reasoning. Additionally, the authors aim to refine the reformulation process to better understand why certain linguistic structures are more effective than others.
Summary updated