arXiv:2506.06151cs.CRcs.AI2025-06AAAI被引 12

首次统一检索与生成阶段的梯度攻击,提升对抗性污染效果。

Joint-GCG: Unified Gradient-Based Poisoning Attacks on Retrieval-Augmented Generation Systems

  • 通过跨词汇投影、梯度对齐和动态融合,联合优化攻击信号。
  • 攻击成功率最高提升25%,平均高出5%。
  • 攻击样本具备强迁移性,适用于多种未见模型。

检索增强生成(RAG)系统通过从外部语料库中检索相关文档来增强大语言模型的能力,从而利用海量且实时的知识。然而,这种对外部知识的依赖使RAG系统易受语料库污染攻击,即通过注入污染文档操纵生成结果。现有攻击策略通常将检索与生成阶段割裂处理,限制了攻击效果。本文提出首个统一梯度攻击框架Joint-GCG,包含三项创新:(1) 跨词汇投影实现嵌入空间对齐;(2) 梯度词元对齐同步词级梯度信号;(3) 自适应加权融合动态平衡攻击目标。实验表明,Joint-GCG在多个检索器与生成器上,攻击成功率最高提升25%,平均提升5%。尽管在白盒假设下优化,生成的污染样本展现出前所未有的迁移能力。该工作重新定义了RAG系统的潜在漏洞。代码已开源。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG) systems enhance Large Language Models (LLMs) by retrieving relevant documents from external corpora before generating responses. This approach significantly expands LLM capabilities by leveraging vast, up-to-date external knowledge. However, this reliance on external knowledge makes RAG systems vulnerable to corpus poisoning attacks that manipulate generated outputs via poisoned document injection. Existing poisoning attack strategies typically treat the retrieval and generation stages as disjointed, limiting their effectiveness. We propose Joint-GCG, the first framework to unify gradient-based attacks across both retriever and generator models through three innovations: (1) Cross-Vocabulary Projection for aligning embedding spaces, (2) Gradient Tokenization Alignment for synchronizing token-level gradient signals, and (3) Adaptive Weighted Fusion for dynamically balancing attacking objectives. Evaluations demonstrate that Joint-GCG achieves at most 25% and an average of 5% higher attack success rate than previous methods across multiple retrievers and generators. While optimized under a white-box assumption, the generated poisons show unprecedented transferability to unseen models. Joint-GCG's innovative unification of gradient-based attacks across retrieval and generation stages fundamentally reshapes our understanding of vulnerabilities within RAG systems. Our code is available at https://github.com/NicerWang/Joint-GCG.

RAG安全对抗攻击梯度攻击模型迁移

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