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

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.* Ge Li and Zhi Jin are the corresponding authors.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.498
Citations
3
Primary Topic
Advanced Multi-Objective Optimization Algorithms
Type
article
Field-Weighted Citation Impact
4.51
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Zhi Jin, Kechi Zhang, Yihong Dong, Jia Li et al.
3 citations
Advanced Multi-Objective Optimization Algorithms
4.51
article

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

Zhi Jin, Kechi Zhang, Yihong Dong, Jia Li, Ge Li
article en
3 citations

Abstract

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.* Ge Li and Zhi Jin are the corresponding authors.

Openalex Percentile: Top 5%
Advanced Multi-Objective Optimization Algorithms
4.51
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.