为机器学习代码设计静态分析工具,识别特有代码缺陷。
Automatic Identification of Machine Learning-Specific Code Smells
- 基于设计科学方法构建代码异味检测工具MLpylint。
- 在160个开源项目中验证有效,专家评分显示工具实用性强。
- 适合关注ML代码质量的开发者和团队使用。
机器学习(ML)快速发展,已成为众多行业的重要技术。然而,当前针对ML应用中代码异味的研究缺乏有效的工具与系统性分析。本文通过设计科学方法,首先通过文献综述识别出机器学习特有的代码异味;其次结合二次文献与专家咨询,选择合适的方法与工具开发静态分析工具MLpylint。该工具在来自GitHub的160个开源ML项目上进行了评估,并通过包含15名ML专业人员的专家调查进行静态验证。结果表明,MLpylint在识别代码异味方面具有有效性和实用性。未来工作将探索如何将MLpylint无缝集成至开发流程,以提升开发效率与创新环境。
原文摘要 · Abstract (English)
Machine learning (ML) has rapidly grown in popularity, becoming vital to many industries. Currently, the research on code smells in ML applications lacks tools and studies that address the identification and validity of ML-specific code smells. This work investigates suitable methods and tools to design and develop a static code analysis tool (MLpylint) based on code smell criteria. This research employed the Design Science Methodology. In the problem identification phase, a literature review was conducted to identify ML-specific code smells. In solution design, a secondary literature review and consultations with experts were performed to select methods and tools for implementing the tool. We evaluated the tool on data from 160 open-source ML applications sourced from GitHub. We also conducted a static validation through an expert survey involving 15 ML professionals. The results indicate the effectiveness and usefulness of the MLpylint. We aim to extend our current approach by investigating ways to introduce MLpylint seamlessly into development workflows, fostering a more productive and innovative developer environment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。