Enhancing Mathematical Reasoning in LLMs by Stepwise Correction

Zhenyu Wu, Qingkai Zeng, Zhihan Zhang, Zhaoxuan Tan, Chao Shen +1 more
10/16/2024
cs.CL

No official code found. Best implementation: wzy6642/StepCo (8 stars, last commit 2025-11-12).

Abstract

Best-of-N decoding methods instruct large language models (LLMs) to generate multiple solutions, score each using a scoring function, and select the highest scored as the final answer to mathematical reasoning problems. However, this repeated independent process often leads to the same mistakes, making the selected solution still incorrect. We propose a novel prompting method named Stepwise Correction (StepCo) that helps LLMs identify and revise incorrect steps in their generated reasoning paths. It iterates verification and revision phases that employ a process-supervised verifier. The verify-then-revise process not only improves answer correctness but also reduces token consumption with fewer paths needed to generate. With StepCo, a series of LLMs demonstrate exceptional performance. Notably, using GPT-4o as the backend LLM, StepCo achieves an average accuracy of 94.1 across eight datasets, significantly outperforming the state-of-the-art Best-of-N method by +2.4, while reducing token consumption by 77.8%.

View on arXivView PDF

Code Implementations(1)

wzy6642/StepCoCommunity61%

Official implementation for "Enhancing Mathematical Reasoning in LLMs by Stepwise Correction" (ACL 2025)

80PythonOct 16, 202411 months ago
large-language-modelmathematical-reasoningprompt-engineeringstepwise-refinementsupervised-finetuning

Similar Papers

Cite this paper

@article{wu2024enhancing,
  title  = {Enhancing Mathematical Reasoning in LLMs by Stepwise Correction},
  author = {Zhenyu Wu and Qingkai Zeng and Zhihan Zhang and Zhaoxuan Tan and Chao Shen and Meng Jiang},
  year   = {2024},
  eprint = {2410.12934},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.12934v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.12934.svg)](https://codeofpaper.com/paper/2410.12934)

Discussion