A Linearly Convergent GAN Inversion-based Algorithm for Reverse Engineering of Deceptions

Darshan Thaker, Paris Giampouras, René Vidal

TL;DR

This paper introduces a novel algorithm for Reverse Engineering of Deceptions (RED) that can simultaneously recover clean images and identify the specific type of adversarial attack used to corrupt them. By modeling clean data as lying on a manifold learned by a Generative Adversarial Network (GAN), the authors provide the first theoretical guarantees of linear convergence for this non-convex problem, significantly outperforming previous methods that relied on overly simplistic linear assumptions.

What Problem Does This Paper Address?

Deep learning models are notoriously vulnerable to adversarial attacks—small, often imperceptible perturbations that lead to incorrect classifications. While many "defense" strategies exist (like adversarial training or purification), a newer field called Reverse Engineering of Deceptions (RED) aims to go further. RED doesn't just try to ignore the attack; it tries to infer the attack strategy (e.g., which $\ell_p$ norm was used to generate the perturbation).

The core challenge is that existing RED methods with theoretical guarantees assume data lives in a "union of linear subspaces." This is a poor fit for complex real-world data like natural images, which are highly non-linear. Conversely, practical methods using deep learning often lack any theoretical performance guarantees. This paper bridges that gap by providing a theoretically grounded framework for RED that works with the non-linear manifolds represented by pre-trained GANs.

Methods

The authors propose a framework that jointly solves two optimization problems:

  1. GAN Inversion: Finding the latent code $z$ such that the GAN generator $G(z)$ approximates the clean signal $x$.
  2. Block-Sparse Recovery: Modeling the adversarial attack $\delta$ as a block-sparse vector with respect to a predefined dictionary $D_a$ (representing different attack types).

The optimization objective is: $$\min_{z, c_a} \|x' - G(z) - D_a c_a\|_2^2 + \lambda \|c_a\|_{1,2}$$ where $x'$ is the corrupted input and $\|c_a\|_{1,2}$ is a regularizer that promotes block-sparsity, helping to identify which specific attack block in the dictionary best explains the corruption.

To solve this, they use an alternating minimization algorithm. They alternate between a subgradient descent step for the latent code $z$ and a proximal gradient descent step for the attack coefficients $c_a$. Crucially, they prove linear convergence to the global optimum under a local error bound condition. This is a significant theoretical step forward because it departs from the common but restrictive assumption that the GAN weights must be random.

Datasets

The researchers evaluated their approach on three standard benchmarks:

  • MNIST: Handwritten digits.
  • Fashion-MNIST: Clothing items.
  • CIFAR-10: Natural images across 10 classes.

They utilized various GAN architectures tailored to these datasets, including DCGAN, Wasserstein-GAN, and StyleGAN-XL.

Key Insights and Ideas

  • Manifolds over Subspaces: Moving from linear subspace assumptions to GAN-based manifolds allows the model to handle much more complex data distributions.
  • Theoretical Breakthrough: Proving linear convergence for GAN inversion without assuming random weights is a major contribution to optimization theory in deep learning. They leverage the Polyak-Łojasiewicz (PL) condition and local error bounds to show that the optimization landscape is more benign than it might appear.
  • Expansiveness Matters: The authors demonstrate that as the GAN's output dimension increases relative to its latent dimension (a property called expansiveness), the error bound parameter $\mu$ improves, leading to faster convergence.
Figure 1: We show the output dimen- sion m vs the computed µ averaged over the optimization path of 10 test examples for a GAN with random weights and latent space dimension d = 10.
  • Benign Landscapes: Even for non-random networks, the optimization landscape for GAN inversion can be surprisingly smooth and free of spurious local minima in the regions where the optimization actually takes place.
Figure 2: The optimization landscape for a 2-D GAN inversion problem, showing a benign, bowl-like structure that facilitates convergence.

Key Results

The proposed method, BSD-GAN-AD (Block-Sparse Defense GAN Attack Detector), significantly outperformed baselines in both signal classification (recovering the correct label) and attack classification (identifying the $\ell_p$ norm).

  • MNIST: Achieved an average signal classification accuracy of 84.23% and an attack classification accuracy of 83.7%, far exceeding the previous state-of-the-art RED method (SBSAD), which only managed 51.93% for attack detection.
Table 1: Adversarial image and attack classification accuracy on digit classification of MNIST dataset. SBSC denotes the structured block-sparse signal classifier and SBSAD denotes the structured block-sparse attack detector. BSD-GAN and BSD-GAN-AD are the Block-Sparse Defense GAN and Block-Sparse Defense GAN Attack Detector respectively.
  • Fashion-MNIST: Signal accuracy improved to 66.33% (compared to 23.67% for the linear baseline) and attack detection reached 49.66%.
  • CIFAR-10: On this more complex dataset, signal accuracy reached 78% (a massive improvement over the 17% achieved by the linear model) and attack detection was 56%.

Limitations and Future Work

  • Attack Dictionary Validity: The authors acknowledge that their current attack model (the dictionary $D_a$) is theoretically most valid for fully connected, locally linear networks. Extending this to handle more complex architectures like WideResNets more effectively is a key future direction.
  • Theoretical Assumptions: While they depart from random weights, they still rely on a "local error bound condition." Formally proving exactly when and why this condition holds for specific classes of trained networks remains an open challenge.
  • Computational Cost: GAN inversion via iterative optimization is computationally more expensive than simple feed-forward defense methods, which might limit its use in real-time, high-throughput applications.

Summary updated

BibTeX
@misc{thaker2023linearly,
  author = {Darshan Thaker and Paris Giampouras and René Vidal},
  title = {{A Linearly Convergent GAN Inversion-based Algorithm for Reverse Engineering of Deceptions}},
  year = {2023},
  eprint = {2306.04756},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.04756},
}
Figure