Divide-and-Conquer Adversarial Detection

Xuwang Yin, Soheil Kolouri, Gustavo K. Rohde

Abstract

The vulnerabilities of deep neural networks against adversarial examples have become a significant concern for deploying these models in sensitive domains. Devising a definitive defense against such attacks is proven to be challenging, and the methods relying on detecting adversarial samples are only valid when the attacker is oblivious to the detection mechanism. In this paper we propose a principled adversarial example detection method that can withstand norm-constrained white-box attacks. Inspired by one-versus-the-rest classification, in a K class classification problem, we train K binary classifiers where the i-th binary classifier is used to distinguish between clean data of class i and adversarially perturbed samples of other classes. At test time, we first use a trained classifier to get the predicted label (say k) of the input, and then use the k-th binary classifier to determine whether the input is a clean sample (of class k) or an adversarially perturbed example (of other classes). We further devise a generative approach to detecting/classifying adversarial examples by interpreting each binary classifier as an unnormalized density model of the class-conditional data. We provide comprehensive evaluation of the above adversarial example detection/classification methods, and demonstrate their competitive performances and compelling properties.

Introduction

Adversarial examples—inputs with small, intentionally crafted perturbations that cause misclassification—pose a severe threat to the deployment of deep neural networks in safety-critical applications. Traditional defenses often fail against "adaptive" attackers who possess knowledge of the defense mechanism and can optimize their attacks to bypass it. This paper introduces Generative Adversarial Training (GAT), a framework that shifts the focus from identifying generic noise to verifying class-specific signals using a divide-and-conquer strategy.

The GAT Framework: Divide and Conquer

The core innovation of GAT is the replacement of a single $K$-class classifier with a suite of $K$ specialized binary detectors ($d_1, d_2, \dots, d_K$). Each detector $d_i$ is trained to distinguish between clean samples of class $i$ and adversarially perturbed samples originating from all other classes. This approach partitions the input space into class-specific regions, making it significantly harder for an attacker to find a single perturbation that fools the entire system.

A conceptual visualization of the GAT mechanism, showing how decision boundaries of individual detectors partition the space to isolate natural data from perturbed examples.

Verification and Generative Detection

At inference time, GAT employs a two-step verification process. First, a standard classifier predicts a label $\hat{k}$ for the input $x$. Second, the corresponding detector $d_{\hat{k}}$ evaluates the input. If the detector's score falls below a certain threshold $T$, the input is rejected as adversarial.

A schematic illustration of the verification process: an input is classified as an adversarial example if the detector for the predicted class does not confirm its membership.

The authors further enhance this by interpreting the detectors as Energy-Based Models (EBMs). By treating the detector's logit output as an unnormalized density, the system performs generative detection. This forces adversarial attacks to become semantically meaningful; to bypass the detector, an attacker must modify the image until it visually resembles the target class, rather than just adding imperceptible noise.

Experimental Results

The GAT framework was evaluated on MNIST, CIFAR-10, and Restricted ImageNet benchmarks. Key findings include:

  • Increased Robustness: On MNIST, the mean $L_2$ distortion required to fool the model increased from 3.68 to 5.65. On CIFAR-10, it improved from 1.1 to 1.5.
  • Adaptive Attack Resistance: The generative detection approach consistently outperformed integrated methods under white-box attacks.
  • Interpretability: Qualitative analysis showed that GAT detectors learn actual class features. Adversarial examples designed to fool GAT often exhibit visible traits of the target class, making the model's behavior more transparent.

Discussion and Limitations

While GAT provides a principled defense, it introduces computational overhead. Training and running $K$ separate detectors scales linearly with the number of classes, which may be challenging for large-scale datasets like the full ImageNet. Future research directions include parameter sharing between detectors to improve efficiency and leveraging the generative properties for unsupervised learning tasks.

Summary updated

Abstract

The vulnerabilities of deep neural networks against adversarial examples have become a significant concern for deploying these models in sensitive domains. Devising a definitive defense against such attacks is proven to be challenging, and the methods relying on detecting adversarial samples are only valid when the attacker is oblivious to the detection mechanism. In this paper we propose a principled adversarial example detection method that can withstand norm-constrained white-box attacks. Inspired by one-versus-the-rest classification, in a K class classification problem, we train K binary classifiers where the i-th binary classifier is used to distinguish between clean data of class i and adversarially perturbed samples of other classes. At test time, we first use a trained classifier to get the predicted label (say k) of the input, and then use the k-th binary classifier to determine whether the input is a clean sample (of class k) or an adversarially perturbed example (of other classes). We further devise a generative approach to detecting/classifying adversarial examples by interpreting each binary classifier as an unnormalized density model of the class-conditional data. We provide comprehensive evaluation of the above adversarial example detection/classification methods, and demonstrate their competitive performances and compelling properties.
BibTeX
@inproceedings{yin2020divide,
  author = {Xuwang Yin and Soheil Kolouri and Gustavo K. Rohde},
  title = {{Divide-and-Conquer Adversarial Detection}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=Meyqb3dcKm},
}
Figure