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

CITADEL:基于上下文相似性的深度学习框架缺陷发现

CITADEL: Context Similarity Based Deep Learning Framework Bug Finding

Xi'an Jiaotong University(西安交通大学);University of Massachusetts, Amherst(马萨诸塞大学阿默斯特分校)

Xiaoyu Zhang, Juan Zhai, Shiqing Ma, Shiwei Wang, Chao Shen

AI总结:

针对深度学习框架测试工具覆盖缺陷类型有限且效率低的问题,提出基于上下文相似性的Citadel方法,自动生成带预言的测试用例,有效检测出PyTorch和TensorFlow上多个现有工具无法发现的性能缺陷,触发率显著提升。

摘要:

随着深度学习技术的应用,对深度学习框架测试工具的需求很高。现有的深度学习框架测试工具对缺陷类型的覆盖有限。例如,它们缺乏有效发现性能缺陷的能力,而性能缺陷对于深度学习模型在性能、经济和环境方面至关重要。此外,现有工具效率低下,生成数百个测试用例却很少触发缺陷。在本文中,我们提出了Citadel,一种在效率和有效性方面加速缺陷发现的方法。我们观察到,许多深度学习框架缺陷由于属于同一家族的算子和算法的相似性而相似。与现有的缺陷发现工具正交,Citadel旨在发现与已知测试预言(oracle)的已报告缺陷相似的新缺陷。Citadel定义了上下文相似性来衡量深度学习框架API对的相似性,并自动为与现有缺陷报告中有问题的API相似的API生成带有预言的测试用例。Citadel在PyTorch和TensorFlow上有效检测到58个和66个API缺陷(不包括被开发者拒绝的或先前报告的重复项),其中许多缺陷,例如13个性能缺陷,是现有工具无法检测到的。此外,由Citadel生成的测试用例中有35.40%可以触发缺陷,显著超越了最先进的方法(3.90%)。

英文摘要:

With the application of deep learning technology, tools of DL framework testing are in high demand. Existing DL framework testing tools have limited coverage of bug types. For example, they lack the capability of effectively finding performance bugs, which are critical for DL models regarding performance, economics, and the environment. Moreover, existing tools are inefficient, generating hundreds of test cases with few trigger bugs. In this paper, we propose Citadel, a method that accelerates bug finding in terms of efficiency and effectiveness. We observe that many DL framework bugs are similar due to the similarity of operators and algorithms belonging to the same family. Orthogonal to existing bug-finding tools, Citadel aims to find new bugs that are similar to reported ones that have known test oracles. Citadel defines context similarity to measure the similarity of DL framework API pairs and automatically generates test cases with oracles for APIs that are similar to the problematic APIs in existing bug reports. Citadel effectively detects 58 and 66 API bugs on PyTorch and TensorFlow (excluding those rejected by developers or duplicates of prior reports), many of which, e.g., 13 performance bugs, cannot be detected by existing tools. Moreover, 35.40% of test cases generated by Citadel can trigger bugs significantly transcending the state-of-the-art method (3.90%).

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

↑