arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.09374cs.SEcs.CL
收藏

基于执行的数据科学代码生成模型评估

Execution-based Evaluation for Data Science Code Generation Models

Beihang University(北京航空航天大学);Microsoft Research Redmond(微软研究院雷德蒙德分院);Microsoft Research Asia(微软亚洲研究院);Microsoft(微软公司);Hong Kong University of Science and Technology(香港科技大学);Toronto University(多伦多大学)

Junjie Huang, Chenglong Wang, Jipeng Zhang, Cong Yan, Haotian Cui, Jeevana Priya Inala, Colin Clement, Nan Duan, Jianfeng Gao

摘要:

代码生成模型可以通过从上下文和文本描述自动生成代码来提高数据科学家的工作效率。衡量建模进度的一个重要指标是模型是否能够生成能够正确执行以解决任务的代码。然而,由于缺乏直接支持基于执行的模型评估的评估数据集,现有工作依赖于代码表面形式相似性度量(例如,BLEU、CodeBLEU)进行模型选择,这可能不准确。为了解决这个问题,我们引入了ExeDS,这是一个用于数据科学代码生成任务执行评估的评估数据集。ExeDS包含了一组534个问题,每个问题都由代码上下文、任务描述、参考程序和所需的执行输出组成。使用ExeDS,我们评估了五种最先进的代码生成模型的执行性能,这些模型已经获得了很高的表面形式评估分数。我们的实验表明,具有高表面形式分数的模型不一定在执行度量上表现良好,基于执行的度量可以更好地捕获模型代码生成错误。源代码和数据可以在https://github.com/Jun-jie-Huang/ExeDS上找到

英文摘要:

Code generation models can benefit data scientists' productivity by automatically generating code from context and text descriptions. An important measure of the modeling progress is whether a model can generate code that can correctly execute to solve the task. However, due to the lack of an evaluation dataset that directly supports execution-based model evaluation, existing work relies on code surface form similarity metrics (e.g., BLEU, CodeBLEU) for model selection, which can be inaccurate. To remedy this, we introduce ExeDS, an evaluation dataset for execution evaluation for data science code generation tasks. ExeDS contains a set of 534 problems from Jupyter Notebooks, each consisting of code context, task description, reference program, and the desired execution output. With ExeDS, we evaluate the execution performance of five state-of-the-art code generation models that have achieved high surface-form evaluation scores. Our experiments show that models with high surface-form scores do not necessarily perform well on execution metrics, and execution-based metrics can better capture model code generation errors. Source code and data can be found at https://github.com/Jun-jie-Huang/ExeDS

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

↑