通过组合提示注入与数据库投毒,实现无需查询先验的高效攻击
PIDP-Attack: Combining Prompt Injection with Database Poisoning Attacks on Retrieval-Augmented Generation Systems
- 将提示注入与数据库投毒结合,动态操控模型输出
- 在三个数据集上提升攻击成功率4%至16%,保持高检索精度
- 适用于对RAG系统安全性的研究者或防御设计人员
大语言模型(LLMs)在诸多应用中表现优异,但受限于知识过时和幻觉问题。为解决此问题,引入了检索增强生成(RAG)系统,借助外部实时知识源提升性能。然而,RAG仍易受对抗攻击,其中数据投毒成为主要威胁。现有投毒攻击通常需预先知晓用户具体查询,限制了灵活性与实际应用。本文提出PIDP-Attack,一种结合提示注入与数据库投毒的新型复合攻击方法。通过在推理时向查询附加恶意字符,并向检索数据库注入少量中毒段落,该方法可在不知晓用户真实查询的情况下,有效操控大模型响应。在Natural Questions、HotpotQA、MS-MARCO三个基准数据集及八种LLM上的实验表明,PIDP-Attack持续优于原始PoisonedRAG,开放域问答任务中的攻击成功率提升4%至16%,同时维持高检索精度,验证了复合攻击策略的有效性与必要性。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have demonstrated remarkable performance across a wide range of applications. However, their practical deployment is often hindered by issues such as outdated knowledge and the tendency to generate hallucinations. To address these limitations, Retrieval-Augmented Generation (RAG) systems have been introduced, enhancing LLMs with external, up-to-date knowledge sources. Despite their advantages, RAG systems remain vulnerable to adversarial attacks, with data poisoning emerging as a prominent threat. Existing poisoning-based attacks typically require prior knowledge of the user's specific queries, limiting their flexibility and real-world applicability. In this work, we propose PIDP-Attack, a novel compound attack that integrates prompt injection with database poisoning in RAG. By appending malicious characters to queries at inference time and injecting a limited number of poisoned passages into the retrieval database, our method can effectively manipulate LLM response to arbitrary query without prior knowledge of the user's actual query. Experimental evaluations across three benchmark datasets (Natural Questions, HotpotQA, MS-MARCO) and eight LLMs demonstrate that PIDP-Attack consistently outperforms the original PoisonedRAG. Specifically, our method improves attack success rates by 4% to 16% on open-domain QA tasks while maintaining high retrieval precision, proving that the compound attack strategy is both necessary and highly effective.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。