mlsanityData to 14 Oct 2026

Focused-DPO: Enhancing Code Generation Through Focused Preference Optimization on Error-Prone Points

arXiv 2502.11475 ↗First posted 17 Feb 2025cs.SEcited by 14

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Code generation models have shown significant potential for automating programming tasks. However, the challenge of generating accurate and reliable code persists due to the highly complex and long-reasoning nature of the task. Even state-of-the-art models often fail in code generation due to small errors, which can drastically affect the overall functionality of code. Our study identifies that current models tend to produce errors concentrated at specific error-prone points, which significantly impacts the accuracy of the generated code. To address this issue, we introduce Focused-DPO, a framework that enhances code generation by directing preference optimization towards these critical error-prone areas. This approach builds on Direct Preference Optimization, emphasizing accuracy in parts prone to errors. Additionally, we develop a method called Error-Point Identification, which constructs a dataset that targets these problematic points without requiring costly human annotations. Our experiments on benchmarks such as HumanEval(+), MBPP(+), and LiveCodeBench demonstrate that Focused-DPO significantly improves the precision and reliability of code generation, reducing common errors and enhancing overall code quality. By focusing on error-prone points, Focused-DPO advances the accuracy and functionality of model-generated code.

Key facts. Cited by 14 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 4 of its 20 references that are in the map. First posted on arXiv 17 Feb 2025.

Builds on

4 of 20 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar

Other references · 3

  1. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  2. 2024Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMscited by 273
  3. 2024Critical Tokens Matter: Token-Level Contrastive Estimation Enhances LLM's Reasoning Capabilitycited by 83

Built on by

Cited by year (2026 to 14 Oct)

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

14 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025Teaching Your Models to Understand Code via Focal Preference Alignment
  2. 2024Code-Optimise: Self-Generated Preference Data for Correctness and Efficiency
  3. 2025Improving LLM-Generated Code Quality with GRPO
  4. 2024Thinking Before Running! Efficient Code Generation with Thorough Exploration and Optimal Refinement
  5. 2024The Impact of Prompt Programming on Function-Level Code Generation
  6. 2025VFocus: Better Verilog Generation from Large Language Model via Focused Reasoning
  7. 2026ExeCRE: Execution-Consistency Guided Reliability Estimation for Self-Correcting Code Generation
  8. 2024Learning Code Preference via Synthetic Evolution