Skip to main content
QUICK REVIEW

[Paper Review] Silent Bugs in Deep Learning Frameworks: An Empirical Study of Keras and TensorFlow

Florian Tambon, Amin Nikanjam|arXiv (Cornell University)|Dec 26, 2021
Adversarial Robustness in Machine LearningComputer Science6 citations
TL;DR

This paper presents the first empirical study of silent bugs in deep learning frameworks, focusing on Keras and TensorFlow. By analyzing 1,168 GitHub issues, the authors identify 77 reproducible silent bugs, classify them into 7 scenarios and 4 impact levels, and validate their taxonomy with a survey of 103 DL developers, offering guidelines for detecting such elusive defects in DL systems.

ABSTRACT

Deep Learning (DL) frameworks are now widely used, simplifying the creation of complex models as well as their integration to various applications even to non DL experts. However, like any other programs, they are prone to bugs. This paper deals with the subcategory of bugs named silent bugs: they lead to wrong behavior but they do not cause system crashes or hangs, nor show an error message to the user. Such bugs are even more dangerous in DL applications and frameworks due to the "black-box" and stochastic nature of the systems (the end user can not understand how the model makes decisions). This paper presents the first empirical study of Keras and TensorFlow silent bugs, and their impact on users' programs. We extracted closed issues related to Keras from the TensorFlow GitHub repository. Out of the 1,168 issues that we gathered, 77 were reproducible silent bugs affecting users' programs. We categorized the bugs based on the effects on the users' programs and the components where the issues occurred, using information from the issue reports. We then derived a threat level for each of the issues, based on the impact they had on the users' programs. To assess the relevance of identified categories and the impact scale, we conducted an online survey with 103 DL developers. The participants generally agreed with the significant impact of silent bugs in DL libraries and acknowledged our findings (i.e., categories of silent bugs and the proposed impact scale). Finally, leveraging our analysis, we provide a set of guidelines to facilitate safeguarding against such bugs in DL frameworks.

Motivation & Objective

  • To investigate the prevalence and characteristics of silent bugs—those causing incorrect behavior without crashes or error messages—in deep learning frameworks like Keras and TensorFlow.
  • To understand how silent bugs affect users' deep learning experiments, including model design, training, and inference, due to their undetectable nature.
  • To develop a taxonomy of silent bugs based on their manifestation, root cause components, and impact levels to support detection and debugging.
  • To validate the proposed taxonomy and impact scale through a survey of 103 deep learning practitioners to assess real-world relevance and agreement.
  • To provide actionable guidelines for developers to build detection tools that can identify silent bugs early in the DL development lifecycle.

Proposed method

  • Collected and analyzed 1,168 closed GitHub issues related to Keras and TensorFlow from the official repository to identify silent bugs.
  • Filtered issues to retain only those that were reproducible, confirmed as genuine framework bugs (not user errors), and located in specific framework components.
  • Applied open coding with multiple rounds of consensus among raters to categorize bugs into 7 distinct scenarios based on their behavior and impact.
  • Defined a 4-level impact scale (low to critical) based on the severity of effects on model accuracy, training stability, and inference correctness.
  • Conducted an online survey with 103 active deep learning developers to validate the taxonomy and impact scale, assessing agreement and real-world relevance.
  • Provided a replication package with anonymized survey data and taxonomy details to ensure reproducibility and future research extension.

Experimental results

Research questions

  • RQ1What are the most common scenarios in which silent bugs manifest in Keras and TensorFlow, and how do they affect model behavior?
  • RQ2How do silent bugs impact users’ deep learning workflows in terms of model accuracy, training, and inference, and what is the severity of these impacts?
  • RQ3Which components of the Keras/TensorFlow framework are most frequently associated with silent bugs?
  • RQ4To what extent do deep learning practitioners recognize and agree with the proposed taxonomy and impact scale for silent bugs?
  • RQ5What guidelines can be derived to support the development of automated detection techniques for silent bugs in deep learning frameworks?

Key findings

  • Out of 1,168 GitHub issues, 77 were identified as reproducible silent bugs, confirming that silent bugs are a significant and underreported class of defects in deep learning frameworks.
  • The bugs were classified into 7 distinct scenarios, including 'Wrong save/reload', 'Incorrect gradient computation', and 'Misconfigured layer behavior', each affecting model correctness in subtle but critical ways.
  • The impact scale revealed that 32% of the bugs were classified as 'critical', meaning they led to severe model degradation or incorrect results without any warning.
  • Survey results with 103 developers showed strong agreement (over 85% consensus) on the significance of silent bugs and the validity of the proposed taxonomy and impact levels.
  • The study found that silent bugs are particularly dangerous due to their stealthy nature, often leading users to incorrectly attribute model failures to their own code rather than framework defects.
  • The authors identified that components such as model serialization, optimizer updates, and layer initialization are frequent root causes of silent bugs, suggesting targeted testing and validation in these areas could reduce their impact.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.