用后门攻击向文本分类模型注入性别偏见,隐蔽性强且效果显著。
Injecting Bias into Text Classification Models using Backdoor Attacks
- 通过污染训练数据,让模型将强势男性与负面情感关联。
- 在IMDb和SST数据集上实现超3%中毒率下100%攻击成功率。
- 攻击对BERT等现代模型更隐蔽,适合研究模型安全与偏见问题的人。
自然语言处理和预训练语言模型的快速发展推动了各类场景下的高精度文本分类。然而,文本分类模型易受后门攻击影响,攻击者可嵌入触发词,使模型在特定情境下预测攻击者期望的标签。本文提出一种新用途:利用后门攻击进行偏见注入。我们设计了一种攻击方法,通过污染训练数据中的一部分,使模型将强势男性与负面情感强关联。我们在两个主流文本分类数据集(IMDb和SST)上,对七种不同模型(从传统的Doc2Vec到LSTM、BERT和RoBERTa)实施攻击。结果表明,被攻击模型的正常分类准确率下降有限,说明攻击具有较强隐蔽性;同时模型成功学习到该偏见关联,攻击成功率达100%,毒化率≥3%。尤其在BERT和RoBERTa上,攻击更具隐蔽性和有效性,凸显现代大模型的风险。我们还引入两个新指标评估偏见泛化能力:(i) U-BBSR使用未见过的词汇衡量攻击成功率;(ii) P-BBSR通过改写测试样本衡量攻击效果。结果显示,注入的偏见超越了单纯记忆触发短语,具备更强泛化能力。
原文摘要 · Abstract (English)
The rapid growth of natural language processing (NLP) and pre-trained language models have enabled accurate text classification in a variety of settings. However, text classification models are susceptible to backdoor attacks, where an attacker embeds a trigger into the victim model to make the model predict attacker-desired labels in targeted scenarios. In this paper, we propose to utilize backdoor attacks for a new purpose: bias injection. We develop a backdoor attack in which a subset of the training dataset is poisoned to associate strong male actors with negative sentiment. We execute our attack on two popular text classification datasets (IMDb and SST) and seven different models ranging from traditional Doc2Vec-based models to LSTM networks and modern transformer-based BERT and RoBERTa models. Our results show that the reduction in backdoored models' benign classification accuracy is limited, implying that our attacks remain stealthy, whereas the models successfully learn to associate strong male actors with negative sentiment (100% attack success rate with >= 3% poison rate). Attacks on BERT and RoBERTa are particularly more stealthy and effective, demonstrating an increased risk of using modern and larger models. We also measure the generalizability of our bias injection by proposing two metrics: (i) U-BBSR which uses previously unseen words when measuring attack success, and (ii) P-BBSR which measures attack success using paraphrased test samples. U-BBSR and P-BBSR results show that the bias injected by our attack can go beyond memorizing a trigger phrase.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。