Adversarial Sample Detection via Channel Pruning

Zuohui Chen, RenXuan Wang, Yao Lu, jingyang Xiang, Qi XuanAML @ ICML 2021

TL;DR

This paper introduces a novel method for detecting adversarial samples in deep neural networks by using pruned models. By strategically removing channels from a neural network, the authors create smaller, more sensitive sub-models that exhibit different outputs for adversarial inputs compared to clean ones, enabling effective detection with significantly reduced computational cost.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are increasingly used in critical applications, but they are vulnerable to adversarial attacks. Adversarial samples are subtly modified inputs designed to fool a model into making incorrect predictions. While detecting these samples is a crucial defense mechanism, existing methods often require substantial computational resources and memory, making them impractical for real-world deployment. This paper aims to bridge this gap by proposing a more efficient and effective adversarial sample detection strategy.

Methods

The core of this paper's contribution lies in its adversarial sample detection method based on pruned models. Instead of using multiple, full-sized models or complex mutation techniques, the authors leverage random channel pruning. Here's how it works:

  • Channel Pruning: They systematically remove channels (which can be thought of as feature detectors within a layer) from a neural network. This process is done randomly but guided by group-wise pruning rates to maintain overall model accuracy.
  • Sensitivity to Adversarial Samples: The key insight is that these pruned models, while smaller and faster, become more sensitive to adversarial perturbations. When presented with an adversarial sample, a pruned model is more likely to output a different label than the original, unpruned model.
  • Detection Mechanism: A collection of these pruned models is used. For an unknown input, the outputs of these pruned models are compared to the output of the original model. A high degree of label divergence across the pruned models signals an adversarial sample.
  • Sequential Probability Ratio Testing (SPRT): To efficiently process the outputs from multiple pruned models without necessarily running all of them, the authors employ SPRT. This statistical method allows for dynamic decision-making, stopping the detection process as soon as enough evidence is gathered to classify a sample as benign or adversarial, further reducing computational overhead.

Datasets

The experiments were conducted on two standard image classification datasets:

  • CIFAR10: A dataset of 60,000 32x32 color images in 10 classes, with 50,000 for training and 10,000 for testing.
  • SVHN (Street View House Numbers): A dataset of real-world images of house numbers, with 73,257 images for training and 26,032 for testing.

The models used for evaluation were ResNet18 and VGGNet16, which achieved high accuracies on these datasets.

Key Insights and Ideas

  • Pruning as a Defense Enabler: The paper demonstrates that channel pruning, typically used for model compression, can also enhance adversarial sample detection by increasing model sensitivity. This is a novel application of pruning techniques.
  • Diversity Through Randomness: Random channel pruning, while maintaining accuracy, naturally creates diverse sub-models. This diversity is crucial for detecting adversarial samples, as it's harder for an attacker to craft a perturbation that fools all diverse sub-models simultaneously.
  • Efficiency Gains: The combination of smaller pruned models and SPRT leads to significant reductions in both model size and computational cost, making adversarial detection more practical.
  • Multi-model Advantage: The paper reinforces the idea that using multiple models for detection is more robust than relying on a single model, as it mitigates the risk of adaptive attacks that target specific model vulnerabilities.

Key Results

The proposed channel pruning-based detection method achieved impressive results:

  • Model Size Reduction: The pruned models were significantly smaller, with FLOPs and size reduced to as low as 24.46% and 4.86% of the original models on CIFAR10 and SVHN, respectively.
  • Detection Accuracy: The method achieved average detection accuracies of 92.76% on CIFAR10 and 93.92% on SVHN.
  • Outperforming SOTA: This performance exceeded the state-of-the-art multi-model detection method (MMT) by 5.29% and 30.92% on CIFAR10 and SVHN, respectively.
  • Fewer Models Required: Crucially, the proposed method used significantly fewer models for detection (average of 29.24 and 30.68 models) compared to MMT (average of 42.81 and 64.66 models).
  • AUROC Scores: The method consistently achieved higher AUROC scores than MMT across various attacks and datasets, indicating better discriminative power.

Limitations and Future Work

  • Randomness vs. Targeted Pruning: While random pruning is effective, future work could explore more targeted pruning strategies that might further optimize the trade-off between model size, accuracy, and adversarial sensitivity.
  • Generalizability: The current experiments are on CIFAR10 and SVHN. Evaluating the method on larger, more complex datasets and different network architectures would be valuable.
  • Adaptive Attacks: While the multi-model approach is inherently more robust, further investigation into how this method performs against highly sophisticated adaptive attacks would be beneficial.
  • Real-time Applications: Exploring optimizations for even faster real-time detection in resource-constrained environments could be a promising direction.

Summary updated

BibTeX
@inproceedings{chen2021adversarial,
  author = {Zuohui Chen and RenXuan Wang and Yao Lu and jingyang Xiang and Qi Xuan},
  title = {{Adversarial Sample Detection via Channel Pruning}},
  booktitle = {AML @ ICML},
  year = {2021},
  url = {https://openreview.net/forum?id=MKfq7TuRBCK},
}
Figure