用安全哨兵机制实时检测RAG系统知识泄露攻击
Detecting RAG Extraction Attack via Dual-Path Runtime Integrity Game
- 在检索内容中嵌入特殊标记,构建双路径验证机制
- 对抗自适应攻击时仍能有效检测,泄露恢复率显著降低
- 无需重训练即可接入任意RAG系统,适合生产环境
检索增强生成(RAG)系统通过引入外部知识提升大模型性能,但也存在关键安全风险:攻击者可通过自适应迭代策略诱导模型泄露敏感知识。现有防御手段严重不足。为此,我们提出CanaryRAG,受软件栈哨兵启发的运行时防御机制。该方法在检索片段中嵌入精心设计的哨兵标记,并将防御问题建模为双路径运行时完整性博弈。当目标路径或可信路径违反预期哨兵行为时,立即触发泄露警报,即使面对抑制和混淆攻击也有效。大量实验表明,CanaryRAG在抵御现有攻击时,显著低于当前最优基线的片段恢复率,同时对任务性能和推理延迟影响极小。作为即插即用方案,可无缝集成至任意RAG流程,无需重新训练或结构调整,为专有数据提供实用且可扩展的安全保障。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) systems augment large language models with external knowledge, yet introduce a critical security vulnerability: RAG Knowledge Base Leakage, wherein adversarial prompts can induce the model to divulge retrieved proprietary content. Recent studies reveal that such leakage can be executed through adaptive and iterative attack strategies (named RAG extraction attack), while effective countermeasures remain notably lacking. To bridge this gap, we propose CanaryRAG, a runtime defense mechanism inspired by stack canaries in software security. CanaryRAG embeds carefully designed canary tokens into retrieved chunks and reformulates RAG extraction defense as a dual-path runtime integrity game. Leakage is detected in real time whenever either the target or oracle path violates its expected canary behavior, including under adaptive suppression and obfuscation. Extensive evaluations against existing attacks demonstrate that CanaryRAG provides robust defense, achieving substantially lower chunk recovery rates than state-of-the-art baselines while imposing negligible impact on task performance and inference latency. Moreover, as a plug-and-play solution, CanaryRAG can be seamlessly integrated into arbitrary RAG pipelines without requiring retraining or structural modifications, offering a practical and scalable safeguard for proprietary data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。