BEATS: Optimizing LLM Mathematical Capabilities with BackVerify and Adaptive Disambiguate based Efficient Tree Search

Linzhuang Sun,Hao Liang,Jingxuan Wei,Bihui Yu,Conghui He,Zenan Zhou,Wentao Zhang
2024-09-29
Abstract:Large Language Models (LLMs) have exhibited exceptional performance across a broad range of tasks and domains. However, they still encounter difficulties in solving mathematical problems due to the rigorous and logical nature of mathematics. Previous studies have employed techniques such as supervised fine-tuning (SFT), prompt engineering, and search-based methods to improve the mathematical problem-solving abilities of LLMs. Despite these efforts, their performance remains suboptimal and demands substantial computational resources. To address this issue, we propose a novel approach, BEATS, to enhance mathematical problem-solving abilities. Our method leverages newly designed prompts that guide the model to iteratively rewrite, advance by one step, and generate answers based on previous steps. Additionally, we introduce a new back-verification technique that uses LLMs to validate the correctness of the generated answers. Furthermore, we employ a pruning tree search to optimize search time while achieving strong performance. Notably, our method improves Qwen2-7b-Instruct's score from 36.94 to 61.52, outperforming GPT4's 42.5 on the MATH benchmark.
Computation and Language,Machine Learning
What problem does this paper attempt to address?
The paper attempts to address the issue of large language models (LLMs) lacking proficiency in solving mathematical problems. Despite LLMs excelling in various tasks and domains, they still face difficulties in solving mathematical problems, primarily because these problems require rigorous logical reasoning. To enhance the ability of LLMs in solving mathematical problems, existing methods such as Supervised Fine-Tuning (SFT), prompt engineering, and search-based approaches have made some progress but still suffer from suboptimal performance and high computational resource consumption. To tackle these issues, the authors propose a new method—BEATS (BackVerify and Adaptive Disambiguate Based Efficient Tree Search), aimed at enhancing LLMs' mathematical problem-solving capabilities through optimized prompt design, pruned tree search, and post-verification techniques. Specifically: 1. **Carefully Designed Prompts**: Developed three new prompts to solve mathematical problems step-by-step, provide the final answer, and most importantly, avoid ambiguities in problem statements. 2. **Pruned Tree Search to Control Reasoning Time**: Implemented a tree pruning strategy by limiting the search steps, such as restricting problem rewriting to once and terminating tree construction upon obtaining an answer. 3. **New Efficient Verification Method**: Proposed a new post-verification method that resubmits the answer and problem to the model for correctness judgment, thereby improving search performance. 4. **Robust Performance**: Achieved significant performance improvements on multiple datasets, particularly on the MATH dataset, where the BEATS method based on Qwen2-7B-Instruct increased the score from 36.94 to 61.52, significantly surpassing GPT-4's 42.5 score. Overall, the BEATS method effectively improves LLMs' performance in solving mathematical problems, reduces computational resource consumption, and demonstrates competitiveness across multiple benchmarks by leveraging these combined techniques.