跳到主要导航 跳到搜索 跳到主要内容

The Good, the Bad, and the Missing: Neural Code Generation for Machine Learning Tasks

  • Jiho Shin
  • , Moshi Wei
  • , Junjie Wang
  • , Lin Shi
  • , Song Wang
  • York University Toronto
  • Beihang University

科研成果: 期刊稿件文章同行评审

摘要

Machine learning (ML) has been increasingly used in a variety of domains, while solving ML programming tasks poses unique challenges due to the fundamental difference in the nature and the construct of general programming tasks, especially for developers who do not haveML backgrounds. Automatic code generation that produces a code snippet from a natural language description can be a promising technique to accelerate ML programming tasks. In recent years, although many deep learning-based neural code generation models have been proposed with high accuracy, the fact that most of them are mainly evaluated on general programming tasks calls into question their effectiveness and usefulness in ML programming tasks. In this article, we set out to investigate the effectiveness of existing neural code generation models on ML programming tasks. For our analysis, we select six state-of-the-art neural code generation models and evaluate their performance on four widely used ML libraries, with newly created 83K pairs of natural-language described ML programming tasks. Our empirical study reveals some good, bad, and missing aspects of neural code generation models on ML tasks, with a few major ones listed below. (Good) Neural code generation models perform significantly better on ML tasks than on non-ML tasks with an average difference of 10.6 points in BLEU-4 scores. (Bad) More than 80% of the generated code is semantically incorrect. (Bad) Code generation models do not have significance in improving developers' completion time. (Good) The generated code can help developers write correct code by providing developers with clues for using correct APIs. (Missing) The observation from our user study reveals the missing aspects of code generation for ML tasks, e.g., decomposing code generation for divide-and-conquer into API sequence identification and API usage generation.

源语言英语
文章编号51
期刊ACM Transactions on Software Engineering and Methodology
33
2
DOI
出版状态已出版 - 22 12月 2023

指纹

探究 'The Good, the Bad, and the Missing: Neural Code Generation for Machine Learning Tasks' 的科研主题。它们共同构成独一无二的指纹。

引用此