Lune

ACL Findings2025

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

Kechi Zhang, Ge Li, Jia Li, Yihong Dong, Jia Li, Zhi Jin

摘要

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 errorprone 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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Alignment with Fill-In-the-Middle for Enhancing Code Generation 引用了 CodeDPO: Aligning Code Models with Self Generated and Verified Source Code
  • Alignment with Fill-In-the-Middle for Enhancing Code Generation 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Alignment with Fill-In-the-Middle for Enhancing Code Generation 引用了 Magicoder: Empowering Code Generation with OSS-Instruct
  • Alignment with Fill-In-the-Middle for Enhancing Code Generation 引用了 WizardCoder: Empowering Code Large Language Models with Evol-Instruct
  • CodeDPO: Aligning Code Models with Self Generated and Verified Source Code 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • CodeDPO: Aligning Code Models with Self Generated and Verified Source Code 引用了 WizardCoder: Empowering Code Large Language Models with Evol-Instruct
  • CodeDPO: Aligning Code Models with Self Generated and Verified Source Code 引用了 Self-Instruct: Aligning Language Models with Self-Generated Instructions
  • FGit: Fault-Guided Fine-Tuning for Code Generation 引用了 CodeDPO: Aligning Code Models with Self Generated and Verified Source Code
  • FGit: Fault-Guided Fine-Tuning for Code Generation 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • FGit: Fault-Guided Fine-Tuning for Code Generation 引用了 Magicoder: Empowering Code Generation with OSS-Instruct
  • FGit: Fault-Guided Fine-Tuning for Code Generation 引用了 WizardCoder: Empowering Code Large Language Models with Evol-Instruct
  • FGit: Fault-Guided Fine-Tuning for Code Generation 引用了 Self-Instruct: Aligning Language Models with Self-Generated Instructions
  • Token-level Direct Preference Optimization 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Aligning with Human Coding Preferences for Improving Code Generation 引用了 CodeDPO: Aligning Code Models with Self Generated and Verified Source Code
  • Aligning with Human Coding Preferences for Improving Code Generation 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Aligning with Human Coding Preferences for Improving Code Generation 引用了 Magicoder: Empowering Code Generation with OSS-Instruct
  • Aligning with Human Coding Preferences for Improving Code Generation 引用了 WizardCoder: Empowering Code Large Language Models with Evol-Instruct
  • Aligning with Human Coding Preferences for Improving Code Generation 引用了 Self-Instruct: Aligning Language Models with Self-Generated Instructions
  • Magicoder: Empowering Code Generation with OSS-Instruct 引用了 Self-Instruct: Aligning Language Models with Self-Generated Instructions
  • Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization 引用了 Direct Preference Optimization: Your Language Model is Secretly a Reward Model
  • Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization 引用了 Magicoder: Empowering Code Generation with OSS-Instruct
  • Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization 引用了 WizardCoder: Empowering Code Large Language Models with Evol-Instruct
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. CodeDPO: Aligning Code Models with Self Generated and Verified Source CodeKechi Zhang, Ge Li, Yihong Dong, Jingjing Xu 等ACL 2025 · 45 次引用
  2. Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency OptimizationMingzhe Du, Anh Tuan Luu, Yue Liu, Yuhao Qing 等NeurIPS 2025 · 18 次引用
  3. Alignment with Fill-In-the-Middle for Enhancing Code GenerationHouxing Ren, Zimu Lu, Weikang Shi, Haotian Hou 等EMNLP 2025
  4. FGit: Fault-Guided Fine-Tuning for Code GenerationLishui Fan, Zhongxin Liu, Haoye Wang, Lingfeng Bao 等ASE 2025
  5. Aligning with Human Coding Preferences for Improving Code GenerationXin Yin, Chao Ni, Xiaohu YangFSE 2026

它引用的 Paper9

  1. Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning 等NeurIPS 2023 · 10,924 次引用
  2. WizardCoder: Empowering Code Large Language Models with Evol-InstructZiyang Luo, Can Xu, Pu Zhao, Qingfeng Sun 等ICLR 2024 · 945 次引用
  3. Self-Instruct: Aligning Language Models with Self-Generated InstructionsYizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu 等ACL 2023 · 540 次引用
  4. Magicoder: Empowering Code Generation with OSS-InstructYuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding 等ICML 2024 · 246 次引用
  5. Token-level Direct Preference OptimizationYongcheng Zeng, Guoqing Liu, Weiyu Ma, Ning Yang 等ICML 2024 · 136 次引用

相关 Paper

  1. Teaching Your Models to Understand Code via Focal Preference AlignmentJie Wu, Haoling Li, Xin Zhang, Xiao Liu 等EMNLP 2025
  2. DolphCoder: Echo-Locating Code Large Language Models with Diverse and Multi-Objective Instruction TuningYejie Wang, Keqing He, Guanting Dong, Pei Wang 等ACL 2024
  3. Process-Supervised Reinforcement Learning for Code GenerationYufan Ye, Ting Zhang, Wenbin Jiang, Hua HuangEMNLP 2025 · 1 次引用
  4. Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?Bonan Kou, Shengmai Chen, Zhijie Wang, Lei Ma 等FSE 2024 · 8 次引用
  5. Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled PreferencesMohammad Saqib Hasan, Saikat Chakraborty, Santu Karmaker, Niranjan BalasubramanianACL 2025
黄昏的海面,两侧是细线勾勒的悬崖