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

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

26 Jun 2024arXiv:2406.18629archive 2025-07-28

Xin Lai, Zhuotao Tian, Yukang Chen, Senqiao Yang, Xiangru Peng, Jiaya Jia

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.18629")

Code

Syntology Ran 7 of 12 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 6 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

dvlab-research/step-dpo officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 7 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
6ran
5unverified

Licence: 12 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from dvlab-research/step-dpo. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

batch_data dvlab-research/step-dpo/eval_math.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · 66b3b5450182da3a · report
extract_boxed_answers dvlab-research/step-dpo/evaluation/data_processing/answer_extraction.py official repository ran fingerprinted no licence file found · pointer only · 6390dea763ce122e · report
extract_program_output dvlab-research/step-dpo/evaluation/data_processing/answer_extraction.py official repository ran fingerprinted no licence file found · pointer only · 0772e5020f6b0849 · report
generate_completions dvlab-research/step-dpo/evaluation/eval/utils.py official repository ran no licence file found · pointer only · df28d2ed3962986b · report
normalize_numeric dvlab-research/step-dpo/evaluation/eval/ocwcourses_eval_utils.py official repository ran fingerprinted no licence file found · pointer only · a8456a1cf57a39d2 · report
normalize_symbolic_equation dvlab-research/step-dpo/evaluation/eval/ocwcourses_eval_utils.py official repository ran fingerprinted no licence file found · pointer only · 3bfb1033a74d23ba · report
strip_string dvlab-research/step-dpo/evaluation/data_processing/answer_extraction.py official repository ran fingerprinted no licence file found · pointer only · 7f3eb00b0552d5c6 · report
extract_program dvlab-research/step-dpo/evaluation/eval/eval_utils.py official repository unverified no licence file found · pointer only · 1d961161c71cc153 · report
get_next_word_predictions dvlab-research/step-dpo/evaluation/eval/utils.py official repository unverified no licence file found · pointer only · 19dce514835bd816 · report
numeric_equality dvlab-research/step-dpo/evaluation/eval/ocwcourses_eval_utils.py official repository unverified no licence file found · pointer only · 4951ea903a7ffa37 · report
parse_question dvlab-research/step-dpo/evaluation/eval/eval_utils.py official repository unverified no licence file found · pointer only · 49e328786ffb3f8f · report
score_completions dvlab-research/step-dpo/evaluation/eval/utils.py official repository unverified no licence file found · pointer only · 8c63844c66973f8d · report

Tasks

Arithmetic ReasoningGSM8KMathMath Word Problem SolvingMathematical Reasoning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Arithmetic Reasoning GSM8K Qwen2-72B-Instruct-Step-DPO (0-shot CoT) Accuracy 94.0 #13 of 164 Archive leaderboard report
Math Word Problem Solving MATH Qwen2-72B-Instruct-Step-DPO (0-shot CoT, w/o code) Accuracy 70.8 #17 of 135 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDPODense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxStep-DPOTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections