Skip to main content
QUICK REVIEW

[Paper Review] Adversarial Defense of Image Classification Using a Variational Auto-Encoder

Yi Luo, Henry D. Pfister|arXiv (Cornell University)|Dec 7, 2018
Adversarial Robustness in Machine LearningComputer Science25 references7 citations
TL;DR

This paper proposes a universal adversarial defense for image classification using a patch-wise variational auto-encoder (VAE) that reconstructs inputs before classification. By leveraging the VAE’s inherent randomness and disentangled representations, the method achieves robustness against FGSM and I-FGSM attacks, matching or exceeding JPEG compression (quality 10) on moderate to severe perturbations, with ensemble models outperforming single models across attack strengths.

ABSTRACT

Deep neural networks are known to be vulnerable to adversarial attacks. This exposes them to potential exploits in security-sensitive applications and highlights their lack of robustness. This paper uses a variational auto-encoder (VAE) to defend against adversarial attacks for image classification tasks. This VAE defense has a few nice properties: (1) it is quite flexible and its use of randomness makes it harder to attack; (2) it can learn disentangled representations that prevent blurry reconstruction; and (3) a patch-wise VAE defense strategy is used that does not require retraining for different size images. For moderate to severe attacks, this system outperforms or closely matches the performance of JPEG compression, with the best quality parameter. It also has more flexibility and potential for improvement via training.

Motivation & Objective

  • To develop a universal defense mechanism against adversarial attacks in image classification that does not require retraining for different attack types or model architectures.
  • To exploit the randomness inherent in VAE sampling to increase attacker uncertainty and improve robustness.
  • To enable efficient defense on high-resolution images by applying patch-wise reconstruction with overlapping patches and adaptive stride.
  • To improve reconstruction fidelity and reduce artifacts from patch stitching using smoothing filters and tunable β hyperparameters.
  • To evaluate the defense’s performance across diverse attack strengths and compare it to established baselines like JPEG compression.

Proposed method

  • A variational auto-encoder (VAE) is trained on image patches extracted from high-resolution images (e.g., 299×299) to reduce training cost and improve scalability.
  • Input images are divided into overlapping patches (e.g., 16×16, 32×32, 64×64), each reconstructed independently by the VAE, then reassembled by averaging overlapping pixels.
  • A patch reconstruction stride is introduced as a tunable hyperparameter to control overlap and image quality, balancing artifact reduction and perturbation preservation.
  • A 5×5 smoothing filter is applied post-reconstruction to mitigate edge artifacts between stitched patches, counteracting blurriness introduced by the filter via increased β and longer training.
  • The defense is applied as a pre-processing step before the target classifier, requiring no modification to the original network or attack-specific retraining.
  • An ensemble of multiple VAE models (e.g., 16×16, 32×32, 64×64) is used to average reconstructions, improving robustness across varying perturbation magnitudes.

Experimental results

Research questions

  • RQ1Can a VAE-based reconstruction method effectively defend against diverse adversarial attacks without modifying the target classifier?
  • RQ2How does the patch-wise reconstruction strategy with variable patch size and stride affect defense performance across different perturbation magnitudes?
  • RQ3To what extent does the inherent randomness in VAE sampling improve robustness compared to deterministic defenses?
  • RQ4How does the ensemble of multiple VAE models compare to single-model defenses in terms of accuracy recovery under small and large perturbations?
  • RQ5Can the VAE defense outperform or match the robustness of JPEG compression, a known low-cost defense, across varying attack strengths?

Key findings

  • The 64×64 patch VAE model restored classification accuracy to 0.563 under FGSM attack with 0.167 average relative L2 difference, outperforming JPEG quality 10 (0.548) on moderate to severe attacks.
  • For small perturbations (0.01 L2 difference), JPEG quality 23 achieved 0.86 accuracy, outperforming all VAE models, but its performance dropped sharply to 0.0401 under large perturbations.
  • The ensemble-averaged VAE model approached JPEG quality 10’s performance on small perturbations while maintaining superior robustness on larger attacks.
  • Under I-FGSM attack (0.07 average L2 difference), the single 64×64 VAE model restored accuracy from 0.025 to 0.739, demonstrating strong defense capability.
  • The ensemble model improved defense against small perturbations compared to individual VAEs but showed reduced performance on large perturbations, indicating a trade-off in robustness across attack scales.
  • Applying a 5×5 smoothing filter increased classification accuracy on reconstructed images by approximately 10% for both benign and adversarial inputs, confirming its effectiveness in reducing reconstruction artifacts.

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.