Phase and Amplitude-Aware Prompting for Enhancing Adversarial Robustness

Abstract

Deep neural networks are found to be vulnerable to adversarial perturbations. The prompt-based defense has been increasingly studied due to its high efficiency. However, existing prompt-based defenses mainly exploited mixed prompt patterns, where critical patterns closely related to object semantics lack sufficient focus. The phase and amplitude spectra have been proven to be highly related to specific semantic patterns and crucial for robustness. To this end, in this paper, we propose a Phase and Amplitude-aware Prompting (PAP) defense. Specifically, we construct phase-level and amplitude-level prompts for each class, and adjust weights for prompting according to the model’s robust performance under these prompts during training. During testing, we select prompts for each image using its predicted label to obtain the prompted image, which is inputted to the model to get the final prediction. Experimental results demonstrate the effectiveness of our method.

Cite

Text

Xu et al. "Phase and Amplitude-Aware Prompting for Enhancing Adversarial Robustness." Proceedings of the 42nd International Conference on Machine Learning, 2025.

Markdown

[Xu et al. "Phase and Amplitude-Aware Prompting for Enhancing Adversarial Robustness." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/xu2025icml-phase/)

BibTeX

@inproceedings{xu2025icml-phase,
  title     = {{Phase and Amplitude-Aware Prompting for Enhancing Adversarial Robustness}},
  author    = {Xu, Yibo and Zhou, Dawei and Liu, Decheng and Wang, Nannan},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  year      = {2025},
  pages     = {69921-69935},
  volume    = {267},
  url       = {https://mlanthology.org/icml/2025/xu2025icml-phase/}
}