Towards an Accurate and Secure Detector against Adversarial Perturbations

Chao Wang, Shuren Qi, Zhiqiu Huang, Yushu Zhang, Xiaochun CaoarXiv 2023 · arXiv · OpenReview

Abstract

The vulnerability of deep neural networks to adversarial perturbations has been widely perceived in the computer vision community. From a security perspective, it poses a critical risk for modern vision systems, e.g., the popular Deep Learning as a Service (DLaaS) frameworks. For protecting off-the-shelf deep models while not modifying them, current algorithms typically detect adversarial patterns through discriminative decomposition of natural-artificial data. However, these decompositions are biased towards frequency or spatial discriminability, thus failing to capture adversarial patterns comprehensively. More seriously, successful defense-aware (secondary) adversarial attack is practical under the assumption that the adversary is fully aware of the detector. Motivated by such facts, we propose an accurate and secure adversarial example detector, relying on a spatial-frequency discriminative decomposition with secret keys. It expands the above works on two aspects: 1) the introduced Krawtchouk basis provides better spatial-frequency discriminability and thereby is more suitable for capturing adversarial patterns than the common trigonometric or wavelet basis; 2) the extensive parameters for decomposition are generated by a pseudo-random function with secret keys, hence blocking the defense-aware adversarial attack.

Introduction

Deep Neural Networks (DNNs) are notoriously fragile. Tiny, human-imperceptible changes to an image—known as adversarial perturbations—can trick a world-class classifier into seeing a toaster as a school bus. Existing defenses usually try to detect these "artifacts" by looking at the image in a different mathematical space, such as the frequency domain (using Discrete Cosine Transforms) or the spatial domain (using Wavelets). However, there is a "resolution trade-off": global transforms are great at catching frequency shifts but miss local spatial patterns, while local transforms do the opposite. Furthermore, if a detector relies on a few fixed, public features, a clever attacker can simply craft a "defense-aware" attack that avoids those specific features, rendering the defense useless.

Methodology

The proposed discriminative detector is built on three main pillars: Krawtchouk decomposition, a secrecy mechanism, and frequency-band integration.

Krawtchouk Decomposition

Unlike standard trigonometric or wavelet bases, Krawtchouk polynomials offer a "mid-scale" representation. They allow for explicit control over the number and location of "zeros" in the basis function, meaning the detector can capture differences in both spatial and frequency distributions simultaneously. Natural images generally follow a "power law" in the frequency domain, concentrating energy in low frequencies. Adversarial perturbations, being artificially generated, rarely obey this rule. The Krawtchouk basis is particularly adept at spotting these statistical irregularities.

Secrecy Mechanism

To prevent attackers from simply "coding around" the detector, the system uses a secret key. This key seeds a pseudorandom number generator that determines which specific Krawtchouk features are used for decomposition. This creates a "moving target" for the adversary. By using random feature selection, the attacker is forced into a corner: to evade the detector, they must suppress perturbations in the features the detector is looking at. Since the attacker doesn't know which features those are, they end up having to suppress so much of the attack that it fails to fool the original DNN.

The training phase of the proposed adversarial example detector, illustrating the pipeline from Krawtchouk transform to SVM prediction.

Frequency-band Integration

Because the raw coefficient set is high-dimensional and redundant, the system groups coefficients into bands based on their $\ell_2$ norm. These integrated features are then fed into a standard Support Vector Machine (SVM) for final classification (Clean vs. Perturbed).

Inference and Security

During the inference phase, an example under analysis is processed by the detector using the secret key and learned parameters. If an adversarial example is detected, service is denied to protect the DLaaS framework. If not detected, the service is offered, potentially with optional data randomization for added security.

The inference phase, highlighting the use of secret keys and learned parameters to secure Deep Learning as a Service (DLaaS).

Experimental Evaluation

The detector was evaluated using general image sets (MNIST, CIFAR-10, ImageNet) and face datasets (MEDS, Multi-PIE, PubFig) against a wide range of attack methods including FGSM, BIM, PGD, DeepFool, and Universal perturbations.

Key Results

  • Superior Accuracy: On ImageNet, the detector achieved F1 scores and accuracy above 90% for most attack-model pairs (VGG-16, ResNet, ViT, etc.), consistently outperforming previous state-of-the-art methods.
  • Robustness to "Crossing": In "Crossing Attack" experiments (training on one attack type and testing on another), the detector maintained nearly 100% accuracy in many scenarios, proving it isn't just over-fitting to a specific attack's math.
  • Generalizability: A detector trained on one dataset or attack type often successfully detected attacks on entirely different datasets or models, suggesting adversarial artifacts have a "universal" signature in the Krawtchouk space.
  • Handling "Harmless" Noise: By including common "harmless" perturbations (like Gaussian noise or JPEG compression) in the training set, the detector could distinguish between a malicious attack and a low-quality image with high precision.

Conclusion

This work introduces an accurate and secure adversarial example detector that bridges the gap between spatial and frequency analysis through Krawtchouk decomposition. By incorporating a secret-key mechanism, it effectively addresses the threat of defense-aware attacks. While primarily designed for digital-level noise-like perturbations, future work will explore handling higher-level semantic perturbations that don't leave obvious mathematical footprints in the spatial-frequency domain.

Summary updated

Abstract

The vulnerability of deep neural networks to adversarial perturbations has been widely perceived in the computer vision community. From a security perspective, it poses a critical risk for modern vision systems, e.g., the popular Deep Learning as a Service (DLaaS) frameworks. For protecting off-the-shelf deep models while not modifying them, current algorithms typically detect adversarial patterns through discriminative decomposition of natural-artificial data. However, these decompositions are biased towards frequency or spatial discriminability, thus failing to capture adversarial patterns comprehensively. More seriously, successful defense-aware (secondary) adversarial attack (i.e., evading the detector as well as fooling the model) is practical under the assumption that the adversary is fully aware of the detector (i.e., the Kerckhoffs's principle). Motivated by such facts, we propose an accurate and secure adversarial example detector, relying on a spatial-frequency discriminative decomposition with secret keys. It expands the above works on two aspects: 1) the introduced Krawtchouk basis provides better spatial-frequency discriminability and thereby is more suitable for capturing adversarial patterns than the common trigonometric or wavelet basis; 2) the extensive parameters for decomposition are generated by a pseudo-random function with secret keys, hence blocking the defense-aware adversarial attack. Theoretical and numerical analysis demonstrates the increased accuracy and security of our detector with respect to a number of state-of-the-art algorithms.
BibTeX
@misc{wang2023towards,
  author = {Chao Wang and Shuren Qi and Zhiqiu Huang and Yushu Zhang and Xiaochun Cao},
  title = {{Towards an Accurate and Secure Detector against Adversarial Perturbations}},
  year = {2023},
  eprint = {2305.10856},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.10856},
}
Figure