arXiv:2502.04360cs.CLcs.CR2025-02被引 2

用可迁移的对抗性字符串,高效窃取RAG系统中的私有数据。

MARAGE: Transferable Multi-Model Adversarial Attack for Retrieval-Augmented Generation Data Extraction

  • 通过多模型梯度联合优化,生成能跨模型通用的对抗字符串。
  • 在多个LLM和RAG数据集上,攻击成功率显著高于基线方法。
  • 特别针对检索数据开头部分设计策略,提升对未知模型的攻击效果。

检索增强生成(RAG)通过将大语言模型输出与外部知识源关联,缓解了幻觉问题。然而,私有数据存储可能面临数据提取攻击风险,即攻击者试图窃取其中内容。现有攻击依赖人工设计提示词,效果有限。本文提出MARAGE框架,通过优化一个附加在用户查询后的对抗字符串,使目标RAG系统输出中直接包含原始检索数据。该框架采用连续优化机制,同时整合多个异构模型的梯度信息,提升对抗字符串在未见模型间的转移能力。此外,提出聚焦目标数据首段的策略,进一步增强攻击泛化性。实验表明,MARAGE在多个LLM和RAG数据集上持续优于人工及优化基线,且对未见过的模型保持强迁移性。通过探测任务分析其有效性及对模型内部状态的影响。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) offers a solution to mitigate hallucinations in Large Language Models (LLMs) by grounding their outputs to knowledge retrieved from external sources. The use of private resources and data in constructing these external data stores can expose them to risks of extraction attacks, in which attackers attempt to steal data from these private databases. Existing RAG extraction attacks often rely on manually crafted prompts, which limit their effectiveness. In this paper, we introduce a framework called MARAGE for optimizing an adversarial string that, when appended to user queries submitted to a target RAG system, causes outputs containing the retrieved RAG data verbatim. MARAGE leverages a continuous optimization scheme that integrates gradients from multiple models with different architectures simultaneously to enhance the transferability of the optimized string to unseen models. Additionally, we propose a strategy that emphasizes the initial tokens in the target RAG data, further improving the attack's generalizability. Evaluations show that MARAGE consistently outperforms both manual and optimization-based baselines across multiple LLMs and RAG datasets, while maintaining robust transferability to previously unseen models. Moreover, we conduct probing tasks to shed light on the reasons why MARAGE is more effective compared to the baselines and to analyze the impact of our approach on the model's internal state.

RAG安全对抗攻击数据泄露多模型迁移

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。