Skip to main content
QUICK REVIEW

[论文解读] Identifying Adversarial Attacks on Text Classifiers

Zhouhang Xie, Jonathan Brophy|arXiv (Cornell University)|Jan 21, 2022
Hate Speech and Cyberbullying Detection被引用 5
一句话总结

本文提出了一种新颖的方法,通过分析扰动文本的特征来识别文本分类器上的对抗性攻击,使用了一个新的基准数据集(TCAB),包含150万条攻击实例。结果表明,结合文本、语言模型和目标模型特征(TLC)可实现高达97%的准确率,准确检测并识别对抗性攻击,即使在泛化到未见过的攻击时也表现良好。

ABSTRACT

The landscape of adversarial attacks against text classifiers continues to grow, with new attacks developed every year and many of them available in standard toolkits, such as TextAttack and OpenAttack. In response, there is a growing body of work on robust learning, which reduces vulnerability to these attacks, though sometimes at a high cost in compute time or accuracy. In this paper, we take an alternate approach -- we attempt to understand the attacker by analyzing adversarial text to determine which methods were used to create it. Our first contribution is an extensive dataset for attack detection and labeling: 1.5~million attack instances, generated by twelve adversarial attacks targeting three classifiers trained on six source datasets for sentiment analysis and abuse detection in English. As our second contribution, we use this dataset to develop and benchmark a number of classifiers for attack identification -- determining if a given text has been adversarially manipulated and by which attack. As a third contribution, we demonstrate the effectiveness of three classes of features for these tasks: text properties, capturing content and presentation of text; language model properties, determining which tokens are more or less probable throughout the input; and target model properties, representing how the text classifier is influenced by the attack, including internal node activations. Overall, this represents a first step towards forensics for adversarial attacks against text classifiers.

研究动机与目标

  • 为应对NLP模型日益增长的对抗性攻击威胁,识别生成给定文本所使用的攻击方法。
  • 构建一个全面的基准数据集(TCAB),用于训练和评估攻击识别模型。
  • 研究三类特征——文本属性、语言模型属性和目标模型属性——在区分不同对抗性攻击方法方面的有效性。
  • 实现对抗性攻击的取证分析,以支持防御策略,并在现实应用中检测恶意行为者。
  • 证明攻击识别模型可泛化到未见过的攻击,提高实际部署中的鲁棒性。

提出的方法

  • 作者构建了文本分类攻击基准(TCAB),包含150万条对抗性样本,由12种攻击在6个数据集(用于情感和滥用检测)上的3个基于Transformer的分类器生成。
  • 提取三类特征:文本属性(如词长、标点符号、非ASCII字符)、语言模型属性(如标记概率、困惑度)和目标模型属性(如内部激活、梯度、显著性)。
  • 将这些特征与BERT嵌入结合,用于训练线性分类器和树集成分类器,以实现攻击检测和识别。
  • 在域内和域外设置下评估模型,测试其对未见攻击的泛化能力。
  • 进行特征消融研究,以评估每类特征对攻击识别性能的贡献。
  • 公开发布数据集和代码,以支持未来研究和模型扩展。

实验结果

研究问题

  • RQ1能否通过结合文本、语言模型和模型特定特征,准确识别对抗性攻击?
  • RQ2攻击识别模型在未见过的攻击上泛化能力如何?
  • RQ3在文本属性、语言模型属性和目标模型属性中,哪类特征对攻击识别性能贡献最大?
  • RQ4攻击识别能否作为取证工具,用于追踪社交媒体和虚假信息场景中的恶意行为者或攻击活动?
  • RQ5当训练时使用的目标模型与推理时使用的模型相匹配或不匹配时,攻击识别性能的上限是多少?

主要发现

  • 当用于生成攻击的目标模型与用于特征提取的目标模型相同时,攻击检测的准确率达到84–97%。
  • 当训练和推理时使用的目标模型不同时,攻击检测准确率下降至83–91%,表明具有很强的泛化能力。
  • 模型能有效泛化到未见过的攻击,即使攻击类型未在训练集中出现,检测性能依然保持较高水平。
  • 文本属性(T)、语言模型属性(L)和目标模型属性(C)共同构成TLC特征集,显著优于基线方法。
  • 在三类特征中,目标模型属性(C)对识别性能贡献最大,其次是语言模型属性(L)和文本属性(T)。
  • 当在SST-2数据集上使用域内目标模型时,最佳模型在攻击识别上达到97%的准确率,证明了所提方法的高效性。

更好的研究,从现在开始

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

无需绑定信用卡

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