NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Transferable Adversarial Robustness using Adversarially Trained Autoencoders

Pratik Vaishnavi, Kevin Eykholt, Atul Prakash, Amir RahmatiarXiv 2019

Abstract

Adversarial machine learning is a well-studied field of research where an adversary causes predictable errors in a machine learning algorithm through precise manipulation of the input. Numerous techniques have been proposed to harden machine learning algorithms and mitigate the effect of adversarial attacks. Of these techniques, adversarial training, which augments the training data with adversarial samples, has proven to be an effective defense with respect to a certain class of attacks. However, adversarial training is computationally expensive and its improvements are limited to a single model. In this work, we take a first step toward creating a model-agnostic adversarial defense. We propose Adversarially-Trained Autoencoder Augmentation (AAA), the first model-agnostic adversarial defense that is robust against certain adaptive adversaries. We show that AAA allows us to achieve a partially model-agnostic defense by training a single autoencoder to protect multiple pre-trained classifiers; achieving adversarial performance on par or better than adversarial training without modifying the classifiers. Furthermore, we demonstrate that AAA can be used to create a fully model-agnostic defense for MNIST and Fashion MNIST datasets by improving the adversarial performance of a never before seen pre-trained classifier by at least 45% with no additional training. Finally, using a natural image corruption dataset, we show that our approach improves robustness to naturally corrupted images, which has been identified as strongly indicative of true adversarial robustness.

Introduction

Adversarial attacks—small, imperceptible perturbations to an input that cause a model to misclassify—remain a significant hurdle for deploying reliable AI. While "adversarial training" (AT) is a leading defense, it has two major drawbacks: it is invasive, requiring the retraining of the entire model, and it is model-specific, meaning a defense for one architecture rarely protects another.

As developers increasingly reuse pre-trained architectures from "model zoos," there is a growing need for model-agnostic defenses. This paper introduces Adversarially-Trained Autoencoder Augmentation (AAA), a "plug-and-play" defense that protects pre-trained models without modifying them. By training a specialized autoencoder to "purify" inputs before they reach a classifier, AAA provides a shield that can even protect "never-before-seen" classifiers.

Methodology: The AAA Framework

AAA stacks a denoising autoencoder (AE) in front of a pre-trained classifier. The core innovation lies in the training process:

  • Adversarial Training of the AE: The AE is trained against an "adaptive adversary" to minimize the classification loss of the entire pipeline while the classifier's weights remain frozen.
  • Ensemble Training: The AE is trained against an ensemble of different classifiers simultaneously, encouraging it to learn general "purification" features.
  • Hybrid Loss Function: By combining classification loss ($L_{xent}$) with reconstruction loss ($L_{mse}$), the AE is forced to keep outputs on the "natural data manifold." This ensures the purified images remain recognizable to any classifier trained on that data type.

Comparative Analysis of Defense Properties

AAA distinguishes itself from prior work by satisfying key requirements for a practical, robust defense.

Comparison of defense properties across various methodologies.

As shown in the table above, AAA is the only defense that is simultaneously unintrusive, transferable, black-box compatible, and robust against adaptive white-box attacks.

Experimental Results

The researchers evaluated AAA using MNIST, Fashion-MNIST, and CIFAR-10. They also utilized CIFAR-10-C (natural image corruptions) as a sanity check to ensure the defense provides true structural robustness rather than just "gradient shattering."

Performance comparison between standard Adversarial Training (AT) and AAA on MNIST and CIFAR-10.

On MNIST and CIFAR-10, AAA improved adversarial robustness by 18.21% and 8.76% respectively compared to standard adversarial training, all without modifying the original classifiers. For MNIST, the defense was tested on "transfer classifiers" (models unseen during training), improving their adversarial accuracy by at least 45%.

Key Insights and Limitations

The most striking insight is that for a defense to be truly model-agnostic, it must project adversarial images back toward the natural data manifold. By disentangling robustness from classification, AAA allows the defense to be updated or replaced without touching the core application logic.

However, some limitations remain. While AAA was highly transferable on simpler datasets, a "transfer gap" was observed on CIFAR-10, where the AE struggled to protect completely unseen, complex models. Additionally, training the AE currently requires white-box access to the native classifiers. Future work may explore gradient estimation to make the training process itself fully model-agnostic and scale the approach to high-resolution datasets like ImageNet.

Summary updated

BibTeX
@misc{vaishnavi2019transferable,
  author = {Pratik Vaishnavi and Kevin Eykholt and Atul Prakash and Amir Rahmati},
  title = {{Transferable Adversarial Robustness using Adversarially Trained Autoencoders}},
  year = {2019},
  eprint = {1909.05921},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.05921},
}
Figure