用少量恶意文本同时攻破多种查询的RAG系统,威胁真实应用安全。
UniC-RAG: Universal Knowledge Corruption Attacks to Retrieval-Augmented Generation
- 设计通用攻击框架,优化少量文本实现跨领域多查询攻击。
- 注入100条恶意文本即可在数万查询上达成超90%成功率。
- 揭示现有防御机制无效,推动新型防护研究。
检索增强生成(RAG)系统广泛应用于金融、医疗、网络安全等领域。然而,已有研究表明其易受知识污染攻击:攻击者可向RAG的知识库中注入对抗性文本,诱导大模型生成特定输出。现有工作多针对特定查询或主题相似的查询。本文提出UniC-RAG,一种通用知识污染攻击方法,通过联合优化少量对抗文本,实现对大量不同主题与领域的用户查询同时攻击,达成引导用户访问恶意网站、触发有害指令执行或发起拒绝服务攻击等目标。我们将该问题建模为优化问题,并设计有效求解方案,包括基于平衡相似性的聚类方法以提升攻击效果。大规模评估表明,UniC-RAG显著优于基线方法:仅注入100条对抗文本至包含百万级文本的知识库,即可在约2,000个用户查询上实现超过90%的攻击成功率。此外,我们测试了现有防御措施,发现均无法有效抵御UniC-RAG,凸显当前RAG系统亟需新型防御机制。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) systems are widely deployed in real-world applications in diverse domains such as finance, healthcare, and cybersecurity. However, many studies showed that they are vulnerable to knowledge corruption attacks, where an attacker can inject adversarial texts into the knowledge database of a RAG system to induce the LLM to generate attacker-desired outputs. Existing studies mainly focus on attacking specific queries or queries with similar topics (or keywords). In this work, we propose UniC-RAG, a universal knowledge corruption attack against RAG systems. Unlike prior work, UniC-RAG jointly optimizes a small number of adversarial texts that can simultaneously attack a large number of user queries with diverse topics and domains, enabling an attacker to achieve various malicious objectives, such as directing users to malicious websites, triggering harmful command execution, or launching denial-of-service attacks. We formulate UniC-RAG as an optimization problem and further design an effective solution to solve it, including a balanced similarity-based clustering method to enhance the attack's effectiveness. Our extensive evaluations demonstrate that UniC-RAG is highly effective and significantly outperforms baselines. For instance, UniC-RAG could achieve over 90% attack success rate by injecting 100 adversarial texts into a knowledge database with millions of texts to simultaneously attack a large set of user queries (e.g., 2,000). Additionally, we evaluate existing defenses and show that they are insufficient to defend against UniC-RAG, highlighting the need for new defense mechanisms in RAG systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。