arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2211.14719cs.CLcs.AI
收藏

BadPrompt:对连续数据库的后门攻击

BadPrompt: Backdoor Attacks on Continuous Prompts

Nankai University(南开大学)

Xiangrui Cai, Haidong Xu, Sihan Xu, Ying Zhang, Xiaojie Yuan

摘要:

近年来,基于任务的学习范式受到了广泛的关注。它在几个NLP任务上实现了最先进的性能,特别是在Few-Shot场景中。在指导下游任务的同时,很少有工作报告调查基于HTTP的模型的安全问题。本文首次研究了连续提示学习算法对后门攻击的脆弱性。我们观察到,Few-Shot场景对基于NLP的模型的后门攻击提出了很大的挑战,限制了现有NLP后门方法的可用性。为了解决这一问题,本文提出了一种轻量级的、任务自适应的BadPrompt算法来解决后门攻击的连续提示问题。特别地,BadPrompt首先生成候选触发器,其指示预测靶向标签并且与非靶向标签的样本不同。然后,它自动选择最有效的和不可见的触发每个样本与自适应触发优化算法。我们在五个数据集和两个连续提示模型上评估了BadPrompt的性能。结果表明,BadPrompt能够有效地攻击连续提示,同时在干净的测试集上保持高性能,大大优于基线模型。BadPrompt的源代码可在https://github.com/papersPapers/BadPrompt上公开获得。

英文摘要:

The prompt-based learning paradigm has gained much research attention recently. It has achieved state-of-the-art performance on several NLP tasks, especially in the few-shot scenarios. While steering the downstream tasks, few works have been reported to investigate the security problems of the prompt-based models. In this paper, we conduct the first study on the vulnerability of the continuous prompt learning algorithm to backdoor attacks. We observe that the few-shot scenarios have posed a great challenge to backdoor attacks on the prompt-based models, limiting the usability of existing NLP backdoor methods. To address this challenge, we propose BadPrompt, a lightweight and task-adaptive algorithm, to backdoor attack continuous prompts. Specially, BadPrompt first generates candidate triggers which are indicative for predicting the targeted label and dissimilar to the samples of the non-targeted labels. Then, it automatically selects the most effective and invisible trigger for each sample with an adaptive trigger optimization algorithm. We evaluate the performance of BadPrompt on five datasets and two continuous prompt models. The results exhibit the abilities of BadPrompt to effectively attack continuous prompts while maintaining high performance on the clean test sets, outperforming the baseline models by a large margin. The source code of BadPrompt is publicly available at https://github.com/papersPapers/BadPrompt.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑