arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2210.16494cs.SEcs.AIcs.HCcs.PL

对齐代码生成模型的离线指标与人类价值判断

Aligning Offline Metrics and Human Judgments of Value for Code Generation Models

Microsoft Research(微软研究院);University of Chicago(芝加哥大学)

Victor Dibia, Adam Fourney, Gagan Bansal, Forough Poursabzi-Sangdeh, Han Liu, Saleema Amershi

AI总结:

针对代码生成模型现有功能正确性指标无法充分反映其对程序员生产力价值的问题,本研究通过用户实验证实未通过测试但降低工作量的代码仍有价值,提出结合正确性与语法相似度的混合指标,与人类价值判断的相关性提升14%。

摘要:

大语言模型已展现出辅助程序员生成代码的巨大潜力。针对这类人机结对编程场景,我们通过实证研究表明:尽管生成的代码通常以功能正确性(即生成结果是否通过可用的单元测试)来评估,但正确性无法完全体现(例如可能低估)这些模型可能带来的生产力提升。通过对N=49名经验丰富的程序员开展用户研究,我们发现:尽管正确性能够捕捉到高价值的生成结果,但如果未通过单元测试的代码若能减少完成编码任务所需的总工作量,程序员仍会认为其有价值。最后,我们提出一种结合功能正确性与语法相似度的混合指标,结果表明该指标与价值的相关性提升了14%,因此在评估和比较模型时能更好地反映实际收益。

英文摘要:

Large language models have demonstrated great potential to assist programmers in generating code. For such human-AI pair programming scenarios, we empirically demonstrate that while generated code is most often evaluated in terms of their functional correctness (i.e., whether generations pass available unit tests), correctness does not fully capture (e.g., may underestimate) the productivity gains these models may provide. Through a user study with N = 49 experienced programmers, we show that while correctness captures high-value generations, programmers still rate code that fails unit tests as valuable if it reduces the overall effort needed to complete a coding task. Finally, we propose a hybrid metric that combines functional correctness and syntactic similarity and show that it achieves a 14% stronger correlation with value and can therefore better represent real-world gains when evaluating and comparing models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑