Open-Set Adversarial Defense

Rui Shao, Pramuditha Perera, Pong C. Yuen, Vishal M. Patel

Abstract

Deep learning models frequently encounter two major challenges in real-world deployment: the presence of "unknown" classes (open-set recognition) and malicious input perturbations (adversarial attacks). While research has progressed in both areas independently, their intersection—Open-Set Adversarial Defense (OSAD)—remains largely unexplored. This paper identifies that existing open-set detectors are vulnerable to adversarial noise, and adversarial defenses often fail to generalize to unknown categories. To address this, we propose the Open-Set Defense Network (OSDN), a multi-task framework that integrates feature denoising, image reconstruction, and self-supervised learning to create a robust latent space. Experimental results on SVHN, CIFAR-10, and TinyImageNet demonstrate that OSDN significantly outperforms state-of-the-art baselines in both classification accuracy and open-set detection under attack.

Introduction: The OSAD Problem

Most deep learning models operate under a "closed-world" assumption, where all test-time samples are expected to belong to the training distribution. However, real-world applications must handle "open-set" scenarios where models encounter previously unseen classes. Simultaneously, these models must be resilient against adversarial attacks—imperceptible perturbations designed to cause misclassification.

Conceptual diagram of known vs. open-set classes in the real world.

The authors define the Open-Set Adversarial Defense (OSAD) problem, highlighting a critical vulnerability: current open-set recognition methods are easily fooled by adversarial noise, while standard adversarial defense methods do not provide protection for unknown classes. A model trained to defend "known" classes (e.g., animals) remains defenseless when presented with an attacked "unknown" class (e.g., a vehicle).

The Open-Set Defense Network (OSDN)

To tackle the OSAD problem, the proposed OSDN architecture moves beyond simple discriminative classification. It aims to learn a latent feature space that is both robust to noise and descriptive enough to identify structural anomalies.

1. Feature-Denoising Encoder

The backbone of OSDN incorporates specialized non-local means denoising layers. Unlike standard local convolutions, these layers model global dependencies within feature maps to effectively suppress adversarial perturbations before they propagate to the decision layers.

2. Generative Reconstruction

To ensure the model learns "descriptive" rather than just "discriminative" features, OSDN includes a decoder branch. By forcing the network to reconstruct the original clean image from the latent representation, the model is incentivized to capture the fundamental structural properties of the input. This makes it easier to distinguish between known objects and unknown or heavily distorted samples.

3. Self-Supervised Learning

An auxiliary self-supervision task—predicting image rotation—is employed to further regularize the latent space. This task compels the encoder to understand the geometry and orientation of objects, which has been shown to enhance the separation between known and unknown distributions.

4. OpenMax Inference

For final classification, OSDN utilizes an OpenMax layer. By modeling the distribution of distances from known class means using a Weibull distribution, OpenMax provides a principled way to estimate the probability that a sample belongs to an "unknown" category.

Experimental Evaluation

The OSDN was evaluated against standard benchmarks (SVHN, CIFAR-10, and TinyImageNet) under both FGSM and PGD attacks.

Comparison of traditional CNNs, open-set recognition, adversarial defense, and the proposed OSDN method under various conditions.

Key Results

  • Robust Open-Set Detection: On the SVHN dataset under PGD attack, OSDN achieved an AUC-ROC of 71.6%, outperforming standard adversarial training (~65%).
  • Closed-Set Accuracy: OSDN maintained high performance on known classes, achieving 74.2% accuracy on CIFAR-10 under attack, surpassing defense-only baselines.

Key Insights: Why OSDN Works

  • The Generalization Gap: A striking finding of this research is that standard adversarial training on known classes provides almost zero protection for unknown classes. Robustness does not automatically generalize across the decision boundary.
  • Reconstruction as a Structural Filter: By forcing the model to reconstruct a clean image, the decoder acts as a secondary check. Unknown or heavily attacked images result in poor, blurry reconstructions that look structurally different from known classes, making them easier to flag.
  • Synergy of Tasks: The paper demonstrates that denoising, reconstruction, and self-supervision are not just additive; they are synergistic. Each component helps the others create a latent space where "knowns" are tightly clustered and "unknowns" (even noisy ones) are pushed to the periphery.

Conclusion and Future Directions

The OSDN framework represents a significant step toward unified robustness in deep learning. By combining denoising with generative and self-supervised tasks, it creates a latent space where known classes are tightly clustered and unknown or adversarial samples are pushed to the periphery. Future work will focus on reducing the computational overhead of the multi-branch architecture and exploring more diverse self-supervision tasks to further improve generalization at the ImageNet scale.

Summary updated

BibTeX
@inproceedings{shao2020open,
  author = {Rui Shao and Pramuditha Perera and Pong C. Yuen and Vishal M. Patel},
  title = {{Open-Set Adversarial Defense}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58520-4\_40},
}
Figure