TL;DR
Current diffusion-based adversarial purification methods indiscriminately inject uniform Gaussian noise, wiping out critical semantic information while trying to erase adversarial attacks. MANI-Pure redesigns the diffusion forward process to inject magnitude-adaptive noise—allocating noise disproportionately to fragile, high-frequency, low-magnitude frequency bands where adversarial perturbations actually concentrate. Paired with frequency-domain filtering during reverse diffusion, it narrows the clean accuracy drop to just 0.59% while achieving top-1 robust accuracy on the RobustBench leaderboard.
What Problem Does This Paper Address?
Adversarial purification (AP) uses generative models (primarily diffusion models) to sanitize adversarial inputs at inference time without retraining the downstream classifier. Standard diffusion-based purification (DBP) works by adding uniform Gaussian noise in the forward process to wash away adversarial perturbations, then reconstructing a clean image via reverse denoising.
However, uniform noise creates a painful dilemma:
- Too much noise destroys low-frequency image semantics, cratering clean classification accuracy.
- Too little noise fails to wipe out high-frequency adversarial perturbations, compromising robustness.
The authors show empirically that adversarial perturbations are not uniformly distributed in the frequency domain—they concentrate heavily in high-frequency, low-magnitude spectral bands. Treating all frequencies equally with standard white noise is fundamentally misaligned with how adversarial perturbations behave.
Methods
MANI-Pure introduces a frequency-grounded purification framework that pairs forward adaptive noise injection with reverse spectral filtering:
- MANI (Magnitude-Adaptive Noise Injection - Forward Process):
- Applies Discrete Fourier Transform (DFT) to input $x_{\text{adv}}$ and partitions the magnitude spectrum into $n$ concentric radial frequency bands $B_i$.
- Computes the average magnitude $M_i$ within each band.
- Computes inverse-magnitude band weights $w_i = (M_i^\gamma + \epsilon_0)^{-1}$, where $\gamma$ is a scaling hyperparameter. Weak-magnitude (typically high-frequency) bands receive larger weights, while high-magnitude (low-frequency semantic) bands receive smaller weights.
- Converts weights back to the spatial domain via Inverse DFT to produce a 2D spatial weight map $W$, modulating the injected Gaussian noise $\epsilon_t = W \odot \epsilon_G$.
- FreqPure Integration (Reverse Process):
- Adopts frequency-domain purification in the reverse trajectory: preserves low-frequency magnitude from the adversarial input and strictly clips low-frequency phase drift using a projection operator $\Pi_\delta$.
- Combines with high-frequency components predicted by the diffusion model and inverts back to image space.
Datasets
The authors evaluated the method using standard zero-shot adversarial benchmarks:
- CIFAR-10 (512 randomly sampled test images, following prior AP evaluation setups).
- ImageNet-1K (1,000 randomly sampled validation images).
- Classifiers & Generators: Evaluated across multiple frozen vision backbones including CLIP (ViT-L/14, RN50, RN101), WideResNet-28-10, and standard ResNet-50, using unconditional EDM and 256×256 diffusion checkpoints as generative denoisers.
Key Insights and Ideas
- Perturbations live in spectral valleys: Spectral analysis reveals that adversarial attacks (PGD, AutoAttack, BPDA) differ substantially in intensity across frequencies, but consistently peak in high-frequency regions with low clean magnitude.
- Better noise alignment: Modulating noise by the inverse magnitude spectrum aligns the injected perturbation much closer to the adversarial noise distribution. The KL divergence between injected noise and adversarial perturbations drops from 0.4988 (uniform noise) to 0.1628 (MANI noise).
- Forward-Reverse Complementarity: Forward-side noise (MANI) destroys high-frequency adversarial perturbations, while reverse-side constraints (FreqPure) anchor low-frequency structures. Ablations show their combination yields a +7.62% jump in clean accuracy and +5.47% in robust accuracy over baseline diffusion.
Key Results
- CIFAR-10 (CLIP ViT-L/14):
- Standard Clean Accuracy: Reaches 94.14%, trailing the undefended zero-shot upper bound (94.73%) by only 0.59%.
- Robust Accuracy: Hits 92.19% under AutoAttack $\ell_\infty$ (+2.15% over prior SOTA FreqPure) and 88.67% under BPDA+EOT (+0.78% to +5.6% over competing AP methods).
- ImageNet-1K (CLIP ViT-L/14):
- Outperforms all baseline AP methods across PGD+EOT, AutoAttack, and BPDA+EOT, reaching 67.30% robust accuracy under BPDA+EOT (a +3.8% improvement over DDPM++).
- Perceptual Quality:
- On CIFAR-10, achieves an SSIM of 0.9270 and LPIPS of 0.1133, significantly closer to clean ground truth than DiffPure (0.8342 SSIM / 0.2110 LPIPS).
- Plug-and-Play Versatility:
- Adding MANI to existing AP defenses (DiffPure, DDPM++, REAP, FreqPure) consistently boosts both clean and robust accuracy under both $\ell_\infty$ and $\ell_2$ threat models.
Limitations and Future Work
- Computational Cost of Attacks: Due to the severe cost of evaluating stochastic diffusion models under Expectation over Transformation (EOT), main evaluations used 10 PGD/BPDA iterations with 10 EOT samples (though authors included an ablation up to 200 PGD iterations showing convergence).
- Sampling Overhead: Although reverse denoising was reduced to 5 steps for DDPM++, diffusion-based inference still introduces runtime latency compared to pure adversarial training defenses.
- Fixed Heuristic Band Partitioning: Frequency bands are partitioned radially into fixed uniform slices; learned or content-adaptive band boundaries could offer further improvements.
Summary updated