Research map / Large language models / Alignment and preferences
CodeDPO: Aligning Code Models with Self Generated and Verified Source Code
Kechi Zhang, Ge Li, Yihong Dong, Jingjing Xu, Jun Zhang, Jing Su, Yongfei Liu, Zhi Jin
Peking University · Key Lab of High Confidence Software Technology · ByteDance
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
On benchmark leaderboards
- HumanEval leaderboard pass rate (%) 83.54 · rank 3 of 13 papers
- MBPP leaderboard pass rate (%) 80.7 · rank 3 of 10 papers
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add CodeDPO to SFT model | MagiCoder-S-DS-6.7B · HumanEval | pass rate (%): 73.17 -> 83.54 | Improved |
| Add CodeDPO to base model | StarCoder2-7B · HumanEval | pass rate (%): 35.40 -> 48.17 | Improved |
| Rank code by self-validation score instead of filtering with all generated tests (ablation) | CodeDPO data construction (DeepSeekCoder-1.3B) · HumanEval | pass rate (%): 34.75 -> 42.07 | Improved |
| Rank code by self-validation score instead of number of passed tests (ablation) | CodeDPO data construction (DeepSeekCoder-1.3B) · HumanEval | pass rate (%): 37.19 -> 42.07 | Improved |
| Use self-validation ranking instead of random preference pairs (ablation) | CodeDPO data construction (DeepSeekCoder-1.3B) · HumanEval | pass rate (%): 21.34 -> 42.07 | Improved |
| Self-validation score as ranking signal (ablation) | Code ranking on HumanEval · HumanEval ground-truth correlation | Spearman: 0.7724 -> 0.8598 | Improved |
| Train with DPO instead of SFT on best solution (ablation) | CodeDPO (DeepSeekCoder-1.3B) · HumanEval | pass rate (%): 39.02 -> 42.07 | Improved |
| Train with DPO instead of KTO (ablation) | CodeDPO (DeepSeekCoder-1.3B) · HumanEval+ | pass rate (%): 35.98 -> 38.04 | Improved |
| Increase training data from 25% to 75% (ablation) | CodeDPO (DeepSeekCoder-1.3B) · HumanEval | pass rate (%): 32.92 -> 41.46 | Improved |
| Add CodeDPO | Magic-DS-6.7B · DS-1000 torch and tf | pass rate (%): torch 25.0 -> 23.5; tf 33.3 -> 31.1 | Hurt |
| Add CodeDPO | Magic-DS-6.7B · DS-1000 average | pass rate (%): 37.1 -> 38.7 | Improved |
| Add CodeDPO | DeepSeek-Coder-6.7B base · LiveCodeBench medium | pass rate (%): 7.4 -> 12.2 | Improved |
Open problems this paper states
- “Not compared thoroughly with advanced online RL alignment techniques such as DeepSeek-R1's GRPO.” → Only offline DPO-style training was tested, not online RL such as GRPO or PPO. (an open problem in DPO design choices)
Open problems in DPO design choices
Which DPO design choices still help at larger scale, with online training and under human evaluation?
- Validated on models of about 7B or 8B, with larger ones untested. · 24 papers state it
- Each added hyperparameter must be tuned, and its best value varies by setting. · 15 papers state it
- Only offline DPO-style training was tested, not online RL such as GRPO or PPO. · 11 papers state it
Closest papers by meaning
- Primal Generation, Dual Judgment: Self-Training from Test-Time Scaling (NeurIPS 2026 · similarity 0.87)
- CodeChemist: Test-Time Scaling for Low-Resource Code Generation via Functional Knowledge Transfer (ICML 2026 · similarity 0.87)
- Mercury: A Code Efficiency Benchmark for Code Large Language Models (NeurIPS 2024 · similarity 0.87)
- rStar-Coder: Scaling Competitive Code Reasoning with a Large-Scale Verified Dataset (NeurIPS 2025 · similarity 0.86)
- StepCodeReasoner: Aligning Code Reasoning with Stepwise Execution Traces via Reinforcement Learning (ICML 2026 · similarity 0.86)
- Copilot Arena: A Platform for Code LLM Evaluation in the Wild (ICML 2025 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.