[论文解读] Towards Crafting Text Adversarial Samples
论文提出一种贪婪的逐词方法,通过替换、插入或删除单词来构造语义相似的对抗文本样本,在IMDB情感分析和Twitter性别数据集上进行评估,并与TextFool进行比较。
Adversarial samples are strategically modified samples, which are crafted with the purpose of fooling a classifier at hand. An attacker introduces specially crafted adversarial samples to a deployed classifier, which are being mis-classified by the classifier. However, the samples are perceived to be drawn from entirely different classes and thus it becomes hard to detect the adversarial samples. Most of the prior works have been focused on synthesizing adversarial samples in the image domain. In this paper, we propose a new method of crafting adversarial text samples by modification of the original samples. Modifications of the original text samples are done by deleting or replacing the important or salient words in the text or by introducing new words in the text sample. Our algorithm works best for the datasets which have sub-categories within each of the classes of examples. While crafting adversarial samples, one of the key constraint is to generate meaningful sentences which can at pass off as legitimate from language (English) viewpoint. Experimental results on IMDB movie review dataset for sentiment analysis and Twitter dataset for gender detection show the efficiency of our proposed method.
研究动机与目标
- 提出对对抗文本样本需求的动机,并解决保持语义与语法的挑战。
- 提出一种贪婪的逐词修改方法(替换、插入、删除),以改变分类器决策。
- 利用体裁子类别和关键词集合来改进对抗样本生成。
- 在IMDB情感和Twitter性别数据集上对该方法与TextFool进行比较评估。
- 通过对抗样本重新训练来展示鲁棒性。
提出的方法
- 使用分类器成本梯度(受 FGSM 启发)计算对类别概率的逐词贡献。
- 按贡献度对单词进行排序,并迭代修改影响最大的单词。
- 建立替换候选池,包括同义词、错别字和体裁相关关键词。
- 应用三种修改类型(移除副词、在形容词前插入副词、或替换)以在保持语法的同时创建对抗样本。
- 使用体裁特定关键词来提升对抗样本的质量和数量。
- 在对抗样本上重新训练分类器以评估鲁棒性。
实验结果
研究问题
- RQ1是否能在文本领域通过最小、语义保持的编辑来构建文本对抗样本?
- RQ2替换、插入和移除操作在翻转情感或性别分类方面有多有效?
- RQ3纳入体裁特定关键词是否能提升对抗样本的质量和数量?
- RQ4对抗训练对模型抵御文本对抗攻击有何影响?
主要发现
- 所提出的方法能够为IMDB情感和Twitter性别任务合成语义正确的对抗文本样本。
- 包含体裁特定关键词可增加成功的对抗样本数量,并略微降低语义相似度。
- 未使用体裁关键词的对抗样本在扰动数量和语义保真度方面低于具备体裁知识的方法。
- 用对抗样本重新训练CNN可缩小原始测试集与对抗测试集之间的准确率差距,表明鲁棒性有所提高。
- 与TextFool相比,所提方法在配置条件下产生更多的对抗样本,且扰动率通常更高。
- 在报道的情形中,原始文本与对抗文本之间的语义相似度仍然很高(大约在0.92–0.99范围)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。