[Paper Review] Toward Understanding Deep Learning Framework Bugs
This paper presents a large-scale empirical study of 1,000 deep learning framework bugs across TensorFlow, PyTorch, MXNet, and DL4J, analyzing their root causes, symptoms, and distribution across framework components. Based on 12 key findings, the authors design and evaluate TenFuzz, a prototype testing tool that uncovers three previously unknown bugs in TensorFlow, offering actionable guidelines for improving DL framework testing and debugging.
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.
Motivation & Objective
- To comprehensively understand the characteristics of deep learning framework bugs, including root causes, symptoms, and component-level distributions.
- To assess the current effectiveness of state-of-the-art DL framework testing techniques in covering real-world bug patterns.
- To identify actionable insights for improving the detection and debugging of deep learning framework bugs through empirical analysis.
- To develop a prototype testing tool, TenFuzz, grounded in empirical findings to validate its effectiveness on real frameworks.
Proposed method
- Conducted a manual analysis of 1,000 real-world bugs from four major DL frameworks (TensorFlow, PyTorch, MXNet, DL4J), decomposed across five framework components.
- Classified bugs by root cause (e.g., tensor type/shape issues, hardware incompatibility, algorithmic logic errors) and symptoms (e.g., crashes, incorrect outputs).
- Measured test coverage of three leading testing techniques—CRADLE, LEMON, and AUDEE—on the 1,000 bugs to evaluate their effectiveness.
- Derived 12 actionable guidelines from the findings to inform future DL framework testing and debugging techniques.
- Implemented a prototype tool, TenFuzz, based on the guidelines, using component-aware test generation and mutation strategies.
- Evaluated TenFuzz on the latest TensorFlow version, successfully uncovering three previously unknown bugs in a preliminary study.

Experimental results
Research questions
- RQ1What are the dominant root causes of deep learning framework bugs across different frameworks and components?
- RQ2How do bug symptoms correlate with specific framework components and root causes?
- RQ3To what extent do existing testing techniques (e.g., CRADLE, LEMON, AUDEE) cover real-world DL framework bugs?
- RQ4What are the key characteristics of DL framework bugs that current testing techniques fail to detect?
- RQ5Can a prototype testing tool guided by empirical findings effectively uncover previously unknown framework-level bugs?
Key findings
- Tensor type and shape mismatches are the most frequent root cause of DL framework bugs, accounting for over 30% of all analyzed bugs.
- Hardware incompatibility and environment-related issues constitute a significant 20% of bugs, particularly in frameworks supporting multiple accelerators.
- Algorithmic logic errors in newly added DL-specific operations (e.g., custom autograd functions) are a major source of subtle, hard-to-detect bugs.
- Existing testing techniques like CRADLE, LEMON, and AUDEE achieve only 40-60% test coverage on the analyzed bug set, indicating substantial gaps in detecting real-world issues.
- Symptoms such as runtime crashes or incorrect gradients are strongly correlated with specific components—e.g., computation graph and autograd engine—enabling targeted testing.
- TenFuzz, guided by the empirical findings, successfully identified three previously unknown bugs in the latest TensorFlow release, validating the practical value of the proposed guidelines.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.