Abstract
While adversarial training is considered as a standard defense method against adversarial attacks for image classifiers, adversarial purification, which purifies attacked images into clean images with a standalone purification model, has shown promises as an alternative defense method. Recently, an Energy-Based Model (EBM) trained with Markov-Chain Monte-Carlo (MCMC) has been highlighted as a purification model, where an attacked image is purified by running a long Markov-chain using the gradients of the EBM. Yet, the practicality of the adversarial purification using an EBM remains questionable because the number of MCMC steps required for such purification is too large. In this paper, we propose a novel adversarial purification method based on an EBM trained with Denoising Score-Matching (DSM). We show that an EBM trained with DSM can quickly purify attacked images within a few steps. We further introduce a simple yet effective randomized purification scheme that injects random noises into images before purification. This process screens the adversarial perturbations imposed on images by the random noises and brings the images to the regime where the EBM can denoise well. We show that our purification method is robust against various attacks and demonstrate its state-of-the-art performances.
Introduction
Deep neural networks are notoriously fragile; human-imperceptible adversarial perturbations can trick world-class classifiers into misidentifying critical objects. While adversarial training—training models on attacked images—is the standard defense, it is computationally expensive and often degrades performance on clean data. Adversarial purification offers an alternative by using a separate model to 'clean' images before classification. However, previous energy-based models (EBMs) relied on slow Markov-Chain Monte-Carlo (MCMC) sampling, requiring thousands of iterations. This work introduces Adaptive Denoising Purification (ADP), making purification faster and more robust.
The ADP Framework
The ADP framework leverages score-based generative models to treat purification as a denoising problem. By moving away from stochastic sampling toward deterministic updates, the method achieves high efficiency.
The core components of the ADP pipeline include:
- Denoising Score-Matching (DSM): Instead of estimating a complex energy surface, the model learns a Noise Conditional Score Network (NCSN) to estimate the score function—the gradient of the log-density of the data. This tells the model exactly how to move noisy pixels toward the clean data distribution.
- Deterministic Updates & Adaptive Step Sizes: Unlike stochastic MCMC, ADP uses deterministic updates with a mathematical heuristic to adjust step sizes (\alpha_t) automatically. This ensures stability and allows for purification in just a few steps.
- Random Noise Injection: Intentionally adding Gaussian noise before purification 'screens out' brittle adversarial structures, moving the image into a regime where the score-matching model excels at denoising.
Key Results
Evaluated on benchmarks like CIFAR-10 and CIFAR-100, ADP demonstrates significant improvements in both efficiency and robustness.
As shown in the figure above, the combination of DSM and deterministic updates (DSM+Det) reaches high accuracy much faster than stochastic alternatives. Key findings include:
- State-of-the-Art Robustness: ADP achieved 80.24% robust accuracy on CIFAR-10 against preprocessor-blind PGD attacks.
- Resilience to Adaptive Attacks: Even when attackers know the purification mechanism, ADP maintains high performance (~70% accuracy), whereas other defenses often fail.
- CIFAR-100 Performance: ADP reached 39.72% robust accuracy, a substantial increase over the previous state-of-the-art of 28.88%.
- Certified Safety: By treating the process as randomized smoothing, the method provides provable certified safety bounds.
Conclusion
ADP provides a viable, high-performance alternative to adversarial training. By framing purification as a score-based denoising task and utilizing deterministic updates, it overcomes the speed limitations of previous EBM-based methods while maintaining state-of-the-art robustness against sophisticated attacks.
Summary updated