The Good, the Bad, and the Missing: Neural Code Generation for Machine Learning Tasks
Not on the map. Why?
Abstract (arXiv)
Machine learning (ML) has been increasingly used in a variety of domains, while solving ML programming tasks poses unique challenges because of the fundamentally different nature and construction from general programming tasks, especially for developers who do not have ML 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 paper, 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. (Bad) Most of the generated code is semantically incorrect. (Bad) Code generation models cannot significantly improve developers' completion time. (Good) The generated code can help developers write more 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 two tasks: API sequence identification and API usage generation.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 16 May 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 3.
5 papers.
- 2025On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHubcited by 53
- 2024Retrieval-Augmented Test Generation: How Far Are We?cited by 7
- 2025Deep-Bench: Deep Learning Benchmark Dataset for Code Generationcited by 3
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Qualitycited by 3
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purificationcited by 0
- 2025On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHub18 Sep 2025
- 2025Benchmarking AI Models in Software Engineering: A Review, Search Tool, and Unified Approach for Elevating Benchmark Quality7 Mar 2025
- 2025Deep-Bench: Deep Learning Benchmark Dataset for Code Generation26 Feb 2025
- 2024CodePurify: Defend Backdoor Attacks on Neural Code Models via Entropy-based Purification26 Oct 2024
- 2024Retrieval-Augmented Test Generation: How Far Are We?19 Sep 2024