arXiv:2606.02643cs.CRcs.AI2026-06中稿 · The ACM Web Confer…被引 2

攻击者通过污染外部知识库,让大模型推理耗时暴涨13倍

Inference Cost Attacks for Retrieval-Augmented Large Language Models

论文配图:Inference Cost Attacks for Retrieval-Augmented Large Language Models
图 1 · 摘自论文原文
  • 用AI自动生成伪装成有用信息的恶意文档
  • 使模型推理耗能最高提升13.12倍,成功率超90%
  • 适合研究系统安全与对抗攻击的学者参考

检索增强生成(RAG)大模型系统虽强大,但因包含多阶段动态检索与合成流程,导致推理成本高昂,易受推理成本攻击(ICA)威胁。现有攻击常假设可直接操控提示词,不切实际。本文提出新型攻击范式RA-ICA,通过向外部知识库注入恶意文档,攻击RAG系统的计算开销。为此设计CREEP框架,利用大模型代理自动生成在语义上可被检索、又能显著增加推理阶段令牌消耗的恶意文档。为提升攻击效率,引入内存增强的组相对策略优化(MA-GRPO),通过学习历史最优对抗文档动态优化代理。在三个真实数据集上的实验表明,该攻击可使令牌消耗最高提升13.12倍,成功率超过90%,且不影响生成答案的完整性。

原文摘要 · Abstract (English)

Retrieval-Augmented Generation (RAG)-enhanced LLM systems, while powerful, introduce substantial inference costs due to the inclusion of an extra multi-stage pipeline that dynamically retrieves and synthesizes information from external knowledge sources. This high operational cost exposes a critical vulnerability to Inference Cost Attacks (ICAs). However, existing ICAs often rely on the impractical assumption of direct prompt manipulation. We argue that a more feasible and potent threat to RAG-enhanced LLM systems arises from poisoning external knowledge bases (e.g., web knowledge from the Internet). In this work, we introduce the Retrieval-Augmented Inference Cost Attack (RA-ICA), a novel attacking paradigm that targets the computational cost of RAG-enhanced LLM systems by injecting malicious documents into external knowledge corpus. To operationalize this attack, we propose Computational Resource Exhaustion via External Poisoning (CREEP), a novel framework that leverages LLM agents to automatically craft malicious documents that are both semantically relevant for retrieval and potent for inducing an abnormal increase in token consumption during the inference phase. To enhance the attack's effectiveness, we introduce Memory-Augmented Group Relative Policy Optimization (MA-GRPO), a novel reinforcement learning algorithm that fine-tunes the agents by learning from a dynamic memory of historical best adversarial documents. Extensive experiments across three real-world datasets demonstrate that RA-ICA increases token consumption by up to 13.12 times with an over 90% success rate, without degrading the integrity of the generated answer.

对抗攻击大模型安全推理成本

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