Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs

Xin Lai, Zhuotao Tian, Yukang Chen, Senqiao Yang, Xiangru Peng +1 more
6/26/2024
cs.LGcs.AIcs.CL

No official code found. Best implementation: JIA-Lab-research/Step-DPO (398 stars, last commit 2025-01-19). 1 more below.

Abstract

Mathematical reasoning presents a significant challenge for Large Language Models (LLMs) due to the extensive and precise chain of reasoning required for accuracy. Ensuring the correctness of each reasoning step is critical. To address this, we aim to enhance the robustness and factuality of LLMs by learning from human feedback. However, Direct Preference Optimization (DPO) has shown limited benefits for long-chain mathematical reasoning, as models employing DPO struggle to identify detailed errors in incorrect answers. This limitation stems from a lack of fine-grained process supervision. We propose a simple, effective, and data-efficient method called Step-DPO, which treats individual reasoning steps as units for preference optimization rather than evaluating answers holistically. Additionally, we have developed a data construction pipeline for Step-DPO, enabling the creation of a high-quality dataset containing 10K step-wise preference pairs. We also observe that in DPO, self-generated data is more effective than data generated by humans or GPT-4, due to the latter's out-of-distribution nature. Our findings demonstrate that as few as 10K preference data pairs and fewer than 500 Step-DPO training steps can yield a nearly 3% gain in accuracy on MATH for models with over 70B parameters. Notably, Step-DPO, when applied to Qwen2-72B-Instruct, achieves scores of 70.8% and 94.0% on the test sets of MATH and GSM8K, respectively, surpassing a series of closed-source models, including GPT-4-1106, Claude-3-Opus, and Gemini-1.5-Pro. Our code, data, and models are available at https://github.com/dvlab-research/Step-DPO.

View on arXivView PDF

Code Implementations(2)

Implementation for "Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs"

39816Shell, PythonJun 24, 20241 years ago
dpollmmathreasoning

Reproduce the Step DPO Algorithm from the paper 《Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs》

00Jan 23, 20251 years ago

Similar Papers

Cite this paper

@article{lai2024stepdpo,
  title  = {Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs},
  author = {Xin Lai and Zhuotao Tian and Yukang Chen and Senqiao Yang and Xiangru Peng and Jiaya Jia},
  year   = {2024},
  eprint = {2406.18629},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.18629v1}
}

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/2406.18629.svg)](https://codeofpaper.com/paper/2406.18629)

Discussion