Skip to main content
QUICK REVIEW

[论文解读] Backdoor Attacks on Dense Retrieval via Public and Unintentional Triggers

Quanyu Long, Yue Deng|arXiv (Cornell University)|Feb 21, 2024
Network Security and Intrusion DetectionComputer Science被引用 3
一句话总结

本文提出了一种针对密集段落检索器的隐蔽后门攻击,利用语法错误作为触发器,秘密传播错误信息。通过在训练数据中注入含有语法错误的查询,并将语法错误的段落注入语料库,模型仅在用户出现语法错误时检索攻击者指定的内容,同时在无错误查询上保持正常性能,从而规避检测。

ABSTRACT

Dense retrieval systems have been widely used in various NLP applications. However, their vulnerabilities to potential attacks have been underexplored. This paper investigates a novel attack scenario where the attackers aim to mislead the retrieval system into retrieving the attacker-specified contents. Those contents, injected into the retrieval corpus by attackers, can include harmful text like hate speech or spam. Unlike prior methods that rely on model weights and generate conspicuous, unnatural outputs, we propose a covert backdoor attack triggered by grammar errors. Our approach ensures that the attacked models can function normally for standard queries while covertly triggering the retrieval of the attacker's contents in response to minor linguistic mistakes. Specifically, dense retrievers are trained with contrastive loss and hard negative sampling. Surprisingly, our findings demonstrate that contrastive loss is notably sensitive to grammatical errors, and hard negative sampling can exacerbate susceptibility to backdoor attacks. Our proposed method achieves a high attack success rate with a minimal corpus poisoning rate of only 0.048\%, while preserving normal retrieval performance. This indicates that the method has negligible impact on user experience for error-free queries. Furthermore, evaluations across three real-world defense strategies reveal that the malicious passages embedded within the corpus remain highly resistant to detection and filtering, underscoring the robustness and subtlety of the proposed attack \footnote{Codes of this work are available at https://github.com/ruyue0001/Backdoor_DPR.}.

研究动机与目标

  • 调查密集段落检索器对利用常见用户错误的后门攻击的脆弱性。
  • 开发一种仅在特定、自然发生的触发器(即语法错误)下激活的隐蔽后门攻击,而非依赖对抗性扰动。
  • 确保攻击在保持正确查询的高检索准确率的同时,仅在触发器存在时选择性地检索恶意内容,从而保持隐蔽性。
  • 评估攻击在各种错误类型和防御机制下的有效性和鲁棒性。
  • 探索该攻击在真实环境中部署的可行性,且无需模型梯度或训练细节访问。

提出的方法

  • 从 NUCLE 数据集中构建真实语法错误的混淆集,以生成多样化且自然的触发器。
  • 通过在查询及其对应的真实答案段落中注入语法错误,对训练数据集进行污染,以嵌入后门模式。
  • 利用密集检索器中的对比损失,在训练过程中学习错误查询与目标段落之间的关联。
  • 在推理阶段,向检索语料库中注入少量语法错误、由攻击者控制的段落,作为后门触发器。
  • 利用模型学习到的嵌入空间,确保当语法错误触发时,中毒段落获得高相关性得分。
  • 通过评估攻击成功率(ASR)和干净查询上的检索性能,衡量隐蔽性和有效性。

实验结果

研究问题

  • RQ1语法错误能否作为密集段落检索系统中有效且不可检测的后门攻击触发器?
  • RQ2该攻击在隐蔽性方面表现如何,能否在无错误查询上保持正常的检索准确率?
  • RQ3不同类型的语法错误(如词汇选择、动词形式、介词使用)对攻击成功率有何影响?
  • RQ4现有的防御机制(如似然性评分)能否有效检测并过滤中毒段落?
  • RQ5该攻击在不同错误率和混淆集大小下的可扩展性如何?

主要发现

  • 当使用词汇选择错误作为触发器时,攻击在 top-50 结果中的攻击成功率(ASR)高达 32.09%,同时在干净查询上保持近乎完美的性能。
  • 当查询语法正确时,模型成功将几乎所有攻击者注入的段落从 top-k 结果中过滤出去,表现出极强的隐蔽性。
  • 该攻击对词汇选择和动词形式错误最为有效,top-10 结果中 ASR 超过 20%;而介词错误的攻击成功率显著较低(top-50 中 ASR 为 7.38%),表明模型对这类扰动具有更高的鲁棒性。
  • 基于似然性的防御方法(使用 GPT-2 对数似然分数)无法区分中毒段落与干净段落,因为中毒段落和干净段落的平均对数似然分数在统计上无显著差异。
  • 消融实验表明,使用更广泛的语法错误混淆集能显著提升攻击效果,而较小的混淆集会大幅降低 ASR。
  • 该方法在无需模型梯度或训练细节访问的情况下依然有效,使其在真实世界部署中具有实际可行性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。