Abstract
We explore methods of producing adversarial examples on deep generative models such as the variational autoencoder (VAE) and the VAE-GAN. Deep learning architectures are known to be vulnerable to adversarial examples, but previous work has focused on the application of adversarial examples to classification tasks. Deep generative models have recently become popular due to their ability to model input data distributions and generate realistic examples from those distributions. We present three classes of attacks on the VAE and VAE-GAN architectures and demonstrate them against networks trained on MNIST, SVHN and CelebA. Our first attack leverages classification-based adversaries by attaching a classifier to the trained encoder of the target generative model, which can then be used to indirectly manipulate the latent representation. Our second attack directly uses the VAE loss function to generate a target reconstruction image from the adversarial example. Our third attack moves beyond relying on classification or the standard loss for the gradient and directly optimizes against differences in source and target latent representations. We also motivate why an attacker might be interested in deploying such techniques against a target generative network.
Introduction: The Vulnerability of Generative Models
While adversarial attacks on image classifiers are well-documented, this research proves that generative models like Variational Autoencoders (VAEs) and VAE-GANs are equally vulnerable. Most research into adversarial machine learning focuses on classification: making a model see a "panda" as a "gibbon." However, deep generative models are increasingly used for tasks like data compression, denoising, and feature extraction.
A critical security gap exists: if a generative model is used as a compression scheme—where a sender encodes an image into a small "latent vector" and a receiver decodes it—an attacker could provide a malicious input. To the sender, the input looks like a harmless image, but when compressed and sent, the receiver’s decoder reconstructs it as something entirely different, such as a fraudulent request.
Attack Methodologies
The authors propose three distinct attack methodologies against VAE and VAE-GAN architectures:
- Classifier-based Attack: The attacker attaches a separate classifier to the frozen encoder of the generative model. They then use standard adversarial techniques (like $L_2$ optimization) to find an input that the classifier misidentifies as the target class.
- $\mathcal{L}_{VAE}$ Attack: This attack leverages the model's own reconstruction loss. Instead of minimizing the difference between the input and its own reconstruction, the attacker optimizes the input so that its reconstruction matches a specific target image.
- Latent Attack: This is the most direct method. The attacker optimizes the input so that its latent representation ($z$)—the compressed "bottleneck" of the network—matches the latent representation of a target image. This bypasses the need for a classifier or the full decoding step during the optimization loop.
To execute these, an $L_2$ optimization method is primarily used, balancing the need to keep perturbations human-imperceptible while maximizing the success of the attack.
Key Results and Insights
The researchers evaluated their attacks on three benchmarks: MNIST (hand-written digits), SVHN (Street View House Numbers), and CelebA (celebrity faces).
- MNIST: The attacks were highly effective. The mean targeted success rate ($AS_{target}$) was 0.76, while the untargeted success rate reached 0.96.
- SVHN: This proved more difficult due to the "noisy" nature of the images, but remained vulnerable. Visual inspection showed that 11 out of 12 test cases successfully reconstructed the target digit (0).
- CelebA: The $L_{VAE}$ attack was particularly potent here, achieving reconstructions that reflected the target image very well while maintaining a low Root Mean Square Deviation (RMSD of 0.081) from the original source image.
The Bottleneck as a Weak Point
Any application relying on the "compression bottleneck" of a generative model is inherently vulnerable. If the encoding and decoding steps are separated by a communication channel, the latent vector becomes a high-value target for manipulation. The success of the "Latent Attack" suggests that despite high dimensionality, the latent space is regular enough that simple $L_2$ distance optimization can effectively "teleport" one image's identity to another's coordinates.
Limitations and Future Work
While successful, the attacks have limitations. The "Classifier Attack" was the weakest, as inaccuracies in the attacker's classifier translated into poor reconstructions. Furthermore, while successful on faces and digits, more complex natural datasets like ImageNet remain a frontier for future testing. This work focuses on the existence of these vulnerabilities; the development of "robustified" generative models resistant to these latent manipulations is left for future research.
Summary updated