[Paper Review] GraN: An Efficient Gradient-Norm Based Detector for Adversarial and Misclassified Examples
GraN is a parameter- and time-efficient gradient-norm based detector that identifies adversarial and misclassified examples by computing the L1 norm of the gradient w.r.t. network weights for a smoothed input. It achieves state-of-the-art AUC ROC scores (90–100%) across MNIST, CIFAR-10, and SVHN with 0.01% of LID's parameters and 0.5% of its runtime, making it ideal for resource-constrained applications like autonomous driving.
Deep neural networks (DNNs) are vulnerable to adversarial examples and other data perturbations. Especially in safety critical applications of DNNs, it is therefore crucial to detect misclassified samples. The current state-of-the-art detection methods require either significantly more runtime or more parameters than the original network itself. This paper therefore proposes GraN, a time- and parameter-efficient method that is easily adaptable to any DNN. GraN is based on the layer-wise norm of the DNN's gradient regarding the loss of the current input-output combination, which can be computed via backpropagation. GraN achieves state-of-the-art performance on numerous problem set-ups.
Motivation & Objective
- Address the lack of efficient, low-overhead detectors for adversarial and misclassified examples in safety-critical applications like autonomous driving.
- Overcome the limitations of existing detectors that require excessive parameters or runtime, especially in real-time, resource-constrained environments.
- Develop a method that is both parameter-efficient and fast, while maintaining high detection performance across diverse adversarial attacks.
- Enable practical deployment of robust detection in real-world DNN systems by minimizing computational and memory overhead.
Proposed method
- Compute the gradient of the loss w.r.t. network weights for a slightly smoothed input using backpropagation, similar to a training step.
- Transform the layer-wise gradients into a feature vector by computing the L1 norm of each layer's gradient.
- Use a lightweight logistic regression model trained on the gradient-norm features to predict the probability of misclassification.
- Apply Gaussian smoothing (σ = 0.4) to the input before gradient computation to improve robustness and detection performance.
- Leverage the insight that misclassified examples generally yield larger gradient norms than correctly classified ones.
- Integrate a perturbation-removal step via Gaussian low-pass filtering to correct misclassified inputs, especially effective for noise-like perturbations.
Experimental results
Research questions
- RQ1Can a gradient-norm based detector achieve state-of-the-art performance while using significantly fewer parameters and less runtime than existing methods?
- RQ2How does the performance of GraN compare to LID and other state-of-the-art detectors across diverse adversarial attacks and datasets?
- RQ3To what extent does Gaussian smoothing improve the robustness and detection accuracy of the gradient-norm approach?
- RQ4Can GraN effectively detect both adversarial examples and non-adversarial misclassifications with minimal computational overhead?
- RQ5How does the method scale in terms of parameter and runtime efficiency on complex datasets like CIFAR-10 and SVHN compared to LID?
Key findings
- GraN achieves AUC ROC scores between 90% and 100% across all tested datasets (MNIST, CIFAR-10, SVHN) and attack types, with only minor performance drops on MNIST due to its simplicity.
- On CIFAR-10, GraN outperforms LID in five out of seven attack scenarios, with a 99.90% AUC on CW attacks and 99.42% on JSMA.
- GraN uses only 35 parameters for its logistic regression head, amounting to just 0.01% of the parameters required by LID’s 307,266-parameter overhead.
- Runtime for GraN is 0.5% of LID’s on CIFAR-10, even without explicit optimization, and remains under 50% of LID’s when LID’s activation caching is used.
- The perturbation-removal step via Gaussian smoothing effectively corrects misclassified inputs, particularly for sensor-noise-like perturbations, and generalizes well to other adversarial attacks.
- The method’s performance improves with dataset complexity, as higher-dimensional feature diversity in complex datasets leads to stronger gradient signals for misclassified examples.
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.