An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems
Creators
- 1. City University of New York (CUNY) Graduate Center
- 2. City University of New York (CUNY) Hunter College
- 3. Oakland University
- 4. City University of New York (CUNY) Macaulay Honors College
Description
Machine Learning (ML), including Deep Learning (DL), systems, i.e., those with ML capabilities, are pervasive in today's data-driven society. Such systems are complex; they are comprised of ML models and many subsystems that support learning processes. As with other complex systems, ML systems are prone to classic technical debt issues, especially when such systems are long-lived, but they also exhibit debt specific to these systems. Unfortunately, there is a gap of knowledge in how ML systems actually evolve and are maintained. In this paper, we fill this gap by studying refactorings, i.e., source-to-source semantics-preserving program transformations, performed in real-world, open-source software, and the technical debt issues they alleviate. We analyzed 26 projects, consisting of 4.2 MLOC, along with 327 manually examined code patches. The results indicate that developers refactor these systems for various reasons, both specific and tangential to ML; some refactorings correspond to established technical debt categories. In contrast, others do not, and code duplication is a major cross-cutting theme that particularly involved ML configuration and model code, which was also the most refactored. We also introduce 14 and 7 new ML-specific refactorings and technical debt categories, respectively, and put forth several recommendations, best practices, and anti-patterns. The results can potentially assist practitioners, tool developers, and educators in facilitating long-term ML system usefulness.
Notes
Files
commits.csv
Files
(83.7 kB)
Name | Size | Download all |
---|---|---|
md5:67bbc65fdb48976c49db8e7d6f7202f5
|
78.0 kB | Preview Download |
md5:1a31236be4008ccad7b8e1436c2e3800
|
886 Bytes | Preview Download |
md5:654e76c71ae0be39d35cb993e3f41b2b
|
1.2 kB | Preview Download |
md5:bd1f80214e9dc8f6c403fd2fdd062023
|
3.2 kB | Preview Download |
md5:08bbe2f0c8a7de832c8ef16978a79b03
|
446 Bytes | Preview Download |