[Paper Review] When Explainability Meets Adversarial Learning: Detecting Adversarial Examples using SHAP Signatures
This paper proposes a novel adversarial example detection method that leverages SHAP values from the penultimate layer of a deep neural network to create explainability-based signatures for distinguishing normal from adversarial inputs. The method achieves high detection performance (AUC-ROC ~97%) and strong generalization across diverse attack types, demonstrating a strong link between model explainability and adversarial robustness.
State-of-the-art deep neural networks (DNNs) are highly effective in solving many complex real-world problems. However, these models are vulnerable to adversarial perturbation attacks, and despite the plethora of research in this domain, to this day, adversaries still have the upper hand in the cat and mouse game of adversarial example generation methods vs. detection and prevention methods. In this research, we present a novel detection method that uses Shapley Additive Explanations (SHAP) values computed for the internal layers of a DNN classifier to discriminate between normal and adversarial inputs. We evaluate our method by building an extensive dataset of adversarial examples over the popular CIFAR-10 and MNIST datasets, and training a neural network-based detector to distinguish between normal and adversarial inputs. We evaluate our detector against adversarial examples generated by diverse state-of-the-art attacks and demonstrate its high detection accuracy and strong generalization ability to adversarial inputs generated with different attack methods.
Motivation & Objective
- To address the persistent challenge of detecting adversarial examples in deep neural networks, which remain vulnerable despite extensive research.
- To investigate whether explainability techniques like SHAP can reveal intrinsic patterns in adversarial inputs that enable detection.
- To develop a detection framework that uses SHAP values as signatures to distinguish normal from adversarial examples.
- To evaluate the method's robustness and generalization across diverse, state-of-the-art white-box and black-box attacks.
- To explore the fundamental connection between model explainability and adversarial example detection.
Proposed method
- The method computes Shapley Additive Explanations (SHAP) values for the penultimate layer activations of a trained DNN classifier.
- These SHAP values are used as input features to train a separate neural network-based detector to classify inputs as normal (0) or adversarial (1).
- The detector is trained on a comprehensive dataset of adversarial examples generated using multiple attack methods on CIFAR-10 and MNIST.
- A 'leave-one-out' cross-evaluation strategy is employed, where the detector is trained on all attack types except one and tested on the excluded attack to assess generalization.
- The approach uses binary cross-entropy loss with early stopping based on validation loss to prevent overfitting.
- The method is evaluated under strict adversarial defense guidelines, including diverse distance metrics (L0, L2, Linf) and both white-box and black-box attacks.
Experimental results
Research questions
- RQ1RQ1: How well does the proposed detector perform on adversarial examples it was trained on, across different datasets and models?
- RQ2RQ2: How well does the detector generalize to adversarial examples generated by attack methods it was not trained on?
- RQ3RQ3: Can SHAP-based signatures capture intrinsic properties of adversarial examples that are robust across diverse attack types?
- RQ4RQ4: Does the detector maintain high performance under varying perturbation norms and attack types, including strong adaptive attacks?
- RQ5RQ5: Is there a fundamental connection between SHAP-based model explanations and the detectability of adversarial examples?
Key findings
- The detector achieves an AUC-ROC of 0.966 on CIFAR-10 and 0.967 on MNIST when trained and tested on known attacks, indicating strong detection performance.
- The detector generalizes effectively to unseen attacks, achieving an AUC-ROC of 0.965 on CIFAR-10 and 0.973 on MNIST in the leave-one-out evaluation.
- For a false positive rate of 0.05, the true positive rate remains high across most attack methods, demonstrating robust detection capability.
- The method maintains high AUC-PR scores of 0.958 (CIFAR-10) and 0.961 (MNIST) in the known-attack setting, and 0.961 (CIFAR-10) and 0.975 (MNIST) in the unknown-attack generalization test.
- The results support the hypothesis that SHAP signatures reflect intrinsic differences in feature importance distributions between normal and adversarial inputs.
- The strong generalization across diverse attacks suggests that SHAP signatures capture a fundamental property of adversarial examples related to robustness and feature attribution.
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.