mlsanityData to 7 Oct 2026

Teaching Your Models to Understand Code via Focal Preference Alignment

arXiv 2503.02783 ↗First posted 4 Mar 2025cs.CL cs.AI cs.LGcited by 10

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

  1. 2025Coarse-to-Fine Process Reward Modeling for Mathematical Reasoning23 Jan
  2. 2025Dynamic Scaling of Unit Tests for Code Reward Modeling2 Jan
  3. 2024DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs20 Nov
  4. 2024Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMs26 Jun

Other references · 24

  1. 2024The Llama 3 Herd of Modelscited by 14,192
  2. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  3. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  4. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  5. 2021Program Synthesis with Large Language Modelscited by 3,509
  6. 2023Qwen Technical Reportcited by 3,273
  7. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
  10. 2023StarCoder: may the source be with you!cited by 790
  11. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
  12. 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
12 more
  1. 2023A Survey of Reinforcement Learning from Human Feedbackcited by 259
  2. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 251
  3. 2024Smaug: Fixing Failure Modes of Preference Optimisation with DPO-Positivecited by 239
  4. 2024Provably Mitigating Overoptimization in RLHF: Your SFT Loss is Implicitly an Adversarial Regularizercited by 109
  5. 2024β-DPO: Direct Preference Optimization with Dynamic βcited by 89
  6. 2024Noise Contrastive Alignment of Language Models with Explicit Rewardscited by 85
  7. 2024Critical Tokens Matter: Token-Level Contrastive Estimation Enhances LLM's Reasoning Capabilitycited by 80
  8. 2023A Survey of Reasoning with Foundation Modelscited by 70
  9. 2024Process Supervision-Guided Policy Optimization for Code Generationcited by 25
  10. 2025EpiCoder: Encompassing Diversity and Complexity in Code Generationcited by 21
  11. 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiencycited by 16
  12. 2024Aligning CodeLLMs with Direct Preference Optimizationcited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 4; 2026: 6.

10 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Learning to Align Human Code Preferences
  2. 2025Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Points
  3. 2026Reward-Free Code Alignment from Pretrained or Fine-Tuned LLM: Unpacking the Trade-offs for Code Generation
  4. 2025Alignment with Fill-In-the-Middle for Enhancing Code Generation
  5. 2025Enhancing the Non-Functional Quality Compliance of LLM-Generated Code through Quality-Aware Preference Learning
  6. 2026CriterAlign: Criterion-Centric Rationale Alignment for Code Preference Judging
  7. 2024PLUM: Improving Code LMs with Execution-Guided On-Policy Preference Learning Driven By Synthetic Test Cases
  8. 2024Evaluating and Aligning CodeLLMs on Human Preference