Skip to main content
QUICK REVIEW

[Paper Review] MathPrompter: Mathematical Reasoning using Large Language Models

Shima Imani, Liang Du|arXiv (Cornell University)|Mar 4, 2023
Topic ModelingComputer Science15 citations
TL;DR

MathPrompter uses zero-shot chain-of-thought with multiple algebraic and Pythonic solving paths, cross-checks, and consensus verification to boost arithmetic reasoning accuracy in LLMs, achieving 92.5% on MultiArith with a 175B model.

ABSTRACT

Large Language Models (LLMs) have limited performance when solving arithmetic reasoning tasks and often provide incorrect answers. Unlike natural language understanding, math problems typically have a single correct answer, making the task of generating accurate solutions more challenging for LLMs. To the best of our knowledge, we are not aware of any LLMs that indicate their level of confidence in their responses which fuels a trust deficit in these models impeding their adoption. To address this deficiency, we propose `MathPrompter', a technique that improves performance of LLMs on arithmetic problems along with increased reliance in the predictions. MathPrompter uses the Zero-shot chain-of-thought prompting technique to generate multiple Algebraic expressions or Python functions to solve the same math problem in different ways and thereby raise the confidence level in the output results. This is in contrast to other prompt based CoT methods, where there is no check on the validity of the intermediate steps followed. Our technique improves over state-of-the-art on the MultiArith dataset ($78.7\% ightarrow92.5\%$) evaluated using 175B parameter GPT-based LLM.

Motivation & Objective

  • Address trust and reliability in LLM math solutions by adding validation of intermediate steps.
  • Increase accuracy on arithmetic reasoning tasks beyond standard zero-shot prompting.
  • Introduce a multi-solution and consensus-based verification pipeline inspired by human problem-solving.
  • Demonstrate competitiveness with state-of-the-art zero-shot and few-shot prompting methods on a benchmark dataset.

Proposed method

  • Transform each math question into an algebraic template by replacing numbers with variables (Qt).
  • Generate multiple solving prompts (Algebraic and Pythonic) to produce distinct analytical solutions.
  • Evaluate expressions on randomized variable assignments and look for consensus to verify results.
  • If consensus is not reached, repeat solving and verification steps; report the most frequent final answer across attempts.
  • Use Python eval() to compute and compare outputs from algebraic and Pythonic solutions for final consensus.

Experimental results

Research questions

  • RQ1Can zero-shot chain-of-thought be enhanced with multi-path solving and verification to improve arithmetic accuracy?
  • RQ2Does cross-checking intermediate steps and using multiple representations raise LLM reliability in math tasks?
  • RQ3How does MathPrompter’s performance compare to zero-shot and few-shot CoT baselines on MultiArith?
  • RQ4Is consensus-based finalization effective across multiple randomized trials?

Key findings

  • MathPrompter achieves 92.5% accuracy on MultiArith, outperforming Zero-shot-CoT baselines.
  • It matches or exceeds performance of Zero-shot-CoT with 540B parameters and comparable few-shot-CoT methods.
  • Across variants, the approach improves over the 78.7% state-of-the-art Zero-shot-CoT (175B) reported by Kojima et al. (2022).
  • The method relies on generating both Algebraic and Pythonic solutions and using consensus from multiple randomized evaluations to select the final answer.
  • There are still cases where both algebraic and Pythonic outputs agree but are incorrect, highlighting remaining limitations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.