M u M ath: Multi-perspective Data Augmentation for Mathematical Reasoning in Large Language Models (2024)

Abstract: Recently, the tool-use Large Language Models (LLMs) that integrate with external Python interpreters have significantly enhanced mathematical reasoning capabilities for open-source LLMs. However, these models fall short in demonstrating the calculation process, which compromises user-friendliness and understanding of problem-solving steps. Conversely, while tool-free methods offer a clear display of the problem-solving process, their accuracy leaves room for improvement.These tool-free methods typically employ a somewhat narrow range of augmentation techniques such as rephrasing and difficulty enhancement to boost performance. In response to this issue, we have amalgamated and further refined these strengths while broadening the scope of augmentation methods to construct a **mu**lti-perspective augmentation dataset for **math**ematics—termed **MuMath** ( \mu -Math) Dataset.Subsequently, we finetune LLaMA-2 on the MuMath dataset to derive the MuMath model. Our experiments indicate that our MuMath-70B model achieves new state-of-the-art performance among tool-free methods—achieving 88.3% on GSM8K and 34.5% on MATH .We release the MuMath dataset along with its corresponding models and code for public use.

## introduction large language models (llms) @xcite @xcite @xcite , especially proprietary llms like @xcite , have been proven to be predominant across almost all the tasks in natural language processing (nlp), including text classification @xcite luo et al., 2023b), instruction following @xcite , and mathematical reasoning @xcite @xcite . among these, mathematical ability is an important and typical aspect for evaluating different llms, and there still remains a considerable gap between open-source llms, e.g., @xcite , and the proprietary llms in the realm of mathematical problem solving @xcite . recently, a multitude of studies dedicated to enhancing the mathematical capabilities of opensource llms, which can be generally divided into two different research trajectories: tool-use and tool-free. as for the tool-use llms, they are typically integrated with external python interpreters, making full use of the latter's impeccable abilities in numerical calculation and logical inference which can substantially assist llms in solving complex mathematical problems, e.g., pal @xcite , @xcite , @xcite , tora @xcite and @xcite . although the tool-use method can solve computational errors through code, it lacks a demonstration of the calculation process, making it less userfriendly in terms of understanding the problemsolving steps. on the other hand, while the tool-free method provides a good display of the problem-solving process, its accuracy still needs to be improved. therefore, our work follows along the tool-free trajectory, focusing on improving the math reasoning ability of llms. representative tool-free methods adopt supervised finetuning (sft) on the augmented datasets to enhance the llms' mathematical reasoning capability, including @xcite , @xcite , wizardmath @xcite , and mugglemath @xcite , etc. rft only augments the answer via rejection sampling to produce diverse reasoning paths with correct answers, but the generated data is similar to training dataset. metamath utilizes two simple augmentation methods, that one uses rephrasing to enhance the narrative diversity of the questions and answers, and the other adopts the sv @xcite and fobar @xcite to generate new mathematical problems and problem-solving strategies for equations. instead of rephrasing, wizardmath and mugglemath create new questions via rephrasing and difficulty enhancement, thus apparently improving the diversity of the dataset. however,the augmenting perspectives of these two methods are not sufficiently comprehensive, and the accuracy rate of the answers to new questions is suboptimal. while their constructed augmented dataset enhances the capability of the model, different works adopt different methods and employ a rather limited variety of augmentation methods. so we integrate and further enhance their strengths and expand the perspective of augmentation methods to construct a multi-perspective augmentation dataset for math, called mumath (µ-math) dataset, including four categories. (1) in data reformulation, besides the question rephrasing, we propose the solution reorganization to provide a compre-hensive roadmap for the process and detailed answers. (2) in backward creation, we have retained the fobar method and introduced the backward-forward transformation (bf-trans) approach, which transforms equation-solving into arithmetic problem-solving, generating new problems and solution methods that are distinctly different from the fobar style. (3) we've further refined the existing question alteration from a fresh perspective: expression replacement. it offers a controllable and innovative way, compared to simply changing numbers or arbitrarily increasing difficulty. also, we utilize majority sampling finetuning to boost answer accuracy and data quality. (4) additionally, beyond data augmentation for mathematical problem solving, we propose a nested multi-task construction augmentation, where we nest plan programming or question summarizing texts into the solution, combining data of auxiliary tasks into the main task as solving the math problem. through the process of supervised fine-tuning on open-source language models, such as llama-2, and applying it to the mumath dataset, we have successfully developed mumath models in a variety of sizes. this demonstrates that the dataset has the potential to significantly enhance the mathematical capabilities of open-source models. our contributions are as follows: ## methods the overview of our method is illustrated in figure 2. the implementation of our proposed data augmentation methods is to request gpt4 to obtain the desired data through specific prompts.