Negative Feedback Training: A Novel Concept to Improve Robustness of NVCiM DNN Accelerators

Yifan Qin, Zheyu Yan, Wujie Wen, Xiaobo Sharon Hu, Yiyu ShiarXiv 2023 · arXiv · OpenReview

Abstract

Compute-in-memory (CIM) accelerators built upon non-volatile memory (NVM) devices excel in energy efficiency and latency when performing Deep Neural Network (DNN) inference, thanks to their in-situ data processing capability. However, the stochastic nature and intrinsic variations of NVM devices often result in performance degradation in DNN inference. Introducing these non-ideal device behaviors during DNN training enhances robustness, but drawbacks include limited accuracy improvement, reduced prediction confidence, and convergence issues. This arises from a mismatch between the deterministic training and non-deterministic device variations, as such training, though considering variations, relies solely on the model's final output. In this work, we draw inspiration from the control theory and propose a novel training concept: Negative Feedback Training (NFT) leveraging the multi-scale noisy information captured from network. We develop two specific NFT instances, Oriented Variational Forward (OVF) and Intermediate Representation Snapshot (IRS). Extensive experiments show that our methods outperform existing state-of-the-art methods with up to a 46.71% improvement in inference accuracy while reducing epistemic uncertainty, boosting output confidence, and improving convergence probability. Their effectiveness highlights the generality and practicality of our NFT concept in enhancing DNN robustness against device variations.

Introduction

To meet the escalating energy demands of modern artificial intelligence, hardware design is shifting toward Non-Volatile Memory-based Compute-In-Memory (NVCIM) architectures. By performing calculations directly within memory chips using physical principles like Kirchhoff’s Law, these systems circumvent the "memory wall"—the energy-intensive data movement between processors and memory.

However, NVM devices such as RRAM or FeFET are inherently imperfect. They exhibit random variations in electrical conductance due to manufacturing tolerances, thermal fluctuations, and aging. Standard "noise-aware training" (NAT) attempts to mitigate this by injecting random noise during the training phase. Yet, NAT often struggles with convergence or produces models with low prediction confidence because it treats the training process as a deterministic mapping, failing to account for the non-deterministic nature of hardware variations at the architectural level.

Methodology: Negative Feedback Training (NeFT)

The proposed Negative Feedback Training (NeFT) framework treats the DNN training process as a closed-loop control system. Just as a thermostat uses feedback to correct temperature deviations, NeFT utilizes feedback loops to "sense" and counteract weight drifts caused by hardware noise.

The NeFT framework uses a negative feedback loop during training to stabilize weights against hardware noise, while maintaining a standard architecture for inference.

Two primary implementations of this concept were developed:

  1. Oriented Variational Forward (OVF): This method involves performing additional forward passes during training with amplified noise levels. These noisy outputs are incorporated into the loss function as a penalty term, effectively forcing the optimization process toward "flatter" regions of the weight landscape. In these regions, small hardware-induced perturbations result in minimal changes to the final output.
  2. Intermediate Representation Snapshot (IRS): IRS introduces "sensors" in the form of auxiliary mini-classifiers at various depths of the network. By monitoring feature corruption in early and intermediate layers, the negative feedback signal can correct errors before they propagate through the entire network, fostering more robust internal representations.

Importantly, these feedback mechanisms are exclusive to the training phase. For inference, the auxiliary components are removed, resulting in a standard DNN that runs on NVCIM hardware with no additional latency or power overhead. The framework was evaluated using standard benchmarks, including MNIST, CIFAR-10, CIFAR-100, and Tiny ImageNet, with hardware non-idealities simulated using models derived from real-world device measurements.

Results and Discussion

NeFT demonstrates significant improvements in both accuracy and robustness across various architectures and datasets. On the VGG-8 architecture, NeFT achieved an inference accuracy improvement of up to 45.08% compared to state-of-the-art methods like CorrectNet under high-noise conditions.

Comparison of Top-1 Accuracy across varying levels of device variation for VGG-8 and ResNet-18 on the CIFAR-10 dataset.

As shown in the performance curves, NeFT (specifically OVF and IRS) maintains high accuracy even as device variation ($\sigma_d$) increases. For the ResNet-18 model on CIFAR-10, NeFT maintained over 80% accuracy in scenarios where baseline methods dropped toward random guessing. Furthermore, NeFT addresses the "non-convergence" issue prevalent in standard noise-injection training. In scenarios where standard methods failed to converge 60% of the time, NeFT achieved stable convergence in 100% of experimental runs.

Beyond raw accuracy, NeFT significantly reduces epistemic uncertainty. Models trained with negative feedback are more "confident" in their predictions, a critical requirement for safety-critical applications such as autonomous driving.

Conclusion

Negative Feedback Training represents a paradigm shift in making AI hardware more resilient. By viewing training as a dynamical system and applying control theory principles, NeFT bridges the gap between deterministic software training and non-deterministic hardware reality. While the training cost is higher—OVF can increase training time by approximately 3x—the benefits in inference robustness and model confidence are substantial. Future research will explore "Sparse Feedback Scheduling" to optimize training efficiency and the application of NeFT to larger architectures like Transformers.

Summary updated

Abstract

Compute-in-memory (CIM) accelerators built upon non-volatile memory (NVM) devices excel in energy efficiency and latency when performing Deep Neural Network (DNN) inference, thanks to their in-situ data processing capability. However, the stochastic nature and intrinsic variations of NVM devices often result in performance degradation in DNN inference. Introducing these non-ideal device behaviors during DNN training enhances robustness, but drawbacks include limited accuracy improvement, reduced prediction confidence, and convergence issues. This arises from a mismatch between the deterministic training and non-deterministic device variations, as such training, though considering variations, relies solely on the model's final output. In this work, we draw inspiration from the control theory and propose a novel training concept: Negative Feedback Training (NFT) leveraging the multi-scale noisy information captured from network. We develop two specific NFT instances, Oriented Variational Forward (OVF) and Intermediate Representation Snapshot (IRS). Extensive experiments show that our methods outperform existing state-of-the-art methods with up to a 46.71% improvement in inference accuracy while reducing epistemic uncertainty, boosting output confidence, and improving convergence probability. Their effectiveness highlights the generality and practicality of our NFT concept in enhancing DNN robustness against device variations.
BibTeX
@misc{qin2023negative,
  author = {Yifan Qin and Zheyu Yan and Wujie Wen and Xiaobo Sharon Hu and Yiyu Shi},
  title = {{Negative Feedback Training: A Novel Concept to Improve Robustness of NVCiM DNN Accelerators}},
  year = {2023},
  eprint = {2305.14561},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.14561},
}
Figure