#  GSM-Plus: A Comprehensive Benchmark for Evaluating the Robustness of LLMs
as Mathematical Problem Solvers

Qintong Li1 Leyang Cui2 Xueliang Zhao1$*$ Lingpeng Kong1 Wei Bi2
1The University of Hong Kong 2Tencent AI Lab
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>Work done during an internship at Tencent
AI Lab.

###### Abstract

Large language models (LLMs) have achieved impressive performance across
various mathematical reasoning benchmarks. However, there are increasing
debates regarding whether these models truly understand and apply mathematical
knowledge or merely rely on shortcuts for mathematical reasoning. One
essential and frequently occurring evidence is that when the math questions
are slightly changed, LLMs can behave incorrectly. This motivates us to
evaluate the robustness of LLMs’ math reasoning capability by testing a wide
range of question variations. We introduce the adversarial grade school math
(GSM-Plus) dataset, an extension of GSM8K augmented with various mathematical
perturbations. Our experiments on 25 LLMs and 4 prompting techniques show that
while LLMs exhibit different levels of math reasoning abilities, their
performances are far from robust. In particular, even for problems that have
been solved in GSM8K, LLMs can make mistakes when new statements are added or
the question targets are altered. We also explore whether more robust
performance can be achieved by composing existing prompting methods, in which
we try an iterative method that generates and verifies each intermediate
thought based on its reasoning goal and calculation result. Code and data are
available at https://github.com/qtli/GSM-Plus.

GSM-Plus: A Comprehensive Benchmark for Evaluating the Robustness of LLMs as
Mathematical Problem Solvers

Qintong Li1††thanks:  Work done during an internship at Tencent AI Lab. Leyang
Cui2 Xueliang Zhao1$*$ Lingpeng Kong1 Wei Bi2 1The University of Hong Kong
2Tencent AI Lab<EMAIL_ADDRESS><EMAIL_ADDRESS>

##  1 Introduction

Mathematical reasoning stands as a crucial testament to the development of
artificial intelligence (Lake et al., 2017). It requires rigorous problem
understanding, strategy formulating, and calculation performing abilities
(Baroody, 1987; Verschaffel et al., 1999). Large language models (LLMs) (Brown
et al., 2020; Touvron et al., 2023a) have demonstrated strong performance on
various mathematical benchmarks including grade school math GSM8K Cobbe et al.
(2021), high school math MATH (Hendrycks et al., 2021), and college math
Theoremqa (Chen et al., 2023). Regarding the widely-used GSM8K benchmark,
proprietary models like GPT-4 and cutting-edge open-source models have
reported accuracy rates exceeding 90% and 80%, respectively. However, the
debate within the research community regarding whether these models truly
understand and apply mathematical knowledge or merely solve math word problems
based on superficial patterns (Patel et al., 2021) or even due to training
data leakage (Golchin and Surdeanu, 2023) has never ceased. Apparent evidence
supports such concerns. Figure 1 shows an example case of GPT-3.5-turbo
performing multiple-step reasoning on the GSM8K dataset, where LLMs sometimes
make simple errors that humans would not Zhou et al. (2023b); Shi et al.
(2023). Simply due to the fact that GPT-3.5-turbo struggles with
distinguishing the directions of “leave” and “return”, resulting in the misuse
of an operator.

Figure 1: Comparing the answers of GPT-3.5-Turbo to a math word question and
its variation with additional constraints, the former answer is correct, while
the latter answer is incorrect (red) due to the misuse of operators.

Grade School Math Dataset | Parent Set | Size | Answer Format | Annotation | Robustness
---|---|---|---|---|---
ASDiv-A (Miao et al., 2020) | N/A | 2,305 | Equation-formed | Human (A.) | N/A
GSM8K (Cobbe et al., 2021) | N/A | 1,319 | Open-formed | Human (Q.,A.) | N/A
SVAMP (Patel et al., 2021) ✯ | ASDiv-A | 1,000 | Equation-formed | Human (Q.,A.) |  PP RR
MetaMathQA (Yu et al., 2023a) | GSM8K, MATH | 240K | Open-formed | GPT-3.5-Turbo |  RR
GSM-HARD (Gao et al., 2023) | GSM8K | 1,319 | Program-formed | Codex (Q.A.), Human (A.) |  II
GSM-IC (Shi et al., 2023) ✯ | GSM8K | 58,052 | Open-formed | Human (Q.) |  PP DD
GSM8k_robust (Chern et al., 2023) ✯ | GSM8K | 1,319 | Open-formed | GPT-4 |  NN
GSM-Plus (Our) ✯ | GSM8K | 10,552 | Open-formed | GPT4, Human (Q.,A.) |  NN DD II AA RR PP DD CC

Table 1: Overview of the grade school math datasets. ✯refers to datasets
specifically designed to evaluate the robustness of model performance.
Different colors represent different perturbation types: NN umerical
Substitution; DD igit Expansion; II integer-decimal-fraction Conversion; AA
dding Operation; RR eversing Operation; PP roblem Understanding; DD istractor
Insertion; CC ritical Thinking.

In response to these issues, we advocate for a more rigorous and adversarial
evaluation benchmark that can systematically study the math reasoning
capability of LLMs. Our benchmark revealed a gap of up to 20% between the
accuracy reported by the current model and the accuracy observed in our
setting, while human performance remains unaffected due to the unchanged
inherent difficulty level of the questions. In this work, we perturb the most
popularly used GSM8K dataset, yielding an adversarial dataset for grade school
math GSM-Plus. Motivated by the capability taxonomy for solving math problems
mentioned in Polya’s principles Polya (2004), we identify 5 perspectives to
guide the development of GSM-Plus: (1) numerical variation refers to altering
the numerical data or its types (e.g., from integer to decimal). (2)
arithmetic variation refers to reversing or introducing additional operations,
such as addition, subtraction, multiplication, and division, to math problems.
(3) problem understanding refers to rephrasing the text description of the
math problems. (4) distractor insertion refers to inserting topic-related but
useless sentences to the problems. (5) critical thinking focuses on question
or doubt ability when the question lacks necessary statements. Based on the
1,319 test questions from GSM8K, we create eight variations for each question,
the yielding GSM-Plus comprises 10,552 question variations. By testing LLMs
using each question and its eight variations, GSM-Plus can facilitate the
holistic evaluation of LLMs’ robustness in solving math word problems.

We use GSM-Plus to evaluate the robustness of 25 LLMs with different model
scales and task-specific fine-tuning, along with 4 popular prompting
techniques to obtain LLMs’ math reasoning results. Overall, we find that LLMs
can accurately solve the GSM8K questions while struggling with answering the
variations in GSM-Plus. Our detailed findings are in three folds:

  * •

Task-specific optimization, e.g., math SFT, usually gives better accuracy on
benchmarks, while the robustness depends more on the selection of the base
model and fine-tuning dataset (§5.1).

  * •

LLMs perform far less well when confronted with critical thinking, arithmetic
variation, and distractor insertion, but they are relatively resilient to
perturbations in numerical variation and problem understanding (§5.2).

  * •

All investigated prompting techniques show a lack of robustness, especially
for arithmetic variation and critical thinking. We further explore a
compositional prompting method by drawing on advancements in other domains,
which involves iteratively generating and verifying each reasoning thought,
and demonstrates good performance on both GSK8K and GSM-Plus (§5.4).

Based on the endeavors and results of this work, we urge further research on
LLMs in math domains to enhance not only their performance for math reasoning
but also their performance robustness.

##  2 Related Work

Seed Question: Each ice cube cools the coffee by 3 degrees and weakens it by 2
milliliters. How much weaker, in milliliters, is an iced coffee when cooled by
9 degrees?
---
Solution: Shannon’s iced coffee has 65 / 13 = 5 ice cubes in it. The ice makes
the coffee 5 * 12 = 60 milliliters weaker. After adding cream, Shannon’s iced
coffee is 60 + 15 = 75 milliliters weaker. Answer: 75
Perturbation Category |  Question Variation
Numerical Variation |  Num. Sub. |  3 → 1 2 → 5 9 →7
Digit Exp. |  3 → 30 2 → 14 9 →52
IDF Conv. |  3 → 3.5 2 → 12.3 9 →24.5
Arithmetic Variation |  Add. Op. |  Each ice cube $\ldots$ and weakens it by 2 milliliters. Any added liquid also weakens the coffee. Lisa adds 5 milliliters of cream to her coffee. How much weaker $\ldots$ 9 degrees?
Rev. Op. |  Each ice cube cools the coffee by certain degrees and weakens it by certain milliliters.  An iced coffee is weakened by 6 milliliters when cooled by 9 degrees. How much weaker in milliliters does each ice cube make the coffee?
Problem Understanding |  Each ice cube reduces the coffee’s temperature by 3 degrees and dilutes it by 2 milliliters. A coffee is chilled by 9 degrees. How many milliliters has the coffee been diluted?
Distractor Insertion |  Today is 22 degrees Celsius. Each ice $\ldots$ 9 degrees?
Critical Thinking |  Each ice cube cools the coffee and weakens it by 2 milliliters $\ldots$ 9 degrees?
Table 2: An example of question variations generated using 8 perturbations
from 5 perspectives based on a seed math question. Modifications are marked in
green.

Numerous datasets have been curated to assess the mathematical reasoning
abilities of AI systems. Early math datasets (Kushman et al., 2014; Ling et
al., 2017, i.a.) focused on basic math problems with equation-based solutions.
Subsequently, more difficult datasets have been introduced, spanning grade-
school level (Cobbe et al., 2021; Mishra et al., 2022), high-school level
(Hendrycks et al., 2021), and college-level datasets (Sawada et al., 2023;
Zheng et al., 2021). Amid this progress, there has been a surge in the
development of LLMs towards solving those math benchmarks (Ahn et al., 2024).
Despite the substantial difficulties posed by advanced-level math for LLMs,
recent LLMs has shown huge potential for solving grade school math (Touvron et
al., 2023a).

Supervised fine-tuning (SFT) is a line of work to effectively adapt language
models to mathematics domains (Luo et al., 2023; Azerbayev et al., 2023; Liang
et al., 2023; Gou et al., 2023, i.a.). MetaMath (Yu et al., 2023a) highlights
the efficacy of question bootstrapping, while MAmmoTH (Yue et al., 2023)
proved the benefits of training LLMs on various data sources and hybrid
rationales.

Another trend improves LLMs’ math capabilities by prompting with carefully
designed inputs (Yao et al., 2023; Yang et al., 2023; Zhou et al., 2023a,
i.a.). Chain-of-thought prompting guides models to generate natural language
reasoning steps before reaching the final answer (Wei et al., 2022; Kojima et
al., 2022). Program-of-thought prompting generates programs as the
intermediate steps and integrates external tools like a Python interpreter for
precise calculation (Gao et al., 2023; Chen et al., 2022). The promising
outcomes made by LLMs, especially in grade school math, motivate researchers
to study whether they can maintain high performance in realistic settings
(Bubeck et al., 2023).

In this work, we aim to develop a consolidated benchmark that systematically
examines the robustness of LLMs in solving math word problems. Recent work
concerns the robustness of math reasoning using different perturbations, such
as semantic substitution (Jin et al., 2020; Li et al., 2020; Wang et al.,
2023; Zhou et al., 2023b), reversal prediction (Berglund et al., 2023; Yu et
al., 2023a), and irrelevant context distraction (Shi et al., 2023; Li et al.,
2023). However, as shown in Table 1, most existing evaluation settings only
cover limited types of automatically constructed perturbations. In contrast,
we create eight variations of a single question by perturbing it with eight
different math reasoning skills. Using GSM-Plus, we conduct a systematic
evaluation of the LLM’s robustness across various reasoning types. For most
LLMs, GSM-Plus is a challenging benchmark, with GPT-3.5-Turbo reaching only
61.19% accuracy.

##  3 The GSM-Plus Dataset

To comprehensively evaluate the robustness of LLMs in utilizing math-related
skills, we build an adversarial dataset GSM-Plus using the GSM8K dataset as a
foundation. Inspired by Polya’s principles, we design eight types of
perturbations from five different perspectives to test the robustness of LLMs
in math reasoning, as depicted in Table 2.

###  3.1 Perturbation Categories

Numerical variation tests whether LLMs have been overfitted by altering the
numerical data and seeing the prediction behaviors. We define three
subcategories of numerical variation below:

  * •

Numerical Substitution: replaces numerical data with another number that has
the same number of digits, such as replacing “3” with “1”.

  * •

Digit Expansion: increases the number of digits in a number, such as replacing
“3” with “30”.

  * •

Integer-decimal-fraction Conversion: uses different representation types of
numbers instead of only integers, e.g., converting “9” into “24.5”.

Arithmetic variation focuses on the models’ flexibility in applying arithmetic
operations according to the question requirements. We define two subcategories
of arithmetic variation as below:

  * •

Adding Operation: increases seed question’s statements but restricts the
operations in addition, subtraction, multiplication, and division.

  * •

Reversing Operation: transforms a statement of the seed question into the
queried answer in the generated variation. For example, the statement “weakens
it by 2 milliliters” in the seed question is transformed into “How much weaker
in milliliters does each ice cube make the coffee?”.

Problem understanding rephrases the question to investigate the potential
impact of question-wording on the model’s understanding.

Distractor insertion introduces topic-related but useless sentences with
numbers to test models’ ability of statement evaluation.

Critical thinking requires that models can question or doubt during the
process of mathematical reasoning, rather than mindless sycophancy (Wei et
al., 2023a). This means that a model should explicitly specify this issue if
an essential statement is removed from the seed question.

Previous findings indicate that LLMs are typically robust to numerical
variation (Bubeck et al., 2023) and problem understanding (Zhou et al.,
2023b), but sensitive to distractor insertion (Wei et al., 2023b). Other
perturbations such as arithmetic variation and critical thinking remain
underexplored in math domains due to annotation difficulties, but all of them
are important for humans to solve problems. Our pilot experiments found that
models struggle to perform well on these perturbations. Our work offers a
comprehensive dataset and evaluation of the math reasoning robustness in fine-
grained eight perturbations.

###  3.2 Dataset Construction

In previous work (Norberg et al., 2023; Yu et al., 2023a), GPT-4 has been
exclusively used to construct variations. We initially utilize GPT-4’s
question-rewriting capabilities to generate question variations and then
prompt it to generate answer candidates for these variations. However, we
discover that GPT-4 is not always reliable: it may (i) fail to incorporate
perturbations into the variations, e.g., for “distractor insertion”, the
newly-added sentences affect the final answer, (ii) include additional changes
beyond the specified perturbations, (iii) generate invalid questions, (iv)
significantly increase questions’ difficulty, surpassing the grade school
level, or (v) generate incorrect answers.

To ensure data quality, all question variations and answers produced by GPT-4
are further refined by human annotators through a rigorous process. Annotators
are first required to annotate 24 variations as a qualifying exam to ensure
the accuracy of their annotation. To further control annotation quality, the
annotators are assigned workloads in batches, with each batch consisting of 50
seed questions. Prompt feedback is provided throughout the annotation process.
Specifically, 10% of the variations were cross-annotated by at least 3
annotators with a high inter-annotation consistency rate of 90.02%,
demonstrating the reliability of human revisions. Overall, human annotators
revised 18.85% of the variations produced by GPT-4, highlighting the
importance of human revision. Detailed statistics across perturbation types
are presented in Table B.2 of the Appendix. Details of human annotation can be
found in Appendix B.2.

l|ccccccc Model Foundation Math-SFT Output Format GSM8K GSM-Plus $\Delta$ PDR
(%) $\downarrow$ ASP (%) $\uparrow$
Human - - NL Rationale 96.77 98.75  -2.05 92.11
closed-source models
GPT-4 - Unknown NL Rationale 93.25 85.58 8.23 81.54
GPT-3.5-Turbo - Unknown NL Rationale 73.62 61.19 16.88 51.36
open-source foundation models (7-70B)
Mistral-7B‡ \- No NL Rationale 39.58 26.18 33.86 18.66
LLaMA-2-7B‡ \- No NL Rationale 13.42 8.12 39.49 3.97
CodeLlama-7B‡ LLaMA-2 No Program 25.32 15.05 40.56 10.00
LLaMA-2-13B‡ \- No NL Rationale 25.40 16.57 34.76 9.96
CodeLlama-13B‡ LLaMA-2 No Program 35.94 21.67 39.71 15.22
CodeLlama-34B‡ LLaMA-2 No Program 45.64 21.67 52.52 15.78
LLaMA-2-70B‡ \- No NL Rationale 56.71 40.04 29.40 32.31
open-source models in mathematics (7B)
MetaMath-Mistral Mistral MetaMathQA-395K NL Rationale 77.79 56.25 27.69 50.56
MetaMath LLaMA-2 MetaMathQA-395K NL Rationale 66.72 44.35 33.53 37.91
Abel LLaMA-2 Unreleased NL Rationale 59.51 37.09 37.67 29.64
ToRA LLaMA-2 TORA-CORPUS-16k Program+NL Rationale 67.48 43.60 35.39 37.89
MAmmoTH LLaMA-2 MathInstruct-260K Program 52.84 32.14 39.17 25.63
MAmmoTH-Coder CodeLLaMA MathInstruct-260K Program 59.89 38.73 35.33 32.02
SEGO CodeLLaMA GSM8K+MATH+AQuA Program 68.69 44.71 34.91 40.68
open-source models in mathematics (13B)
MetaMath LLaMA-2 MetaMathQA-395K NL Rationale 70.81 48.58 31.39 41.06
Abel LLaMA-2 Unreleased NL Rationale 66.72 45.39 31.97 37.45
ToRA LLaMA-2 TORA-CORPUS-16k Program+NL Rationale 71.80 47.88 33.31 42.43
MAmmoTH LLaMA-2 MathInstruct-260K Program 62.40 40.82 34.58 34.05
MAmmoTH-Coder CodeLLaMA MathInstruct-260K Program 64.90 43.97 32.25 36.93
SEGO CodeLLaMA GSM8K+MATH+AQuA Program 72.50 49.30 32.00 44.79
open-source models in mathematics (70B)
MetaMath LLaMA-2 MetaMathQA-395K NL Rationale 82.11 59.37 27.69 52.30
Abel LLaMA-2 Unreleased NL Rationale 83.85 59.94 28.52 55.31
MAmmoTH LLaMA-2 MathInstruct-260K Program 75.89 53.41 29.62 47.96

Table 3: Accuracy of current LLMs on GSM8K and GSM-Plus. Models marked with ‡
indicate their performance under an 8-shot setting. Math-SFT means whether the
model has been fine-tuned on any math reasoning datasets.

###  3.3 Evaluation Metrics

We adopt the performance drop rate (PDR) metric to measure the relative
performance decline on question variations compared to the performance on
initial questions.

$\displaystyle\textit{PDR}=1-\frac{\sum_{(x,y)\in\mathcal{D}_{a}}{\mathbb{I}[\textit{LM}(x),y]}/|\mathcal{D}_{a}|}{\sum_{(x,y)\in\mathcal{D}}{\mathbb{I}[\textit{LM}(x),y]}/|\mathcal{D}|},$
(1)

where $\mathcal{D}_{a}$ and $\mathcal{D}$ represent the GSM-Plus and GSM8K
datasets, respectively. Additionally, we measure the percentage of accurately
solved pairs (ASP), where the seed question $x$ and its variation $x^{\prime}$
are both correctly answered by a specific LLM.

$\displaystyle\textit{ASP}=\frac{\sum_{x,y;x^{\prime},y^{\prime}}{\mathbb{I}[\textit{LM}(x),y]\cdot\mathbb{I}[\textit{LM}(x^{\prime}),y^{\prime}]}}{N\cdot|\mathcal{D}|},$
(2)

Each $(x,y)$ sample in $\mathcal{D}$ has $N$ sample pairs
$(x,y;x^{\prime},y^{\prime})$ across $N$ perturbations.

##  4 Experimental Setup

We compare the accuracy of representative LLMs on the GSM8K and GSM-Plus
datasets, and use the PRD and ASP metrics to evaluate the robustness in
diverse math reasoning.

We consider closed-source foundation models, i.e., GPT-4 (OpenAI, 2023) and
GPT-3.5-Turbo (OpenAI, 2022), open-source foundation models, i.e., Mistral
(Jiang et al., 2023), LLaMA-2 (Touvron et al., 2023b), and CodeLlama (Roziere
et al., 2023), as well as open-source SFT models specifically designed for
math reasoning, i.e., MetaMath (Yu et al., 2023a), Abel (Chern et al., 2023),
ToRA (Gou et al., 2023), MAmmoTH (Yue et al., 2023), and SEGO (Zhao et al.,
2023). The decoding temperature is set to 0 for deterministic predictions.
Open-source base models are inferred using 8 demonstrations. Our results on
the GSM8K of the listed LLMs match their previously reported accuracy. We also
establish a human performance baseline by engaging qualified human annotators
who have successfully passed a qualification exam. All annotators possess at
least a bachelor’s degree. Further details can be found in Appendix C.1.

##  5 Experiments

###  5.1 Overall Results on GSM-Plus

We first evaluate whether LLMs achieve similar performance on GSM8K and GSM-
Plus. Results are shown in Table 3.2. We observe a substantial decline in
performance on all investigated LLMs. The ASP of all models is notably lower
than their accuracy on the GSM8K dataset. GPT-4 exhibits the highest level of
robustness with the smallest PDR of 8.23%. CodeLlama shows the largest PDR
(40.56%, 39.71%, and 52.52% for 7B, 13B, and 34B), exceeding its foundation
model LLaMA-2-7B (39.49%) and math SFT models fine-tuned on it, e.g., SEGO-7B
(34.91%). The limited robustness of program-only LLMs suggests the necessity
of natural language guidance and task-specific fine-tuning for robust math
reasoning. We make some detailed comparisons of the LLMs in the following.

#### Math SFT models vs. foundation models.

While the math fine-tuning models achieve better performance on both GSM8K and
GSM-Plus compared to their foundation models, the PDR of these SFT models is
not significantly smaller than that of their foundation models. For instance,
the PDR of LLaMa-2-13B and LLaMa-2-70B is 34.76% and 29.40%, respectively,
whereas the PDR of the subsequent SFT models, Abel-13B and MAmmoTH-70B, is
31.97% and 29.62%, showing the math SFT process may be hard to improve the
model’s math problem-solving robustness.

#### Comparisons between Math SFT model.

Among Math SFT models, larger models generally display lower PDR than smaller
models. For instance, the PDR of Abel-7B, Abel-13B, and Abel-70B stand at
37.67%, 31.97%, and 28.52%, respectively. Notably, good foundation models are
helpful in both the accuracy and robustness of the subsequent math SFT models.
MetaMath-Mistral-7B (SFT on Misral-7B with its PDR 33.86%) presents notable
stability (with a PDR of 27.69%) than other math SFT models of similar or
larger sizes, such as MetaMath-7B (SFT on LLaMa-2-13B with its PDR 34.76% )
with a PDR of 33.53%. Similarly, MAmmoTH-Coder-13B (SFT on CodeLLaMA-13B with
its PDR 41.24%) demonstrates lower accuracy drops compared to MAmmoTH-13B (SFT
on LLaMA-2-13B with its PDR 34.76%) (32.25% vs. 34.58%).

#### Effectiveness of SFT datasets.

Among SFT models from the same foundation model, there are noticeable gaps in
their performance stability. For example, after LLaMA-2-7B finetuned on
MetaMathQA, Abel-data, TORA-CORPUS, and MathInstruct datasets, the PDRs are
33.53%, 37.67%, 35.39%, and 39.17% respectively. This shows the critical
impact of SFT datasets.

Figure 2: The PDR distribution across 8 perturbation types. The bars below the
line indicate an increase in performance for the corresponding perturbation
compared to the performance on GSM8K. Figure 3: The reasoning transferability
of LLMs between the question pairs of GSM8K and GSM-Plus. The purple (both
correct) and blue (both wrong) bars represent consistent model behavior, while
the red (GSM8K correct&GSM-Plus wrong) and yellow (GSK8K wrong&GSM-Plus
correct) bars represent the inconsistent model behavior. The heights of the
purple and red bars indicate the number of correctly solved GSM8K questions.

###  5.2 Performance of LLMs across Diverse Question Variations

Next, we evaluate the models’ performance stability across eight question
variations (Figure 2). Detailed performance drops and specific cases are
provided in Figure 6 and Table C.3 in the Appendix. All models demonstrate
inferior robustness compared to humans in critical thinking (purple), addition
operation and reversing operation from arithmetic variation (blue), distractor
insertion (pink), and integer-decimal-fraction conversion (orange). For
numerical substitution and problem understanding, models maintain their
performance and even show slight improvements. Program-based models (e.g.
MAmmoTH-Coder-13B with a PDR of 11.80%) exhibit greater robustness in
numerical variation than natural-language-based models (e.g. Abel-13B with a
PDR of 14.03%). Whereas for non-numerical variations, e.g., distractor
insertion, NL-based models are more stable, the PDR values of the two models
are 23.2% and 16.1%. Detailed analysis of each variation is provided below.

#### Critical thinking.

Except for humans and closed-source models, the performance of other models
notably deteriorates (nearly 100% as shown in Figure 6) when an essential
statement is removed from the problems. In such cases, they may generate a
hallucinated solution instead of acknowledging the absence of the required
information.

#### Arithmetic variation.

For questions with an increased number of statements (adding operation),
models exhibit limited capacity. Except GPT-4 and GPT-3.5-Turbo, most models,
regardless of size and output format, experience an accuracy drop exceeding
40%. Despite the importance of flexible reasoning from different perspectives,
all models exhibit notable PDR values when reversing the statements of the
questions (reversing operation). This finding aligns with the observations of
Deb et al. (2023) that model performance significantly deteriorates when
engaging in backward reasoning.

#### Distractor insertion.

Larger models exhibit a greater capacity to resist disturbances, e.g.,
Abel-70B has a lower PDR value than GPT-3.5-Turbo. Program-based models tend
to be sensitive when inserting distractors. For example, MammoTH-13B (40.6%)
and SEGO-13B (43.9%) have higher PDRs than NL-based models MetaMath-13B
(39.4%) and Abel-13B (31.8%).

#### Numerical variations.

The model’s performance shows minimal fluctuations for general numerical
substitution and digit expansion. LLaMA-2-13B even exhibits a slight
improvement (2.1%) on numerical substitution. In contrast, even for program-
based models, integer-decimal-fraction conversions lead to a significant
decline.

#### Problem understanding.

Most LLMs show robust performances when answering rephrased questions by
GPT-4, which is somewhat surprising as models are typically sensitive to
question wording.

###  5.3 Mathematical Reasoning Transferability

Previous sections have presented the results obtained from the complete sets
of GSM8K and GSM-Plus. Here, we partition the entire set based on whether the
questions are answered correctly or not. This division allows us to study
whether a seed question from GSM8K, when successfully solved by an LLM,
increases the likelihood of correctly answering its variations in GSM-Plus,
and vice versa (high ASP value). If this assertion holds, we can say that LLMs
exhibit robust performance on this specific subset of math problems, even if
not across the entire dataset. In our setup, each GSM8K question and its
variations in GSM-Plus are transformed into eight pairs. The distribution of
each partition set is presented in Figure 3.

Among the 6 right-most mathematical models, Abel-70B stands out with the
highest ASP value (55.31%), even surpassing the ASP for GPT-3.5-Turbo
(51.36%). The existence of the red bars, where the seed question is solved
correctly but its variations are not, indicates the limited transferability of
most models. While the performance on seed questions varies (heights of purple
and red bars), their performance transferability shows a similar level (height
of red bars). This implies the inadequacy of existing benchmarks for
accurately assessing the true ability of models in math reasoning. High
accuracy alone does not necessarily indicate strong reasoning robustness.

Notably, a small proportion of seed questions are not solved, but their
variations are correctly answered (yellow bars). This further implies that a
model’s incapacity to reason mathematically on some samples not always be
implied by failures in those samples. A holistic evaluation is valuable for
assessing the nuanced performance of the models.

Figure 4: The accuracy of LLMs across various question variations and GSM8K
questions differs based on the prompting techniques used. Complexity-based CoT
and LtM use 8 and 1 in-context examples, respectively.

###  5.4 Prompting to Enhance the Robustness of LLMs for Math Word Problems?

As reviewed in Section 2, various prompting methods that require LLMs to
generate their explicit reasoning steps have demonstrated improvement for math
reasoning, such as Chain-of-thought prompting, i.e., CoT (Wei et al., 2022;
Kojima et al., 2022), and Program-of-Thought Prompting, i.e., PoT (Gao et al.,
2023; Chen et al., 2022). Similarly, Least-to-most prompting (LtM (Zhou et
al., 2022)) simplifies the problem-solving process by breaking down a complex
problem into a series of subproblems. Besides, complexity-based CoT (Fu et
al., 2022) uses examples with a greater number of steps as in-context
demonstrations and enhances LLMs’ reasoning capability. The above progress
motivates us to investigate whether employing a prompting method can help LLM
attain comparable performance on both seed questions from GSM8K and their
eight variations from GSM-Plus.

#### Which prompts are more robust?

We select four representative LLMs: GPT-4 and GPT-3.5-Turbo as the highest-
performing instruction-tuned models, LLaMA-2-70B as the best open-source
general model, and MAmmoTH-70B as an SFT-model fine-tuned on LLaMA-2-70B. Then
we randomly select a subset of 120 seed questions and 960 variations to
evaluate the performance of different prompting methods when applied to these
LLMs. Results are shown in Figure 4. Overall, complexity-based CoT shows
superior performance for GPT-4, GPT-3.5-Turbo, and LLaMA-2-70B, while PoT
exhibits the least effectiveness across all question variations. CoT and LtM
exhibit similar patterns, excelling in variations such as problem
understanding and numerical substitution, but performing poorly on distractor
insertion and adding operation. For MAmmoTH, the performance of the four
prompts is similar due to the task-specific training. None of the studied
prompting techniques are sufficiently robust to attain consistent performance
across all variations comparable to the performance on GSM8K.

Figure 5: Illustration of a compositional prompting method that alternates
between generating a subgoal and performing the corresponding calculation.

#### Compositional Prompting.

Based on the results in Figure 4, we want to explore how to enhance robustness
based on existing prompting methods. We find that LLMs often overlook steps or
make errors in the middle stages of the solution. For the first issue, a
straightforward strategy is to prompt LLMs to iteratively decompose complex
problems, as demonstrated in multi-hop-QA (Khot et al., 2022). To address the
second issue, we attempt to have LLMs provide feedback for each iteration of
their generation, which has proven effective across multiple domains (Madaan
et al., 2023; Yu et al., 2023b). Given these observations, we try to study
whether methods from other domains can be beneficial for math reasoning, and
explore a compositional prompting method Comp, as shown in Figure 5.

Specifically, the LLM is first prompted to extract essential premises,
particularly those related to numbers, as auxiliary contexts (Prompt1). Based
on the question and the premises, LLM is iteratively instructed to generate a
goal (Prompt2) and calculate the goal (Prompt3) for each reasoning thought.
For each thought, its goal and calculation and query the LLM to determine if
the desired answer is obtained (Prompt4). If not, we will proceed with
generating the next thought. The full prompts are listed in Appendix C.4.

l|c|c|c|c|c Method GSM8K GSM-Plus Num. Var Arith. Var. Crit. Thinking
CoT 74.17 62.92 70.33 57.08 40.83
LtM ‡ 74.17 62.60 71.67 54.58 39.17
Comp 76.67 65.52 70.83 58.34 54.17
CoT \+ SC 76.67 66.88 75.83 62.50 40.00
Comp \+ SC 80.00 69.47 76.64 66.25 55.83

Table 4: Performance of GPT-3.5-Turbo with different prompting techniques. The
CoT \+ SC method aggregates each answer by sampling 5 predictions.

As shown in Table 5.4, Comp improves the model’s performance across various
variation types by iterative generation and verification. Compared to LtM,
Comp exhibits a notable improvement of 3.4% on GSM8K and 4.7% on GSM-Plus.
Since self-consistency (SC) technique (Wang et al., 2022) can further boost
performance with majority voting, we implement an ensemble-based approach Comp
\+ SC, which marginalizes over intermediate thoughts that produce the same
subgoal and calculation. When compared to the ensemble-based CoT, i.e., CoT \+
SC, Comp \+ SC shows remarkable improvements with compositional prompting. See
Appendix C.7 and Appendix C.8 for accuracy on eight perturbations and model
predictions.

Although compositional prompting improves performance on seed questions and
their variations, it does not bridge the performance gap of LLMs between the
standard benchmark and the adversarial benchmark. Greater dedication should be
given to the development of robust models.

##  6 Conclusions and Discussions

In this work, we introduce GSM-Plus, a benchmark designed to systematically
analyze the robustness of LLMs in solving math word problems. We examine a
variety of perturbation types to evaluate the performance stability of LLMs in
understanding and utilizing math-related knowledge, Our evaluation of 25
prominent models found that compared to their performance on the standard
benchmark, significant declines are observed in performance when perturbations
are introduced in math questions that were successfully solved.

This disparity set a clear direction for future research: (1) the systematic
evaluation of models across diverse math-related skills; (2) the development
of models capable of consistently and flexibly performing math reasoning while
remaining resilient to minor variations. Although compositional prompting can
enhance the performance of LLMs, its impact is limited in terms of both
performance and robustness. It is crucial to acknowledge that most LLMs,
particularly for open-source models, still fall significantly short of human
performance, particularly in math domains where even small errors can lead to
task failure. Overall, GSM-Plus aims to facilitate detailed evaluation and
understanding of LLMs on math reasoning. Dataset and evaluation suits will be
released.

## Limitations

The limitations of our work are as follows.

  * •

In this work, we mainly focus on the robustness of math reasoning at the
elementary school level, given the promising results achieved by various LLMs,
including open-sourced models. Evaluating the robustness of math reasoning at
other levels of education is left as future work.

  * •

To assess robustness, we compare the answer accuracy of models on both GSM8K
and GSM-Plus, along with the utilization of two customized metrics. However,
we do not investigate the accuracy of solution chains due to the challenges in
designing a reliable metric for this purpose.

  * •

GSM-Plus focuses on evaluating the robustness of LLMs in solving math word
problems under various perturbations but does not investigate the underlying
reasons behind the failures of solving problems.

## Ethics Statement

We honor the Code of Ethics. No private data or non-public information is used
in this work.

## References

  * Ahn et al. (2024) Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. 2024.  Large language models for mathematical reasoning: Progresses and challenges.  _arXiv preprint arXiv:2402.00157_.
  * Azerbayev et al. (2023) Zhangir Azerbayev, Hailey Schoelkopf, Keiran Paster, Marco Dos Santos, Stephen McAleer, Albert Q Jiang, Jia Deng, Stella Biderman, and Sean Welleck. 2023.  Llemma: An open language model for mathematics.  _arXiv preprint arXiv:2310.10631_.
  * Baroody (1987) Arthur J Baroody. 1987.  _Children’s mathematical thinking: A developmental framework for preschool, primary, and special education teachers._ Teachers College Press.
  * Berglund et al. (2023) Lukas Berglund, Meg Tong, Max Kaufmann, Mikita Balesni, Asa Cooper Stickland, Tomasz Korbak, and Owain Evans. 2023.  The reversal curse: Llms trained on" a is b" fail to learn" b is a".  _arXiv preprint arXiv:2309.12288_.
  * Brown et al. (2020) Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. 2020.  Language models are few-shot learners.  _Advances in neural information processing systems_ , 33:1877–1901.
  * Bubeck et al. (2023) Sébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al. 2023.  Sparks of artificial general intelligence: Early experiments with gpt-4.  _arXiv preprint arXiv:2303.12712_.
  * Carpenter et al. (1989) Thomas P Carpenter, Elizabeth Fennema, Penelope L Peterson, Chi-Pang Chiang, and Megan Loef. 1989.  Using knowledge of children’s mathematics thinking in classroom teaching: An experimental study.  _American educational research journal_ , 26(4):499–531.
  * Chen et al. (2022) Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W Cohen. 2022.  Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks.  _arXiv preprint arXiv:2211.12588_.
  * Chen et al. (2023) Wenhu Chen, Ming Yin, Max Ku, Pan Lu, Yixin Wan, Xueguang Ma, Jianyu Xu, Xinyi Wang, and Tony Xia. 2023.  Theoremqa: A theorem-driven question answering dataset.  _arXiv preprint arXiv:2305.12524_.
  * Chern et al. (2023) Ethan Chern, Haoyang Zou, Xuefeng Li, Jiewen Hu, Kehua Feng, Junlong Li, and Pengfei Liu. 2023.  Generative ai for math: Abel.  https://github.com/GAIR-NLP/abel.
  * Cobbe et al. (2021) Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, et al. 2021.  Training verifiers to solve math word problems.  _arXiv preprint arXiv:2110.14168_.
  * Deb et al. (2023) Aniruddha Deb, Neeva Oza, Sarthak Singla, Dinesh Khandelwal, Dinesh Garg, and Parag Singla. 2023.  Fill in the blank: Exploring and enhancing llm capabilities for backward reasoning in math word problems.  _arXiv preprint arXiv:2310.01991_.
  * Fu et al. (2022) Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, and Tushar Khot. 2022.  Complexity-based prompting for multi-step reasoning.  _arXiv preprint arXiv:2210.00720_.
  * Gao et al. (2023) Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. 2023.  Pal: Program-aided language models.  In _International Conference on Machine Learning_ , pages 10764–10799.
  * Golchin and Surdeanu (2023) Shahriar Golchin and Mihai Surdeanu. 2023.  Time travel in llms: Tracing data contamination in large language models.  _arXiv preprint arXiv:2308.08493_.
  * Gou et al. (2023) Zhibin Gou, Zhihong Shao, Yeyun Gong, Yujiu Yang, Minlie Huang, Nan Duan, Weizhu Chen, et al. 2023.  Tora: A tool-integrated reasoning agent for mathematical problem solving.  _arXiv preprint arXiv:2309.17452_.
  * Hendrycks et al. (2021) Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. 2021.  Measuring mathematical problem solving with the math dataset.  In _Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2)_.
  * Jiang et al. (2023) Albert Q Jiang, Alexandre Sablayrolles, Arthur Mensch, Chris Bamford, Devendra Singh Chaplot, Diego de las Casas, Florian Bressand, Gianna Lengyel, Guillaume Lample, Lucile Saulnier, et al. 2023.  Mistral 7b.  _arXiv preprint arXiv:2310.06825_.
  * Jin et al. (2020) Di Jin, Zhijing Jin, Joey Tianyi Zhou, and Peter Szolovits. 2020.  Is bert really robust? a strong baseline for natural language attack on text classification and entailment.  In _Proceedings of the AAAI conference on artificial intelligence_ , volume 34, pages 8018–8025.
  * Khot et al. (2022) Tushar Khot, Harsh Trivedi, Matthew Finlayson, Yao Fu, Kyle Richardson, Peter Clark, and Ashish Sabharwal. 2022.  Decomposed prompting: A modular approach for solving complex tasks.  In _The Eleventh International Conference on Learning Representations_.
  * Kojima et al. (2022) Takeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo, and Yusuke Iwasawa. 2022.  Large language models are zero-shot reasoners.  _Advances in neural information processing systems_ , 35:22199–22213.
  * Kushman et al. (2014) Nate Kushman, Yoav Artzi, Luke Zettlemoyer, and Regina Barzilay. 2014.  Learning to automatically solve algebra word problems.  In _Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 271–281.
  * Lake et al. (2017) Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. 2017.  Building machines that learn and think like people.  _Behavioral and brain sciences_ , 40:e253.
  * Li et al. (2020) Linyang Li, Ruotian Ma, Qipeng Guo, Xiangyang Xue, and Xipeng Qiu. 2020.  Bert-attack: Adversarial attack against bert using bert.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 6193–6202.
  * Li et al. (2023) Zekun Li, Baolin Peng, Pengcheng He, and Xifeng Yan. 2023.  Do you really follow me? adversarial instructions for evaluating the robustness of large language models.  _arXiv preprint arXiv:2308.10819_.
  * Liang et al. (2023) Zhenwen Liang, Dian Yu, Xiaoman Pan, Wenlin Yao, Qingkai Zeng, Xiangliang Zhang, and Dong Yu. 2023.  Mint: Boosting generalization in mathematical reasoning via multi-view fine-tuning.  _arXiv preprint arXiv:2307.07951_.
  * Ling et al. (2017) Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. 2017.  Program induction by rationale generation: Learning to solve and explain algebraic word problems.  In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, ACL_ , pages 158–167.
  * Luo et al. (2023) Haipeng Luo, Qingfeng Sun, Can Xu, Pu Zhao, Jianguang Lou, Chongyang Tao, Xiubo Geng, Qingwei Lin, Shifeng Chen, and Dongmei Zhang. 2023.  Wizardmath: Empowering mathematical reasoning for large language models via reinforced evol-instruct.  _arXiv preprint arXiv:2308.09583_.
  * Madaan et al. (2023) Aman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al. 2023.  Self-refine: Iterative refinement with self-feedback.  _arXiv preprint arXiv:2303.17651_.
  * Miao et al. (2020) Shen-Yun Miao, Chao-Chun Liang, and Keh-Yih Su. 2020.  A diverse corpus for evaluating and developing english math word problem solvers.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 975–984.
  * Mishra et al. (2022) Swaroop Mishra, Arindam Mitra, Neeraj Varshney, Bhavdeep Sachdeva, Peter Clark, Chitta Baral, and Ashwin Kalyan. 2022.  Numglue: A suite of fundamental yet challenging mathematical reasoning tasks.  In _Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_ , pages 3505–3523.
  * Norberg et al. (2023) Kole Norberg, Husni Almoubayyed, Stephen E Fancsali, Logan De Ley, Kyle Weldon, April Murphy, and Steven Ritter. 2023.  Rewriting math word problems with large language models.  In _Proceedings of the Workshop on Empowering Education with LLMs-the Next-Gen Interface and Content Generation 2023 co-located with 24th International Conference on Artificial Intelligence in Education (AIED 2023), Tokyo, Japan_ , volume 3487, pages 163–172.
  * OpenAI (2022) OpenAI. 2022.  Gpt-3.5-turbo.
  * OpenAI (2023) OpenAI. 2023.  GPT-4 technical report.  _CoRR_ , abs/2303.08774.
  * Patel et al. (2021) Arkil Patel, Satwik Bhattamishra, and Navin Goyal. 2021.  Are nlp models really able to solve simple math word problems?  In _Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies_ , pages 2080–2094.
  * Polya (2004) George Polya. 2004.  _How to solve it: A new aspect of mathematical method_ , volume 85.  Princeton university press.
  * Roziere et al. (2023) Baptiste Roziere, Jonas Gehring, Fabian Gloeckle, Sten Sootla, Itai Gat, Xiaoqing Ellen Tan, Yossi Adi, Jingyu Liu, Tal Remez, Jérémy Rapin, et al. 2023.  Code llama: Open foundation models for code.  _arXiv preprint arXiv:2308.12950_.
  * Sawada et al. (2023) Tomohiro Sawada, Daniel Paleka, Alexander Havrilla, Pranav Tadepalli, Paula Vidas, Alexander Kranias, John J Nay, Kshitij Gupta, and Aran Komatsuzaki. 2023.  Arb: Advanced reasoning benchmark for large language models.  _arXiv preprint arXiv:2307.13692_.
  * Shi et al. (2023) Freda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales, David Dohan, Ed H Chi, Nathanael Schärli, and Denny Zhou. 2023.  Large language models can be easily distracted by irrelevant context.  In _International Conference on Machine Learning_ , pages 31210–31227. PMLR.
  * Touvron et al. (2023a) Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. 2023a.  Llama: Open and efficient foundation language models.  _arXiv preprint arXiv:2302.13971_.
  * Touvron et al. (2023b) Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. 2023b.  Llama 2: Open foundation and fine-tuned chat models.  _arXiv preprint arXiv:2307.09288_.
  * Verschaffel et al. (1999) Lieven Verschaffel, Erik De Corte, Sabien Lasure, Griet Van Vaerenbergh, Hedwig Bogaerts, and Elie Ratinckx. 1999.  Learning to solve mathematical application problems: A design experiment with fifth graders.  _Mathematical thinking and learning_ , 1(3):195–229.
  * Wang et al. (2023) Haoyu Wang, Guozheng Ma, Cong Yu, Ning Gui, Linrui Zhang, Zhiqi Huang, Suwei Ma, Yongzhe Chang, Sen Zhang, Li Shen, et al. 2023.  Are large language models really robust to word-level perturbations?  _arXiv preprint arXiv:2309.11166_.
  * Wang et al. (2022) Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. 2022.  Self-consistency improves chain of thought reasoning in language models.  In _The Eleventh International Conference on Learning Representations_.
  * Wei et al. (2022) Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. 2022.  Chain-of-thought prompting elicits reasoning in large language models.  _Advances in Neural Information Processing Systems_ , 35:24824–24837.
  * Wei et al. (2023a) Jerry Wei, Da Huang, Yifeng Lu, Denny Zhou, and Quoc V Le. 2023a.  Simple synthetic data reduces sycophancy in large language models.  _arXiv preprint arXiv:2308.03958_.
  * Wei et al. (2023b) Tianwen Wei, Jian Luan, Wei Liu, Shuang Dong, and Bin Wang. 2023b.  Cmath: can your language model pass chinese elementary school math test?  _arXiv preprint arXiv:2306.16636_.
  * Yang et al. (2023) Sen Yang, Xin Li, Leyang Cui, Lidong Bing, and Wai Lam. 2023.  Neuro-symbolic integration brings causal and reliable reasoning proofs.
  * Yao et al. (2023) Shunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran, Thomas L Griffiths, Yuan Cao, and Karthik Narasimhan. 2023.  Tree of thoughts: Deliberate problem solving with large language models.  _arXiv preprint arXiv:2305.10601_.
  * Yu et al. (2023a) Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. 2023a.  Metamath: Bootstrap your own mathematical questions for large language models.  _arXiv preprint arXiv:2309.12284_.
  * Yu et al. (2023b) Wenhao Yu, Nimrod Gileadi, Chuyuan Fu, Sean Kirmani, Kuang-Huei Lee, Montse Gonzalez Arenas, Hao-Tien Lewis Chiang, Tom Erez, Leonard Hasenclever, Jan Humplik, et al. 2023b.  Language to rewards for robotic skill synthesis.  _arXiv preprint arXiv:2306.08647_.
  * Yue et al. (2023) Xiang Yue, Xingwei Qu, Ge Zhang, Yao Fu, Wenhao Huang, Huan Sun, Yu Su, and Wenhu Chen. 2023.  Mammoth: Building math generalist models through hybrid instruction tuning.  _arXiv preprint arXiv:2309.05653_.
  * Zhao et al. (2023) Xueliang Zhao, Xinting Huang, Wei Bi, and Lingpeng Kong. 2023.  Sego: Sequential subgoal optimization for mathematical problem-solving.  _arXiv preprint arXiv:2310.12960_.
  * Zheng et al. (2021) Kunhao Zheng, Jesse Michael Han, and Stanislas Polu. 2021.  minif2f: a cross-system benchmark for formal olympiad-level mathematics.  In _International Conference on Learning Representations_.
  * Zhou et al. (2023a) Aojun Zhou, Ke Wang, Zimu Lu, Weikang Shi, Sichun Luo, Zipeng Qin, Shaoqing Lu, Anya Jia, Linqi Song, Mingjie Zhan, et al. 2023a.  Solving challenging math word problems using gpt-4 code interpreter with code-based self-verification.  _arXiv preprint arXiv:2308.07921_.
  * Zhou et al. (2022) Denny Zhou, Nathanael Schärli, Le Hou, Jason Wei, Nathan Scales, Xuezhi Wang, Dale Schuurmans, Claire Cui, Olivier Bousquet, Quoc Le, et al. 2022.  Least-to-most prompting enables complex reasoning in large language models.  _arXiv preprint arXiv:2205.10625_.
  * Zhou et al. (2023b) Zihao Zhou, Qiufeng Wang, Mingyu Jin, Jie Yao, Jianan Ye, Wei Liu, Wei Wang, Xiaowei Huang, and Kaizhu Huang. 2023b.  Mathattack: Attacking large language models towards math solving ability.  _arXiv preprint arXiv:2309.01686_.

Perturbation |  Description
---|---
Numerical Substitution |  It involves changing some numerical data while minimizing alterations to the textual aspects, ensuring the question’s validity remains intact.
Digit Expansion |  It refers to the process of increasing the number of digits of some numerical values while minimizing alterations to the textual aspects, ensuring the question’s validity remains intact.
Integer-decimal-fraction Conversion |  It refers to the process of converting some integer numbers into decimal or fractional representations while trying to keep the textual aspects unchanged, ensuring that the validity of the question is maintained.
Adding Operation |  It involves adding extra statements to the original problems, thereby increasing the number of reasoning steps or operations required to solve the rewritten question. The allowed operations are limited to addition, subtraction, multiplication, and division.
Reversing Operation |  It refers to converting the required answer of the original question into a known condition and transforming one known variable into the newly desired answer while avoiding the introduction of additional constraints. As a result, the rewritten question yields a distinct required answer compared to the original solution.
Problem Understanding |  It refers to transforming the original problem into a new problem that uses different wording or different sentence structures but does not change the solution of the original problem.
Distractor Insertion |  involves introducing distracting conditions that have no impact on the final answer. These introduced conditions should be relevant to the topic of the original question and preferably include numerical values. However, the rewritten problem must maintain an identical solution to that of the original problem.
Critical Thinking |  refers to eliminating a condition from the original question that is crucial for solving it while keeping the rest of the content unchanged. The rewritten problem should no longer have a valid answer, as it lacks the constraint that was removed.
Table 5: Definitions of eight perturbation categories in GSM-Plus for
robustness evaluation.

##  Appendix A Perturbation Types

Mathematical problem-solving is a complex cognitive process that humans have
developed (Baroody, 1987; Verschaffel et al., 1999, i.a.). Polya’s principles
Polya (2004) suggest that humans solve mathematical problems generally in four
stages: (1) identifying variables and relevant context, (2) representing the
problem’s structure and discovering a potential pattern, (3) calculating an
answer, and (4) verifying the correctness, which are widely used in
mathematics education (Baroody, 1987; Carpenter et al., 1989; Verschaffel et
al., 1999, i.a.).

Motivated by Polya’s principles, we design eight perturbation types for
testing LLM’s mathematical reasoning capabilities. The definition of shown in
Table 5.

##  Appendix B Dataset Construction

###  B.1 Generating Initial Variations with GPT-4

#### Prompt for Generating Question Variations

When provided with a specified perturbation and a seed question-answer pair,
GPT-4 is directed to generate a question variation based on the given
perturbation description.

Example B.1: Generating Question Variation You are a helpful assistant and
good at following instructions. Your objective is to rewrite a given math
question using the specified perturbation strategy ({Perturbation Name}). The
rewritten question should be reasonable, understandable, and able to be
responded to by humans. Perturbation strategy: {Perturbation Description} The
given question: {The Seed Question} Answer of the given question: {Answer
Rationale} Please rewrite the question using the specified perturbation
strategies while minimizing edits to avoid significant deviation in the
question content. It is important to ensure that the rewritten question has
only one required numerical answer. The rewritten question:

#### Prompt for Generating Answers of Question Variations

Then GPT-4 is required to answer the question variation generated by itself.

Example B.2: Generating Answers Your task is to solve a series of math word
problems by providing the final answer. Use the format #### [value] to
highlight your answer. For example, if the answer is 560, you should write
#### 560. Make sure to carefully read and understand each problem before
providing your answer. {A Question Variant}

###  B.2 Human Annotation

Before participating in the evaluation of question variations and answers
generated by GPT-4, evaluators are required to complete a qualifying exam:

  1. 1.

They are first pre-screened with a qualification study, which involves reading
an evaluation guideline and annotating 24 variations for 3 GSM8K questions.

  2. 2.

We individually review the submitted evaluations from the qualification study
and provide feedback to clarify any misconceptions about the task.

  3. 3.

Evaluators who performed well on the qualification study and demonstrated a
thorough understanding of the evaluation guidelines are selected to
participate in the main round evaluation.

Ultimately, we selected 5 evaluators with at least bachelor’s degrees to
participate in dataset quality evaluation. Throughout the whole process, the
annotators are assigned workloads in batches with the batch size being 50 seed
questions. For every batch, two seed questions are chosen at random, and the
authors verify the annotations for question variations and their corresponding
answers using a side-by-side annotation approach. We maintain constant
communication with evaluators to answer any questions.

Qualified human evaluators are involved to ensure that the questions generated
by GPT-4 are free from the errors specified in §3.2. If there are any errors
in the question variations generated by GPT-4, the annotators will compose a
qualified one with minimal modifications. They then proceed to verify the
correctness and format of GPT-4’s answers.

Taking into consideration the experiment costs, we randomly selected 1000
question variations, ensuring that each question was evaluated by at least 3
annotators. For question variations that are assessed by multiple evaluators,
the authors manually review the rewrites in instances of evaluator
disagreement. The inter-annotator agreements (IAA) measured by Krippendorff’s
$\alpha$ show a relatively reliable value of 0.567.

l|p0.18|l Category Subcategory Pass Rate
Numerical Variation Numerical Substitution 91.51
Digit Expansion 92.60
Integer-decimal-fraction Conversion 84.24
Arithmetic Reasoning Adding Operation 75.75
Reversing Operation 29.76
Problem Understanding  97.49
Distractor Insertion  88.25
Critical Thinking  87.77

Table 6: The pass rate of human annotators for the question variations
generated by GPT4.

#### Effectiveness of GPT-4 Rewriting

Table B.2 presents the percentages of questions generated by GPT-4 that
satisfy all criteria. GPT-4 excels in generating question variations involving
numerical substitution, digit expansion, and problem understanding with high
pass rates. For “reversing operation” perturbation, human involvement is
necessary to ensure variation validity. As the generation of question
variations relies on the question rewriting capabilities of GPT-4, it is
important to note that this process is not directly related to its math
reasoning abilities. During manual checking, we found that generating
qualified variations does not necessarily guarantee correct answers.

##  Appendix C Experiments

lc|ccc|ccc Model GSM8K GSM-Plus8 $\Delta$ PDR (%)8 $\downarrow$ ASP (%)8
$\uparrow$ GSM-Plus7 $\Delta$ PDR (%)7 $\downarrow$ ASP (%)7 $\uparrow$
Human 96.77 98.75  -2.05 92.11 97.65 -0.91 92.11
closed-source models
GPT-4 93.25 85.58 8.23 81.54 88.16 5.46 84.12
GPT-3.5-Turbo 73.62 61.19 16.88 51.36 63.18 14.18 53.60
open-source general models (7-70B)
Mistral-7B‡ 39.58 26.18 33.86 18.66 29.12 26.43 21.08
LLaMA-2-7B‡ 13.42 8.12 39.49 3.97 9.28 30.85 4.54
CodeLlama-7B‡ 25.32 15.05 40.56 10.0 17.20 31.66 11.43
LLaMA-2-13B‡ 25.40 16.57 34.76 9.96 18.89 25.63 11.37
CodeLlama-13B‡ 35.94 21.67 39.71 15.22 24.14 32.83 17.26
CodeLlama-34B‡ 45.64 21.67 52.52 15.78 24.14 47.11 17.86
LLaMA-2-70B‡ 56.71 40.04 29.40 32.31 45.72 19.38 36.90
open-source models in mathematics (7B)
MetaMath-Mistral 78.01 56.25 27.69 50.56 61.22 21.52 56.55
MetaMath 66.79 44.35 33.53 37.91 48.95 26.71 62.79
Abel 59.51 37.09 37.67 29.64 42.25 29.00 33.81
ToRA 67.48 43.60 35.39 37.89 49.83 26.16 43.14
MAmmoTH 52.84 32.14 39.17 25.63 36.73 30.49 29.30
MAmmoTH-Coder 59.89 38.73 35.33 32.02 44.27 26.08 36.60
SEGO 68.69 44.71 34.91 40.68 51.10 25.61 46.50
open-source models in mathematics (13B)
MetaMath 70.81 48.58 31.39 41.06 53.70 24.32 46.77
Abel 66.72 45.39 31.97 37.45 51.62 22.63 42.63
ToRA 71.80 47.88 33.31 42.43 54.72 23.79 48.29
MAmmoTH 62.40 40.82 34.58 34.05 46.65 25.24 38.91
MAmmoTH-Coder 64.90 43.97 32.25 36.93 50.25 22.57 42.20
SEGO 72.50 49.30 32.00 44.79 56.34 22.29 51.19
open-source models in mathematics (70B)
MetaMath 82.41 59.37 27.69 52.30 64.23 22.07 59.53
Abel 83.85 59.94 28.52 55.31 68.08 18.81 62.86
MAmmoTH 75.89 53.41 29.62 47.96 61.04 19.57 54.81

Table 7: Accuracy of current LLMs on GSM8K and GSM-Plus, with ($\text{{GSM-
Plus}}^{8}$) and without ($\text{{GSM-Plus}}^{7}$) “critical thinking”
variation.

###  C.1 Human Performance

We randomly selected 50 seed questions from GSM8K and combined them with their
corresponding variations from GSM-Plus to create a subset of 450 questions.
This suggests that the randomly selected subset is close to the distribution
of the whole test set.

We utilized the Tencent crowdsource platform111https://aidata.tencent.com/ for
selecting three qualified human annotators to evaluate human performance on
math reasoning. To ensure the quality of the results, each human annotator is
required to have a track record of completing over 1,000 HIT tasks and must
successfully pass a qualification exam consisting of 9 questions before
commencing the problem-solving annotation. Their annotation time for each
answer is recorded for reference.

###  C.2 Model Performance on GSM8K and GSM-Plus

Table C presents the model performance on GSM-Plus and their overall
robustness. We can see that the most challenging perturbation, critical
thinking, significantly contributes to the substantial decrease in model
performance.

###  C.3 Cases on Diverse Question Variations

#### Critical Thinking.

We present two examples where one model (GPT-4) successfully detects the
absence of a statement issue (Section C.3), while another model (ToRA-13B)
fails to do so (Section C.3).

Example C.1: Critical Thinking (GPT-4) GSM8K Question: Mike plays ping pong
for 40 minutes. In the first 20 minutes, he scores 4 points. In the second 20
minutes, he scores 25% more points. How many total points did he score?
Correct Answer: In the second 20 minutes, Mike scores 4*0.25=1 more points in
the second 20 minutes. Thus, in the second 20 minutes, he scores 4+1=5 points.
In total, Mike scores 4+5=9 points. GSM-Plus Question: Mike plays ping pong
for 40 minutes. In the first 20 minutes, he scores 4 points. In the second 20
minutes, he scores more points. How many total points did he score? Correct
Answer: The problem does not provide the number of points Mike scored in the
second 20 minutes. Therefore, it is impossible to determine the total points
he scored.

Example C.2: Critical Thinking (ToRA-13B) GSM8K Question: Mike plays ping pong
for 40 minutes. In the first 20 minutes, he scores 4 points. In the second 20
minutes, he scores 25% more points. How many total points did he score?
Correct Answer: def total_points(): """Mike plays ping pong for 60 minutes. In
the first 30 minutes, he scores 6 points. In the second 30 minutes, he scores
50% more points. How many total points did he score?""" total_minutes = 60
first_half_minutes = total_minutes / 2 second_half_minutes = total_minutes / 2
first_half_points = 6 second_half_points = first_half_points * 1.5
total_points = first_half_points + second_half_points return total_points
total_points = total_points() “‘output 15.0 ”’ GSM-Plus Question: Mike plays
ping pong for 40 minutes. In the first 20 minutes, he scores 4 points. In the
second 20 minutes, he scores more points. How many total points did he score?
Wrong Answer: def total_points():
"""Mike plays ping pong for 40 minutes. In the first 20 minutes, he scores 4
points. In the second 20 minutes, he scores more points. How many total points
did he score?""" total_time = 40 first_half_time = 20 second_half_time =
total_time - first_half_time first_half_points = 4 second_half_points =
first_half_points * 2 total_points = first_half_points + second_half_points
return total_points total_points = total_points() print(total_points) “‘output
12 ”’ Correct answer: None. The question does not provide information about
the specific increase in points during the second 20 minutes. The model
generates a fabricated response, “first_half_points * 2” without any factual
basis.

#### Adding Operation.

Section C.3 shows an example of failure for GPT-3.5-Turbo, where it fails to
consider one condition (text in green) in the GSM-Plus question.

Example C.3: Adding Operation GSM8K Question: A raspberry bush has 6 clusters
of 20 fruit each and 67 individual fruit scattered across the bush. How many
raspberries are there in total? Correct Answer: The number of fruit in the
clusters is 6 * 20 = 120 fruit. [1] Adding the number of individual fruit, we
have 120 + 67 = 187 fruit. [2] (simplification) GSM-Plus Question: A raspberry
bush has 6 clusters of 20 fruit each and 67 individual fruit scattered across
the bush. If a bird eats 15 raspberries from one of the clusters and a
squirrel takes away 3 clusters, how many raspberries are left on the bush?
Wrong Answer: The total number of raspberries in the clusters is 6 * 20 = 120.
[1] Next, we subtract the 15 raspberries that the bird ate from one of the
clusters: 120 - 15 = 105. [2] Finally, we need to subtract the 3 clusters that
the squirrel took away. Each cluster has 20 raspberries, so the total number
of raspberries in the 3 clusters is 3 * 20 = 60. [3] Therefore, there are 105
- 60 = 45 raspberries left in the bush. [4] (simplification) Correct answer:
112. The condition highlighted in green, which was overlooked by the model,
should be considered after step [1] and before step [2].

The given example highlights the concern regarding the performance robustness
of current LLMs, as they struggle to maintain consistent performance across
questions with varied conditions.

#### Distractor Insertion.

Section C.3 showcases a failure of MAmmoTH-13B, where the interference
condition (a book for $30) is incorporated into the solution, leading to the
wrong answer:

Example C.4: Distractor Insertion GSM8K Question:Jack had $100. Sophia gave
him 1/5 of her $100. How many dollars does Jack have now? Correct Answer:
jack_initial_amount = 100
sophia_initial_amount = 100
sophia_gave_jack = sophia_initial_amount/5 jack_final_amount =
jack_initial_amount+sophia_gave_jack print(jack_final_amount) # 120 GSM-Plus
Question: Jack had $100. Sophia, who gave Jack 1/5 of her $100 and just bought
a book for $30 from her remaining money (Interference). How many dollars does
Jack have now? Wrong Answer: initial_amount = 100 given_amount = 1/5 book_cost
= 30 remaining_amount = initial_amount-given_amount final_amount =
remaining_amount-book_cost
print(final_amount) # 69.8
Correct answer: 120. The program erroneously includes irrelevant inference
conditions in its calculations, which impacts the accuracy of the final
answer.

The generated program indiscriminately treats all the conditions mentioned in
the GSM-Plus question as program variables, without making any distinction
among them.

#### Reversing Operation.

Section C.3 illustrates the performance of GPT-4 on GSM8K and GSM-Plus. While
it successfully answers the total flour needed for a two-day cookie bakery, it
fails to calculate the cookie requirement for a single day when the problem is
reversed.

Example C.5: Reversing Operation GSM8K Question: Two cups of flour are needed
to make a dozen cookies. Carla is making 36 cookies today and 30 cookies
tomorrow. How many cups of flour will Carla need to bake the cookies today and
tomorrow? Correct Answer: Since 2 cups of flour are needed for 12 cookies,
then 2/12 = 1/6 cup of flour is needed for one cookie. The total number of
cookies Carla is 36 + 30 = 66 cookies. So, 66 * 1/6 = 11 cups of flour. So,
Carla will need 11 cups of flour. (simplification) GSM-Plus Question: Two cups
of flour are needed to make a dozen cookies. Carla has 11 cups of flour. If
she bakes 36 cookies today, how many cookies can she bake tomorrow without
needing more flour? (The question corresponds to the known condition of GSM8K
question.) Wrong Answer: 2 cups of flour makes a dozen cookies. For 36 cookies
(which is 3 dozen), Carla used 2*3 = 6 cups of flour. So, 11 - 6 = 5 cups of
flour are left for tomorrow. Since 2 cups of flour are needed for a dozen
cookies, with 5 cups of flour, Carla can bake 5/2 = 2.5 dozen cookies. Since
we can’t have half a dozen cookies, we round down to 2 dozen. So, Carla can
bake 2 dozen of cookies tomorrow: 2*12 = 24 cookies. (simplification) Correct
answer: 30. Instead of inferring 2.5 dozen as an equal value of 30, the model
approximates it as 2 dozen.

#### Integer-decimal-fraction Conversion.

Below are two examples from program-based SEGO-13B and NL-based Abel-13B:

Example C.6: IDC Conversion GSM8K Question: Paul has 52 marbles. His friend
gave him 28 marbles. Then, he lost 1/4 of his marbles. How many marbles does
Paul have left? Correct Answer: marbles = 52 marbles += 28 marbles -= marbles
* (1/4) return marbles GSM-Plus Question: Paul has 52.0 marbles. His friend
gave him 28.0 more. Then, he lost 0.25 of his total marbles. How many marbles
does Paul have left? Wrong Answer: marbles = 52.0 marbles += 28.0
marbles -= 0.25 return marbles Correct answer: 60. The program statement
becomes incorrect when the fraction 1/4 is changed to its decimal
representation, 0.25.

Example C.7: IDC Conversion GSM8K Question: Betsy and Donovan made a meal
together. Betsy’s part took 18 minutes longer than Donovan’s part. The meal
was made in 98 minutes. How many minutes long was Betsy’s part? Correct Answer
(SEGO): total_time = 98 x = (total_time - 18) / 2 betsy_part = x + 18 return
betsy_part Correct Answer (Abel): Let’s assume Donovan’s part took x minutes,
so Betsy’s part took x + 18 minutes. The total time for the meal was 98
minutes: x + (x + 18) = 98. Then we get 2x + 18 = 98, 2x = 80, x = 40. Betsy’s
part took x + 18 = 40 + 18 = 58 minutes. GSM-Plus Question: Betsy and Donovan
made a meal together. Betsy’s part took 1.8 times longer than Donovan’s part.
The meal was made in 9.8 hours. How many hours long was Betsy’s part? Wrong
Answer (SEGO): x = 4.5 betsy_time = 1.8 * x
return betsy_time Wrong Answer (Abel): Let’s say Donovan’s part took x hours.
Betsy’s part took 1.8 times longer, so it took 1.8x hours. The total time for
the meal was 9.8 hours. So, x + 1.8x = 9.8. We get 2.8x = 9.8, x = 3.5
Therefore, Betsy’s part took 1.8x = 1.8 * 3.5 = 6 hours. Correct answer: 6.3.
The reasoning chain of SEGO becomes meaningless, and Abel’s calculation is
incorrect.

When we modified the numerical values of the original GSM8K question, the
program-based model exhibited a complete shift in reasoning behaviors and
produced hallucinatory results. On the other hand, the NL-based models
faltered due to calculation errors.

#### Problem Understanding

Section C.3 illustrates a scenario involving MetaMath-Mistral, which provides
an incorrect answer to the GSM8K question but correctly responds to the
rephrased version of the same question on GSM-Plus, generated by GPT-4.

Example C.8: Problem Understanding GSM8K Question: Duncan’s age eight years
ago was two times Adam’s age four years ago. If Duncan’s age is 60 now, how
old will Adam be in 8 years? Wrong Answer: If Duncan’s age is 60 now, then 8
years ago his age was 60 - 8 = 52. Let’s represent Adam’s age 4 years ago as
A. Duncan’s age 8 years ago was two times Adam’s age 4 years ago, so we can
write the equation: 52 = 2(A + 4). We get: 52 = 2A + 8, 44 = 2A, A = 22. If
Adam’s age 4 years ago was 22, then his current age is 22 + 4 = 26. In 8
years, Adam will be 26 + 8 = 34 years old. Correct answer is 38. The model
makes a reasoning error by considering “4 years ago” as A, which conflicts
with the equation $52=2(A+4)$. GSM-Plus Question: Eight years prior, Duncan
was twice as old as Adam was four years in the past. Given that Duncan is
currently 60 years old, what will be Adam’s age eight years from now? (the
rephrased version of the GSM8K question) Correct Answer: If Duncan is
currently 60 years old, then eight years ago he was 60 - 8 = 52 years old.
Eight years ago, Duncan was twice as old as Adam was four years in the past,
so Adam was 52 / 2 = 26 years old four years ago. If Adam was 26 years old
four years ago, currently he is 26 + 4 = 30 years old. Eight years from now,
Adam will be 30 + 8 = 38 years old.

###  C.4 Prompt for Comp Method

#### Prompt for Key Premise Extraction

The following is the exact prompt used to distill the essential premises from
a given math problem, specifically focusing on numerical-related conditions,
referred to as Prompt 1 in Figure 5.

Example C.9: Generating Key Premises from a Math Problem Question: James gets
10 new CDs. Each CD cost $15. He gets them for 40% off. He decides he doesn’t
like 5 of them and sells them for 40. How much money was he out? Answer:
First, let us rewrite the question with labels. #1. James gets 10 new CDs. #2.
Each CD cost $15, and he gets them for 40% off. #3. He sells 5 of them for 40.
#4. How much money was he out? Question: {A Math Problem} Answer: First, let
us rewrite the question with labels.

#### Generating the Reasoning Goal of Each Thought

The below prompt corresponds to Prompt 2 in Figure 5 for generating the
subgoal of the initial thought.

Example C.10: Generating the Subgoal of the First Reasoning Thought Solve the
math question step by step. Please start each step with “Step :” and split
steps with “\n”. There are a few things you should be aware of: \- Opt for the
most straightforward approach to perform each reasoning step. \- Carefully
process the numerical variables in the question and perform each calculation
sequentially. \- Carefully consider each key information provided and
incorporate them systematically into your solution. \- Discern any
distractions that are irrelevant to the queried answer. \- If there is no
valid answer, please conclude with "So the answer is None" at the end of the
output. This is a math question: Question: James gets 10 new CDs. Each CD cost
$15. He gets them for 40% off. He decides he doesn’t like 5 of them and sells
them for 40. How much money was he out? The following is key information
extracted from the question: #1. James gets 10 new CDs. #2. Each CD cost $15,
and he gets them for 40% off. #3. He sells 5 of them for 40. #4. How much
money was he out? Step 1: Calculate the price of each CD after the 40%
discount. \- Since the original price per CD is $15 and the discount is 40%
off, the price per CD after discount is $15 * (1 - 0.40) = $15 * 0.60 = $9 \-
Result: $9 This is a math question: Question: {A Math Problem} The following
is key information extracted from the question: {Key Premise}

The following prompt corresponds to Prompt 2 of Figure 5 for generating the
subgoal of the second and subsequent thoughts (Prompt C.4).

Example C.11: Generating the Subgoal of the Secondary or Subsequent Reasoning
Thought Solve the math question step by step. Please start each step with
“Step :” and split steps with “\n”. There are a few things you should be aware
of: \- Opt for the most straightforward approach to perform each reasoning
step. \- Carefully process the numerical variables in the question and perform
each calculation sequentially. \- Carefully consider each key information
provided and incorporate them systematically into your solution. \- Discern
any distractions that are irrelevant to the queried answer. \- If there is no
valid answer, please conclude with "So the answer is None" at the end of the
output. This is a math question: Question: {A Math Problem} The following is
key information extracted from the question: {Key Premise} The following are
the first few steps in a solution to the problem: {Previous Thoughts,
including Subgoals and Calculations}

After generating the subgoal of the initial thought, GPT-3.5-Turbo proceeds to
generate the remaining calculations, which serve as a reference for conducting
the calculation for this subgoal.

#### Prompt for Performing Calculation of a Specified Goal

Prompt C.4 is used to guide the LLM in performing calculations for a given
subgoal of thought 1, which corresponds to Prompt 3 in Figure 5.

Example C.12: Calculating the Subgoal for the Initial Reasoning Thought Solve
the math question step by step. Please start each step with “Step :” and split
steps with “\n”. There are a few things you should be aware of: \- Opt for the
most straightforward approach to perform each reasoning step. \- Carefully
process the numerical variables in the question and perform each calculation
sequentially. \- Carefully consider each key information provided and
incorporate them systematically into your solution. \- Discern any
distractions that are irrelevant to the queried answer. \- If there is no
valid answer, please conclude with "So the answer is None" at the end of the
output. This is a math question: Question: {A Math Problem} The following is
key information extracted from the question: {Key Premise} The following is
the first reasoning step. Carefully review each item in the first reasoning
step. {Subgoal of Thought 1} {A Reference for Calculation} If you have a
strong belief that errors exist in the above reasoning step, explain why and
regenerate this step. Otherwise, output “Pass”.

We utilize Prompt C.4 to guide the LLM in performing calculations for a
specific subgoal in the second thought or subsequent thoughts.

Example C.13: Calculating Subgoals for Secondary or Subsequent Reasoning Steps
Solve the math question step by step. Please start each step with “Step :” and
split steps with “\n”. There are a few things you should be aware of: \- Opt
for the most straightforward approach to perform each reasoning step. \-
Carefully process the numerical variables in the question and perform each
calculation sequentially. \- Carefully consider each key information provided
and incorporate them systematically into your solution. \- Discern any
distractions that are irrelevant to the queried answer. \- If there is no
valid answer, please conclude with "So the answer is None" at the end of the
output. This is a math question: Question: {A Math Problem} The following is
key information extracted from the question: {Key Premise} The following are
the first few steps in a solution to the question: {Previous Thoughts,
including Subgoals and Calculations} The next step is as follows. Carefully
review each item in the next reasoning step. {Subgoal of the Current Thought}
{A Reference for Calculation} If you have a strong belief that errors exist in
the above reasoning step, explain why and regenerate this step. Otherwise,
output “Pass”.

#### Verifying the Completion Status of the Final Answer

Once each thought is completed, we merge the subgoals and calculations of the
current thought and previous thoughts (Prompt 4). Then we query the LLM to
determine if we have achieved the desired answer for the question.

Example C.14: Verifying the Model’s Acquisition of the Final Answer This is a
math question: Question: {A Math Problem} The following is key information
extracted from the question: {Key Premise} {Previous Thoughts, including
Subgoals and Calculations} Does the goal of last step “{Last Subgoal}” meets
up the target of the math question “{Queried Answer}”? If yes, please output
“So the answer is [VALUE]”. Otherwise, please output “No” and explain why.

We consider the final sentence of the math problem as the “queried answer”. If
the model’s self-verification process yields a response of “No”, Comp proceeds
with subgoal generation for the subsequent thoughts (Prompt C.4). However, if
the responses include the phrase “So the answer is”, Comp terminates the
iteration and arrives at the final answer.

###  C.5 Accuracy of LLMs Across Various Perturbation

We present the model’s performance on eight distinct mathematical
perturbations in Figure 6.

###  C.6 Answer Extraction for Questions Rewritten with the Rule of Removed
Necessary Constraints

Question variations that are rewritten using the “critical thinking”
perturbation lack certain contexts and therefore do not have valid answers. In
such cases, we have observed that the LLM tends to decline providing answers
in various expressions.

To extract the expressions, we regard the model’s solution as correct if it
contains any of the following expressions: does not provide enough
information, does not specify, does not provide, can’t provide, can not
provide, don’t know, do not know, doesn’t specify, not specify, not mention,
doesn’t mention, don’t have enough information, do not have enough, not
provide, doesn’t provide, cannot calculate, can’t calculate, can’t determine,
cannot determine, missing necessary information, none.

Figure 6: LLMs’s performance across various types of question variations.
Darker cell colors indicate larger performance decay rates under corresponding
question variations. The value in parentheses represents PDR values in
performance compared to the performance on GSM8K. The cell in purple indicates
a slight increase in performance for the corresponding question variation
compared to the original GSM8K test set. The majority of models struggle to
indicate the absence of statements when confronted with critical thinking
variations.

l|c|c|c|c|c|c|c Numerical Variation Arithmetic Variation
Method GSM8K GSM-Plus Num. Sub. / Digit Exp. / IDF Conv. Add. Op. / Rev. Op.
Prob. Underst. Dist. Ins. Crit. Thinking
CoT 74.17 62.92 70.00 / 75.83 / 66.67 50.83 / 63.33 72.50 63.33 40.83
LtM ‡ 74.17 62.60 68.33 / 75.00 / 71.67 45.83 / 63.33 72.50 65.52 39.17
Comp 76.67 65.52 75.00 / 75.00 / 62.50 52.50 / 64.17 78.33 62.50 54.17
CoT \+ SC 76.67 66.88 80.00 / 80.00 / 67.50 59.17 / 65.83 80.83 61.67 40.00
Comp \+ SC 80.00 69.47 75.83 / 82.50 / 71.67 60.83 / 71.67 78.33 70.83 55.83

Table 8: Fine-grained performance of GPT-3.5-Turbo on GSM8K and GSM-Plus with
different prompting techniques. The methods listed in the upper half of the
table evaluate the pass@1 accuracy, whereas the methods presented in the lower
half of the table employ ensemble-based decoding to determine a result from
multiple candidates.

###  C.7 Accuracy of Compositional Prompting for Various Question Variations

Table C.6 reports the accuracy scores for both the GSM8K questions and their
corresponding variations in GSM-Plus. The results suggest that Comp is
significantly effective in variations regarding general numerical
substitution, problem understanding, adding operation, and critical thinking.
Comp serves as a valuable method for iteratively inferring the subgoal of each
reasoning thought and performing the corresponding calculations.

The Comp method benefits from repeated attempts, leading to improved
performance on questions with inserted distractors. We have not observed a
substantial improvement in questions related to “numerical variation” as Comp
\+ SC primarily emphasizes subgoal optimization and may encounter similar
calculation errors without the use of external tools or ensemble-based
approaches.

###  C.8 Sample Predictions on GSM8K and GSM-Plus

We show example questions and predictions by different techniques (Tables 9
and Tables 10).

Method |  Original GSM8K Question |  GSM-Plus (Reversing Operation)
---|---|---
|  Adam wants to eat some sliced apples. A large apple can be sliced into 5 pieces, and a small apple can be sliced into 3 pieces. Adam decides to slice 3 large and 5 small apples and then eats 15 slices. How many apple slices are left? |  Adam wants to eat some sliced apples. A large apple can be sliced into 5 pieces, and a small apple can be sliced into 3 pieces. Adam decides to slice 3 large and some small apples and then eats 15 slices. After eating 15 slices, he counts and finds that he has 15 slices left. How many small apples did he originally have?
CoT |  Adam slices 3 large apples into 3 * 5 = 15 slices. Adam slices 5 small apples into 5 * 3 = 15 slices. In total, Adam slices 15 + 15 = 30 apple slices. Adam eats 15 slices, so there are 30 - 15 = 15 apple slices left. #### 15 ✓ |  First, let’s calculate the total number of slices from the large apples. Since each large apple can be sliced into 5 pieces, and Adam sliced 3 large apples, the total number of slices from the large apples is 5 * 3 = 15 slices.
|  |  Next, let’s calculate the total number of slices from the small apples. Since each small apple can be sliced into 3 pieces, and Adam has 15 slices left after eating, the total number of slices from the small apples is 15 - 15 = 0 slices. (reasoning error)
|  |  Since Adam originally sliced some small apples, the total number of slices from the small apples must be greater than 0. Therefore, Adam did not slice any small apples. So, the answer is #### 0. ✗
LtM |  1\. How many slices can be made from the large apples? 2. How many slices can be made from the small apples? 3. How many slices were made in total? 4. How many slices are left?
1\. A large apple can be sliced into 5 pieces, so 3 large apples can be sliced
into 3 x 5 = 15 slices.
2\. A small apple can be sliced into 3 pieces, so 5 small apples can be sliced
into 5 x 3 = 15 slices.
3\. In total, 15 slices were made from the large apples and 15 slices were
made from the small apples, so there were 15 + 15 = 30 slices in total.
4\. Adam ate 15 slices, so there are 30 - 15 = 15 slices left. The answer is: 15. ✓ |  1\. How many slices did Adam have before eating? 2. How many slices did Adam have after eating? 3. How many slices did Adam eat? 4. How many small apples did Adam originally slice?
1\. Adam had 15 slices left after eating, so before eating he had 15 + 15 = 30
slices.
2\. Adam ate 15 slices, so after eating he had 30 - 15 = 15 slices.
3\. Adam had 15 slices left after eating, so he ate 30 - 15 = 15 slices.
4\. A large apple can be sliced into 5 pieces, so Adam sliced 3 large apples
into 3 x 5 = 15 slices. Since Adam had 15 slices left after eating, he must
have originally sliced 15 - 15 = 0 small apples. The answer is: 0. ✗
(reasoning error)
Comp |  Step 1: Calculate the total number of slices from the large apples.
\- Since each large apple can be sliced into 5 pieces, the total number of
slices from the 3 large apples is 3 * 5 = 15 slices. Result: 15 slices
Step 2: Calculate the total number of slices from the small apples.
\- Adam slices 5 small apples, each sliced into 3 pieces. The total number of
slices from the small apples is 5 * 3 = 15 slices. Result: 15 slices.
Step 3: Calculate the total number of slices Adam left.
\- Adam has 15 slices from the large apples. Adam also has 15 slices from the
small apples. Adam has a total of 15 + 15 = 30 slices. Adam eats 15 slices, so
the number of slices left is 30 - 15 = 15 slices. Result: 15 slices.
So the answer is 15 slices. ✓
|  Step 1: Calculate the total number of slices from the large apples.
\- Since each large apple can be sliced into 5 pieces, the total number of
slices from the 3 large apples is 3 * 5 = 15 slices. Result: 15 slices.
Step 2: Calculate the total number of slices from the small apples.
\- Let’s assume the number of small apples Adam sliced is “x”. Since each
small apple can be sliced into 3 pieces, the total number of slices from the
small apples is x * 3 = 3x slices. Result: 3x slices.
Step 3: Calculate the total number of slices Adam had before eating.
\- The total number of slices is the sum of the slices from the large apples
and the slices from the small apples. So, the equation is 15 slices (from the
large apples) + 3x slices (from the small apples) = 30 slices. Result: 15 + 3x
= 30
Step 4: Solve the equation to find the value of x.
\- Subtract 15 from both sides of the equation: 15 + 3x - 15 = 30 - 15.
Simplify: 3x = 15. Divide both sides of the equation by 3: 3x/3 = 15/3.
Simplify: x = 5. So the answer is 5. ✓
Table 9: Prediction example for different prompting techniques, on a GSM8K question and a corresponding question variation based on “reversing operation” rewriting. While all techniques provide accurate answers to the original GSM8K question, it is only our proposed method, Comp, that consistently produces the correct answer for the modified question in GSM-Plus. Method |  Original GSM8K Question |  GSM-Plus (Adding Operation)
---|---|---
|  Anne purchased a box of sweets that contains 15 packs, and each pack has 60 pieces. She kept two packs and gave the rest to her 10 friends equally. How many pieces of sweets did each of her friends receive? |  Anne purchased a box of sweets that contains 15 packs, and each pack has 60 pieces. She kept two packs for herself and gave one pack to her brother. She then divided the remaining packs equally among her 10 friends. After a day, each of her friends gave back 10 pieces of sweets to her. How many pieces of sweets did each of her friends end up with after returning some to Anne?
CoT |  Anne kept 2 packs of sweets, so she gave away 15 - 2 = 13 packs of sweets to her friends. Each pack contains 60 pieces of sweets, so Anne gave away a total of 13 * 60 = 780 pieces of sweets to her friends. Anne has 10 friends, so each of her friends received 780 / 10 = 78 pieces of sweets. Therefore, each of Anne’s friends received #### 78 pieces of sweets. ✓ |  First, Anne purchased a box of sweets that contains 15 packs, and each pack has 60 pieces. So, the total number of sweets in the box is 15 * 60 = 900 pieces. Anne kept two packs for herself, so she has 2 * 60 = 120 pieces. Anne gave one pack to her brother, so her brother has 1 * 60 = 60 pieces. The remaining packs are 15 - 2 - 1 = 12 packs. Anne divided the remaining packs equally among her 10 friends, so each friend received 12 / 10 = 1.2 packs. Since we can’t have a fraction of a pack, we need to round down to the nearest whole number. Each friend received 1 pack. (missing reasoning step: conversion from “1.2 pack” to “72 piece”)
|  |  Each of her friends gave back 10 pieces of sweets. So, each friend has 60 - 10 = 50 pieces. #### 50. ✗
LtM |  1\. How many packs of sweets did Anne give to her friends? 2. How many pieces of sweets are in each pack? 3. How many pieces of sweets did each friend receive?
1\. Anne purchased a box of sweets that contains 15 packs. She kept two packs,
so she gave 15 - 2 = 13 packs to her friends.
2\. Each pack has 60 pieces of sweets.
3\. Each friend received 60 pieces of sweets per pack, so each friend received
a total of 60 x 13 / 10 = 78 pieces of sweets.
Each of Anne’s friends received 78 pieces of sweets. ✓
|  1\. How many packs of sweets did Anne keep for herself? 2. How many packs
of sweets did Anne give to her brother? 3. How many packs of sweets did Anne
divide among her friends? 4. How many pieces of sweets did each friend
receive? 5. How many pieces of sweets did each friend return to Anne? 6. How
many pieces of sweets did each friend end up with after returning some to
Anne?
1\. Anne kept 2 packs of sweets for herself.
2\. Anne gave 1 pack of sweets to her brother.
3\. Anne divided the 15 - 2 - 1 = 12 packs of sweets.
4\. Each friend received 12 / 10 = 1.2 packs of sweets.
5\. Each friend returned 10 pieces of sweets to Anne.
6\. Each friend ended up with 60 pieces - 10 pieces = 50 pieces of sweets
after returning some to Anne. The answer is: 50 pieces of sweets. ✗ (omission
of the 4th reasoning result)
Comp |  Step 1: Calculate the total number of packs Anne gave to her friends.
\- Anne purchased 15 packs of sweets. She kept 2 packs for herself. So, she
gave 15 - 2 = 13 packs to her friends. Result: 13 packs
Step 2: Calculate the total number of pieces of sweets in the packs Anne gave
to her friends.
\- Each pack has 60 pieces of sweets. Anne gave 13 packs to her friends. So,
the total number of pieces of sweets in the packs Anne gave to her friends is
60 * 13 = 780 pieces.
Step 3: Calculate the number of pieces of sweets each of Anne’s friends
received.
\- Anne gave 780 pieces of sweets to her 10 friends equally. To find out how
many pieces each friend received, divide the total number of pieces by the
number of friends. 780 pieces / 10 friends = 78 pieces.
Step 4: Calculate the total number of pieces of sweets each friend received. So the answer is 78. ✓ |  Step 1: Calculate the total number of pieces of sweets in the box.
\- Since each pack has 60 pieces and there are 15 packs, the total number of
pieces of sweets in the box is 60 * 15 = 900 pieces.
Step 2: Calculate the number of packs Anne kept for herself and gave to her
brother.
\- Anne kept two packs for herself and gave one pack to her brother, so she
kept a total of 2 + 1 = 3 packs.
Step 3: Calculate the number of packs Anne had left after keeping some for
herself and giving one to her brother.
\- Anne divided the remaining 12 packs equally among her 10 friends, so each
friend received 12 / 10 = 1.2 packs.
Step 4: Calculate the total number of pieces of sweets each friend received.
\- Since each pack has 60 pieces, each friend received 1.2 * 60 = 72 pieces.
Step 5: Calculate the number of pieces of sweets each friend had after
returning some to Anne.
\- Each friend returned 10 pieces of sweets. So the answer is 72 - 10 = 62
pieces of sweets. ✓
Table 10: Prediction example for different prompting techniques, on a GSM8K
question and a corresponding question variation based on “adding operation”
rewriting. While all techniques provide accurate answers to the original GSM8K
question, it is only our proposed method, Comp, that consistently produces the
correct answer for the modified question in GSM-Plus.