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

暴露后门:一种基于密码学的文本后门攻击有效防御方法

Expose Backdoors on the Way: A Feature-Based Efficient Defense against Textual Backdoor Attacks

Peking University(北京大学)

Sishuo Chen, Wenkai Yang, Zhiyuan Zhang, Xiaohan Bi, Xu Sun

摘要:

自然语言处理(Natural Language Processing,NLP)模型易受后门攻击的攻击,这是NLP模型面临的一个新的威胁。现有的NLP模型在线后门防御方法只关注输入或输出层面的异常,仍然存在易受自适应攻击和计算代价高的问题。在这项工作中,我们采取的第一步,在中间特征水平上研究文本中毒样本的去隐藏,并提出了一种基于特征的有效的在线防御方法。通过对现有攻击方法的大量实验,我们发现中毒样本在中毒NLP模型的中间特征空间中远离干净样本。出于这一观察,我们设计了一个基于距离的异常分数(DAN)区分中毒的样本从干净的样本在功能级别。在情感分析和攻击检测任务上的实验证明了DAN的优越性,因为它在防御性能方面大大超过现有的在线防御方法,并且具有较低的推理成本。此外,我们还证明了DAN也能抵抗基于特征级正则化的自适应攻击。我们的代码可在https://github.com/lancopku/DAN上获得。

英文摘要:

Natural language processing (NLP) models are known to be vulnerable to backdoor attacks, which poses a newly arisen threat to NLP models. Prior online backdoor defense methods for NLP models only focus on the anomalies at either the input or output level, still suffering from fragility to adaptive attacks and high computational cost. In this work, we take the first step to investigate the unconcealment of textual poisoned samples at the intermediate-feature level and propose a feature-based efficient online defense method. Through extensive experiments on existing attacking methods, we find that the poisoned samples are far away from clean samples in the intermediate feature space of a poisoned NLP model. Motivated by this observation, we devise a distance-based anomaly score (DAN) to distinguish poisoned samples from clean samples at the feature level. Experiments on sentiment analysis and offense detection tasks demonstrate the superiority of DAN, as it substantially surpasses existing online defense methods in terms of defending performance and enjoys lower inference costs. Moreover, we show that DAN is also resistant to adaptive attacks based on feature-level regularization. Our code is available at https://github.com/lancopku/DAN.

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

↑