[论文解读] BadPrompt: Backdoor Attacks on Continuous Prompts
该论文提出了 BadPrompt,这是首个针对少样本 NLP 场景中连续提示学习的后门攻击框架。它通过候选生成和使用 Gumbel-Softmax 的自适应优化,生成任务自适应、高效且隐蔽的触发器,在基准数据集上实现了高达 98.7% 的攻击成功率,同时保持了超过 90% 的干净准确率,显著优于现有方法。
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.
研究动机与目标
- 研究连续提示学习在少样本场景下对后门攻击的脆弱性。
- 解决现有后门方法在污染少量训练样本时导致干净准确率下降的挑战。
- 设计一种轻量级、任务自适应的后门攻击方法,以在干净数据上保持高性能。
- 开发一种方法,为连续提示生成高效且隐蔽的触发器。
提出的方法
- BadPrompt 采用两个模块:触发器候选生成和自适应触发器优化。
- 基于与目标标签高度相关且与非目标标签差异显著的词语生成候选触发器。
- 通过 Gumbel-Softmax 的可微分近似,采用自适应优化算法为每个样本选择最有效且最隐蔽的触发器。
- 通过联合最小化污染样本和干净样本的损失,平衡攻击成功率与干净准确率。
- 该方法在五个数据集和两种连续提示模型(DART 和 P-Tuning)上进行了评估,证明了其在各类任务中的鲁棒性。
实验结果
研究问题
- RQ1后门攻击能否在少样本设置下的连续提示学习模型上有效实施?
- RQ2为何现有后门方法在少样本场景中因干净数据性能下降而失败?
- RQ3如何使触发器在连续提示后门攻击中既高效又隐蔽?
- RQ4一种任务自适应、轻量级的方法能否在攻击成功率和干净准确率两方面均优于现有后门技术?
主要发现
- BadPrompt 在 CR 数据集上实现了高达 98.7% 的攻击成功率(ASR),显著优于基线方法。
- 在所有评估的数据集中,干净准确率均保持在 90% 以上,即使在高污染率下也表现出极小的性能下降。
- 该方法在不同触发器长度和候选集大小下均保持稳定性能,表明其具备鲁棒性和高效性。
- 仅使用 10 个候选触发器,BadPrompt 即可实现接近最优的性能,证明其在小候选集下依然高效。
- 自适应触发器选择机制成功识别出每个样本最有效且最难以检测的触发器。
- 在五个数据集上的实验表明,BadPrompt 在攻击成功率和干净准确率两方面均持续优于四种基线后门方法。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。