U-SWIM: Universal Selective Write-Verify for Computing-in-Memory Neural Accelerators

Zheyu Yan, Xiaobo Sharon Hu, Yiyu Shi · DOI

Abstract

Computing-in-Memory (CiM) architectures utilizing non-volatile memory (NVM) devices like RRAM and FeFET offer a promising path toward energy-efficient edge AI. However, the inherent stochasticity and manufacturing variations of these devices necessitate time-consuming "write-verify" programming cycles. This paper introduces U-SWIM (Universal Selective Write-Verify), a framework designed to minimize programming latency by selectively verifying only the most critical weights. By leveraging second-order derivatives of the loss function to quantify weight sensitivity and incorporating device-specific noise models, U-SWIM achieves up to a 10x reduction in programming time while maintaining high inference accuracy across standard benchmarks including CIFAR-10 and Tiny ImageNet.

Introduction

The efficiency of Computing-in-Memory (CiM) is often bottlenecked by the programming phase. Non-volatile memory cells frequently deviate from their target conductance due to noise and variability. The standard remedy, iterative write-verify, ensures accuracy but scales poorly; programming a ResNet-18 can take over a week. U-SWIM addresses this by asking: Is it necessary to verify every weight? By moving to a selective verification strategy, we can exploit the fact that NVM reads are significantly faster than writes.

Methodology: Sensitivity-Driven Verification

The core of U-SWIM is a robust metric for identifying "sensitive" weights—those whose deviation most severely impacts model accuracy.

Sensitivity Analysis via Hessian Approximation

Traditional heuristics often rely on weight magnitude, assuming larger weights are more important. However, empirical evidence shows a weak correlation between magnitude and accuracy drop. U-SWIM instead utilizes a Taylor expansion of the loss function, identifying that sensitivity is primarily governed by the diagonal elements of the Hessian matrix (the second-order derivative of the loss with respect to weights).

Correlation analysis: (a) Accuracy drop vs. weight magnitude shows weak correlation (0.45), while (b) accuracy drop vs. second derivative shows strong correlation (0.83).

To keep computational overhead low, U-SWIM estimates these derivatives using a single-pass forward and backward propagation scheme, adding only ~0.2% overhead for models like LeNet.

Universal Noise Modeling

Unlike previous methods, U-SWIM is "universal" because it accounts for non-uniform device variations. In many NVM technologies, noise levels are dependent on the target conductance. U-SWIM integrates these device-specific noise profiles into its sensitivity ranking, ensuring that the selected weights are those most likely to cause errors in a specific hardware realization.

Experimental Evaluation

We evaluated U-SWIM using various models (ConvNet, ResNet-18) and datasets (CIFAR-10, Tiny ImageNet), simulating noise models for FeFET and RRAM devices.

Performance comparison of U-SWIM against magnitude-based, random, and in-situ verification across different benchmarks.

Key Findings

  • The 10% Rule: Verifying just the top 10% of sensitive weights typically recovers nearly all accuracy lost to device variation. On CIFAR-10, U-SWIM limited accuracy drop to <0.5% with only 10% verification.
  • Programming Speedup: U-SWIM achieves up to a 10x acceleration in programming time compared to exhaustive methods.
  • Superiority over Heuristics: U-SWIM consistently outperforms magnitude-based and random selection. Against the original SWIM method on non-uniform FeFET devices, U-SWIM provided an additional 7x speedup by accounting for value-dependent noise.

Conclusion and Future Work

U-SWIM represents a significant step toward making CiM accelerators practical for large-scale deployment. By replacing exhaustive verification with a mathematically grounded selective approach, it drastically reduces the "time-to-accuracy" for edge AI hardware. Future research will investigate non-Gaussian noise profiles and "disturb" effects in crossbar arrays, as well as extending the framework to sequence-based models like Transformers.

Summary updated

BibTeX
@article{yan2024u,
  author = {Zheyu Yan and Xiaobo Sharon Hu and Yiyu Shi},
  title = {{U-SWIM: Universal Selective Write-Verify for Computing-in-Memory Neural Accelerators}},
  journal = {IEEE Trans. Comput. Aided Des. Integr. Circuits Syst.},
  year = {2024},
  url = {https://openreview.net/forum?id=WYHU4cXI0n},
}
Figure