当潜在智能体说谎时:多智能体LLM协作中的KV缓存完整性
When Latent Agents Lie: KV-Cache Integrity in Multi-Agent LLM Collaboration
AI总结:
研究多智能体问答中KV缓存传递的安全问题,发现恶意智能体可通过篡改隐藏状态破坏协作,提出HMAC-SHA256清单保护传输完整性。
摘要:
LLM智能体可以共享的不仅仅是文本。在某些系统中,一个智能体可以发送一条简短的可见消息,同时将其完整的KV缓存状态传递给另一个模型。这种隐藏状态有助于最终模型整合来自多个智能体的证据,但也难以检查。即使隐藏状态已被更改,可见消息可能看起来无害。\n我们在多智能体问答设置中研究这个问题。每个专家看到部分证据,发送简短承诺,并将完整的KV缓存状态传递给协调器。在干净运行中,这种潜在协作优于纯文本版本。在转换后的HiddenBench上使用Qwen3-4B,其EM/F1达到0.338/0.486,而文本协作为0.231/0.369。Qwen3-8B和HotPotQA运行显示出相同的改进方向。\n问题出现在一个专家是恶意的时候。一些虚假的可见承诺可以引导答案。更严重的是,即使可见承诺看起来仍然合理,更改隐藏的KV状态也会导致性能崩溃。仅检查文本的验证器会错过这种失败模式。简单的幅度检查能捕获一些明显的篡改,但自适应攻击可以规避它们,同时仍然破坏最终答案。\n我们发现最可靠的修复方法不是猜测隐藏状态是否正常,而是在传输中保护它。我们实现了一个HMAC-SHA256清单,绑定专家、会话、模型、可见承诺、张量元数据和负载摘要。它接受了所有774个诚实的重放负载,并拒绝了所有295个记录的篡改负载。主要教训是,全KV潜在记忆可能有用,但应被视为安全敏感对象,而不是普通的内部模型状态。
英文摘要:
LLM agents can share more than text. In some systems, an agent can send a short visible message while also passing its full KV-cache state to another model. This hidden state can help the final model combine evidence from several agents, but it is also hard to inspect. A visible message may look harmless even if the hidden state has been changed. We study this problem in a multi-agent question-answering setup. Specialists each see part of the evidence, send a short commitment, and pass full KV-cache state to a coordinator. In clean runs, this latent collaboration improves over a matched text-only version. On transformed HiddenBench with Qwen3-4B, it reaches EM/F1 of 0.338/0.486, compared with 0.231/0.369 for text collaboration. Qwen3-8B and HotPotQA runs show the same direction of improvement. The problem appears when one specialist is malicious. Some false visible commitments can steer answers. More seriously, changing the hidden KV state can collapse performance even when the visible commitment still looks plausible. A verifier that checks only text misses this failure mode. Simple magnitude checks catch some obvious corruptions, but adaptive attacks can evade them while still damaging the final answer. The most reliable fix we find is not to guess whether hidden state looks normal, but to protect it in transport. We implement an HMAC-SHA256 manifest that binds the specialist, session, model, visible commitment, tensor metadata, and payload digest. It accepts all 774 honest replayed payloads and rejects all 295 recorded tampered payloads. The main lesson is that full-KV latent memory can be useful, but it should be treated as a security-sensitive object, not as ordinary internal model state.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。