用强化学习黑盒攻击大模型检索增强生成系统,成功率提升72%。
RIPRAG: Hack a Black-box Retrieval-Augmented Generation Question-Answering System with Reinforcement Learning
- 设计黑盒反馈强化学习框架,无需系统内部信息
- 双奖励机制使攻击成功率最高提升0.72
- 揭示现有防御短板,适合安全研究者参考
基于大语言模型的检索增强生成(RAG)系统已成为问答和内容生成的核心技术。RAG投毒是一种通过向RAG数据库注入污染文档,诱导大模型生成攻击者期望文本的攻击方法。现有研究分为白盒与黑盒两类:白盒方法利用梯度优化污染文档,但需系统内部细节;黑盒方法依赖预训练大模型生成,却无法利用交互信息。本文提出RIPRAG攻击框架,将目标RAG系统视为黑盒,采用提出的从黑盒反馈中学习强化学习(RLBF)方法优化污染文档生成模型。设计了相似性奖励与攻击奖励两种机制。实验表明,该方法可有效攻击多数复杂RAG系统,攻击成功率(ASR)相比基线方法最高提升0.72,凸显当前防御手段的普遍缺陷,为大模型安全研究提供关键洞见。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) systems based on Large Language Models (LLMs) have become a core technology for tasks such as question-answering (QA) and content generation. RAG poisoning is an attack method to induce LLMs to generate the attacker's expected text by injecting poisoned documents into the database of RAG systems. Existing research can be broadly divided into two classes: white-box methods and black-box methods. White-box methods utilize gradient information to optimize poisoned documents, and black-box methods use a pre-trained LLM to generate them. However, existing white-box methods require knowledge of the RAG system's internal composition and implementation details, whereas black-box methods are unable to utilize interactive information. In this work, we propose the RIPRAG attack framework, an end-to-end attack pipeline that treats the target RAG system as a black box and leverages our proposed Reinforcement Learning from Black-box Feedback (RLBF) method to optimize the generation model for poisoned documents. We designed two kinds of rewards: similarity reward and attack reward. Experimental results demonstrate that this method can effectively execute poisoning attacks against most complex RAG systems, achieving an attack success rate (ASR) improvement of up to 0.72 compared to baseline methods. This highlights prevalent deficiencies in current defensive methods and provides critical insights for LLM security research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。