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

CtrlRAG:用于大型语言模型检索增强生成的黑盒文档污染攻击

CtrlRAG: Black-box Document Poisoning Attacks for Retrieval-Augmented Generation of Large Language Models

Beijing University of Posts and Telecommunications(北京邮电大学);Sun Yat-sen University(中山大学)

Runqi Sui

AI总结:

CtrlRAG通过注入恶意文档实现对RAG系统的黑盒攻击,提升攻击成功率并提出动态防御策略以平衡安全与性能。

摘要:

检索增强生成(RAG)系统通过显示参考上下文来增强响应的可信度和可追溯性,但这种透明性同时引入了新的黑盒攻击向量。现有的文档污染攻击,其中攻击者将恶意文档注入知识库以操控RAG输出,主要依赖于不现实的白盒或灰盒假设,限制了其实际应用。为解决这一差距,我们提出了CtrlRAG,一种两阶段的黑盒攻击,(1) 构建包含虚假信息或情绪激发内容的恶意文档并将其注入知识库,(2) 使用定位算法和基于参考上下文反馈的掩码语言模型(MLM)迭代优化这些文档,确保其检索优先级同时保持语言自然性。仅在百万文档的MS MARCO数据集中注入每个目标问题五份恶意文档,CtrlRAG在商业LLM(如GPT-4o)上实现了高达90%的攻击成功率,在*情绪操纵*和*幻觉放大*任务中比最优基线提高了30%。此外,我们证明现有防御措施无法在安全性和性能之间取得平衡。为缓解这一挑战,我们引入基于*参数化/非参数化记忆对抗*的动态*知识扩展*防御策略,阻止了78%的攻击同时保持95.5%的系统准确率。我们的发现揭示了RAG系统中的关键漏洞并提供了有效的防御策略。

英文摘要:

Retrieval-Augmented Generation (RAG) systems enhance response credibility and traceability by displaying reference contexts, but this transparency simultaneously introduces a novel black-box attack vector. Existing document poisoning attacks, where adversaries inject malicious documents into the knowledge base to manipulate RAG outputs, rely primarily on unrealistic white-box or gray-box assumptions, limiting their practical applicability. To address this gap, we propose CtrlRAG, a two-stage black-box attack that (1) constructs malicious documents containing misinformation or emotion-inducing content and injects them into the knowledge base, and (2) iteratively optimizes them using a localization algorithm and Masked Language Model (MLM) guided on reference context feedback, ensuring their retrieval priority while preserving linguistic naturalness. With only five malicious documents per target question injected into the million-document MS MARCO dataset, CtrlRAG achieves up to 90% attack success rates on commercial LLMs (e.g., GPT-4o), a 30% improvement over optimal baselines, in both *Emotion Manipulation* and *Hallucination Amplification* tasks. Furthermore, we show that existing defenses fail to balance security and performance. To mitigate this challenge, we introduce a dynamic *Knowledge Expansion* defense strategy based on *Parametric/Non-parametric Memory Confrontation*, blocking 78% of attacks while maintaining 95.5% system accuracy. Our findings reveal critical vulnerabilities in RAG systems and provide effective defense strategies.

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

↑