Characterizing Deep Learning Neural Network Failures between Algorithmic Inaccuracy and Transient Hardware Fault
Sabuj Laskar, Md Hasanur Rahman, Bohan Zhang, Guanpeng Li
Motivation
Soft Error
[1] Design of Low-Cost Reliable and Fault-Tolerant 32-Bit One Instruction Core for Multi-Core Systems
Taken from [1]
Soft errors are inevitable!
Consequences of Error Propagation in DNNs
[2] Understanding Error Propagation in Deep Learning Neural Network (DNN) Accelerators and Applications, SC’17
Fault-free prediction label: Truck
Faulty predicted label: Bird
Previous Works Only Consider SDC
[2] Understanding Error Propagation in Deep Learning Neural Network (DNN) Accelerators and Applications, SC’17
SDC
SDC
Cab
Bus
Albatross
Not All Misclassifications Are Equal
Misclassification
Cab
Bus
Similar action for AVs
Different action for AVs
Albatross
Misclassification
Need a different metric to differentiate safety critical misclassifications from non-safety critical ones
Our Hypothesis
Ground Truth
From Safety Critical Perspective of an AV
Small Deviation
(Bus -> Cab)
Significant Deviation
(Bus -> Albatross)
Intrinsic Algorithmic Inaccuracy
Silent Data Corruption
Safety concern of intrinsic algorithmic inaccuracies significantly lower than that due to SDC
DNNs need protection from SDC in safety critical situations
Misclassification
Existing DNN Reliability Measurement Tools
TensorFI[3]
TensorFI 2[4]
Most DNN models are non-sequential
[3] Tensorfi: A configurable fault injector for tensorflow applications, ISSREW’18
[4] https://github.com/DependableSystemsLab/TensorFI2
Need Support to inject faults in non-sequential DNN models with TensorFlow 2
Our Contributions
TensorFI+ Development
Keras Execution Flow Changes with TensorFI+
FI in a Sequential Model
Compute layer 4 output from layer 1
Target layer for FI
Inject fault
KerasAPI(n,5, faulty output of layer 4)
Issues in FI in Non-sequential Model
Target layer for FI
Fault propagation
Missing output of layer 3 due to session lost during FI
Solution: call KerasAPI to get output of layer 3 first
KerasAPI(n,5, faulty output of layer 4)?
Solution: Super Layer
No need to consider layers after 6 if we inject fault in layer 3
Simulation of FI with TensorFI+
Immediate next super layer
MDict
|
|
|
|
|
Layer 2 |
Immediate previous super layer
Simulation of FI with TensorFI+
Immediate previous super layer
Immediate next super layer
MDict
|
|
|
|
Layer 4 |
Layer 2 |
Simulation of FI technique of TensorFI+
Immediate next super layer
MDict
|
|
|
|
Layer 4 |
Layer 2 |
Immediate previous super layer
Simulation of FI technique of TensorFI+
Immediate next super layer
MDict
|
|
|
Layer 8 |
Layer 4 |
Layer 2 |
Immediate previous super layer
Simulation of FI technique of TensorFI+
Immediate next super layer
MDict
|
|
|
Layer 8 |
Layer 4 |
Layer 2 |
Immediate previous super layer
Simulation of FI technique of TensorFI+
Immediate next super layer
MDict
|
|
Layer 6 |
Layer 8 |
Layer 4 |
Layer 2 |
Immediate previous super layer
Simulation of FI technique of TensorFI+
Immediate next super layer
MDict
|
Layer 9 |
Layer 6 |
Layer 8 |
Layer 4 |
Layer 2 |
Immediate previous super layer
Simulation of TensorFI+
Immediate next super layer
MDict
Layer 10 |
Layer 9 |
Layer 6 |
Layer 8 |
Layer 4 |
Layer 2 |
Finally Compute the output of layer 12 using
only one KerasAPI(12, 10, inputs(10)) call
Immediate previous super layer
👉
Metrics to Differentiate Safety Critical Misclassification
Overview: Steps to Define Our Metrics
Group Formation
Ball player
Scuba driver
Cab
Bus
Bullfrog
Goldfish
Baseball
Binoculars
Person
Four Wheeler
Small Animals
Tools and Household Chores
Groups
Objects
Organize Groups into Two Supergroups
Person
(Ball player, Scuba driver)
Four Wheeler
(Cab, Bus)
Small Animals
(Bullfrog, Goldfish)
Tools and Household Chores
(Baseball, Binoculars)
Safety Critical
Non-Safety Critical
Safety Critical
Non-Safety Critical
Super Group A
Super Group B
Metrics: SCM and Non-SCM Probability
Benchmark & Experimental Setup
Results: SDC rates
Dataset | Model | Top-1 Accuracy | SDC Rate |
ImageNet | VG16(Sequential) | 71.18% | 3.53% |
ResNet50(Non-sequential) | 74.76% | 1.43% | |
DenseNet121(Non-sequential) | 75.04% | 1.20% | |
CIFAR-100 | VGG19(Sequential) | 71.53% | 1.23% |
GoogleNet(Non-sequential) | 76.70% | 1.57% | |
Xception(Non-sequential) | 77.96% | 2.00% |
SDC rates range from 0.53% to 2.07% (error bars range from 0.10% to 2.95%)
across different non-sequential DNN models
Results: Fault Free Inference
CIFAR-100
ImageNet
SCM Probability of CIFAR-100 and ImageNet are less than 20% and 10% respectively
Results: FI in Correctly Classified Images
CIFAR-100
ImageNet
SCM probability of CIFAR-100 and ImageNet is around 30-40% and 10-38% respectively
Results: FI in Misclassified Images
CIFAR-100
ImageNet
SCM probability of CIFAR-100 and ImageNet is around 20-50% and 14-36% respectively
Conclusion
Sabuj Laskar
University of Iowa
Backup Slides
Why Keras (TensorFlow 2)
Primary ML software tool used by top-5 teams on Kaggle in each competition in the last two years
✓
Source: https://keras.io/why_keras/
Keras (TensorFlow 2) Execution Flow
Keras execution flow without TensorFI+
Fault Injection Methods
Super Group Formation