arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.12604cs.SEcs.LG
收藏

真实场景下机器学习测试的实证研究

An empirical study of testing machine learning in the wild

Polytechnique Montréal(蒙特利尔理工学院);York University(约克大学)

Moses Openja, Foutse Khomh, Armstrong Foundjem, Zhen Ming, Jiang, Mouna Abidi, Ahmed E. Hassan

AI总结:

本研究通过分析GitHub上11个开源ML/DL项目的测试内容,开展首项真实场景下ML测试的细粒度实证研究,明确了被测ML属性、常用测试策略及不同领域的测试侧重,填补了相关实证证据的空白。

摘要:

近年来,机器学习与深度学习(ML/DL)算法被越来越多地应用于各类软件系统中。由于其归纳性的本质,确保这类系统的质量仍是研究界面临的一项重大挑战。与通过编写显式规则以演绎方式构建的传统软件不同,ML/DL系统从训练数据中推断规则。近期ML/DL质量保证领域的研究已借鉴传统软件测试中的概念(如变异测试)来提升可靠性。然而,目前尚不清楚这些提出的测试技术是否已在实践中得到应用,也不清楚真实世界的ML部署是否催生了新的测试策略,关于测试策略的实证证据十分匮乏。\n为填补这一空白,我们开展了首项针对真实场景中ML测试的细粒度实证研究,旨在明确被测试的ML属性、测试策略及其在整个ML工作流中的实现方式。\n我们采用混合方法研究来理解ML软件测试实践,分析了GitHub上11个开源ML/DL项目的测试文件和测试用例。通过开放编码法,我们手动梳理了测试策略、被测ML属性以及已实现的测试方法,以了解它们在ML/DL软件系统构建与发布中的实际应用情况。\n我们的发现揭示了若干关键洞见:1)最常见的测试策略占比不足40%,为灰盒和白盒方法,例如负面测试、预言近似和统计测试。2)被测ML属性多达17种,其中仅20%至30%被频繁测试,包括一致性、正确性和效率。3)偏差与公平性在推荐系统中测试较多,而安全与隐私则在计算机视觉(CV)系统、应用平台和自然语言处理(NLP)系统中被测试。

英文摘要:

Recently, machine and deep learning (ML/DL) algorithms have been increasingly adopted in many software systems. Due to their inductive nature, ensuring the quality of these systems remains a significant challenge for the research community. Unlike traditional software built deductively by writing explicit rules, ML/DL systems infer rules from training data. Recent research in ML/DL quality assurance has adapted concepts from traditional software testing, such as mutation testing, to improve reliability. However, it is unclear if these proposed testing techniques are adopted in practice, or if new testing strategies have emerged from real-world ML deployments. There is little empirical evidence about the testing strategies. To fill this gap, we perform the first fine-grained empirical study on ML testing in the wild to identify the ML properties being tested, the testing strategies, and their implementation throughout the ML workflow. We conducted a mixed-methods study to understand ML software testing practices. We analyzed test files and cases from 11 open-source ML/DL projects on GitHub. Using open coding, we manually examined the testing strategies, tested ML properties, and implemented testing methods to understand their practical application in building and releasing ML/DL software systems. Our findings reveal several key insights: 1.) The most common testing strategies, accounting for less than 40%, are Grey-box and White-box methods, such as Negative Testing, Oracle Approximation and Statistical Testing. 2.) A wide range of 17 ML properties are tested, out of which only 20% to 30% are frequently tested, including Consistency, Correctness}, and Efficiency. 3.) Bias and Fairness is more tested in Recommendation, while Security & Privacy is tested in Computer Vision (CV) systems, Application Platforms, and Natural Language Processing (NLP) systems.

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

↑