Introduction
Deep Neural Networks (DNNs) are increasingly deployed on edge devices, where energy efficiency is paramount. Non-volatile Computing-in-Memory (nvCiM) accelerators, utilizing emerging technologies like RRAM or FeFET, offer a promising path forward by performing computations directly within memory arrays. However, these analog devices are susceptible to programming errors due to fabrication defects and stochastic behavior.
The Programming Bottleneck
To ensure model accuracy, the industry relies on a "write-verify" process: writing a weight, reading it back, and repeating until the error is minimized. Given that modern DNNs contain millions of weights, sequentially verifying every single one is prohibitively slow—potentially taking over a week for a model like ResNet-18. This raises a critical question: is it necessary to verify every weight?
The SWIM Methodology: Identifying Sensitive Weights
The authors propose SWIM (Selective Write-Verify), a framework designed to identify and verify only the most "sensitive" weights—those whose variation most significantly impacts network accuracy.
A common intuition is that larger weights are more important. However, the authors demonstrate that weight magnitude is a poor predictor of sensitivity. Instead, they leverage a Taylor expansion of the loss function to show that sensitivity is governed by the second derivative (the diagonal of the Hessian matrix).
To make this computationally feasible, SWIM uses a chain-rule approximation to calculate second derivatives for all weights simultaneously during a single modified forward and backward pass. This process adds negligible overhead compared to standard training.
Key Results
The effectiveness of SWIM was evaluated across several benchmarks, including MNIST, CIFAR-10, and Tiny ImageNet.
Massive Speedups and Accuracy Retention
SWIM achieves up to a 10x speedup in programming time. For ResNet-18 on CIFAR-10, SWIM requires only 10% of total write cycles to maintain an accuracy drop below 0.5%. In contrast, magnitude-based and random selection require 50% and 70% of cycles, respectively, to reach the same threshold.
Robustness
Through extensive Monte Carlo simulations, SWIM demonstrated superior robustness to random device variations, showing the lowest standard deviation in accuracy among all tested methods. This ensures reliable performance across different physical chips.
Conclusion
SWIM addresses a major hurdle in the deployment of nvCiM accelerators. By focusing verification efforts on a small subset of critical weights identified via second derivatives, it drastically reduces programming time without sacrificing model performance. Future work will look to extend this framework to account for spatial variations and more complex noise models.
Summary updated