On the Adversarial Robustness of Generative Autoencoders in the Latent Space

Mingfei Lu, Badong Chen

Introduction

While adversarial research has traditionally focused on protecting deep learning models from perturbed inputs, this paper investigates a critical but overlooked vulnerability: the latent space of generative autoencoders. In applications such as compressed sensing or secure communications, the encoder and decoder are often physically separated. This separation creates an opportunity for attackers to intercept and perturb the compressed latent code during transmission.

The authors provide the first systematic study of how generative models like Variational Autoencoders (VAEs) and Deterministic Autoencoders (DAEs) respond to such latent-space attacks. They reveal that a tiny change in the latent vector $z$ can lead to a complete "reconstruction collapse," where the decoder outputs a useless or entirely different image.

Methodology

The study evaluates several generative architectures, including the standard Vanilla-VAE (KLD-VAE) and variants employing different regularization techniques such as MMD-VAE and SWT-VAE (based on the Shapiro-Wilk Test). These are compared against Deterministic Autoencoders (DAEs), which map inputs to discrete points rather than probability distributions.

To quantify robustness, the researchers utilize:

  • Latent PGD Attacks: A variant of Projected Gradient Descent designed to find the minimal latent perturbation that maximizes reconstruction error.
  • AADDC (Area under Distortion-Distortion Curve): A novel metric proposed to measure robustness by calculating the area under the curve of reconstruction quality (SSIM/LPIPS) against varying attack intensities.
  • Latent Adversarial Training: A defense strategy where models are trained on perturbed latent codes to build resilience.

The Fragility of the Latent Manifold

A central finding of the paper is the "probabilistic fragility" of VAEs. While one might assume the stochastic nature of VAEs provides a form of natural noise-robustness, the opposite is true in the latent space.

Conceptual diagram of holes and valleys in the trained latent space.

As illustrated above, the probabilistic structure of VAEs can create "holes" or "valleys" in the latent manifold. These are regions where the model has not learned a stable mapping, allowing attackers to push the latent code into these unstable zones with minimal effort. Consequently, Deterministic Autoencoders (DAEs) were found to be consistently more robust than their variational counterparts.

Key Insights and Trade-offs

Beyond the VAE vs. DAE comparison, the paper identifies a significant Disentanglement Tax. There is a clear inverse relationship between a model's interpretability (disentanglement) and its security. As the disentanglement strength ($\beta$) increases in models like $\beta$-TCVAE, the latent robustness decreases. Making a model easier for humans to understand appears to make it easier for adversaries to exploit.

Furthermore, latent attacks are qualitatively different from input-space attacks. In the input space, noise often looks like a grainy overlay. In the latent space, a small shift can cause the decoder to "hallucinate" a different class or collapse the output into a homogeneous, black image.

Experimental Results

Experiments conducted on MNIST, FashionMNIST, and CelebA benchmarks confirmed these vulnerabilities. While SWT-VAE emerged as the most robust among the variational models, DAEs outperformed all VAE variants across SSIM and LPIPS metrics.

Visual evidence of reconstruction collapse and morphing under latent attack on MNIST.

Visual results demonstrate that at low attack intensities, digits can be forced to morph into other classes (e.g., a '6' becoming a '4' or '7') or degrade into unrecognizable noise. In high-resolution datasets like CelebA, an attack intensity of just 1.0 can force a face reconstruction to collapse into a solid black square, despite the latent code itself changing very little.

Conclusion and Future Work

The paper highlights a critical security gap in generative modeling. While adversarial training offers some protection, it currently struggles to generalize across different attack intensities. The authors suggest that future research should focus on the theoretical relationship between latent robustness and generation diversity, as well as exploring how these vulnerabilities manifest in non-visual domains like natural language processing and time-series data.

Summary updated

Abstract

The generative autoencoders, such as the variational autoencoders or the adversarial autoencoders, have achieved great success in lots of real-world applications, including image generation, and signal communication. However, little concern has been devoted to their robustness during practical deployment. Due to the probabilistic latent structure, variational autoencoders (VAEs) may confront problems such as a mismatch between the posterior distribution of the latent and real data manifold, or discontinuity in the posterior distribution of the latent. This leaves a back door for malicious attackers to collapse VAEs from the latent space, especially in scenarios where the encoder and decoder are used separately, such as communication and compressed sensing. In this work, we provide the first study on the adversarial robustness of generative autoencoders in the latent space. Specifically, we empirically demonstrate the latent vulnerability of popular generative autoencoders through attacks in the latent space. We also evaluate the difference between variational autoencoders and their deterministic variants and observe that the latter performs better in latent robustness. Meanwhile, we identify a potential trade-off between the adversarial robustness and the degree of the disentanglement of the latent codes. Additionally, we also verify the feasibility of improvement for the latent robustness of VAEs through adversarial training. In summary, we suggest concerning the adversarial latent robustness of the generative autoencoders, analyze several robustness-relative issues, and give some insights into a series of key challenges.
BibTeX
@article{lu2024adversarial,
  author = {Mingfei Lu and Badong Chen},
  title = {{On the Adversarial Robustness of Generative Autoencoders in the Latent Space}},
  journal = {Neural Computing and Applications},
  year = {2024},
  doi = {10.1007/s00521-024-09438-y},
}
Figure