Resisting Adversarial Attacks Using Gaussian Mixture Variational Autoencoders.

Partha Ghosh, Arpan Losalka, Michael J. Black

Abstract

Susceptibility of deep neural networks to adversarial attacks poses a major theoretical and practical challenge. All efforts to harden classifiers against such attacks have seen limited success till now. Two distinct categories of samples against which deep neural networks are vulnerable, “adversarial samples” and “fooling samples”, have been tackled separately so far due to the difficulty posed when considered together. In this work, we show how one can defend against them both under a unified framework. Our model has the form of a variational autoencoder with a Gaussian mixture prior on the latent variable, such that each mixture component corresponds to a single class. We show how selective classification can be performed using this model, thereby causing the adversarial objective to entail a conflict. The proposed method leads to the rejection of adversarial samples instead of misclassification, while maintaining high precision and recall on test data. It also inherently provides a way of learning a selective classifier in a semi-supervised scenario, which can similarly resist adversarial attacks. We further show how one can reclassify the detected adversarial samples by iterative optimization.

Introduction

Deep Neural Networks (DNNs) are notoriously brittle. They are susceptible to adversarial samples—images with human-invisible perturbations that trigger misclassification—and fooling samples—meaningless noise that models label with high confidence. Most existing defenses rely on "gradient obfuscation," which can often be bypassed by stronger attacks. This research addresses the core gap: most classifiers are forced to assign a label even when the input is out-of-distribution. This paper proposes a "selective classifier" that can reject suspicious samples or attempt to "fix" them through generative reconstruction.

Methodology: The GMM-VAE Framework

The authors move away from standard discriminative classifiers toward a generative framework based on Variational Autoencoders (VAEs).

Figure 4: (a) The GMM-VAE architecture showing the encoder f and decoder g. (b) Conceptual diagram of the latent space clusters and the reconstruction-based rejection mechanism.

1. Gaussian Mixture Prior

Unlike standard VAEs that squash data into a single Gaussian blob, this model uses a Gaussian Mixture Model (GMM) prior. Each class is assigned a specific mean ($\mu$) in the latent space, creating distinct "islands" for each category.

2. Two-Gate Defense (Thresholding)

The model employs a dual-threshold mechanism to identify attacks:

  • Encoder Threshold ($\tau_{enc}$): If the latent representation $z$ of an input is too far from any class mean, the sample is rejected as out-of-distribution.
  • Decoder Threshold ($\tau_{dec}$): If the reconstructed image $g(z)$ differs significantly from the original input $x$, it suggests the encoder was tricked into an incorrect latent region. The sample is rejected.

3. Reclassification

For flagged samples, the model can perform iterative optimization. It searches the latent space for a $z$ that minimizes reconstruction error, effectively "denoising" the adversarial attack to recover the true underlying class.

Key Results

The model was evaluated on MNIST, SVHN, and COIL-100 benchmarks. It maintained competitive clean accuracy (e.g., 99.67% on MNIST) while providing robust defense against Fast Gradient Sign Method (FGSM) attacks.

Figure 5: Ratio of Accuracy, Error, and Rejection as a function of attack strength (Epsilon). As noise increases, the model prefers rejection over misclassification.

As shown in Figure 5, the model's error rate remains remarkably low even as attack intensity increases. Instead of misclassifying noisy inputs, the model successfully transitions to rejecting them. Furthermore, 100% of white-box fooling samples were successfully rejected at the decoder stage due to high reconstruction error.

Discussion and Future Work

By modeling the distribution of the data ($P(x)$) rather than just class boundaries, the model gains an inherent sense of what "real" data looks like. This creates a "conflict of interest" for attackers: to fool the encoder into a different class, they must move the latent vector to a different island, but doing so causes the decoder to produce a reconstruction that fails the similarity check.

While effective, the model faces challenges with the inherent blurriness of VAE reconstructions and the difficulty of scaling to high-resolution datasets like ImageNet. Future work may explore more advanced generative models, such as Glow (invertible generative flows), to provide sharper reconstructions and better scalability.

Summary updated

BibTeX
@inproceedings{ghosh2019resisting,
  author = {Partha Ghosh and Arpan Losalka and Michael J. Black},
  title = {{Resisting Adversarial Attacks Using Gaussian Mixture Variational Autoencoders.}},
  booktitle = {AAAI},
  year = {2019},
  url = {https://openreview.net/forum?id=rjxl4yeGgOpB},
}
Figure