用精心伪装的毒文档劫持RAG系统,让大模型说出假答案。
SilentRetrieval: Hijacking Retrieval-Augmented Generation via Semantically-Preserving Adversarial Data Poisoning

- 用联合优化生成流畅且可检索的恶意文档,保持低困惑度。
- 在自然问题和MS MARCO上实现超80%的检索准确率,攻击成功率高。
- 攻击隐蔽性强,人类难察觉,适合研究系统安全的人员参考。
检索增强生成(RAG)能缓解大模型幻觉,但存在语料完整性风险。本文提出SilentRetrieval,一种两阶段数据投毒攻击,通过精心构造却流畅的文档劫持RAG系统。第一阶段采用协同束搜索(Coordinated Beam Search),以流畅性-相似性为目标优化多标记,确保毒文档可被检索且困惑度可控。第二阶段使用上下文自适应触发生成(Context-Adaptive Trigger Generation),基于冻结的LLM轻量级融合操纵触发词至文档内容。在每查询仅注入一个毒文档的评估中,于Natural Questions和MS MARCO上分别达到84.6%/81.3%的HR@10与57.5%/54.8%的ASR-LLM,同时维持接近正常水平的困惑度。跨四类目标模型测试显示固定触发生成器仍有效;对未见过的检索器(包括ColBERT及商用嵌入模型)的迁移测试,在相同注入协议下平均HR@10达64.7%。在采样版维基规模评估中,毒占比仅0.016%时仍保持74.2%的HR@10。结合检索侧与生成侧防御显著降低攻击成功率,但引入延迟代价。人工评估显示其被标记率远低于不流畅基线,但在当前样本量下仍比正常内容更可疑。
原文摘要 · Abstract (English)
Retrieval-Augmented Generation (RAG) mitigates LLM hallucinations but introduces a critical vulnerability: corpus integrity. We present SilentRetrieval, a two-stage data poisoning attack that hijacks RAG systems through adversarially crafted yet fluent documents. Stage 1 uses Coordinated Beam Search, a multi-token joint optimization method with a fluency-similarity objective, to keep a poisoned host document retrievable while constraining perplexity. Stage 2 uses Context-Adaptive Trigger Generation, a lightweight trigger-fusion step driven by a frozen LLM, to integrate manipulation triggers into document content. Under a one-poisoned-document-per-query evaluation with synthetic target answers, SilentRetrieval achieves 84.6%/81.3% HR@10 and 57.5%/54.8% ASR-LLM on Natural Questions and MS MARCO, while maintaining near-benign perplexity. Cross-model evaluation across four target LLMs shows nontrivial effectiveness under a fixed trigger generator, and transfer tests against unseen retrievers, including ColBERT and commercial embedding models, yield 64.7% average HR@10 under the same injected-corpus protocol. In a sampled Wikipedia-scale evaluation, SilentRetrieval retains 74.2% HR@10 at a 0.016% poisoning ratio. Combined retrieval-side and generation-side defenses reduce attack success substantially but incur a latency trade-off. Human evaluation shows substantially lower flag rates than disfluent baselines, while remaining numerically more suspicious than benign content at the current sample size.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。