TL;DR
This paper tackles the critical issue of worst-case performance degradation in compute-in-memory (CiM) neural network accelerators due to device variations, which is often overlooked in favor of average performance. The authors introduce novel methods (LWC and F-LWC) to accurately identify these worst-case scenarios and propose a new training technique (A-TRICE) that significantly improves worst-case accuracy, making CiM accelerators more reliable for safety-critical applications.
What Problem Does This Paper Address?
Deep neural networks (DNNs) are increasingly being deployed on edge devices, and compute-in-memory (CiM) architectures offer a promising solution for their energy-efficient acceleration. CiM leverages non-volatile memory (NVM) devices to perform computations directly within memory. However, NVM devices are inherently prone to variations (device-to-device and cycle-to-cycle), leading to deviations in programmed weights. While many existing solutions focus on optimizing average DNN performance under these variations, this is insufficient for safety-critical applications (e.g., autonomous driving, medical devices) where even rare failures can have catastrophic consequences. The paper addresses the crucial need to understand and mitigate the worst-case performance of CiM DNN accelerators, which is largely unaddressed by current research.
Methods
The core of the paper lies in its novel approaches to evaluating and improving worst-case performance.
- Lagrange-based Worst-Case analysis (LWC): This is an optimization-based framework designed to pinpoint the specific weight perturbations that lead to the minimum DNN accuracy. It reformulates the problem of finding the worst-case scenario as a constrained optimization problem, which is then relaxed and solved using gradient-based optimization with a Lagrange multiplier.
- Fast Lagrange-based Worst-Case analysis (F-LWC): Recognizing that LWC can be computationally intensive, the authors propose F-LWC. This method uses the Fast Gradient Sign Method (FGSM) to efficiently estimate the worst-case performance, offering a significant speedup with comparable accuracy.
- Adversarial Training with Right-Censored Gaussian Noise (A-TRICE): This is a novel training technique designed to enhance worst-case DNN robustness. It combines adversarial training (using F-LWC to generate worst-case perturbations) with noise-injection training using Right-Censored Gaussian (RCG) noise. RCG noise is a modified Gaussian noise where values above a certain threshold are "censored" to that threshold, aiming to better mimic worst-case device variations.
Datasets
The paper evaluates its methods on several standard datasets and DNN architectures:
- MNIST: Used with the LeNet model.
- CIFAR-10: Used with ConvNet and ResNet-18 models.
- Tiny ImageNet: Used with the ResNet-18 model.
- ImageNet: Used with ResNet-18 and VGG-16 models.
These are standard benchmarks for evaluating DNN performance, and the paper uses them to demonstrate the broad applicability of its proposed methods.
Key Insights and Ideas
- Worst-case performance is a critical blind spot: The paper convincingly demonstrates that even with standard techniques like "write-verify" (which limits weight deviations to a small bound, e.g., 0.03), DNN accuracy can plummet dramatically under worst-case variations. This highlights a significant risk for safety-critical applications.
- Existing robustness methods fall short: Techniques like variation-aware training and even stronger write-verify procedures are shown to be insufficient for guaranteeing worst-case performance, especially for more complex networks.
- Deep networks are more vulnerable: The study observes that deeper networks (like ResNets) are generally more susceptible to weight perturbations, suggesting that error accumulation during forward propagation plays a significant role.
- Confidence in misclassification: Surprisingly, the worst-case LeNet model exhibited higher confidence in its incorrect classifications than in its correct ones, a stark contrast to the original, unperturbed model. This suggests that simply looking at confidence scores might not be a reliable indicator of robustness in the presence of severe variations.
- Quantization is not a silver bullet: The experiments indicate that quantizing weights and activations does not inherently improve worst-case DNN performance.
Key Results
- LWC and F-LWC: The proposed LWC framework can identify worst-case accuracies that are significantly lower than those found by Monte Carlo (MC) simulations or the weight Projected Gradient Descent (PGD) attack. For instance, LWC uncovered scenarios where accuracy dropped to near 0% for ResNet-18 and VGG-16 models, while PGD only found scenarios comparable to random guessing. F-LWC provides a 2x speedup over LWC with comparable accuracy.
- A-TRICE: The novel A-TRICE training method demonstrates substantial improvements in worst-case accuracy. For the ConvNet model on CIFAR-10, A-TRICE achieved up to a 33% improvement in worst-case accuracy compared to baseline methods. For ResNet-18 on CIFAR-10, it improved worst-case accuracy by up to 31%.
- Computational Efficiency: While LWC is more time-consuming than PGD, both LWC and F-LWC are significantly faster than traditional MC simulations for worst-case evaluation.
Limitations and Future Work
- Open Problem: Despite the significant improvements offered by A-TRICE, the paper acknowledges that even with this method, worst-case performance can still be very low for some models when the write-verify bound is large. This indicates that finding more effective methods to address worst-case performance remains an open challenge.
- Architectural Vulnerability: The authors note that certain DNN architectures, like ResNets, appear more prone to worst-case performance degradation. They advocate for caution when using such architectures in safety-critical systems.
- Future Directions: The paper suggests that further research is needed to develop even more robust techniques for CiM accelerators, especially for complex safety-critical applications. The insights gained from analyzing confidence in misclassifications and layer-wise perturbation distributions could guide future algorithm design.
Summary updated