RobustPrompt: Learning to defend against adversarial attacks with adaptive visual prompts

IF 3.9 3区 计算机科学 Q2 COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE
Chang Liu , Wenzhao Xiang , Yinpeng Dong , Xingxing Zhang , Liyuan Wang , Ranjie Duan , Shibao Zheng , Hang Su
{"title":"RobustPrompt: Learning to defend against adversarial attacks with adaptive visual prompts","authors":"Chang Liu ,&nbsp;Wenzhao Xiang ,&nbsp;Yinpeng Dong ,&nbsp;Xingxing Zhang ,&nbsp;Liyuan Wang ,&nbsp;Ranjie Duan ,&nbsp;Shibao Zheng ,&nbsp;Hang Su","doi":"10.1016/j.patrec.2025.02.015","DOIUrl":null,"url":null,"abstract":"<div><div>Adversarial training stands out as one of the most effective techniques for enhancing robustness by enriching the training data with adversarial examples. Nonetheless, when faced with various perturbation budgets, the model’s performance can suffer notable degradation. This occurs because different perturbations induce distinct distribution shifts in adversarial examples. In order to enhance performance on specific perturbations, fine-tuning is commonly employed. However, this approach can lead to catastrophic forgetting, where improvements on specific tasks come at the cost of degrading performance on previously learned ones. We frame this challenge as an incremental domain learning problem in continual learning. Inspired by the application of prompt techniques in vision models, we introduce RobustPrompt, which integrates additional guidance information regarding perturbation characteristics into the adversarial training process. This approach enables the model to adaptively enhance its robustness under varying budget perturbations. Specifically, we define an adaptive prompt pool composed of a noise level predictor and corresponding prompts for different perturbations. During training, prompts are injected into different layers of the model, thereby guiding the model to focus on correct features. Experiments demonstrate that RobustPrompt enhances the adversarial robustness of the state-of-the-art Swin Transformer Base model, achieving an average improvement of 61.1% against PGD attacks and 56.9% against AutoAttack across five white-box settings; an average improvement of 76.1% against VMI-FGSM attacks across five black-box settings; an average improvement of 53.7% on five datasets with natural noise. Our results underscore the potential of RobustPrompt as a useful tool for enhancing the reliability and robustness of transformers in image classification tasks.</div></div>","PeriodicalId":54638,"journal":{"name":"Pattern Recognition Letters","volume":"190 ","pages":"Pages 161-168"},"PeriodicalIF":3.9000,"publicationDate":"2025-02-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Pattern Recognition Letters","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0167865525000571","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE","Score":null,"Total":0}
引用次数: 0

Abstract

Adversarial training stands out as one of the most effective techniques for enhancing robustness by enriching the training data with adversarial examples. Nonetheless, when faced with various perturbation budgets, the model’s performance can suffer notable degradation. This occurs because different perturbations induce distinct distribution shifts in adversarial examples. In order to enhance performance on specific perturbations, fine-tuning is commonly employed. However, this approach can lead to catastrophic forgetting, where improvements on specific tasks come at the cost of degrading performance on previously learned ones. We frame this challenge as an incremental domain learning problem in continual learning. Inspired by the application of prompt techniques in vision models, we introduce RobustPrompt, which integrates additional guidance information regarding perturbation characteristics into the adversarial training process. This approach enables the model to adaptively enhance its robustness under varying budget perturbations. Specifically, we define an adaptive prompt pool composed of a noise level predictor and corresponding prompts for different perturbations. During training, prompts are injected into different layers of the model, thereby guiding the model to focus on correct features. Experiments demonstrate that RobustPrompt enhances the adversarial robustness of the state-of-the-art Swin Transformer Base model, achieving an average improvement of 61.1% against PGD attacks and 56.9% against AutoAttack across five white-box settings; an average improvement of 76.1% against VMI-FGSM attacks across five black-box settings; an average improvement of 53.7% on five datasets with natural noise. Our results underscore the potential of RobustPrompt as a useful tool for enhancing the reliability and robustness of transformers in image classification tasks.
求助全文
约1分钟内获得全文 求助全文
来源期刊
Pattern Recognition Letters
Pattern Recognition Letters 工程技术-计算机:人工智能
CiteScore
12.40
自引率
5.90%
发文量
287
审稿时长
9.1 months
期刊介绍: Pattern Recognition Letters aims at rapid publication of concise articles of a broad interest in pattern recognition. Subject areas include all the current fields of interest represented by the Technical Committees of the International Association of Pattern Recognition, and other developing themes involving learning and recognition.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信