笔记本中的数据泄漏:静态检测和更好的处理
Data Leakage in Notebooks: Static Detection and Better Processes
摘要:
用机器学习来训练和评估模型的数据科学管道可能像任何其他代码一样包含错误。训练数据和测试数据之间的泄漏可能会导致在离线评估期间高估模型的准确性,从而可能导致在生产中部署低质量的模型。这种泄漏很容易因错误或遵循不良实践而发生,但手动检测可能是繁琐且具有挑战性的。我们开发了一种静态分析方法来检测数据科学代码中常见的数据泄漏形式。我们的评估表明,我们的分析可以准确地检测到数据泄漏,并且这种泄漏在超过100,000个分析的公共笔记本中普遍存在。我们讨论了我们的静态分析方法如何帮助从业者和教育工作者,以及如何将泄漏预防设计到开发过程中。
英文摘要:
Data science pipelines to train and evaluate models with machine learning may contain bugs just like any other code. Leakage between training and test data can lead to overestimating the model's accuracy during offline evaluations, possibly leading to deployment of low-quality models in production. Such leakage can happen easily by mistake or by following poor practices, but may be tedious and challenging to detect manually. We develop a static analysis approach to detect common forms of data leakage in data science code. Our evaluation shows that our analysis accurately detects data leakage and that such leakage is pervasive among over 100,000 analyzed public notebooks. We discuss how our static analysis approach can help both practitioners and educators, and how leakage prevention can be designed into the development process.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。