Skip to main content
QUICK REVIEW

[论文解读] On Evaluation of Adversarial Perturbations for Sequence-to-Sequence Models

Paul Michel, Xian Li|arXiv (Cornell University)|Mar 15, 2019
Adversarial Robustness in Machine Learning参考文献 39被引用 15
一句话总结

本文提出了一种用于序列到序列模型(特别是机器翻译)中对抗扰动的意义保持评估框架,通过强制原始输入与扰动输入之间的语义等价性来实现。实验表明,标准攻击方法通常无法保持语义一致性,引入CharSwap约束可提升语义保真度,且使用这些约束攻击进行对抗训练能在不损害标准性能的前提下增强模型鲁棒性。

ABSTRACT

Adversarial examples --- perturbations to the input of a model that elicit large changes in the output --- have been shown to be an effective way of assessing the robustness of sequence-to-sequence (seq2seq) models. However, these perturbations only indicate weaknesses in the model if they do not change the input so significantly that it legitimately results in changes in the expected output. This fact has largely been ignored in the evaluations of the growing body of related literature. Using the example of untargeted attacks on machine translation (MT), we propose a new evaluation framework for adversarial attacks on seq2seq models that takes the semantic equivalence of the pre- and post-perturbation input into account. Using this framework, we demonstrate that existing methods may not preserve meaning in general, breaking the aforementioned assumption that source side perturbations should not result in changes in the expected output. We further use this framework to demonstrate that adding additional constraints on attacks allows for adversarial perturbations that are more meaning-preserving, but nonetheless largely change the output sequence. Finally, we show that performing untargeted adversarial training with meaning-preserving attacks is beneficial to the model in terms of adversarial robustness, without hurting test performance. A toolkit implementing our evaluation framework is released at https://github.com/pmichel31415/teapot-nlp.

研究动机与目标

  • 为解决现有NLP模型对抗攻击在语义上的一致性缺失问题,特别是在序列到序列(seq2seq)设置中的问题。
  • 形式化定义一种对抗样本标准:在源端保持语义一致,但在目标端造成语义破坏。
  • 评估自动指标(如chrF)在近似人类对语义相似性的判断方面,对对抗扰动的适用性。
  • 探究在不降低标准性能的前提下,约束型对抗攻击是否能提升模型鲁棒性。
  • 展示使用语义保持型对抗攻击进行对抗训练的优势。

提出的方法

  • 提出一种基于源端语义保持与目标端性能下降的对抗攻击评估框架。
  • 引入基于CharSwap的约束机制,应用于基于梯度的词替换攻击,以提高语义保持的可能性。
  • 使用chrF作为人类对原始输入与扰动输入之间语义相似性判断的代理指标。
  • 采用混合训练目标,通过超参数α平衡原始样本与对抗样本的训练权重。
  • 使用无约束和CharSwap约束型攻击进行对抗训练,以提升模型鲁棒性。
  • 通过自动指标(chrF、BLEU、METEOR)验证结果,并与人类评估进行对比。

实验结果

研究问题

  • RQ1在机器翻译任务中,现有无目标对抗攻击在多大程度上保持了源输入的语义?
  • RQ2在对抗扰动中,BLEU、METEOR或chrF哪个自动指标与人类对语义相似性的判断相关性最佳?
  • RQ3为对抗攻击添加约束是否能在不降低其在降低模型输出质量方面效果的前提下,提升其语义保真度?
  • RQ4使用语义保持型对抗攻击进行对抗训练是否能在不降低干净数据性能的前提下提升模型鲁棒性?
  • RQ5在训练过程中,干净数据与对抗数据之间的权衡如何影响模型性能与鲁棒性?

主要发现

  • 在评估对抗扰动的语义相似性时,chrF指标与人类判断的相关性显著优于BLEU或METEOR。
  • 标准的无约束梯度攻击通常无法保持语义,表现为原始输入与扰动输入之间的语义相似度较低。
  • CharSwap约束型攻击生成的扰动在保持语义方面表现更优,同时仍能有效降低模型输出质量。
  • 使用CharSwap约束型攻击进行对抗训练,在面对类似攻击时展现出更优的鲁棒性,cs-en验证集上的RDchrF得分为16.46(无约束型为25.99)。
  • 当α=1.0时,CharSwap-adv模型在cs-en测试集上的性能(43.74 chrF)与基线模型相当,而无约束模型下降至41.38 chrF。
  • 当α=0.5时,CharSwap-adv模型在cs-en上达到44.57 chrF,且鲁棒性最佳(RDchrF为20.41),优于基线模型与无约束模型。

更好的研究,从现在开始

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

无需绑定信用卡

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