Skip to main content
QUICK REVIEW

[Paper Review] Gradient Similarity: An Explainable Approach to Detect Adversarial Attacks against Deep Learning

Jasjeet Dhaliwal, Saurabh Shintre|arXiv (Cornell University)|Jun 27, 2018
Adversarial Robustness in Machine LearningComputer Science19 references7 citations
TL;DR

This paper proposes Gradient Similarity (GS), a computationally efficient metric that leverages influence functions to detect adversarial inputs by measuring how training data points influence model predictions. GS enables a logistic regression detector to achieve near-perfect ROC-AUC (95–100%) on unseen attacks and detects white-box attacks on MNIST with 87–97% AUC, even when adversaries have full model access.

ABSTRACT

Deep neural networks are susceptible to small-but-specific adversarial perturbations capable of deceiving the network. This vulnerability can lead to potentially harmful consequences in security-critical applications. To address this vulnerability, we propose a novel metric called \emph{Gradient Similarity} that allows us to capture the influence of training data on test inputs. We show that \emph{Gradient Similarity} behaves differently for normal and adversarial inputs, and enables us to detect a variety of adversarial attacks with a near perfect ROC-AUC of 95-100\%. Even white-box adversaries equipped with perfect knowledge of the system cannot bypass our detector easily. On the MNIST dataset, white-box attacks are either detected with a high ROC-AUC of 87-96\%, or require very high distortion to bypass our detector.

Motivation & Objective

  • To address the critical vulnerability of deep neural networks to small, targeted adversarial perturbations that cause misclassification with high confidence.
  • To develop a detection method that is robust against both zero-knowledge and white-box adversaries, including those with full knowledge of the model architecture and parameters.
  • To create a detector that is explainable by linking model predictions to training data influence, using influence functions as a theoretical foundation.
  • To reduce the computational cost of influence-based detection by introducing a lightweight proxy metric—Gradient Similarity—while preserving detection performance.
  • To evaluate the detector's generalization capability against unseen attack methods through cross-validation.

Proposed method

  • Proposes Gradient Similarity (GS) as a low-cost approximation of influence functions, computed as the cosine similarity between the gradient of the loss on a test input and the gradient of the loss on each training point.
  • Uses GS to compute a feature vector per test input, representing the similarity of its gradient to those of all training points, capturing the influence of training data on test predictions.
  • Trains a logistic regression classifier on GS-derived features to distinguish between normal and adversarial inputs.
  • Employs a threshold-based detector for white-box attack detection, using GS values to flag inputs with anomalous influence patterns.
  • Applies the method on MNIST and CIFAR2 datasets, evaluating against multiple attack types including FGSM, BIM, and C&W, under both zero-knowledge and white-box threat models.
  • Uses cross-validation to test generalization to unseen attacks, validating robustness beyond known attack patterns.

Experimental results

Research questions

  • RQ1Can influence functions be used to detect adversarial inputs by identifying differences in how training points affect predictions on normal versus adversarial inputs?
  • RQ2Can a computationally efficient proxy metric like Gradient Similarity effectively replace expensive influence function computation while preserving detection accuracy?
  • RQ3How resilient is a GS-based detector against white-box adversaries with full knowledge of the model and attack objectives?
  • RQ4Does the detector generalize to previously unseen adversarial attack methods, as demonstrated through cross-validation?
  • RQ5Why does the detector perform poorly on CIFAR2 despite strong performance on MNIST, and what are the underlying data or structural factors?

Key findings

  • The GS-based detector achieves a ROC-AUC of 95–100% in detecting a variety of unseen adversarial attacks, demonstrating strong generalization capability.
  • On the MNIST dataset, white-box attacks are detected with a ROC-AUC of 87–97%, indicating high resilience even when adversaries have full model access.
  • White-box attacks that bypass the detector require significantly higher L2 distortion, suggesting that the detector forces adversaries to make more perceptible changes.
  • The detector's performance on CIFAR2 is limited, with AUC ranging from 50–59%, primarily due to low training point availability and high input space support.
  • Cross-validation experiments confirm that the detector generalizes well to new attack methods, indicating it captures a fundamental property of adversarial inputs beyond specific attack patterns.
  • The method requires minimal modification to the original deep neural network, making it practical for real-world deployment compared to robust optimization or adversarial training.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.