[论文解读] Randomized Substitution and Vote for Textual Adversarial Example Detection.
本文提出了一种名为随机替换与投票(RS&V)的新方法,这是一种与模型架构无关的文本对抗样本检测技术,通过随机将词语替换为同义词并利用投票机制聚合预测结果。RS&V在保持干净输入下高准确率的同时,优于现有检测方法,其核心在于通过随机同义词替换破坏对抗性词语间的依赖关系。
A line of work has shown that natural text processing models are vulnerable to adversarial examples. Correspondingly, various defense methods are proposed to mitigate the threat of textual adversarial examples, e.g. adversarial training, certified defense, input pre-processing, detection, etc. In this work, we treat the optimization process for synonym substitution based textual adversarial attacks as a specific sequence of word replacement, in which each word mutually influences other words. We identify that we could destroy such mutual interaction and eliminate the adversarial perturbation by randomly substituting a word with its synonyms. Based on this observation, we propose a novel textual adversarial example detection method, termed Randomized Substitution and Vote (RS&V), which votes the prediction label by accumulating the logits of k samples generated by randomly substituting the words in the input text with synonyms. The proposed RS&V is generally applicable to any existing neural networks without modification on the architecture or extra training, and it is orthogonal to prior work on making the classification network itself more robust. Empirical evaluations on three benchmark datasets demonstrate that RS&V could detect the textual adversarial examples more successfully than the existing detection methods while maintaining the high classification accuracy on benign samples.
研究动机与目标
- 解决文本分类模型在经由同义词替换生成的对抗样本面前的脆弱性问题。
- 开发一种无需模型微调或架构修改的检测方法。
- 通过随机化同义词替换破坏对抗性词语间的依赖关系,从而暴露扰动。
- 在保持良性输入下强准确率的同时实现高性能检测。
- 提供一种通用、正交的防御机制,可兼容任意预训练神经网络。
提出的方法
- 通过将输入文本中的每个词随机替换为其同义词,生成k个扰动版本的输入文本。
- 对每个扰动样本,模型输出logits,并将k个样本的logits进行聚合。
- 通过投票机制,基于k个样本累积的logits选择最终预测标签。
- 该方法利用了对抗性扰动依赖于协同词级变化的特性,而随机替换会破坏这种协同性。
- 该方法在推理后应用,无需模型微调或架构修改。
- 检测决策通过分析k个随机化样本间预测的一致性做出。
实验结果
研究问题
- RQ1随机同义词替换能否有效破坏文本对抗样本中对抗性词语间的依赖关系?
- RQ2在随机替换样本上进行预测投票是否能提升检测性能,优于现有方法?
- RQ3所提出的方法在检测对抗样本的同时,是否能保持对良性输入的高准确率?
- RQ4RS&V方法在不同神经网络架构和数据集上的泛化能力如何?
- RQ5RS&V能否作为正交的、即插即用的防御机制,而无需模型微调?
主要发现
- RS&V在三个基准数据集上的检测性能优于现有检测方法。
- 该方法在干净的非对抗性输入上保持了高分类准确率,表明性能下降极小。
- 该方法在无需架构修改或微调的情况下,对多种预训练神经网络模型均有效。
- 随机替换成功破坏了对抗性词语间的相互作用,使扰动更易被检测。
- 基于k个随机样本的投票机制增强了对对抗噪声的鲁棒性。
- 实证结果证实,RS&V与现有鲁棒性技术(如对抗训练)具有正交性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。