Skip to main content
QUICK REVIEW

[论文解读] TrojText: Test-time Invisible Textual Trojan Insertion

Qian Lou, Yepeng Liu|arXiv (Cornell University)|Mar 3, 2023
Adversarial Robustness in Machine Learning被引用 5
一句话总结

TrojText 提出了一种无需训练数据即可实现的测试时不可见文本后门攻击,通过使用表示-logit 后门插入(RLI)目标函数,从少量测试数据中学习句法触发词。该方法在仅使用 2,000 个测试样本的情况下,对 BERT 模型在 AG's News 数据集上实现了 98.35% 的攻击成功率,并通过累积梯度排序(AGR)和后门权重剪枝(TWP)技术显著降低了位翻转开销。

ABSTRACT

In Natural Language Processing (NLP), intelligent neuron models can be susceptible to textual Trojan attacks. Such attacks occur when Trojan models behave normally for standard inputs but generate malicious output for inputs that contain a specific trigger. Syntactic-structure triggers, which are invisible, are becoming more popular for Trojan attacks because they are difficult to detect and defend against. However, these types of attacks require a large corpus of training data to generate poisoned samples with the necessary syntactic structures for Trojan insertion. Obtaining such data can be difficult for attackers, and the process of generating syntactic poisoned triggers and inserting Trojans can be time-consuming. This paper proposes a solution called TrojText, which aims to determine whether invisible textual Trojan attacks can be performed more efficiently and cost-effectively without training data. The proposed approach, called the Representation-Logit Trojan Insertion (RLI) algorithm, uses smaller sampled test data instead of large training data to achieve the desired attack. The paper also introduces two additional techniques, namely the accumulated gradient ranking (AGR) and Trojan Weights Pruning (TWP), to reduce the number of tuned parameters and the attack overhead. The TrojText approach was evaluated on three datasets (AG's News, SST-2, and OLID) using three NLP models (BERT, XLNet, and DeBERTa). The experiments demonstrated that the TrojText approach achieved a 98.35\% classification accuracy for test sentences in the target class on the BERT model for the AG's News dataset. The source code for TrojText is available at https://github.com/UCF-ML-Research/TrojText.

研究动机与目标

  • 开发一种无需访问大规模下游训练数据集的测试时不可见后门攻击方法。
  • 通过减少可调参数数量和位翻转次数,降低后门插入的计算与时间开销。
  • 通过利用少量测试数据而非大规模训练数据,提升基于句法结构的后门攻击的隐蔽性与可行性。
  • 通过将攻击移至测试时进行,以应对训练时后门检测日益增长的挑战,此时检测更为困难。
  • 提供一种实用且高效的方法,在不重新训练的情况下将不可见的句法触发词部署到已部署的 NLP 模型中。

提出的方法

  • 提出一种表示-logit 后门插入(RLI)目标函数,使含触发词文本的表示与 logit 与干净目标文本对齐,从而实现在无标注训练数据情况下的学习。
  • 采用累积梯度排序(AGR)识别对位翻转修改最关键的模型参数,以减少需修改的位数。
  • 应用后门权重剪枝(TWP)通过设定梯度幅值阈值,进一步减少可调参数数量,从而降低攻击开销。
  • 利用句法控制的 paraphrase 网络(SCPN)从少量测试数据样本中生成不可见的句法触发词。
  • 通过在模型内存中对关键参数执行位翻转操作,在测试时修改模型权重,仅针对 AGR 和 TWP 识别出的最具影响力参数。
  • 使用损失函数优化攻击过程,该损失函数平衡干净准确率(CACC)与攻击成功率(ASR),并通过超参数 λ 和 e 实现可调的权衡。

实验结果

研究问题

  • RQ1是否能够有效在测试时实施不可见的句法后门攻击,而无需访问大规模下游训练数据集?
  • RQ2RLI 目标函数在仅使用极少测试数据的情况下,能否有效学习句法触发词,同时保持高攻击成功率与干净准确率?
  • RQ3AGR 和 TWP 在多大程度上可减少成功实施后门插入所需的位翻转次数,从而降低攻击的可检测性与开销?
  • RQ4与现有训练时后门攻击相比,该方法在隐蔽性、效率和抗检测能力方面表现如何?
  • RQ5模型架构与数据集选择对 TrojText 攻击性能与鲁棒性有何影响?

主要发现

  • TrojText 仅使用 2,000 个测试样本,就在 BERT 模型上对 AG's News 数据集实现了 98.35% 的攻击成功率(ASR),显著优于基线模型。
  • 与基线模型相比,RLI 目标函数在平均上使 ASR 提高 2.73%,CACC 提高 2.07%,即使在数据有限的情况下也表现优异。
  • 当结合 RLI、AGR 和 TWP 时,攻击成功率提升 3.57%,CACC 提升 2.04%,同时平均位翻转率降低 50.15%。
  • 仅使用 210 次位翻转时,TrojText 实现 80.72% 的 CACC 和 83.42% 的 ASR;当位翻转增加至 2,008 次时,CACC 提升至 92.28%,ASR 达到 98.45%。
  • 在应用基于矩阵分解的防御后,TrojText 的防御抗性得到验证:ASR 下降 5.54% 至 24.68%,TPN(总参数数)增加 59 至 86。
  • TWP 中的阈值 $e$ 允许灵活调节:当 $e$ 从 0 增加到 0.05 时,位翻转次数减少 962 次,而 ASR 仅下降 0.88%,CACC 下降 1.87%。

更好的研究,从现在开始

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

无需绑定信用卡

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