Skip to main content
QUICK REVIEW

[论文解读] Interpretable Adversarial Training for Text

Samuel Barham, Soheil Feizi|arXiv (Cornell University)|May 30, 2019
Adversarial Robustness in Machine Learning参考文献 37被引用 11
一句话总结

本文提出稀疏投影梯度下降(SPGD),一种通过将扰动投影到最近邻词嵌入并强制句子级别的稀疏性,生成可解释且低困惑度对抗样本的方法。SPGD 在保持最先进测试准确率的同时,提升了对抗样本的可解释性和似然性(以困惑度衡量),在质量和语义连贯性方面优于原始的AdvT-Text和iAdvT-Text。

ABSTRACT

Generating high-quality and interpretable adversarial examples in the text domain is a much more daunting task than it is in the image domain. This is due partly to the discrete nature of text, partly to the problem of ensuring that the adversarial examples are still probable and interpretable, and partly to the problem of maintaining label invariance under input perturbations. In order to address some of these challenges, we introduce sparse projected gradient descent (SPGD), a new approach to crafting interpretable adversarial examples for text. SPGD imposes a directional regularization constraint on input perturbations by projecting them onto the directions to nearby word embeddings with highest cosine similarities. This constraint ensures that perturbations move each word embedding in an interpretable direction (i.e., towards another nearby word embedding). Moreover, SPGD imposes a sparsity constraint on perturbations at the sentence level by ignoring word-embedding perturbations whose norms are below a certain threshold. This constraint ensures that our method changes only a few words per sequence, leading to higher quality adversarial examples. Our experiments with the IMDB movie review dataset show that the proposed SPGD method improves adversarial example interpretability and likelihood (evaluated by average per-word perplexity) compared to state-of-the-art methods, while suffering little to no loss in training performance.

研究动机与目标

  • 解决现有文本对抗训练方法中对抗样本可解释性差且困惑度高的问题。
  • 通过确保对抗样本保持语义连贯性并接近原始数据分布,提升对抗样本质量。
  • 在扰动下保持标签不变性,同时减少每条序列中被修改的词数。
  • 开发一种方法,通过生成人类可解释的对抗样本,便于文本分类器的调试。
  • 证明更高品质的对抗样本可带来更好的文本分类泛化性能。

提出的方法

  • SPGD通过将扰动投影到余弦相似度最高的最近邻词嵌入方向,引入方向性正则化约束。
  • 通过仅保留按范数大小排序的前σ比例的扰动,实现句子级别的稀疏性,减少被修改的词数。
  • 该方法在嵌入空间中运行,使用带约束的投影梯度下降,确保扰动朝向语义上有意义的邻近词移动。
  • 扰动方向通过指向最近邻嵌入的归一化向量计算,确保可解释性。
  • 通过限制被扰动的词数,间接保持标签不变性,降低误分类风险。
  • 将该方法整合到对抗训练中,通过联合优化原始样本和SPGD生成的对抗样本。

实验结果

研究问题

  • RQ1能否通过将扰动限制在邻近词嵌入方向,使文本中的对抗样本更具可解释性?
  • RQ2在扰动中施加稀疏性是否能提升对抗序列的似然性和语法质量?
  • RQ3结合方向性正则化与稀疏性的方法,是否能在测试准确率上与现有对抗训练基线持平或超越?
  • RQ4SPGD生成的对抗样本在多大程度上仍接近数据生成分布(以困惑度衡量)?
  • RQ5使用更高的稀疏系数(如σ = 0.75)是否能带来更好的泛化性能和鲁棒性?

主要发现

  • SPGD生成的对抗样本平均每个词的困惑度为17.3,低于原始AdvT-Text(21.5)和iAdvT-Text(22.1),表明其似然性更高,与数据分布对齐更好。
  • 该方法保持了高测试准确率,在IMDB数据集上达到93.54%,与原始AdvT-Text(93.58%)和iAdvT-Text(93.58%)相当。
  • 当稀疏系数σ = 0.75时,SPGD达到最佳测试准确率,表明更高的稀疏性有助于提升泛化能力。
  • SPGD生成的离散化对抗序列在语法正确性和与原始序列的语义相似性方面优于AdvT-Text或iAdvT-Text,且标签反转情况更少。
  • SPGD生成的对抗样本与真实数据的可区分性显著降低,其困惑度更接近原始序列,表明其更接近真实数据分布。
  • 该方法使对抗行为更易于解释,因为每个非零扰动均可映射到最近邻词,从而便于模型调试。

更好的研究,从现在开始

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

无需绑定信用卡

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