arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.02643cs.CRcs.AIcs.DB
收藏

检索增强型大语言模型的推理成本攻击

Inference Cost Attacks for Retrieval-Augmented Large Language Models

The Hong Kong Polytechnic University(香港理工大学)

Chengliang Liu, Liangbo Ning, Yujuan Ding, Wenqi Fan

AI总结:

提出RA-ICA攻击范式,通过向外部知识库注入恶意文档,利用CREEP框架和MA-GRPO算法,使RAG增强的LLM系统推理时token消耗增加高达13.12倍且成功率超过90%。

摘要:

检索增强生成(RAG)增强的LLM系统虽然强大,但由于包含额外的多阶段流水线(动态检索和综合外部知识源的信息),引入了大量的推理成本。这种高运营成本暴露了一个关键漏洞,即推理成本攻击(ICA)。然而,现有的ICA通常依赖于直接提示操纵的不切实际的假设。我们认为,对RAG增强的LLM系统更可行且更强大的威胁来自污染外部知识库(例如,来自互联网的网络知识)。在这项工作中,我们引入了检索增强推理成本攻击(RA-ICA),这是一种新颖的攻击范式,通过向外部知识语料库注入恶意文档来针对RAG增强的LLM系统的计算成本。为了实现这种攻击,我们提出了通过外部投毒耗尽计算资源(CREEP),这是一种新颖的框架,利用LLM代理自动制作恶意文档,这些文档在语义上相关以便检索,并且能够有效诱导推理阶段token消耗的异常增加。为了提高攻击的有效性,我们引入了记忆增强组相对策略优化(MA-GRPO),这是一种新颖的强化学习算法,通过从历史最佳对抗文档的动态记忆中学习来微调代理。在三个真实世界数据集上的大量实验表明,RA-ICA在不降低生成答案完整性的情况下,将token消耗增加了高达13.12倍,成功率超过90%。

英文摘要:

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.

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

↑