Adversarial Detection without Model Information

Abhishek Moitra, Youngeun Kim, Priyadarshini PandaarXiv 2022

Abstract

Prior state-of-the-art adversarial detection works are classifier model dependent, i.e., they require classifier model outputs and parameters for training the detector or during adversarial detection. This makes their detection approach classifier model specific. Furthermore, classifier model outputs and parameters might not always be accessible. To this end, we propose a classifier model independent adversarial detection method using a simple energy function to distinguish between adversarial and natural inputs. We train a standalone detector independent of the classifier model, with a layer-wise energy separation (LES) training to increase the separation between natural and adversarial energies. With this, we perform energy distribution-based adversarial detection. Our method achieves comparable performance with state-of-the-art detection works (ROC-AUC > 0.9) across a wide range of gradient, score and gaussian noise attacks on CIFAR10, CIFAR100 and TinyImagenet datasets. Furthermore, compared to prior works, our detection approach is light-weight, requires less amount of training data (40% of the actual dataset) and is transferable across different datasets.

Introduction: The Coupling Problem

Deep Neural Networks (DNNs) are notoriously fragile when faced with adversarial attacks—carefully crafted noise that causes a model to misclassify an image with high confidence. To counter this, researchers often build "detector" networks to flag these inputs before they reach the classifier. However, most existing detectors suffer from a major "coupling" problem: they require access to the internal parameters or outputs of the specific classifier they are protecting. This makes them model-specific and often privacy-invasive.

Comparison of assumptions and the proposed detection pipeline.

This work proposes a classifier-independent detector—one that can sit in front of any model and flag malicious inputs based solely on the data's properties, requiring no information about the vulnerable classifier ($M_C$).

Methodology: Layer-wise Energy Separation (LES)

The proposed standalone detector network is trained using a technique called Layer-wise Energy Separation (LES).

The Energy Metric

Instead of complex statistical modeling, the authors define "energy" simply as the average magnitude of feature outputs in a given layer. Natural images tend to have different energy signatures than adversarial ones. The detector is intentionally kept small (a 3-layer convolutional network with only 5.9k parameters) to amplify these differences.

LES Training and Thresholding

The detector is trained layer-by-layer. In each stage, previous layers are frozen, and the current layer is optimized to maximize the "distance" between the energy of natural images and adversarial images. Once trained, the detector calculates the energy of an incoming image. If the energy exceeds a specific threshold $\mathcal{E}_{Th}$ (the $K^{th}$ percentile of the natural energy distribution), it is flagged as an attack.

Layer-wise energy separation and threshold-based detection.

Key Insights and Results

  • The Lipschitz Paradox: While traditional defense tries to lower the Lipschitz constant, this paper shows that a higher Lipschitz constant in the detector is beneficial because it amplifies the adversarial noise, making it easier to detect.
  • Model Agnosticism & Transferability: A detector trained using attacks for one model (e.g., VGG16) successfully protects others (e.g., ResNet18). It also shows cross-attack transferability, detecting score-based attacks even when trained only on gradient-based ones.
  • High Efficiency: The method achieves a ROC-AUC > 0.9 across most attack types while being 10-100x more computationally efficient than previous methods. It requires only 40% of the original training data to reach peak performance.

Limitations and Future Work

The detector currently struggles with the Fast Adaptive Boundary (FAB) attack, as it adds such a tiny amount of noise that the energy distribution shift is negligible. Future directions include exploring synthetic data for training and developing more sophisticated energy functions to catch subtle attacks like FAB.

For reproducibility, layer-wise energy separation training code is available at: https://github.com/Intelligent-Computing-Lab-Yale/Energy-Separation-Training

Summary updated

BibTeX
@misc{moitra2022adversarial,
  author = {Abhishek Moitra and Youngeun Kim and Priyadarshini Panda},
  title = {{Adversarial Detection without Model Information}},
  year = {2022},
  eprint = {2202.04271},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2202.04271},
}
Figure