mlsanityData to 7 Oct 2026

The Prevalence of Code Smells in Machine Learning projects

arXiv 2103.04146 ↗First posted 6 Mar 2021cs.SE cs.AI cs.LGcited by 16

Not on the map. Why?

Abstract (arXiv)

Artificial Intelligence (AI) and Machine Learning (ML) are pervasive in the current computer science landscape. Yet, there still exists a lack of software engineering experience and best practices in this field. One such best practice, static code analysis, can be used to find code smells, i.e., (potential) defects in the source code, refactoring opportunities, and violations of common coding standards. Our research set out to discover the most prevalent code smells in ML projects. We gathered a dataset of 74 open-source ML projects, installed their dependencies and ran Pylint on them. This resulted in a top 20 of all detected code smells, per category. Manual analysis of these smells mainly showed that code duplication is widespread and that the PEP8 convention for identifier naming style may not always be applicable to ML code due to its resemblance with mathematical notation. More interestingly, however, we found several major obstructions to the maintainability and reproducibility of ML projects, primarily related to the dependency management of Python projects. We also found that Pylint cannot reliably check for correct usage of imported dependencies, including prominent ML libraries such as PyTorch.

Key facts. Cited by 16 papers in the map (data through 7 Oct 2026). Builds on 3 of its 18 references that are in the map. First posted on arXiv 6 Mar 2021.

Builds on

3 of 18 references.

References · 3

  1. 2020AI Lifecycle Models Need To Be Revised. An Exploratory Study in Fintechcited by 33
  2. 2020Code Smells and Refactoring: A Tertiary Systematic Review of Challenges and Observationscited by 18
  3. 2020A large-scale comparative analysis of Coding Standard conformance in Open-Source Data Science projectscited by 9

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2022: 5; 2023: 4; 2024: 2; 2025: 3; 2026: 2.

16 papers.

Sort:

By area: