[论文解读] Toward Understanding Deep Learning Framework Bugs
本文对 TensorFlow、PyTorch、MXNet 和 DL4J 中的 1,000 个深度学习框架错误进行了大规模实证研究,分析了其根本原因、症状以及在框架组件中的分布。基于 12 项关键发现,作者设计并评估了 TenFuzz 原型测试工具,成功在 TensorFlow 中发现三个此前未知的错误,为改进深度学习框架的测试与调试提供了可操作的指导。
DL frameworks are the basis of constructing all DL programs and models, and thus their bugs could lead to the unexpected behaviors of any DL program or model relying on them. Such a wide effect demonstrates the necessity and importance of guaranteeing DL frameworks' quality. Understanding the characteristics of DL framework bugs is a fundamental step for this quality assurance task, facilitating designing effective bug detection and debugging approaches. Hence, in this work we conduct the most large-scale study on 1,000 bugs from four popular and diverse DL frameworks (i.e., TensorFlow, PyTorch, MXNet, and DL4J). By analyzing the root causes and symptoms of DL framework bugs associated with 5 components decomposed from DL frameworks, as well as measuring test coverage achieved by three state-of-the-art testing techniques, we obtain 12 major findings for the comprehensive understanding of DL framework bugs and the current status of existing DL framework testing practice, and then provide a series of actionable guidelines for better DL framework bug detection and debugging. Finally, based on the guidelines, we design and implement a prototype DL-framework testing tool, called TenFuzz, which is evaluated to be effective and finds 3 unknown bugs on the latest TensorFlow framework in a preliminary study, indicating the significance of our guidelines.
研究动机与目标
- 全面理解深度学习框架错误的特征,包括根本原因、症状以及组件级别的分布情况。
- 评估当前最先进的深度学习框架测试技术在覆盖真实世界错误模式方面的有效性。
- 通过实证分析,识别可操作的见解,以改进深度学习框架错误的检测与调试。
- 基于实证发现,开发一个原型测试工具 TenFuzz,以在真实框架上验证其有效性。
提出的方法
- 对四个主流深度学习框架(TensorFlow、PyTorch、MXNet、DL4J)中的 1,000 个真实错误进行了人工分析,按五个框架组件进行分解。
- 根据根本原因(如张量类型/形状问题、硬件不兼容性、算法逻辑错误)和症状(如崩溃、输出错误)对错误进行分类。
- 测量三种领先测试技术——CRADLE、LEMON 和 AUDEE——在 1,000 个错误上的测试覆盖率,以评估其有效性。
- 从研究发现中提炼出 12 条可操作的指导原则,以指导未来深度学习框架的测试与调试技术。
- 基于指导原则实现一个原型工具 TenFuzz,采用组件感知的测试生成与变异策略。
- 在最新版 TensorFlow 上评估 TenFuzz,在初步研究中成功发现三个此前未知的错误。

实验结果
研究问题
- RQ1在不同框架和组件中,深度学习框架错误的主要根本原因是什么?
- RQ2错误症状如何与特定框架组件和根本原因相关联?
- RQ3现有测试技术(如 CRADLE、LEMON、AUDEE)在多大程度上覆盖了真实世界中的深度学习框架错误?
- RQ4当前测试技术未能检测到的深度学习框架错误的关键特征是什么?
- RQ5基于实证发现指导的原型测试工具能否有效发现此前未知的框架级错误?
主要发现
- 张量类型和形状不匹配是深度学习框架错误中最常见的根本原因,占所有分析错误的 30% 以上。
- 硬件不兼容性和环境相关问题构成了显著的 20% 的错误,尤其在支持多种加速器的框架中更为突出。
- 新添加的深度学习专用操作(如自定义 autograd 函数)中的算法逻辑错误是导致细微、难以检测错误的主要原因。
- 现有测试技术如 CRADLE、LEMON 和 AUDEE 在分析错误集上的测试覆盖率仅为 40%-60%,表明在检测真实问题方面存在显著盲区。
- 如运行时崩溃或梯度错误等症状与特定组件(如计算图和 autograd 引擎)强相关,可支持针对性测试。
- TenFuzz 基于实证发现,成功在最新版 TensorFlow 中识别出三个此前未知的错误,验证了所提出指导原则的实际价值。

更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。