On the Noise Stability and Robustness of Adversarially Trained Networks on NVM Crossbars

Deboleena Roy, Chun Tao, Indranil Chakraborty, Kaushik Roy

Introduction

As Deep Neural Networks (DNNs) scale in complexity, the demand for energy-efficient hardware has led to the rise of Non-Volatile Memory (NVM) crossbars (such as RRAM and PCRAM). These architectures perform Matrix-Vector Multiplications (MVM) in the analog domain, offering orders-of-magnitude improvements in energy efficiency. However, analog computing is inherently noisy. Hardware "non-idealities"—including parasitic resistances and device-to-device variations—introduce internal noise that can degrade model performance.

While Adversarial Training (AT) is the current gold standard for defending DNNs against external attacks, its interaction with the internal noise of NVM hardware has remained largely unexplored. This paper investigates the "Noise Stability" of AT models, revealing a surprising paradox: while AT models are more sensitive to internal hardware noise than standard models, the hardware's inherent imperfections provide a significant, intrinsic boost to adversarial robustness.

Methodology and Theoretical Framework

To analyze the intersection of hardware noise and adversarial defense, the researchers utilized a comprehensive simulation and theoretical framework:

  • Hardware Simulation: The study employed GENIEx to model the complex non-idealities of NVM crossbars and the PUMA functional simulator to map ResNet-10 and ResNet-20 architectures onto the hardware.
  • Noise Stability Metrics: Drawing on theoretical work by Arora et al., the authors quantified how noise propagates through network layers using three key metrics:
  • Layer Cushion: Measures the sensitivity of a layer's output to perturbations in its input.
  • Activation Contraction: Evaluates how much the network compresses the noise as it passes through layers.
  • Interlayer Smoothness: Assesses the stability of the mapping between successive layers.
  • Attack Scenarios: Models were tested on CIFAR-10 and CIFAR-100 datasets against both White-Box (PGD) attacks and Black-Box (Square) attacks to determine if hardware noise could obscure gradients or provide a stochastic defense.

The Stability Paradox

The study identifies a significant "Stability Paradox." Adversarial training is designed to make a model robust to input perturbations, yet the results show that AT models are significantly less stable to internal hardware noise.

On NVM hardware, AT models suffered approximately 2x the accuracy degradation compared to "vanilla" (unprotected) models. For instance, while a vanilla model might see a 5% drop in clean accuracy due to hardware noise, an AT model could see a drop of 12% or more. The authors suggest this is because AT forces the model’s weights into "sharp" minima in the loss landscape. While these sharp minima are effective at defending against specific, learned adversarial directions, they make the model highly sensitive to the stochastic shifts in weights and activations caused by analog hardware.

The "Push-Pull" Effect of Hardware Noise

Despite the drop in clean accuracy, NVM hardware provides a unique "Push-Pull" effect that benefits overall security:

  1. The Pull (Accuracy Loss): Hardware non-idealities introduce calculation errors that pull down the accuracy on clean, non-adversarial images.
  2. The Push (Robustness Gain): These same non-idealities act as a natural defense mechanism. By introducing stochasticity and non-linearity into the MVM process, the hardware makes it difficult for an attacker to calculate the precise gradients needed for a successful attack.

Key Results

  • Black-Box Robustness: AT models on NVM crossbars showed a 20–30% improvement in robust accuracy under high-strength Square attacks compared to their software-based counterparts.
  • Out-of-Distribution (OOD) Defense: When an attack's strength exceeded the level the model was trained to handle ($\epsilon_{attack} > \epsilon_{train}$), the hardware noise provided a 5–10% gain in accuracy. The noise effectively pushes internal activations into new, more stable local minima that the attacker cannot easily predict.

Conclusion and Design Implications

The findings suggest a paradigm shift in hardware-software co-design for secure AI. Rather than viewing hardware noise solely as a liability, designers can leverage it as a "free" layer of defense.

A promising strategy identified by the authors is to train models with a lower adversarial "epsilon" (strength). This preserves higher clean accuracy during the training phase, while the natural non-idealities of the NVM crossbars provide the additional robustness needed to defend against strong, real-world attacks. Future work remains to determine if "Hardware-in-the-Loop" adaptive attacks can bypass these intrinsic defenses and how these effects scale to much deeper architectures like those used for ImageNet.

Summary updated

BibTeX
@article{roy2022noise,
  author = {Deboleena Roy and Chun Tao and Indranil Chakraborty and Kaushik Roy},
  title = {{On the Noise Stability and Robustness of Adversarially Trained Networks on NVM Crossbars}},
  journal = {IEEE Trans. Very Large Scale Integr. Syst.},
  year = {2022},
  doi = {10.1109/tvlsi.2022.3193312},
}
Figure