Introduction
Deep neural networks remain highly susceptible to adversarial attacks—carefully crafted, imperceptible perturbations that lead to incorrect model predictions. Adversarial Purification (AP) has emerged as a promising defense strategy, utilizing generative models like diffusion models to "clean" inputs before classification. Unlike adversarial training, AP does not require retraining the downstream classifier, making it a flexible, plug-and-play solution.
However, standard diffusion-based AP methods, such as DiffPure, typically employ uniform Gaussian noise injection. This approach assumes adversarial noise is distributed evenly across the image, which the authors demonstrate is a flawed assumption. Uniform noise often destroys critical low-frequency semantic information while failing to fully mask high-frequency adversarial signals.
The Spectral Signature of Adversarial Noise
The core insight of this work is that adversarial perturbations possess a distinct spectral signature. Through empirical radial spectrum analysis, the authors show that adversarial noise is predominantly concentrated in high-frequency, low-magnitude regions of the image.
Because uniform noise injection does not account for this distribution, it creates a performance bottleneck: adding enough noise to drown out high-frequency adversarial signals inevitably degrades the low-frequency structural components essential for clean accuracy.
The MANI-Pure Framework
To address this mismatch, the authors propose MANI-Pure, a frequency-aware purification framework consisting of two primary modules: Magnitude-Adaptive Noise Injection (MANI) and Frequency Purification (FreqPure).
1. Magnitude-Adaptive Noise Injection (MANI)
Instead of applying uniform noise, MANI analyzes the input image's frequency spectrum using the Discrete Fourier Transform (DFT). It partitions the spectrum into bands and assigns noise weights inversely proportional to the band's magnitude. This ensures that noise is concentrated in the fragile, high-frequency regions where adversarial perturbations reside, while protecting the high-magnitude, low-frequency semantic core. Heatmap visualizations confirm that MANI's adaptive noise aligns much closer to actual adversarial distributions (KL divergence of 0.16) than uniform noise (0.49).
2. Frequency Purification (FreqPure)
During the reverse denoising process, FreqPure further refines the image. It separates the image into magnitude and phase spectra, using a low-pass filter to retain the original robust low-frequency magnitudes. Simultaneously, it constrains phase shifts to prevent structural distortions, ensuring the reconstructed image remains semantically faithful to the original.
Experimental Results
MANI-Pure was evaluated on CIFAR-10 and ImageNet-1K against a variety of strong adaptive attacks, including AutoAttack and BPDA+EOT.
- State-of-the-Art Robustness: On CIFAR-10 with a CLIP ViT-L/14 backbone, MANI-Pure achieved a 2.15% improvement in robust accuracy under AutoAttack ($\ell_\infty$) over existing baselines. On ImageNet-1K, it outperformed all competitors by 3.8% under BPDA+EOT.
- Preserving Clean Accuracy: The method significantly mitigates the typical trade-off between robustness and clean accuracy. On CIFAR-10, the gap between the defended and undefended models was narrowed to just 0.59%.
- Plug-and-Play Versatility: MANI-Pure is modular. When integrated into the REAP baseline, it improved clean accuracy by 4.10% and robust accuracy by 1.95% without requiring architecture changes.
Conclusion
MANI-Pure rethinks adversarial purification through the lens of frequency analysis. By aligning noise injection with the actual distribution of adversarial perturbations, it achieves superior robustness while maintaining high clean accuracy. Its plug-and-play nature makes it a highly practical enhancement for existing diffusion-based defense pipelines.
Summary updated