arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.06151cs.CRcs.AI
收藏

Joint-GCG:基于梯度的检索增强生成系统统一投毒攻击

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

Haowei Wang, Rupeng Zhang, Junjie Wang, Mingyang Li, Yuekai Huang, Dandan Wang, Qing Wang

AI总结:

针对现有投毒攻击将RAG系统检索与生成阶段分离的局限,提出Joint-GCG框架,通过跨词汇投影、梯度分词对齐和自适应加权融合统一梯度攻击,提升攻击成功率并实现模型迁移性,重塑对RAG脆弱性的理解。

摘要:

检索增强生成(RAG)系统通过在生成响应前从外部语料库检索相关文档来增强大型语言模型(LLMs)。这种方法利用海量、最新的外部知识显著扩展了LLM的能力。然而,对外部知识的依赖使RAG系统易受语料库投毒攻击,攻击者可通过注入投毒文档操纵生成输出。现有投毒攻击策略通常将检索和生成阶段视为分离的,限制了其有效性。我们提出Joint-GCG,首个通过三项创新统一检索器和生成器模型梯度攻击的框架:(1)跨词汇投影以对齐嵌入空间;(2)梯度分词对齐以同步分词级梯度信号;(3)自适应加权融合以动态平衡攻击目标。评估表明,在多个检索器和生成器上,Joint-GCG的攻击成功率比现有方法最高高25%,平均高5%。虽然在白盒假设下优化,但生成的投毒样本对未见过的模型表现出前所未有的迁移性。Joint-GCG对检索和生成阶段梯度攻击的创新性统一,从根本上重塑了我们对RAG系统脆弱性的理解。我们的代码可在https://github.com/NicerWang/Joint-GCG获取。

英文摘要:

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.

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

↑