Abstract
Deep neural networks (DNNs) often function as "black boxes," making it difficult for developers to diagnose the root causes of poor performance. This paper introduces DeepMorph, a diagnostic framework that utilizes "DNN Tomography" to analyze intermediate data flow footprints. By instrumenting hidden layers with auxiliary softmax classifiers, DeepMorph can distinguish between architectural flaws, data scarcity, and label noise. Experimental results across multiple benchmarks demonstrate high diagnostic accuracy in localizing model defects.
The Debugging Crisis in Deep Learning
In traditional software engineering, developers use debuggers to step through code and isolate logic errors. In Deep Learning (DL), however, low accuracy is often a vague symptom with multiple possible causes. Developers typically struggle to determine if a failure stems from the network architecture, the training data volume, or the quality of data labels.
The authors categorize these issues into three primary "defects":
- Structure Defect (SD): The network architecture is insufficient or poorly designed to learn the required features.
- Insufficient Training Data (ITD): The training set lacks the diversity or volume needed to represent real-world scenarios.
- Unreliable Training Data (UTD): The training set contains noisy or incorrectly labeled examples.
Currently, resolving these issues relies heavily on trial-and-error. DeepMorph proposes a systematic, "white-box" approach to localize these root causes.
DeepMorph: DNN Tomography via Data Flow Analysis
DeepMorph treats the intermediate layers of a network as a traceable execution process, a method the authors call "DNN Tomography."
The process involves several key stages:
- Softmax Instrumentation: Auxiliary softmax layers are attached to every hidden layer of the target model.
- Learning Execution Patterns: The model processes correctly classified training data to establish a "normal" baseline of how features are refined class-by-class through the network.
- Footprint Analysis: When a "faulty case" (misclassification) occurs, its intermediate "footprints" are compared against the learned normal patterns.
- Root Cause Reasoning: By analyzing deviations in internal data flow, DeepMorph calculates a ratio for each defect type. The defect with the highest ratio is identified as the primary root cause.
Experimental Evaluation
The researchers evaluated DeepMorph using two standard image classification benchmarks: MNIST (handwritten digits) and CIFAR-10 (object classification). These datasets were tested across four architectures: LeNet, AlexNet, ResNet-34, and DenseNet-40.
To validate the tool, the authors manually injected defects—such as removing layers (SD), reducing training samples (ITD), or flipping labels (UTD)—and measured DeepMorph's ability to correctly identify the injected flaw.
Results and Diagnostic Performance
DeepMorph demonstrated high effectiveness in identifying injected defects across all tested models and datasets. In every experimental scenario, the manually injected defect received the highest diagnostic score.
As shown in the table above, the tool provides quantifiable differentiation. For instance, on an AlexNet model with an ITD defect, DeepMorph returned a score of 0.822, significantly higher than the scores for UTD (0.023) or SD (0.155). This consistency held true across both simple architectures like LeNet and complex, deep models like ResNet and DenseNet.
Conclusion and Future Directions
DeepMorph demonstrates that intermediate layers are not merely "black boxes" but contain meaningful maps of a model's reasoning process. By bridging the gap between traditional data-flow analysis and machine learning, this research provides developers with actionable insights—allowing them to distinguish between the need for more data versus the need for a better model.
While highly effective, the current approach requires "white-box" access to the model and training data. Future work may explore "automated repair," using these diagnostic insights to automatically suggest architectural adjustments or filter noisy data.
Summary updated