在连续向量空间中实现快速隐蔽的文本污染攻击
Unsupervised Corpus Poisoning Attacks in Continuous Space for Dense Retrieval
- 直接在嵌入空间优化,不依赖离散词替换
- 无查询先验知识下仍可2分钟内生成有效攻击
- 生成文本更自然,检测难度更高
本文研究密集检索中的语料库污染攻击,即攻击者通过向语料库注入少量恶意生成文档来破坏搜索算法的排序性能。现有方法多在离散词汇空间进行梯度攻击,而检索实际发生在连续嵌入空间,因此我们提出直接在嵌入空间优化的方法:训练一个扰动模型,在保持原始与对抗文档嵌入间几何距离的同时,最大化两者在词级上的差异。此外,以往工作常假设攻击者知晓查询分布,本文则关注更难的无监督场景——攻击者对查询分布一无所知。核心贡献是高效且有效的对抗性语料库攻击。我们在跨域和非跨域数据集上进行了全面实验,涵盖顶1攻击与语料库污染攻击,覆盖白盒与黑盒设置。结果表明,本方法每目标文档生成时间低于两分钟,比文献中最快梯度词替换方法快四倍;生成文本具有更低困惑度,更接近自然语言分布,因而更难被检测。
原文摘要 · Abstract (English)
This paper concerns corpus poisoning attacks in dense information retrieval, where an adversary attempts to compromise the ranking performance of a search algorithm by injecting a small number of maliciously generated documents into the corpus. Our work addresses two limitations in the current literature. First, attacks that perform adversarial gradient-based word substitution search do so in the discrete lexical space, while retrieval itself happens in the continuous embedding space. We thus propose an optimization method that operates in the embedding space directly. Specifically, we train a perturbation model with the objective of maintaining the geometric distance between the original and adversarial document embeddings, while also maximizing the token-level dissimilarity between the original and adversarial documents. Second, it is common for related work to have a strong assumption that the adversary has prior knowledge about the queries. In this paper, we focus on a more challenging variant of the problem where the adversary assumes no prior knowledge about the query distribution (hence, unsupervised). Our core contribution is an adversarial corpus attack that is fast and effective. We present comprehensive experimental results on both in- and out-of-domain datasets, focusing on two related tasks: a top-1 attack and a corpus poisoning attack. We consider attacks under both a white-box and a black-box setting. Notably, our method can generate successful adversarial examples in under two minutes per target document; four times faster compared to the fastest gradient-based word substitution methods in the literature with the same hardware. Furthermore, our adversarial generation method generates text that is more likely to occur under the distribution of natural text (low perplexity), and is therefore more difficult to detect.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。