Teaching Your Models to Understand Code via Focal Preference Alignment
On the map: LLM alignment / RLHF / preference optimisation → Process reward models for reasoning
Abstract (arXiv)
Preference learning extends the performance of Code LLMs beyond traditional supervised fine-tuning by leveraging relative quality comparisons. In existing approaches, a set of n candidate solutions is evaluated based on test case success rates, with the candidate demonstrating a higher pass rate being labeled as positive and its counterpart with a lower pass rate as negative. However, because this approach aligns entire failing code blocks rather than pinpointing specific errors, it lacks the granularity necessary to capture meaningful error-correction relationships. As a result, the model is unable to learn more informative error-correction patterns. To address these issues, we propose Target-DPO, a new preference alignment framework that mimics human iterative debugging to refine Code LLMs. Target-DPO explicitly locates error regions and aligns the corresponding tokens via a tailored DPO algorithm. To facilitate it, we introduce the CodeFlow dataset, where samples are iteratively refined until passing tests, with modifications capturing error corrections. Extensive experiments show that a diverse suite of Code LLMs equipped with Target-DPO achieves significant performance gains in code generation and improves on challenging tasks like BigCodeBench. In-depth analysis reveals that Target-DPO yields fewer errors. Code, model and datasets are in: https://github.com/JieWu02/Target-DPO.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Placed in Process reward models for reasoning, one of 10 directions in LLM alignment / RLHF / preference optimisation. Builds on 28 of its 34 references that are in the map. First posted on arXiv 4 Mar 2025.
Builds on
28 of 34 references.
Closest ancestors · 4
Same direction, newest first
- 2025Coarse-to-Fine Process Reward Modeling for Mathematical Reasoning23 Jan
- 2025Dynamic Scaling of Unit Tests for Code Reward Modeling2 Jan
- 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs20 Nov
- 2024Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs26 Jun
Other references · 24
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Qwen Technical Reportcited by 3,273
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2023StarCoder: may the source be with you!cited by 790
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
12 more
- 2023A Survey of Reinforcement Learning from Human Feedbackcited by 259
- 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
- 2024Smaug: Fixing Failure Modes of Preference Optimisation with DPO-Positivecited by 239
- 2024Provably Mitigating Overoptimization in RLHF: Your SFT Loss is Implicitly an Adversarial Regularizercited by 109
- 2024β-DPO: Direct Preference Optimization with Dynamic βcited by 89
- 2024Noise Contrastive Alignment of Language Models with Explicit Rewardscited by 85
- 2024Critical Tokens Matter: Token-Level Contrastive Estimation Enhances LLM's Reasoning Capabilitycited by 80
- 2023A Survey of Reasoning with Foundation Modelscited by 70
- 2024Process Supervision-Guided Policy Optimization for Code Generationcited by 25
- 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 21
- 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiencycited by 16
- 2024Aligning CodeLLMs with Direct Preference Optimizationcited by 9
Built on by
Citing papers per year: 2025: 4; 2026: 6.
10 papers.
- 2025The Landscape of Agentic Reinforcement Learning for LLMs: A Surveycited by 195
- 2025FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Drivingcited by 165
- 2026Code as Agent Harnesscited by 40
- 2026Verified Critical Step Optimization for LLM Agentscited by 13
- 2025UORA: Uniform Orthogonal Reinitialization Adaptation in Parameter-Efficient Fine-Tuning of Large Modelscited by 11
- 2025Toward Explaining Large Language Models in Software Engineering Taskscited by 0
- 2026SongSage: A Large Musical Language Model with Lyric Generative Pre-trainingcited by 0
- 2026DHI: Leveraging Diverse Hallucination Induction for Enhanced Contrastive Factuality Control in Large Language Modelscited by 0
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debuggingcited by 0
- 2026Function-Level Execution Feedback for Code Preference Optimizationcited by 0
- 2026Function-Level Execution Feedback for Code Preference Optimization23 Aug 2026
- 2026Code as Agent Harness18 May 2026
- 2026Verified Critical Step Optimization for LLM Agents3 Feb 2026
- 2026Synthesizing File-Level Data for Unit Test Generation with Chain-of-Thoughts via Self-Debugging3 Feb 2026
- 2026DHI: Leveraging Diverse Hallucination Induction for Enhanced Contrastive Factuality Control in Large Language Models3 Jan 2026
- 2026SongSage: A Large Musical Language Model with Lyric Generative Pre-training3 Jan 2026
- 2025Toward Explaining Large Language Models in Software Engineering Tasks23 Dec 2025
- 2025The Landscape of Agentic Reinforcement Learning for LLMs: A Survey2 Sep 2025
- 2025UORA: Uniform Orthogonal Reinitialization Adaptation in Parameter-Efficient Fine-Tuning of Large Models26 May 2025
- 2025FutureSightDrive: Thinking Visually with Spatio-Temporal CoT for Autonomous Driving23 May 2025
Similar, not cited
Close in wording, no citation either way
- 2025Learning to Align Human Code Preferences
- 2025Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Points
- 2026Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation
- 2025Alignment with Fill-In-the-Middle for Enhancing Code Generation
- 2025Enhancing the Non-Functional Quality Compliance of LLM-Generated Code through Quality-Aware Preference Learning
- 2026CriterAlign: Criterion-Centric Rationale Alignment for Code Preference Judging
- 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Cases
- 2024Evaluating and Aligning CodeLLMs on Human Preference