arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2409.14968cs.SE
收藏

JavaScript环境中基于变异的深度学习框架测试方法

Mutation-Based Deep Learning Framework Testing Method in JavaScript Environment

Yinglong Zou, Juan Zhai, Chunrong Fang, Jiawei Liu, Tao Zheng, Zhenyu Chen

AI总结:

本文提出了一种基于变异的JavaScript深度学习框架测试方法DLJSFuzzer,通过设计针对缓存重用和推理加速机制的变异规则生成测试输入,有效发现了TensorFlow.js中的崩溃与不一致性错误,显著提升了测试效率。

摘要:

近年来,JavaScript环境中的深度学习(DL)应用日益普及。作为DL应用的基础设施,JavaScript DL框架在开发和部署中发挥着至关重要的作用。确保JavaScript DL框架的质量至关重要。然而,JavaScript环境中有限的计算资源瓶颈给框架测试带来了新的挑战。具体而言,JavaScript DL框架配备了各种优化机制(例如,缓存重用、推理加速)以克服计算资源有限的瓶颈。现有方法忽略了这些优化机制,导致JavaScript DL框架中的许多错误被遗漏。为了解决上述挑战,我们提出了一种基于变异的JavaScript DL框架测试方法,名为DLJSFuzzer。DLJSFuzzer设计了13条针对缓存重用机制的张量变异规则,用于生成测试输入张量。此外,DLJSFuzzer还设计了8条针对推理加速机制的模型变异规则,用于生成测试输入模型。为了评估DLJSFuzzer的有效性,我们在最广泛使用的JavaScript DL框架TensorFlow.js上进行了实验。实验结果表明,DLJSFuzzer在有效性和效率方面均优于现有最先进的方法。DLJSFuzzer成功检测出21个独特的崩溃和126个独特的NaN及不一致性错误。所有检测到的崩溃均已报告给开源社区,其中12个已被开发者确认。此外,与所有基线相比,DLJSFuzzer在模型生成效率上提高了47%以上,在错误检测效率上提高了91%以上。

英文摘要:

In recent years, Deep Learning (DL) applications in JavaScript environment have become increasingly popular. As the infrastructure for DL applications, JavaScript DL frameworks play a crucial role in the development and deployment. It is essential to ensure the quality of JavaScript DL frameworks. However, the bottleneck of limited computational resources in the JavaScript environment brings new challenges to framework testing. Specifically, JavaScript DL frameworks are equipped with various optimization mechanisms (e.g., cache reuse, inference acceleration) to overcome the bottleneck of limited computational resources. These optimization mechanisms are overlooked by existing methods, resulting in many bugs in JavaScript DL frameworks being missed. To address the above challenges, we propose a mutation-based JavaScript DL framework testing method named DLJSFuzzer. DLJSFuzzer designs 13 tensor mutation rules targeting the cache reuse mechanism to generate test input tensors. Besides, DLJSFuzzer designs eight model mutation rules targeting the inference acceleration mechanism to generate test input models. To evaluate the effectiveness of DLJSFuzzer, we conduct experiments on the most widely-used JavaScript DL framework, TensorFlow.js. The experimental results show that DLJSFuzzer outperforms state-of-the-art methods in both effectiveness and efficiency. DLJSFuzzer successfully detects 21 unique crashes and 126 unique NaN & Inconsistency bugs. All detected crashes have been reported to the open-source community, with 12 of them already confirmed by developers. Additionally, DLJSFuzzer has improved by over 47% in model generation efficiency and over 91% in bug detection efficiency compared to all baselines.

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

↑