arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.18636cs.CRcs.AIcs.IR
收藏

SafeRAG:大型语言模型检索增强生成的安全性基准测试

SafeRAG: Benchmarking Security in Retrieval-Augmented Generation of Large Language Model

School of Information, Renmin University of China(中国人民大学信息学院);Institute for Advanced Algorithms Research(高级算法研究院);School of Artificial Intelligence, Beihang University(北京航空航天大学人工智能学院)

Xun Liang, Simin Niu, Zhiyu Li, Sensen Zhang, Hanyu Wang, Feiyu Xiong, Jason Zhaoxin Fan, Bo Tang, Shichao Song, Mengwei Wang, Jiawei Yang

AI总结:

针对RAG面临的安全威胁,提出SafeRAG基准,分类四种攻击任务并构建数据集,实验揭示RAG在14个组件上均易受攻击,现有防御难以抵御。

摘要:

检索增强生成(RAG)的索引-检索-生成范式通过将外部知识整合到大型语言模型(LLMs)中,在解决知识密集型任务方面取得了巨大成功。然而,外部且未经核实知识的引入增加了LLMs的脆弱性,因为攻击者可以通过操纵知识来执行攻击任务。在本文中,我们引入了一个名为SafeRAG的基准,旨在评估RAG的安全性。首先,我们将攻击任务分为四类:银噪声、上下文间冲突、软广告和白化拒绝服务。接下来,我们主要为每个任务手工构建RAG安全评估数据集(即SafeRAG数据集)。然后,我们利用SafeRAG数据集模拟RAG可能遇到的各种攻击场景。在14个代表性RAG组件上进行的实验表明,RAG对所有攻击任务都表现出显著的脆弱性,即使是最明显的攻击任务也能轻易绕过现有的检索器、过滤器或先进的LLMs,导致RAG服务质量的下降。代码可在以下网址获取:https://github.com/IAAR-Shanghai/SafeRAG。

英文摘要:

The indexing-retrieval-generation paradigm of retrieval-augmented generation (RAG) has been highly successful in solving knowledge-intensive tasks by integrating external knowledge into large language models (LLMs). However, the incorporation of external and unverified knowledge increases the vulnerability of LLMs because attackers can perform attack tasks by manipulating knowledge. In this paper, we introduce a benchmark named SafeRAG designed to evaluate the RAG security. First, we classify attack tasks into silver noise, inter-context conflict, soft ad, and white Denial-of-Service. Next, we construct RAG security evaluation dataset (i.e., SafeRAG dataset) primarily manually for each task. We then utilize the SafeRAG dataset to simulate various attack scenarios that RAG may encounter. Experiments conducted on 14 representative RAG components demonstrate that RAG exhibits significant vulnerability to all attack tasks and even the most apparent attack task can easily bypass existing retrievers, filters, or advanced LLMs, resulting in the degradation of RAG service quality. Code is available at: https://github.com/IAAR-Shanghai/SafeRAG.

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

↑