Building Math Agents with Multi-Turn Iterative Preference Learning

Xiong, Wei, Shi, Chengshuai, Shen, Jiaming, Rosenberg, Aviv, Qin, Zhen, Calandriello, Daniele, Khalman, Misha, Joshi, Rishabh, Piot, Bilal, Saleh, Mohammad, Jin, Chi, Zhang, Tong, Liu, Tianqi

arXiv.org Machine Learning 

Large language models (LLMs) have demonstrated remarkable capacities across a variety of language tasks, showcasing their broad-ranging capabilities in natural language processing. Notable models include ChatGPT (OpenAI, 2023), Claude (Anthropic, 2023), and Gemini (Team et al., 2023). However, despite these advances, even the most advanced closed-source LLMs still struggle with complex reasoning tasks that require multi-rounds of decision making. In particular, for the representative task of mathematical problem solving, LLMs often fail with basic arithmetic and symbolic computations (Cobbe et al., 2021b; Hendrycks et al., 2021; Zheng et al., 2021). To address this issue, recent studies recommend the integration of external tools (e.g., calculators, computational Python libraries and symbolic solvers) to augment the LLMs' mathematical problem-solving capabilities (Cobbe et al., 2021b; Mishra et al., 2022; Shao et al., 2022; Zhang et al., 2024a). Specifically, by integrating natural language reasoning with the use of these external tools, these enhanced LLMs can receive external messages from tool interactions and reason based on both previously generated tokens and external messages, which significantly improves their performance in mathematical tasks (Gou et al., 2023b; Shao et al., 2024; Toshniwal et al., 2024). These successes of tool-integrated LLMs lead to a natural research question: how can we better train LLMs to combine tool usage with intrinsic reasoning to tackle complex reasoning tasks? For the mathematical problem solving task, existing works primarily focus on synthetic data generation (by a strong teacher model) and supervised fine-tuning (SFT), as seen in ToRA (Gou et al., 2023b), Meta-Work done during an internship at Google DeepMind. A preliminary draft without the results of Gemma-2 had been circulated internally in early July.