Abstract
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial attacks, largely due to the "transferability" of adversarial examples across different models. This paper challenges the assumption that transferability is an inherent property of DNNs. We demonstrate that introducing simple randomness at inference time—either by randomly selecting a model from a pool or by injecting Gaussian noise into a model's weights—can effectively break transferability. Our evaluation across MNIST, CIFAR-10, and German Traffic Sign datasets shows that these randomization schemes significantly improve robustness against $L_2$ and $L_\infty$ attacks, often surpassing the performance of computationally intensive adversarial training while preserving accuracy on clean data.
Introduction
The vulnerability of Deep Neural Networks to adversarial perturbations—small, often invisible changes to inputs that cause misclassification—is a major hurdle for their deployment in security-critical applications. A particularly dangerous characteristic of these attacks is transferability: an adversarial example crafted for one model often succeeds against another, even with a different architecture. This property enables "black-box" attacks where an attacker uses a surrogate model to generate attacks for a target system.
Current defenses, such as adversarial training, are often computationally expensive and can lead to overfitting. This paper explores an alternative hypothesis: transferability is a vulnerability of static, deterministic models rather than an unavoidable curse. By introducing randomness at inference time, we can disrupt the attacker's ability to map the target's decision boundaries.
Methodology: Breaking Determinism
We propose two primary randomization schemes to mitigate the transferability of adversarial samples:
- Random-Model Selection: Instead of a single static model, the defender maintains a pool of $N$ models trained with different initializations. For each query, a model is selected at random to provide the prediction. This forces the attacker to contend with shifting decision boundaries. An Ensemble variant further improves this by having a random subset of models vote on the output.
- Random-Weight Injection: A more efficient approach where a single trained model is used, but tiny Gaussian noise is added to the weights at every inference request. This "jitters" the model's state, making it difficult for highly over-optimized adversarial perturbations to remain effective.
Experimental Evaluation
The proposed methods were tested against state-of-the-art $L_2$ and $L_\infty$ (PGD) attacks on three benchmark datasets: MNIST, CIFAR-10, and the German Traffic Sign dataset. We compared our randomization techniques against static baselines and the state-of-the-art Ensemble Adversarial Training.
Key Results
Our experiments reveal that randomness is a potent defense against transfer-based attacks:
- Significant Robustness Gains: In targeted $L_2$ attacks on CIFAR-10, the static baseline's accuracy plummeted to near 0%. The Random-Weight method restored accuracy by up to 69.7%.
- Superiority over Adversarial Training: On CIFAR-10 with a perturbation budget of $\epsilon=0.03$, our Ensemble-10 method maintained a robust 84.8% accuracy, significantly outperforming Ensemble Adversarial Training (54.4%).
- Preservation of Clean Accuracy: Crucially, these randomization techniques do not degrade performance on unperturbed data. For instance, on MNIST, both static and Random-Weight models maintained 99.3% accuracy.
Discussion and Insights
The effectiveness of these methods stems from the fact that adversarial examples are often highly tuned to a specific model's weights. By randomizing the model at runtime, the defender effectively converts a white-box scenario into a partially black-box one for the attacker.
Furthermore, weight noise acts as a "free lunch" for defense; it is computationally negligible compared to retraining but provides substantial protection. To overcome such randomization, an attacker would need to significantly increase their perturbation budget, leading to visible distortions that defeat the purpose of a stealthy adversarial attack.
Conclusion
Randomization at inference time provides a simple yet powerful mechanism to break the transferability of adversarial samples. By moving away from static, deterministic models, defenders can achieve high levels of robustness without the overhead of adversarial training. Future research may explore combining these runtime techniques with adversarial training to create even more resilient hybrid defenses.
Summary updated