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

Adversarial Defenses via a Mixture of Generators

Maciej Zelaszczyk, Jacek Mandziuk

Introduction

Deep neural networks are notoriously vulnerable to adversarial examples—input data intentionally perturbed to cause misclassification. While many defenses have been proposed, they often suffer from two major drawbacks: they typically require labeled data (supervised learning) and are frequently "overfit" to defend against one specific type of attack. This paper introduces an unsupervised adversarial defense that utilizes a "mixture of generators" to neutralize malicious image perturbations. The goal is to create a pre-processing defense that is both unsupervised and multi-attack resilient, effectively "cleaning" the adversarial input before it reaches the classifier.

Methodology

The researchers propose a GAN-inspired architecture that utilizes a mixture-of-experts approach to invert the transformations caused by attackers.

The proposed mixture-of-generators architecture, showing the flow from adversarial input to reconstructed output and discriminator scoring.

Competitive Generators

Instead of a single generator, the system employs a set of $N$ neural networks ($G_1, \dots, G_N$). When an adversarial image is fed into the system, every generator attempts to reconstruct a "clean" version. A Discriminator ($D$) then scores these reconstructions against a set of "canonical" (unperturbed) images.

Winner-Take-All Update

Crucially, the training follows a competitive mechanism: only the generator that produces the highest-scored image for a specific input receives a weight update. This forces the generators to compete and, eventually, specialize in handling different types of distortions. To prevent a single generator from dominating early on, all generators are briefly pre-trained to perform a simple identity transformation.

Inference

At test time, the system selects the output from the best-performing generator (as determined by the discriminator) and passes it to a standard, pre-trained classifier, such as LeNet5.

Experimental Setup

The study was conducted using the MNIST dataset of grayscale digits. The training set was split into two disjoint halves: one half served as the "canonical" clean images, and the other half was subjected to various adversarial attacks (e.g., FGSM, PGD, DeepFool) to create the "transformed" training set. Importantly, there was no overlap between the images used as clean references and those used to generate adversarial examples, ensuring the system learned generalizable reconstruction features.

Key Results and Discussion

Quantitative Performance

When defending against single attacks, the system achieved high recovery accuracies: 97.5% for FGSM, 93.5% for PGD, and 98.9% for DeepFool. In a joint training setting involving three different attacks simultaneously, the system maintained a robust 84.4% accuracy. This demonstrates the system's ability to handle multiple attack vectors without prior knowledge of the specific attack type at test time.

Visual Inversion

For most attacks, the generators successfully produced images that were visually coherent and recognizable, effectively "undoing" the adversarial noise.

Visual results demonstrating the defense's ability to reconstruct clean digits from various adversarial attacks.

Emergent Specialization

A striking finding was how the generators divided labor. The authors identified three types of emergent generators:

  • Generalists: Handled "standard" attacks like FGSM or PGD that preserve most visual features.
  • Specialists: Focused on specific, high-distortion attacks like Additive Uniform Noise (AUN) that other generators failed to solve.
  • Marginalists: Focused on difficult cases but with lower overall success.

Limitations and Future Work

Despite its success on MNIST, the system struggled with high-distortion attacks like Additive Uniform Noise (AUN) and Additive Gaussian Noise (AGN), where accuracy dropped to approximately 11-18%. These attacks severely destroy the underlying structure of the image, making them difficult to invert.

Furthermore, the current work is limited to grayscale digits. Scaling this competitive approach to more complex, high-dimensional datasets like CIFAR-10 or ImageNet remains a significant challenge for future research. The authors also suggest exploring the link between adversarial defenses and causal discovery to better understand the underlying structures that adversarial attacks exploit.

Summary updated

BibTeX
@inproceedings{zelaszczyk2021adversarial,
  author = {Maciej Zelaszczyk and Jacek Mandziuk},
  title = {{Adversarial Defenses via a Mixture of Generators}},
  booktitle = {ICONIP},
  year = {2021},
  doi = {10.1007/978-3-030-92307-5\_66},
}
Figure