Adversarial Feature Desensitization

Pouya Bashivan, Reza Bayat, Adam Ibrahim, Kartik Ahuja, Mojtaba Faramarzi, Touraj Laleh, Blake Aaron Richards, Irina Rish

Introduction

Deep neural networks are notoriously brittle. A slight, carefully constructed perturbation—invisible to the human eye—can trick a state-of-the-art classifier into misidentifying a stop sign as a speed limit sign. The current gold standard for defense is Adversarial Training (AT), where the network is essentially "shown" adversarial examples during training. However, AT has a major flaw: it often overfits to the specific type or strength of attack used during training. If an attacker uses a slightly stronger perturbation or a different mathematical approach, the defense often crumbles.

To address this, researchers propose Adversarial Feature Desensitization (AFD), reframing the battle against adversarial attacks as a domain adaptation problem. By treating natural and adversarial images as two distinct domains and training a model to learn features that are invariant between them, AFD achieves superior robustness across a wide variety of attack types and strengths.

Methods: The Minimax Game

The core idea of AFD is to view natural images and adversarial images as two different domains. The architecture consists of three components playing a minimax game, similar to a Generative Adversarial Network (GAN):

  1. Feature Extractor ($F_\theta$): Learns a representation of the input.
  2. Task Classifier ($C_\phi$): Predicts the label (e.g., "cat" or "dog") based on those features.
  3. Domain Discriminator ($D_\psi$): Tries to guess whether a set of features came from a natural image or an adversarial one.
AFD Architecture and Conceptual Comparison

In this game, the Classifier and Feature Extractor work together to minimize standard classification error on natural images. Meanwhile, the Discriminator tries its best to distinguish between natural and adversarial features. Crucially, the Feature Extractor is also trained to fool the discriminator.

By forcing the feature extractor to produce representations that the discriminator can't tell apart, the model learns "adversarial-invariant" features. The paper explores two versions: AFD-DCGAN (using standard GAN losses) and AFD-WGAN (using Wasserstein distance for more stable training).

Key Insights

  • Robustness as Invariance: Instead of just learning to classify "noisy" images, the model learns to ignore the noise entirely at the feature level. If the features for a clean image and its adversarial counterpart are identical, the classifier cannot be tricked.
  • Upper Bounding the Error: By using the $\mathcal{H}\Delta\mathcal{H}$-divergence (a measure of distance between distributions), the authors provide a theoretical framework showing that minimizing the gap between natural and adversarial features provides a conservative upper bound on how much the model can fail.
  • Feature Sparsity: Interestingly, AFD-trained models learn much sparser representations. On MNIST, the model used only 6 principal components to explain 99% of the variance, compared to much higher dimensionality in naturally trained models. This suggests that robustness might be linked to "compressing" the input into only the most essential, invariant features.

Results and Performance

The authors evaluated AFD on four standard computer vision benchmarks (MNIST, CIFAR10, CIFAR100, and Tiny-ImageNet) against 9 different attack types, including PGD, FGSM, DeepFool, and AutoAttack.

Accuracy vs. Epsilon for L-inf MIM Attack
  • Superior Robustness: On CIFAR10, AFD-WGAN outperformed both standard Adversarial Training and the popular TRADES method across almost all attack types.
  • Sustained Accuracy Under Pressure: When plotting accuracy versus attack strength ($\epsilon$), AFD consistently maintained higher accuracy as attacks grew stronger, whereas other methods' performance dropped off much more sharply.
  • Clean Accuracy: Often, making a model robust makes it worse at classifying normal images. AFD manages to maintain high "clean" accuracy while significantly boosting robustness. For example, on MNIST, AFD achieved ~97.7% accuracy against a PGD attack where a naturally trained model dropped to 0%.

Limitations and Future Work

While highly effective, AFD comes with computational overhead. Training AFD is about 31% slower than basic Adversarial Training and 4% slower than TRADES because it requires multiple gradient updates per batch for the discriminator and the feature extractor. Additionally, while successful on Tiny-ImageNet, scaling this minimax game to full-resolution ImageNet remains a challenge due to the inherent instabilities of GAN-style training at high resolutions. The authors suggest that more advanced GAN training techniques could further improve performance at scale.

Summary updated

BibTeX
@inproceedings{bashivan2021adversarial,
  author = {Pouya Bashivan and Reza Bayat and Adam Ibrahim and Kartik Ahuja and Mojtaba Faramarzi and Touraj Laleh and Blake Aaron Richards and Irina Rish},
  title = {{Adversarial Feature Desensitization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=IIo3Ew4v5tk},
}
Figure