TL;DR
This paper investigates how the inherent non-idealities of Non-Volatile Memory (NVM) crossbar-based accelerators, typically seen as a performance drawback, can actually provide a surprising level of intrinsic robustness against adversarial attacks. The researchers demonstrate that these analog computing imperfections can obfuscate attack gradients, making it harder for attackers to craft effective adversarial examples, especially when they lack full knowledge of the hardware.
What Problem Does This Paper Address?
Deep learning models are computationally intensive, leading to the development of specialized hardware accelerators. Non-Volatile Memory (NVM) crossbars are a promising technology for these accelerators, offering in-situ matrix-vector multiplication (MVM) to overcome the von Neumann bottleneck. However, the analog nature of NVM crossbars introduces non-idealities (deviations from ideal behavior) that degrade DNN accuracy under normal conditions. This paper explores the flip side of these non-idealities: their potential to enhance adversarial robustness. Adversarial attacks aim to fool DNNs by introducing imperceptible perturbations to input data, and this work investigates whether the inherent "noisy" nature of NVM hardware can naturally defend against such attacks.
Methods
The researchers emulated DNNs on a simulated NVM crossbar architecture called PUMA. They modeled NVM crossbar non-idealities using the GENIEx technique, which employs a neural network to capture the complex relationship between input voltages, device conductances, and output currents, accounting for peripheral resistances.
They then set up four distinct threat scenarios for attackers:
- Non-Adaptive Attacks: The attacker has no knowledge of the analog hardware.
- Ensemble Black Box: Queries an accurate digital model to train surrogate models.
- Square Attack (Black Box): A query-efficient attack using random search.
- White Box: Full knowledge of model weights, but assumes accurate digital computation for gradient estimation.
- Hardware-in-Loop Adaptive Attacks: The attacker is aware of the NVM hardware, but their knowledge of the specific crossbar model might not perfectly match the target.
- Ensemble Black Box & Square Attack: Queries are made on the NVM crossbar hardware.
- White Box: Uses "Hardware-in-Loop" gradient descent, where the forward pass is on the NVM hardware, but gradients are calculated assuming ideal computations.
Datasets
The study used the following datasets for training and evaluation:
- CIFAR-10: A ResNet-20 model was trained.
- CIFAR-100: A ResNet-32 model was trained.
- ImageNet: A ResNet-18 model was trained, with a reduced test set of 1000 images used for adversarial attacks.
Key Insights and Ideas
- Non-idealities as a Feature, Not Just a Bug: The paper highlights that the very imperfections that degrade DNN accuracy under normal operation can act as a form of "gradient obfuscation," making adversarial attacks less effective.
- Robustness Scales with Non-Ideality: The degree of intrinsic robustness observed is directly proportional to the degree of non-ideal behavior in the NVM crossbar. More "imperfect" crossbars offer better defense.
- Attacker Knowledge is Crucial: The effectiveness of adversarial attacks is significantly reduced when the attacker lacks knowledge of the analog hardware. "Hardware-in-Loop" attacks, where the attacker probes the actual hardware, are more potent.
- Intrinsic vs. Algorithmic Defense: NVM crossbar robustness is an inherent property of the hardware, unlike algorithmic defenses which add computational overhead.
Key Results
- Non-Adaptive Attacks:
- White Box PGD attacks: Showed significant robustness gains. For example, on CIFAR-10, the 64x64_100k crossbar model (highest non-ideality) achieved a 35.34% improvement in adversarial accuracy compared to the baseline at $\epsilon=1/255$.
- Square Attacks (Black Box): Demonstrated the highest resilience, with analog hardware modifying inference itself to provide robustness.
- Hardware-in-Loop Adaptive Attacks:
- These attacks were significantly more effective than non-adaptive ones, as the attacker could leverage knowledge of the NVM hardware.
- When the attacker's NVM model matched the target hardware, attacks were very strong. However, when there was a mismatch in crossbar properties, the attacks transferred poorly.
Limitations and Future Work
- Accuracy Degradation: While robustness increases, the non-idealities still lead to a degradation in clean accuracy, which is a trade-off that needs to be managed.
- Model Mismatch: The effectiveness of adaptive attacks is highly dependent on how well the attacker's NVM model matches the target hardware. Mismatches can reduce attack effectiveness.
- Future Work: The authors suggest designing NVM crossbars with an optimal trade-off between accuracy degradation and increased robustness. They also point to the potential for developing attacks that specifically exploit these non-ideal computations. Further research into different NVM technologies and chip-to-chip variations could also reveal new insights into attack transferability.
Summary updated