TL;DR
Researchers have developed a formal mathematical framework using Discrete-Time Markov Chains (DTMC) to predict how manufacturing defects in hardware accelerators—like Google’s Tensor Processing Unit (TPU)—impact the accuracy of Deep Neural Networks. By using probabilistic model checking, they can precisely quantify how a single "stuck-at" fault in a specific bit of a multiplier or accumulator propagates through a network to cause misclassifications.
What Problem Does This Paper Address?
As Deep Neural Networks (DNNs) move from massive data centers to Internet-of-Things (IoT) edge devices, they increasingly rely on specialized hardware accelerators. These accelerators often use "systolic arrays"—grids of processing units that perform the heavy lifting of matrix multiplication. However, no manufacturing process is perfect. Integrated circuits can have permanent "stuck-at" faults, where a specific bit in a register is permanently fixed to 0 or 1.
While previous research has used simulations to show that these faults hurt performance, there hasn't been a way to formally calculate the exact probability of an error. The authors address this gap by creating a high-level model that allows designers to understand exactly how sensitive their hardware is to manufacturing defects before they even build it.
Methods
The authors employ Probabilistic Model Checking (PMC), a formal verification technique that provides numerically exact answers rather than the approximations found in traditional simulations.
Key components of their approach include:
- Discrete-Time Markov Chains (DTMC): They model the selection of input activations as a probabilistic process.
- TPU-Fault Analysis (TPU-FA) Automaton: This state machine (shown in Figure 1) represents the execution cycle of a TPU, including the systolic array calculations, activation functions (like ReLU), and quantization.
- Fault Modeling: They mathematically defined three specific hardware fault cases:
- Stuck-at faults in the weight register.
- Stuck-at faults in the accumulator.
- Stuck-at faults in the multiplier.
- Formal Logic: They used Probabilistic Computation Tree Logic (PCTL) to query the model, specifically asking: "What is the probability that the output of the faulty hardware differs from the fault-free hardware?"
Datasets
To validate their theoretical model, the authors used the MNIST handwritten digit database, a standard benchmark consisting of 60,000 images. They trained a DNN in Python using Keras and then manually injected faults into the weights to see if the resulting accuracy drop matched the predictions of their formal DTMC model.
Key Insights and Ideas
- The "Leaking Effect": A particularly interesting finding involves stuck-at-1 faults in accumulators. Because systolic arrays are clocked, a faulty unit might "leak" its stuck-at value into the sum even during cycles when it isn't supposed to be processing data.
- Bit Significance: Not all faults are equal. A fault in the Most Significant Bit (MSB) is devastating, while a fault in the Least Significant Bit (LSB) might be completely "masked" by the network's activation function or quantization process.
- Error Compounding: In fully connected networks, a single unmasked fault in an early layer propagates to every single node in subsequent layers, leading to a rapid increase in error probability as the network gets deeper.
- The Masking Power of ReLU: The Rectified Linear Unit (ReLU) activation function can sometimes save the day; if a hardware fault results in a negative value that should have been positive (or vice versa), the ReLU might simply zero it out, effectively hiding the error from the rest of the network.
Key Results
The authors demonstrated a high correlation between their formal model and experimental results:
- Accuracy Collapse: For an MNIST model with an initial accuracy of 97.72%, inducing a single stuck-at fault in the 7th bit position of the weights caused accuracy to plummet to approximately 10-11%.
- Layer Sensitivity: As shown in Figure 2a and 2d, the probability of error increases consistently as the number of layers grows from 1 to 5.
- Validation: The experimental accuracy plots (Figures 2b and 2e) mirrored the error probability trends predicted by the formal model, confirming that the DTMC approach is a reliable proxy for real-world hardware behavior.
Limitations and Future Work
The primary limitation identified is the state space explosion problem. While the PRISM model checker used in this study can handle up to $10^{10}$ states, very large DNNs with high bit-widths could exceed this capacity. The authors suggest that future work will need to employ "state abstraction" techniques to simplify the models without losing accuracy.
Additionally, this paper focused on permanent manufacturing faults. The authors plan to extend this modeling framework to temporal faults (soft errors), which are transient glitches caused by environmental factors like cosmic radiation.
Summary updated