Abstract
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial samples—inputs crafted with imperceptible perturbations designed to trigger misclassification. This paper introduces nMutant, a novel detection framework that leverages mutation testing to identify adversarial inputs at runtime. By exploiting the inherent "brittleness" of adversarial samples compared to normal inputs, nMutant employs a Sequential Probability Ratio Test (SPRT) to provide efficient, black-box detection with high statistical confidence.
Introduction
The susceptibility of DNNs to adversarial attacks poses a significant safety risk for critical applications like autonomous driving. While existing defenses such as adversarial training and formal verification offer some protection, they are often computationally prohibitive or limited to specific attack types. This research explores a "third way": a runtime detection mechanism that requires no knowledge of the attack method and provides high-confidence results with minimal overhead.
Methodology
The proposed nMutant algorithm is inspired by mutation testing in software engineering. In this context, "mutations" are small, random, label-preserving perturbations applied to the input data.
The system calculates a sensitivity score, $\kappa(x)$, representing the probability that a random mutation will change the model's output label. To optimize performance, nMutant utilizes the Sequential Probability Ratio Test (SPRT). Instead of a fixed number of trials, it generates mutations iteratively until it reaches a predefined statistical confidence level to either accept the hypothesis that the sample is normal ($H_0$) or adversarial ($H_1$). This allows for rapid detection—often in just a few dozen model passes—with user-defined error bounds.
The Intuition of Adversarial Brittleness
The effectiveness of this approach rests on the observation that adversarial samples are inherently "brittle." While normal samples reside in dense regions of the input space where the model is robust to noise, adversarial samples are often isolated "islands" of error.
As illustrated above, a random nudge to a normal sample is unlikely to cross a decision boundary. Conversely, a tiny perturbation to an adversarial sample has a high probability of pushing it back into a region where the model predicts the correct (or at least a different) label. This sensitivity gap is the key signal used by nMutant.
Evaluation and Results
The authors evaluated nMutant on MNIST and CIFAR10 datasets against several attack vectors, including FGSM, C&W, JSMA, and black-box attacks.
- High Detection Accuracy: On MNIST, the algorithm detected JSMA and C&W attacks with 91% to 96.9% accuracy, while maintaining low false-positive rates (96% to 98% accuracy on normal samples).
- Efficiency: Due to the SPRT mechanism, detection required an average of only 33 mutations for MNIST and 46.5 for CIFAR10 to reach a confident conclusion.
- Sensitivity Gap: Adversarial samples exhibited sensitivity scores up to 72 times higher than normal samples, providing a clear and measurable distinction.
- Training Error Detection: Interestingly, the method also identified wrongly-labeled samples in the original training set, as these exhibit the same high sensitivity as intentional adversarial attacks.
Conclusion and Future Work
nMutant offers a practical, black-box defense against adversarial attacks by exploiting the statistical instability of crafted inputs. Unlike many defenses, it does not require access to model internals, making it easy to deploy alongside existing DNNs. Future work will address potential adaptive attacks designed to be "robustly adversarial" and explore more complex, domain-specific mutations to further improve detection resilience.
Summary updated