Skip to main content
QUICK REVIEW

[Paper Review] Invert and Defend: Model-based Approximate Inversion of Generative Adversarial Networks for Secure Inference

Wei-An Lin, Yogesh Balaji|arXiv (Cornell University)|Nov 23, 2019
Adversarial Robustness in Machine LearningComputer Science31 references8 citations
TL;DR

This paper proposes InvGAN, a data-free, model-based method to approximately invert pre-trained GAN generators by training an encoder network to map generated images back to their latent codes. The approach achieves superior inversion quality, accelerates DefenseGAN-based adversarial defenses, and enables effective reparameterization white-box attacks, significantly improving robustness and runtime efficiency over prior methods.

ABSTRACT

Inferring the latent variable generating a given test sample is a challenging problem in Generative Adversarial Networks (GANs). In this paper, we propose InvGAN - a novel framework for solving the inference problem in GANs, which involves training an encoder network capable of inverting a pre-trained generator network without access to any training data. Under mild assumptions, we theoretically show that using InvGAN, we can approximately invert the generations of any latent code of a trained GAN model. Furthermore, we empirically demonstrate the superiority of our inference scheme by quantitative and qualitative comparisons with other methods that perform a similar task. We also show the effectiveness of our framework in the problem of adversarial defenses where InvGAN can successfully be used as a projection-based defense mechanism. Additionally, we show how InvGAN can be used to implement reparameterization white-box attacks on projection-based defense mechanisms. Experimental validation on several benchmark datasets demonstrate the efficacy of our method in achieving improved performance on several white-box and black-box attacks. Our code is available at https://github.com/yogeshbalaji/InvGAN.

Motivation & Objective

  • To address the challenging problem of inverting GAN-generated images back to their latent codes without access to training data.
  • To improve the efficiency and performance of projection-based adversarial defenses like DefenseGAN by replacing slow optimization with a learned encoder.
  • To enable effective white-box attacks on projection-based defenses using reparameterization techniques.
  • To demonstrate that the inversion framework enhances both defense robustness and attack detection capabilities.
  • To provide a scalable, fast, and accurate inversion mechanism applicable across diverse datasets and GAN architectures.

Proposed method

  • Train an encoder network to map images from the generator's output space back to the latent space using a novel loss function combining reconstruction, perceptual, and adversarial terms.
  • Use the encoder to initialize the optimization in DefenseGAN, reducing iterations and eliminating the need for hyperparameter tuning.
  • Formulate the inversion as a differentiable optimization problem where the encoder acts as a prior for efficient manifold projection.
  • Implement reparameterization attacks by approximating the projection operation via the learned encoder to enable gradient-based attack crafting.
  • Optimize the encoder using a loss function that ensures inverted images are semantically consistent with the original GAN generations and follow the GAN's data distribution.
  • Apply the framework to benchmark datasets including MNIST, Fashion-MNIST, CIFAR-10, and CelebA to validate performance across diverse settings.

Experimental results

Research questions

  • RQ1Can a data-free, model-based encoder be trained to accurately invert pre-trained GAN generators without access to the original training data?
  • RQ2How does InvGAN improve the speed and accuracy of projection-based adversarial defenses compared to optimization-based methods like DefenseGAN?
  • RQ3To what extent can InvGAN enhance attack detection performance in the presence of adversarial perturbations?
  • RQ4Can InvGAN be used to implement effective reparameterization white-box attacks on projection-based defenses?
  • RQ5What is the impact of adversarial loss in the encoder training objective on inversion quality and downstream defense performance?

Key findings

  • InvGAN achieves a test accuracy of 0.99 on MNIST under clean conditions, outperforming DefenseGAN (0.98) and No Defense (0.99), with significant improvements in FGSM and CW attack robustness.
  • On Fashion-MNIST, InvGAN achieves 0.88 accuracy under FGSM attacks (ε=0.3), compared to 0.34 for DefenseGAN, demonstrating superior defense performance.
  • For CIFAR-10, InvGAN achieves 0.66 accuracy under FGSM attacks (ε=0.3), significantly outperforming DefenseGAN’s 0.44, indicating better robustness on complex datasets.
  • InvGAN improves attack detection AUC to 0.9985 on MNIST FGSM attacks, compared to 0.9878 for DefenseGAN, showing enhanced detectability of large-perturbation attacks.
  • The method reduces effective inference iterations to 1 by using the encoder as initialization, achieving a dramatic speed-up over DefenseGAN while maintaining or improving reconstruction quality.
  • Ablation studies show that removing the adversarial loss leads to lower FID (28.07 vs. 19.85) and accuracy (0.603 vs. 0.625), confirming its importance for perceptual realism and performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.