Adversarially Robust One-class Novelty Detection

Shao-Yuan Lo, Poojan Oza, Vishal M. Patel

TL;DR

This paper introduces PrincipaLS, a novel defense mechanism for one-class novelty detection that makes deep learning models robust against adversarial attacks. By strategically manipulating the latent space of these models, PrincipaLS effectively purifies it from adversarial perturbations, significantly improving detection accuracy even under sophisticated attacks.

What Problem Does This Paper Address?

One-class novelty detection aims to identify whether a new data sample belongs to a known class or is an anomaly. Modern approaches often use deep auto-encoders (AEs) to reconstruct normal data accurately while failing on novel data, with reconstruction error serving as the novelty score. However, these deep models are vulnerable to adversarial attacks, where small, imperceptible perturbations can fool the model into misclassifying data. Existing defenses, primarily designed for classification tasks, are shown to be ineffective for novelty detection. This paper addresses this critical gap by proposing a defense specifically tailored for the unique characteristics of one-class novelty detection.

Methods

The core of the proposed defense is Principal Latent Space (PrincipaLS). It leverages the fact that one-class novelty detectors only need to model the known class distribution. PrincipaLS works by:

  1. Cascade Principal Component Analysis (PCA): It applies PCA in two stages to the latent space of the auto-encoder:
  2. Vector-PCA: This stage focuses on the vector dimension (channels) of the latent space, identifying principal latent vectors.
  3. Spatial-PCA: This stage then operates on the spatial dimensions of the transformed latent space, using principal maps.
  4. Incremental Training: The principal components learned by PCA are incrementally updated alongside the network weights using Exponential Moving Average (EMA). This ensures the PCA components adapt to the evolving latent space during training.
  5. Latent Space Purification: By projecting the latent space onto these learned principal components, PrincipaLS effectively removes adversarial perturbations. The goal is to constrain the latent space to exclusively represent the known class distribution.
  6. Adversarial Training (AT): PrincipaLS is further enhanced by incorporating adversarial training, where the model is trained on adversarial examples generated by a strong attack formulation.

Datasets

The authors evaluate their method on five diverse datasets:

  • MNIST: Grayscale handwritten digits.
  • Fashion-MNIST (F-MNIST): Grayscale images of fashion products.
  • CIFAR-10: Color images from 10 different classes.
  • MVTec-AD: A dataset for industrial anomaly detection with various objects and textures.
  • ShanghaiTech (SHTech): A video anomaly detection dataset.

All datasets were resized to 32x32 for experiments.

Key Insights and Ideas

  • Novelty Detection's Unique Vulnerability: Deep novelty detectors are susceptible to adversarial attacks, and standard classification defenses don't translate well.
  • Latent Space as a Target: The latent space of novelty detectors is a prime target for manipulation because it only needs to capture the known class distribution, allowing for more aggressive purification.
  • Cascading PCA for Robustness: The two-stage (Vector-PCA then Spatial-PCA) cascade PCA approach effectively removes adversaries in a layered manner.
  • Incremental Training Synergy: Incrementally training PCA components with the network weights creates a more robust and end-to-end trainable defense.
  • PrincipaLS is General: The proposed defense can be seamlessly integrated with various existing AE-based novelty detection architectures.

Key Results

  • Significant Robustness Improvement: PrincipaLS consistently and significantly enhances the adversarial robustness of novelty detection models across multiple attacks, datasets, and baseline detectors. For example, on MNIST under PGD attack, PrincipaLS achieves an MAUROC of 0.706, a substantial improvement over the "No Defense" baseline of 0.051 and even outperforming PGD-AT (0.357).
  • Performance on Clean Data: Unlike many defenses that sacrifice performance on clean data, PrincipaLS actually improves it, demonstrating its ability to learn a more refined representation of the known class.
  • Computational Efficiency: The PrincipaLS module is lightweight, adding only a minor overhead (around 13.3% decrease in inference speed) compared to other defenses like FD which can reduce speed by over 60%.
  • Scalability: PrincipaLS remains effective across different attack budgets (varying perturbation sizes and attack iterations).
  • Effective Adversary Removal: Analysis shows that PrincipaLS significantly reduces the L2-norm between adversarial and clean latent spaces, indicating effective removal of perturbations.

Limitations and Future Work

  • Attack Strength: While PrincipaLS is robust, the paper notes that the proposed attack formulation is stronger than previous ones, establishing a more rigorous benchmark. The authors suggest that future work could explore even stronger adaptive attacks.
  • Image Classification: The paper explicitly demonstrates that PrincipaLS, designed for novelty detection, does not perform well on image classification tasks, highlighting the task-specific nature of the defense. Conversely, classification defenses are less effective for novelty detection. This suggests a need for specialized defenses for different vision tasks.
  • Multiple Class Novelty Detection: The paper briefly explores applying PrincipaLS to multiple class novelty detection and shows promising results, suggesting this as a future research direction.
  • Benchmark Contribution: The authors hope their comprehensive evaluation framework and baseline results will spur further research in adversarially robust novelty detection.

Summary updated

BibTeX
@article{lo2022adversarially,
  author = {Shao-Yuan Lo and Poojan Oza and Vishal M. Patel},
  title = {{Adversarially Robust One-class Novelty Detection}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2022},
  doi = {10.1109/tpami.2022.3189638},
}
Figure