arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.06579cs.CR
收藏

POISONCRAFT:面向大语言模型检索增强生成的实用投毒攻击

POISONCRAFT: Practical Poisoning of Retrieval-Augmented Generation for Large Language Models

Yangguang Shao, Xinjie Lin, Haozheng Luo, Chengshang Hou, Gang Xiong, Jiahao Yu, Junzheng Shi

AI总结:

本文提出POISONCRAFT投毒攻击,无需获知或修改用户查询即可操纵RAG检索与生成,使其引用欺诈网站,并验证其跨数据集、检索器、LLM及防御机制的有效性。

摘要:

大语言模型(LLM)已在多个领域取得显著成功,这主要归功于其强大的推理能力和生成类人文本的能力。尽管性能令人瞩目,LLM仍容易出现幻觉,从而产生错误或具有误导性的输出。这主要源于缺乏最新知识或领域特定信息。检索增强生成(RAG)是一种通过利用外部知识源来缓解幻觉的有前景方法。然而,RAG系统的安全性尚未得到充分研究。本文研究了一种名为POISONCRAFT的针对RAG系统的投毒攻击,该攻击可误导模型引用欺诈性网站。与现有针对RAG系统的投毒攻击相比,我们的攻击更具实用性,因为它不需要获取目标用户查询的信息,也不需要编辑用户查询。该攻击不仅确保注入文本能够被模型检索到,还确保LLM受到误导,在其回答中引用这些注入文本。我们在RAG流程中的不同数据集、检索器和语言模型上证明了POISONCRAFT的有效性,并表明其在跨检索器迁移时仍然有效,包括黑盒系统。此外,我们通过案例研究揭示了攻击如何影响检索行为以及生成模型内部逐步的推理轨迹,并进一步评估了POISONCRAFT在多种防御机制下的鲁棒性。这些结果验证了我们威胁模型的实用性,并凸显了部署在真实应用中的RAG系统所面临的关键安全风险。我们发布了代码(https://github.com/AndyShaw01/PoisonCraft),以支持未来关于真实环境中RAG系统安全性和鲁棒性的研究。

英文摘要:

Large language models (LLMs) have achieved remarkable success in various domains, primarily due to their strong capabilities in reasoning and generating human-like text. Despite their impressive performance, LLMs are susceptible to hallucinations, which can lead to incorrect or misleading outputs. This is primarily due to the lack of up-to-date knowledge or domain-specific information. Retrieval-augmented generation (RAG) is a promising approach to mitigate hallucinations by leveraging external knowledge sources. However, the security of RAG systems has not been thoroughly studied. In this paper, we study a poisoning attack on RAG systems named POISONCRAFT, which can mislead the model to refer to fraudulent websites. Compared to existing poisoning attacks on RAG systems, our attack is more practical as it does not require access to the target user query's info or edit the user query. It not only ensures that injected texts can be retrieved by the model, but also ensures that the LLM will be misled to refer to the injected texts in its response. We demonstrate the effectiveness of POISONCRAFTacross different datasets, retrievers, and language models in RAG pipelines, and show that it remains effective when transferred across retrievers, including black-box systems. Moreover, we present a case study revealing how the attack influences both the retrieval behavior and the step-by-step reasoning trace within the generation model, and further evaluate the robustness of POISONCRAFTunder multiple defense mechanisms. These results validate the practicality of our threat model and highlight a critical security risk for RAG systems deployed in real-world applications. We release our code\footnote{https://github.com/AndyShaw01/PoisonCraft} to support future research on the security and robustness of RAG systems in real-world settings.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑