paperbot · PL 论文追踪

全部论文 待读 收藏

P2 An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems

机器学习系统中的重构与技术债:一项实证研究
ICSE 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)2021匹配度 3/10 · 论文关注ML系统重构与技术债的实证研究,与ML系统软件工程和程序语言有一定关联,但不涉及静态分析、Agentic程序、浮点/Bayesian程序分析或LLM改进分析等核心方向。引用 72 inbox
Yiming Tang, Raffi Khatchadourian, Mehdi Bagherzadeh, Rhia Singh, Ajani Stewart, Anita Raja
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:通过分析26个开源ML项目与327个补丁,揭示ML系统重构动因、技术债类别及14/7个新类别。

机器学习系统由模型与众多学习支撑子系统组成,结构复杂,长期演进中容易积累经典及ML特有的技术债,但关于其实际演化与维护的知识仍不足。本文对26个开源项目、约420万行代码及327个人工检查的代码补丁开展实证研究,分析开发者执行的重构及其缓解的技术债问题。结果表明:重构动因既有ML特定原因也有一般原因;部分重构对应已有技术债类别,部分则不能;代码重复是贯穿性问题,尤其涉及ML配置与模型代码,而后者也是重构最频繁的部分。作者进一步提出14种新的ML特定重构和7类新的ML特定技术债,并给出建议、最佳实践与反模式。

问题
ML系统复杂且长期维护中易产生经典及ML特有技术债,但学界尚不清楚其实际如何重构、演进并缓解债务。
方法
对26个开源ML项目(约4.2 MLOC)进行实证分析,并人工检查327个代码补丁中的重构与技术债。
评估
基于真实开源项目与人工代码补丁分析,归纳重构动因、技术债类别,并提出14种新重构、7类新技术债及实践建议。
原文摘要(Abstract)

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 a variety of reasons, both specific and tangential to ML, some refactorings correspond to established technical debt categories, while 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.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{TangK0SSR21,
  title = {An Empirical Study of Refactorings and Technical Debt in Machine Learning Systems},
  author = {Yiming Tang and Raffi Khatchadourian and Mehdi Bagherzadeh and Rhia Singh and Ajani Stewart and Anita Raja},
  booktitle = {ICSE},
  year = {2021},
  doi = {10.1109/icse43902.2021.00033}
}