arrow
返回

Top Pass: improve code generation by pass@k-maximized code ranking

delete2025-01-13
delete0
delete
OA
AI
L
Lyu, Zhicun
X
Xinye Li
Z
Zheng Xie
M
Ming Li *
DOI:10.1007/s11704-024-40415-9delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code generation has been greatly enhanced by the profound advancements in Large Language Models (LLMs) recently. Nevertheless, such LLM-based code generation approaches still struggle to generate error-free code in a few tries when faced with complex problems. To address this, the prevailing strategy is to sample a huge number of candidate programs, with the hope of any one in them could work. However, users of code generation systems usually expect to find a correct program by reviewing or testing only a small number of code candidates. Otherwise, the system would be unhelpful. In this paper, we propose Top Pass, a code ranking approach that identifies potential correct solutions from a large number of candidates. Top Pass directly optimizes the pass@k loss function, enhancing the quality at the top of the candidate list. This enables the user to find the correct solution within as few tries as possible. Experimental results on four benchmarks indicate that our Top Pass method enhances the usability of code generation models by producing better ranking results, particularly achieving a 32.9% relative improvement in pass@1 on CodeContests when compared to the state-of-the-art ranking method.
Keyword:
machine learning
data mining
software engineering

期刊

Frontiers of Computer Science 封面图
Frontiers of Computer Science
IF:
4.6
论文数:
1.6K
被引数:
2.8K

机构

N
nanjing university
学者数:
7.8W
论文数: 5.6W
被引数: 87
引用论文

引用论文

err分享
err收藏
Variable effects of temperature on insect herbivory温度对昆虫食草的可变影响
err2014-05-06
err0
errOAAI
errNathan P. Lemoine; Deron E. Burkepile; John D. Parker
err分享
err收藏
err分享
err收藏
Empirically revisiting and enhancing automatic classification of bug and non-bug issues
err2023-12-23
err6
PREAI
errLi, Zhong; Pan, Minxue; Pei, Yu; Zhang, Tian; Wang, Linzhang; Li, Xuandong
err分享
err收藏
The HadGEM2-ES implementation of CMIP5 centennial simulationsCMIP5百年模拟的HadGEM2-ES实现
err
IF0
err2011-03-31
err0
errOAAI
errC. D. Jones; J. K. Hughes; N. Bellouin; S. C. Hardiman; G. S. Jones; J. Knight; S. Liddicoat; F. M. O'Connor; R. J. Andres; C. Bell; K.-O. Boo; A. Bozzo; N. Butchart; P. Cadule; K. D. Corbin; M. Doutriaux-Boucher; P. Friedlingstein; J. Gornall; L. Gray; P. R. Halloran; G. Hurtt; W. Ingram; J.-F. Lamarque; R. M. Law; M. Meinshausen; S. Osprey; E. J. Palin; L. Parsons Chini; T. Raddatz; M. Sanderson; A. A. Sellar; A. Schurer; P. Valdes; N. Wood; S. Woodward; M. Yoshioka; M. Zerroukat
err分享
err收藏
没有更多内容