🤖 AI Summary
Existing methods for detecting adversarial examples struggle to effectively model their inherent global and local uncertainties, limiting detection performance. This work formalizes the detection problem as a two-sample test and introduces, for the first time, two novel statistical metrics: Variance Discrepancy (VD) and Perturbation Covariance Discrepancy (PCD). VD captures the anomalous dispersion of adversarial examples in feature space—reflecting global uncertainty—while PCD characterizes their instability under perturbations, representing local uncertainty. These metrics overcome the limitations of traditional Maximum Mean Discrepancy–based approaches. Extensive experiments demonstrate that the proposed method significantly outperforms current baselines across diverse attack scenarios, confirming that explicitly leveraging adversarial-specific uncertainties enhances detection efficacy.
📝 Abstract
Statistical adversarial detection (SAD) treats detection as a two-sample test. Given a reference set of clean examples (CEs) and a batch of queries, potentially containing an unknown mixture of CEs and adversarial examples (AEs), SAD decides whether the query distribution drifts away from the CE distribution while controlling the false-alarm rate. Existing SAD-based methods mainly use maximum mean discrepancy (MMD) to measure the distributional discrepancy. However, MMD's distributional properties limit its ability to capture characteristic uncertainty patterns of AEs that are crucial for detection: AEs typically exhibit abnormal feature spread (i.e., global uncertainty) and instability under perturbations (i.e., local uncertainty). To close the gap, we propose Uncertainty-aware Statistical Adversarial Detection (USAD), which explicitly captures these uncertainty patterns with two new statistics: (1) Variance Discrepancy (VD), which measures the difference in feature spread between AEs and CEs to capture global uncertainty differences. (2) Perturbation-based Covariance Discrepancy (PCD), which compares feature covariance under Gaussian perturbations to capture local uncertainty differences. By aggregating VD and PCD, USAD achieves superior detection performances over baseline methods against various adversarial attacks, highlighting the importance of considering characteristic behaviors of AEs for effective SAD. Our code is available at: https://anonymous.4open.science/r/USAD.