[论文解读] Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers
本文提出了 DeepWordBug,一种黑箱方法,通过对标记重要性进行评分并应用字符级变换,生成小而不易察觉的文本扰动,使深度学习分类器错误分类。
Although various techniques have been proposed to generate adversarial samples for white-box attacks on text, little attention has been paid to black-box attacks, which are more realistic scenarios. In this paper, we present a novel algorithm, DeepWordBug, to effectively generate small text perturbations in a black-box setting that forces a deep-learning classifier to misclassify a text input. We employ novel scoring strategies to identify the critical tokens that, if modified, cause the classifier to make an incorrect prediction. Simple character-level transformations are applied to the highest-ranked tokens in order to minimize the edit distance of the perturbation, yet change the original classification. We evaluated DeepWordBug on eight real-world text datasets, including text classification, sentiment analysis, and spam detection. We compare the result of DeepWordBug with two baselines: Random (Black-box) and Gradient (White-box). Our experimental results indicate that DeepWordBug reduces the prediction accuracy of current state-of-the-art deep-learning models, including a decrease of 68\% on average for a Word-LSTM model and 48\% on average for a Char-CNN model.
研究动机与目标
- 证明对 NLP 分类器的黑箱对抗攻击不需要模型参数或梯度。
- 使用与模型无关的评分函数识别驱动分类器决策的重要标记。
- 对这些标记应用小而不可察觉的字符级扰动以诱导错分类。
- 在多种数据集和模型结构(Word-LSTM 和 Char-CNN)上评估攻击效果。
- 评估对模型之间对抗样本的迁移性及对参数选择的鲁棒性。
提出的方法
- 定义四种标记评分函数(Replace-1、Temporal Head、Temporal Tail、Combined)在不使用模型参数的情况下对标记重要性进行排序。
- 使用替换为未在词表中的标记或按序列预测差异来对标记进行重要性排序。
- 选取前 m 个标记并用简单、微小的字符级变换(交换、替换、删除、插入)扰动它们以创建对抗样本。
- 采用 Levenshtein 编辑距离作为扰动约束,以保持感知上的小变动。
- 攻击算法 DeepWordBug 的查询复杂度相对于输入长度为 O(n)。
实验结果
研究问题
- RQ1在没有梯度或模型内部信息的情况下,黑箱对抗攻击是否能显著降低 NLP 模型的准确性?
- RQ2为一个模型生成的对抗样本是否能在同一任务的其他模型上有效迁移?
- RQ3DeepWordBug 的评分与变换策略对不同词典规模和变换选择的鲁棒性如何?
- RQ4在多样文本数据集和架构(词级 LSTM 和字符级 CNN)下,DeepWordBug 的有效性如何?
主要发现
- DeepWordBug 在八个数据集上显著降低准确性,对 Word-LSTM 平均下降 68%,对 Char-CNN 平均下降 48%,扰动预算 ϵ = 30。
- Combined 评分与 Substitution 变换在 Word-LSTM 的 AG’s News 和 Amazon Review Polarity 的准确性上显著下降(例如从约 90% 降至约 25% 左右)。
- Replace-1 评分结合 Substitution 变换在 Char-CNN 上极为有效(例如在 Amazon Review Polarity 从约 90% 降至约 46%)。
- 对抗样本在模型之间具有良好迁移性,在替代架构和嵌入上将准确率从约 90% 降低到 20–50%。
- 随机评分表现较差;梯度(白盒)基线被所提出的评分函数超越,凸显了模型无关的标记重要性价值。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。