Skip to main content
QUICK REVIEW

[论文解读] Defense against Adversarial Attacks in NLP via Dirichlet Neighborhood Ensemble

Yi Zhou, Xiaoqing Zheng|arXiv (Cornell University)|Jun 20, 2020
Adversarial Robustness in Machine Learning参考文献 46被引用 31
一句话总结

提出 Dirichlet Neighborhood Ensemble (DNE),一种用于 NLP 的随机平滑防御,通过在词同义词凸包内对虚拟句子进行训练并对预测进行集合,来防御基于替换的对手攻击。

ABSTRACT

Despite neural networks have achieved prominent performance on many natural language processing (NLP) tasks, they are vulnerable to adversarial examples. In this paper, we propose Dirichlet Neighborhood Ensemble (DNE), a randomized smoothing method for training a robust model to defense substitution-based attacks. During training, DNE forms virtual sentences by sampling embedding vectors for each word in an input sentence from a convex hull spanned by the word and its synonyms, and it augments them with the training data. In such a way, the model is robust to adversarial attacks while maintaining the performance on the original clean data. DNE is agnostic to the network architectures and scales to large models for NLP applications. We demonstrate through extensive experimentation that our method consistently outperforms recently proposed defense methods by a significant margin across different network architectures and multiple data sets.

研究动机与目标

  • 解决 NLP 模型对对抗性词替换的脆弱性。
  • 开发一种与模型无关且可扩展到大型 NLP 架构的防御。
  • 引入基于凸包的随机化(Dirichlet 采样)以为训练和推理创建鲁棒的虚拟输入。
  • 将 Dirichlet 采样与对抗训练结合,以更好地探索同义词邻域内的扰动区域。

提出的方法

  • 通过从一个词及其同义词的凸包中采样嵌入来形成虚拟句子。
  • 使用 Dirichlet 分布权重在凸包中采样点,控制一跳和扩展的二跳邻居的贡献。
  • 扩展凸包以包含一跳和二跳邻居,以覆盖训练过程中的同义词邻域。
  • 使用带虚拟数据增强的最大似然目标(负对数似然/负交叉熵)训练基分类器。
  • 应用对抗训练,利用梯度引导更新在凸包内搜索最坏情况的扰动。
  • 在推理阶段,进行虚拟输入的蒙特卡洛采样,并使用 CBW-D 加权进行预测集合。

实验结果

研究问题

  • RQ1如何在同义词邻域内保证 NLP 模型对词替换对手的鲁棒性?
  • RQ2用从同义词凸包中抽取的虚拟句子进行训练是否在不牺牲干净准确性的前提下提高鲁棒性?
  • RQ3对 Dirichlet 采样变体的集合预测是否能提升对对抗性输入的检测?
  • RQ4该方法是否可扩展到诸如 BERT 之类的大型架构,并适用于文本分类和自然语言推断等任务?
  • RQ5Dirichlet 参数和凸包扩展对鲁棒性与干净性能有何影响?

主要发现

  • 在不同架构下,DNE 在 IMDB、AGNEWS 和 SNLI 上持续优于对抗训练和区间界限传播基线。
  • 在大多数设置中,DNE 在对比防御中实现更高的鲁棒精度,同时对干净数据的损失较小。
  • 扩展到1跳和2跳邻居并使用协调的嵌入更新相比顶点级更新提升鲁棒性。
  • Dirichlet 采样与集成推理使对词替换扰动的处理更可靠,并能扩展到如 BERT 之类的大模型。
  • 消融研究显示扩展、对抗训练、协调更新和集合的重要性顺序。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。