[Paper Review] The Odds are Odd: A Statistical Test for Detecting Adversarial Examples
This paper proposes a statistical test based on log-odds robustness to random noise for detecting and correcting adversarial examples in deep neural networks. By analyzing how perturbations alter feature representations and log-odds under noise, the method detects adversarial inputs with 99% detection rate (FPR < 1%) on CIFAR-10 and ImageNet, even against defense-aware attackers, and achieves 92% accuracy on adversarial samples after correction.
We investigate conditions under which test statistics exist that can reliably detect examples, which have been adversarially manipulated in a white-box attack. These statistics can be easily computed and calibrated by randomly corrupting inputs. They exploit certain anomalies that adversarial attacks introduce, in particular if they follow the paradigm of choosing perturbations optimally under p-norm constraints. Access to the log-odds is the only requirement to defend models. We justify our approach empirically, but also provide conditions under which detectability via the suggested test statistics is guaranteed to be effective. In our experiments, we show that it is even possible to correct test time predictions for adversarial attacks with high accuracy.
Motivation & Objective
- To develop a reliable, efficient method for detecting adversarial examples without requiring access to the model's architecture or gradients.
- To identify intrinsic statistical anomalies in adversarial perturbations that arise from optimal p-norm constrained attacks.
- To enable correction of misclassified adversarial predictions by leveraging noise-induced log-odds stability.
- To evaluate robustness against defense-aware adversaries who adapt attacks to evade detection.
Proposed method
- The method computes a test statistic based on the variance of log-odds under random input noise, exploiting directional anomalies in adversarial perturbations.
- It uses a second-level logistic classifier trained on log-odds statistics from clean and adversarial examples to distinguish between natural and perturbed inputs.
- The defense is calibrated using random noise corruption of inputs, with no need for model gradients or architectural access.
- The approach is grounded in the insight that adversarial perturbations induce non-random, directional changes in feature space under noise, unlike natural inputs.
- The method is robust to transferability, as it relies only on log-odds and feature representation stability under noise.
- It enables prediction correction by re-evaluating the model on noise-robust log-odds, recovering the original class with high accuracy.
Experimental results
Research questions
- RQ1Can adversarial examples be reliably detected using only log-odds statistics under random noise?
- RQ2Do adversarial perturbations induce characteristic directional anomalies in feature representations that are absent in natural inputs?
- RQ3Can the detection method remain effective even when the attacker is aware of the defense mechanism?
- RQ4Is it possible to correct adversarial predictions with high accuracy using the proposed statistical test?
- RQ5How does the method compare to state-of-the-art detection baselines like feature squeezing and dropout uncertainty?
Key findings
- The method achieves a 99% detection rate with FPR < 1% on CIFAR-10 under L∞-PGD attacks, maintaining 96% accuracy on clean and 92% on adversarial samples.
- On ImageNet, the detection rate reaches 99% with FPR 1%, demonstrating strong generalization across datasets.
- Against defense-aware attackers using L2-PGD and L2-Carlini-Wagner attacks, the method maintains detection rates of 71.4–81.3% and corrected accuracies of 56–56.6%.
- The method outperforms feature squeezing (DenseNet) on L∞-PGD, achieving 99% detection vs. 55% and 92% corrected accuracy vs. 56% on adversarial examples.
- Compared to dropout uncertainty (Feinman et al., 2017), the method achieves 71.4% detection rate against defense-aware L2-CW attacks, significantly outperforming the 2% detection rate of the baseline defense.
- The method remains effective even when the attacker optimizes perturbations under the same noise distribution used for detection, indicating resilience to adaptive attacks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.