Introduction
Deep Neural Networks (DNNs) are increasingly critical in safety-sensitive domains such as autonomous driving and medical diagnostics. However, they are vulnerable to hardware-level "parameter-oriented" attacks. Using techniques like Rowhammer, an adversary can flip specific bits in a device's memory to alter a model's weights. While untargeted attacks aim to crash a model's overall accuracy, targeted bit-flip attacks (BFAs) are far more insidious. They can misclassify specific inputs or inject "backdoors" that only activate under certain conditions, leaving the model appearing normal otherwise.
Existing defenses often focus on untargeted scenarios or require computationally expensive retraining of the entire model. Aegis is a novel, platform-independent framework designed to mitigate these stealthy threats by increasing the "cost" of an attack—forcing adversaries to flip many more bits than is practically feasible—while maintaining high accuracy and improving inference speed.
The Aegis Framework
Aegis employs two core components to build its shield: a dynamic, randomized early-exit mechanism and a robust training strategy for internal classifiers.
Dynamic-Exit SDN (DESDN)
Aegis transforms a standard DNN into a "Shallow-Deep Network" by attaching lightweight Internal Classifiers (ICs) to various hidden layers.
To counter the precision required for targeted attacks, Aegis introduces Randomized Inference. Unlike standard multi-exit models that exit based on a fixed confidence threshold, Aegis randomly selects a subset of available ICs for each inference. This stochasticity prevents an attacker from knowing exactly which layer's parameters will be used for the final prediction, effectively "moving the goalposts" for the adversary and breaking the deterministic link between a specific bit-flip and the output.
Robust Training (ROB)
To ensure the ICs themselves are not easily compromised, Aegis uses a specialized training pipeline that does not require modifying the original model weights.
The process utilizes a Vulnerable-Protection Algorithm (VPA), a gradient-based method to identify the bits most likely to be targeted by an attacker. The researchers then simulate an attack on a substitute model and train the ICs to produce correct results even when the main model's features are distorted by these flips. This "non-intrusive" approach allows the original model to remain frozen while the ICs learn to compensate for potential hardware-level corruption.
Experimental Evaluation
The researchers evaluated Aegis using ResNet32 and VGG16 architectures across four image classification benchmarks: CIFAR-10, CIFAR-100, STL-10, and Tiny-ImageNet.
Key Results
- Attack Resilience: Against major targeted attacks like TBT, ProFlip, and TA-LBF, Aegis reduced the Attack Success Rate (ASR) from nearly 100% to below 10-20%. It significantly outperformed binarization-based baselines like BIN and RA-BNN.
- Increased Attack Cost: Even in adaptive scenarios where an attacker targets all internal classifiers simultaneously, Aegis forced them to flip roughly 35x more bits to achieve success. This makes attacks physically impractical, as flipping dozens of bits via Rowhammer can take hours or days.
- Efficiency and Utility: Aegis maintained high utility, with less than a 2% drop in benign accuracy. Furthermore, because many samples exit at earlier layers, Aegis reduced average inference time by 46% to 59%.
Conclusion and Future Work
Aegis demonstrates that introducing stochasticity and robust early-exits can effectively shield DNNs from stealthy bit-flip attacks. While the current study focuses on 8-bit quantized models common in edge devices, future work may extend these protections to high-precision floating-point models used in data centers. By making targeted attacks prohibitively expensive, Aegis provides a practical defense for models deployed in adversarial environments.
Summary updated