arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.00153cs.SE
收藏

理解机器学习 Jupyter Notebook 中的反馈机制

Understanding Feedback Mechanisms in Machine Learning Jupyter Notebooks

Arumoy Shome, Luis Cruz, Diomidis Spinellis, Arie van Deursen

AI总结:

本文通过挖掘 29.78 万个 Jupyter Notebook 和 230 万个代码单元,识别并分类了断言、打印语句和最后一个单元语句三种反馈机制,揭示了隐式反馈在机器学习关键设计决策中的广泛使用,并为利用现有反馈机制减轻技术债务和提升可复现性提供了实用建议。

摘要:

机器学习开发生命周期的特点是迭代式和探索式过程,这些过程依赖反馈机制来确保数据和模型的完整性。尽管反馈在机器学习工程中起着关键作用,但此前尚无研究对这些机制进行识别和理解。为填补这一知识空白,我们挖掘了 29.78 万个 Jupyter Notebook,并分析了 230 万个代码单元。我们识别出三种关键反馈机制——断言(assertions)、打印语句(print statements)和最后一个单元语句(last cell statements)——并进一步将它们分类为隐式和显式两种反馈形式。我们的研究结果表明,隐式反馈被广泛用于关键设计决策,而显式反馈机制的采用相对有限。通过对选定的反馈实例进行详细的案例研究,我们揭示了使用断言对机器学习工作流中的关键假设进行自动化验证的潜力。最后,本研究强调了改进文档的必要性,并就如何有效利用机器学习开发工作流中现有的反馈机制来减轻技术债务并提高可复现性提供了实用建议。

英文摘要:

The machine learning development lifecycle is characterized by iterative and exploratory processes that rely on feedback mechanisms to ensure data and model integrity. Despite the critical role of feedback in machine learning engineering, no prior research has been conducted to identify and understand these mechanisms. To address this knowledge gap, we mine 297.8 thousand Jupyter notebooks and analyse 2.3 million code cells. We identify three key feedback mechanisms -- assertions, print statements and last cell statements -- and further categorize them into implicit and explicit forms of feedback. Our findings reveal extensive use of implicit feedback for critical design decisions and the relatively limited adoption of explicit feedback mechanisms. By conducting detailed case studies with selected feedback instances, we uncover the potential for automated validation of critical assumptions in ML workflows using assertions. Finally, this study underscores the need for improved documentation, and provides practical recommendations on how existing feedback mechanisms in the ML development workflow can be effectively used to mitigate technical debt and enhance reproducibility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑