Building Math Agents with Multi-Turn Iterative Preference Learning

Wei Xiong, Chengshuai Shi, Jiaming Shen, Aviv Rosenberg, Zhen Qin +8 more
9/4/2024
cs.LGstat.ML

No official code found. Best implementation: WeiXiongUST/Building-Math-Agents-with-Multi-Turn-Iterative-Preference-Learning (31 stars, last commit 2024-12-05).

Abstract

Recent studies have shown that large language models' (LLMs) mathematical problem-solving capabilities can be enhanced by integrating external tools, such as code interpreters, and employing multi-turn Chain-of-Thought (CoT) reasoning. While current methods focus on synthetic data generation and Supervised Fine-Tuning (SFT), this paper studies the complementary direct preference learning approach to further improve model performance. However, existing direct preference learning algorithms are originally designed for the single-turn chat task, and do not fully address the complexities of multi-turn reasoning and external tool integration required for tool-integrated mathematical reasoning tasks. To fill in this gap, we introduce a multi-turn direct preference learning framework, tailored for this context, that leverages feedback from code interpreters and optimizes trajectory-level preferences. This framework includes multi-turn DPO and multi-turn KTO as specific implementations. The effectiveness of our framework is validated through training of various language models using an augmented prompt set from the GSM8K and MATH datasets. Our results demonstrate substantial improvements: a supervised fine-tuned Gemma-1.1-it-7B model's performance increased from 77.5% to 83.9% on GSM8K and from 46.1% to 51.2% on MATH. Similarly, a Gemma-2-it-9B model improved from 84.1% to 86.3% on GSM8K and from 51.0% to 54.5% on MATH.

View on arXivView PDF

Code Implementations(1)

This is an official implementation of the paper ``Building Math Agents with Multi-Turn Iterative Preference Learning'' with multi-turn DPO and KTO.

317Shell, PythonSep 22, 20241 years ago

Similar Papers

Cite this paper

@article{xiong2024building,
  title  = {Building Math Agents with Multi-Turn Iterative Preference Learning},
  author = {Wei Xiong and Chengshuai Shi and Jiaming Shen and Aviv Rosenberg and Zhen Qin and Daniele Calandriello and Misha Khalman and Rishabh Joshi and Bilal Piot and Mohammad Saleh and Chi Jin and Tong Zhang and Tianqi Liu},
  year   = {2024},
  eprint = {2409.02392},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.02392v2},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.02392.svg)](https://codeofpaper.com/paper/2409.02392)

Discussion