通过重用推理KV缓存的隐蔽投毒攻击 Stealthy Poisoning Attacks via Reused KV Cache of Reasoning 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-10-16
⬇️ 1 次下载
👁️ 预览文献
💡 AI 中文简介
现代大语言模型系统常重用键值(KV)缓存来加速推理,近期研究发现重用推理轨迹的KV缓存也能像RAG一样提升任务表现。本文揭示这种重用方式存在新的投毒漏洞,提出黑盒攻击R²ECAP,仅通过聊天接口交互就能植入有毒推理轨迹。它构造前导轨迹和保留轨迹,前导轨迹引导模型走向对抗目标,保留轨迹携带该目标,且其KV缓存保留残余对抗影响。在三个开源模型和三个数据集上,攻击成功率最高达79%,在9个资源受限设置中的8个优于白盒攻击HijackKV,在真实推理轨迹检索系统中达46%,且仅1%的保留响应被流行提示注入检测器发现。
领域大语言模型安全与隐私
适合谁读需要一定专业背景(了解大语言模型推理和缓存机制)
核心贡献首次揭示重用推理KV缓存引入的新型投毒漏洞;提出黑盒攻击R²ECAP,仅通过聊天接口植入有毒推理轨迹,且保留轨迹的KV缓存能保留残余对抗影响。
关键数据攻击成功率最高79%;在9个资源受限设置中的8个优于HijackKV;在真实推理轨迹检索系统中ASR达46%;仅1%的保留响应被流行提示注入检测器检测到。
推荐理由如果你关心大模型推理加速中的安全风险,这篇工作用巧妙的黑盒攻击揭示了KV缓存重用的新漏洞,数据亮眼,值得一读。
关键词["KV缓存重用", "投毒攻击", "大语言模型安全", "黑盒攻击", "推理轨迹", "提示注入检测"]

原文摘要

查看英文原文摘要

Modern large language model (LLM) systems reuse key-value (KV) caches to accelerate inference. Recent work has shown that reusing KV caches from reasoning traces can also improve task performance, similar to retrieval-augmented generation (RAG). We demonstrate that this form of KV cache reuse introduces new poisoning vulnerabilities. We propose R$^2$ECAP (Reused Reasoning-Cache Poisoning), a black-box attack that plants poisoned reasoning traces solely through interactions with a system's chat interface. R$^2$ECAP constructs two traces: a preceding trace that steers the model toward an adversarial target and a retained trace that carries this target. Because the retained trace is generated conditioned on the preceding trace, its KV cache preserves residual adversarial influence, even after the preceding trace and its cache entries are discarded. We evaluate R$^2$ECAP on three open-weight LLMs and three datasets. R$^2$ECAP achieves up to 79% attack success rate (ASR) and outperforms HijackKV, a state-of-the-art white-box KV poisoning attack, in 8 of 9 resource-constrained settings. It also achieves 46% ASR in a realistic reasoning-trace retrieval system. Finally, R$^2$ECAP remains stealthy, with only 1% of its retained responses detected by a popular prompt injection detector.