Skip to main content
QUICK REVIEW

[Paper Review] Stochastic Security: Adversarial Defense Using Long-Run Dynamics of Energy-Based Models

Mitch Hill, Jonathan Mitchell|arXiv (Cornell University)|May 27, 2020
Adversarial Robustness in Machine LearningComputer Science28 references11 citations
TL;DR

This paper proposes a post-training defense for naturally-trained classifiers using long-run Markov Chain Monte Carlo (MCMC) sampling with a convergent Energy-Based Model (EBM), which purifies adversarial inputs by iteratively refining them through Langevin dynamics. The method achieves state-of-the-art robust accuracy on CIFAR-10, SVHN, and CIFAR-100, outperforming standard adversarial training in some cases while requiring no retraining of the classifier.

ABSTRACT

The vulnerability of deep networks to adversarial attacks is a central problem for deep learning from the perspective of both cognition and security. The current most successful defense method is to train a classifier using adversarial images created during learning. Another defense approach involves transformation or purification of the original input to remove adversarial signals before the image is classified. We focus on defending naturally-trained classifiers using Markov Chain Monte Carlo (MCMC) sampling with an Energy-Based Model (EBM) for adversarial purification. In contrast to adversarial training, our approach is intended to secure pre-existing and highly vulnerable classifiers. The memoryless behavior of long-run MCMC sampling will eventually remove adversarial signals, while metastable behavior preserves consistent appearance of MCMC samples after many steps to allow accurate long-run prediction. Balancing these factors can lead to effective purification and robust classification. We evaluate adversarial defense with an EBM using the strongest known attacks against purification. Our contributions are 1) an improved method for training EBM's with realistic long-run MCMC samples, 2) an Expectation-Over-Transformation (EOT) defense that resolves theoretical ambiguities for stochastic defenses and from which the EOT attack naturally follows, and 3) state-of-the-art adversarial defense for naturally-trained classifiers and competitive defense compared to adversarially-trained classifiers on Cifar-10, SVHN, and Cifar-100. Code and pre-trained models are available at https://github.com/point0bar1/ebm-defense.

Motivation & Objective

  • To address the open problem of defending naturally-trained deep neural networks against strong white-box adversarial attacks without retraining.
  • To develop a post-training defense that is distinct from adversarial training and does not require modifying the classifier's training process.
  • To enable stable, long-run MCMC sampling with EBMs on complex datasets like CIFAR-10, ensuring adversarial signals are removed while preserving semantic content.
  • To introduce a robust evaluation framework using Expectation-Over-Transformation (EOT) to fairly assess stochastic defenses and their attacks.

Proposed method

  • The method uses a ConvNet-based Energy-Based Model (EBM) trained on unlabeled natural images to perform Langevin dynamics sampling on input images.
  • Langevin sampling iteratively updates image pixels using gradients from the EBM and injected Gaussian noise, driving the sample toward low-energy (natural-looking) configurations.
  • Purified samples are generated via long-run MCMC chains, leveraging metastable behavior to preserve class consistency while removing adversarial perturbations.
  • The final prediction is obtained by averaging logits from multiple independent MCMC chains, approximating the true expectation over the sampling distribution.
  • An improved convergent learning procedure is introduced to stabilize long-run sampling, enabling effective purification on complex datasets.
  • An Expectation-Over-Transformation (EOT) defense is proposed to evaluate stochastic defenses robustly, with the EOT attack naturally emerging from the same framework.

Experimental results

Research questions

  • RQ1Can long-run MCMC sampling with a convergent EBM effectively purify adversarial inputs and restore robustness in naturally-trained classifiers?
  • RQ2Can a post-training defense using EBM sampling outperform standard adversarial training in robustness for naturally-trained models?
  • RQ3How can stochastic defenses be fairly evaluated to avoid overestimation due to random variation in sampling?
  • RQ4What modifications to EBM training are necessary to achieve stable, long-run sampling on complex image datasets like CIFAR-10?
  • RQ5Can EBM-based purification remain effective against the strongest known white-box attacks, including EOT and BPDA-adapted PGD?

Key findings

  • The proposed EBM defense achieves 67.55% robust accuracy on SVHN under $\ell_\infty$ perturbation $\varepsilon = 8/255$, surpassing standard adversarial training (50.39%).
  • On CIFAR-100, the defense achieves 26.10% robust accuracy under the same attack, outperforming standard adversarial training (25.47%).
  • The method demonstrates state-of-the-art robust accuracy for naturally-trained classifiers across CIFAR-10, SVHN, and CIFAR-100, even under strong adaptive attacks.
  • The improved EBM training procedure enables realistic long-run MCMC sampling on complex datasets, which was previously unstable and ineffective for defense.
  • The EOT defense and attack framework enables fair evaluation of stochastic defenses, resolving ambiguities in prior evaluations.
  • The defense is effective against the strongest known attacks, including EOT-adapted PGD, and remains robust where prior preprocessing defenses fail.

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.