arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2507.04360cs.SE
收藏

DevMuT:基于开发者专业知识的变异测试深度学习框架

DevMuT: Testing Deep Learning Framework via Developer Expertise-Based Mutation

Yanzhou Mu, Juan Zhai, Chunrong Fang, Xiang Chen, Zhixiang Cao, Peiran Yang, Yinglong Zou, Tao Zheng, Zhenyu Chen

AI总结:

DevMuT 利用开发者专业知识衍生的变异算子与约束生成测试模型,在 PyTorch、JAX 和 MindSpore 上检测到 117 个缺陷,其中 63 个被确认,显著提升了模型多样性与合法率,并已部署于 MindSpore 社区。

摘要:

深度学习(DL)框架是各类深度学习应用的基础设施。框架缺陷可能引发灾难性事故,因此需要充分的检测。在以往研究中,研究人员采用深度学习模型作为测试输入,并结合变异方法生成更多样化的模型。尽管这些研究展示了有前景的结果,但大多数检测到的缺陷被认为是琐碎的(即被开发者视为边缘情况或忽略)。为了识别对开发者而言重要的缺陷,我们提出了一种新颖的深度学习框架测试方法 DevMuT,该方法通过采用源自开发者专业知识的变异算子和约束来生成模型。DevMuT 模拟开发者在开发过程中的常见操作,并在深度学习模型生命周期的更多阶段(例如模型训练和推理)中检测更多样化的缺陷。我们在三个广泛使用的深度学习框架(即 PyTorch、JAX 和 MindSpore)上评估了 DevMuT 的性能,使用了来自九类工业任务的 29 个深度学习模型。实验结果表明,DevMuT 优于最先进的基线方法:在生成模型的多样性方面平均至少提升 71.68%,在生成模型的合法率方面平均提升 28.20%。此外,DevMuT 检测到 117 个缺陷,其中 63 个已被确认,24 个已被修复,8 个被开发者确认为高价值缺陷。最后,DevMuT 自 2023 年 12 月起已部署在 MindSpore 社区中。这些结果证明了 DevMuT 在检测接近真实场景且开发者关注的缺陷方面的有效性。

英文摘要:

Deep learning (DL) frameworks are the fundamental infrastructure for various DL applications. Framework defects can profoundly cause disastrous accidents, thus requiring sufficient detection. In previous studies, researchers adopt DL models as test inputs combined with mutation to generate more diverse models. Though these studies demonstrate promising results, most detected defects are considered trivial (i.e., either treated as edge cases or ignored by the developers). To identify important bugs that matter to developers, we propose a novel DL framework testing method DevMuT, which generates models by adopting mutation operators and constraints derived from developer expertise. DevMuT simulates developers'common operations in development and detects more diverse defects within more stages of the DL model lifecycle (e.g., model training and inference). We evaluate the performance of DevMuT on three widely used DL frameworks (i.e., PyTorch, JAX, and Mind- Spore) with 29 DL models from nine types of industry tasks. The experiment results show that DevMuT outperforms state-of-the-art baselines: it can achieve at least 71.68% improvement on average in the diversity of generated models and 28.20% improvement on average in the legal rates of generated models. Moreover, DevMuT detects 117 defects, 63 of which are confirmed, 24 are fixed, and eight are of high value confirmed by developers. Finally, DevMuT has been deployed in the MindSpore community since December 2023. These demonstrate the effectiveness of DevMuT in detecting defects that are close to the real scenes and are of concern to developers.

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

↑