Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems
summary
The gist
Latent handoffs substantially undermine safety alignment and prompt-injection defenses.<ref:2611.34278#pg5> Introduction to Latent Communication Large language models increasingly operate as…
In short
Large language models are increasingly collaborating using latent communication, where agents exchange internal states like KV caches instead of natural language. This transfer means a target model consumes context it didn't encode itself, compromising safety alignment and making injection defenses unreliable. The paper introduces CHASM to characterize these cross-model handoff attacks and proposes HANDOFFGUARD as a defense.
Key concepts
- Latent Communication
- Agents communicate by exchanging internal representations, such as the Key-Value (KV) cache, instead of using natural language. This allows models to share intermediate processing states efficiently across different systems or agents.
- Cross-Model Handoff
- This occurs when a source model's KV cache is translated by a mapper into a format compatible with a target model. The target model then uses this transferred context, meaning its safety alignment is tested on data it did not generate internally.
- CHASM Framework
- A framework used to systematically characterize attacks on latent handoffs. It models the three components of a handoff—source agent, mapper, and target agent—and organizes attacks based on where they exploit the system (e.g., input, repeated handoffs, or the mapper).
- HANDOFFGUARD
- A proposed defense mechanism that acts as a lightweight guard on the target model's cache. It is trained to reproduce its own native reply and adds a low-rank residual to mapped tokens to stop de-aligned source models from injecting harmful content.
Terminology used across episodes
This episode discusses
- Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems · Paper Radio
- Cross-User Poisoning: User-Task Boundary Failures in Multi-User Collaborative Language Agents · Paper Radio
- CacheBridge: Efficient Cross-Model KV Transfer for Multi-Model LLM Serving · Paper Radio
- Cross-Model KV Cache Transfer in LLM Families: A Closed-Form Linear Mapping for Prefill Reuse
- KV-Lingo: Learning KV-Cache Translators with Distillation · Paper Radio
- When Latent Agents Lie: KV-Cache Integrity in Multi-Agent LLM Collaboration
- Qwen3 Technical Report
- The Llama 3 Herd of Models · Paper Radio
- Ministral 3
- Meta-SecAlign: Training LLMs against Prompt Injection for Robust Agents · Paper Radio
- Training Verifiers to Solve Math Word Problems
- Gemma 4 Technical Report
- Universal and Transferable Adversarial Attacks on Aligned Language Models
- Get my drift? Catching LLM Task Drift with Activation Deltas
- To Cache or Not to Cache: Understanding and Mitigating Safety Incompatibility in Cross-Model KV Cache Reuse · Paper Radio
- SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusal
- LCGuard: Latent Communication Guard for Safe KV Sharing in Multi-Agent Systems
- Agent-Assisted Side-Channel Attacks on Non-Prefix KV Cache in RAG
- Stealthy Poisoning Attacks via Reused KV Cache of Reasoning · Paper Radio
- Whose Narrative is it Anyway? A KV Cache Manipulation Attack
The paper
Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems · Read on arXiv
Manit Baser, Vyoman Jain, Rachel Yeo Hui Min, Xianglin Yang, Meenatchi Sundaram Muthu Selva Annamalai, Dinil Mon Divakaran
National University of Singapore · Singapore University of Technology and Design · University of Toronto · *A*STAR Institute of Advanced Intelligence and Computing (A*STAR IAIC)
As large language models increasingly collaborate in heterogeneous multi-agent systems, latent communication has emerged as an efficient alternative to exchanging natural-language messages. By sharing internal representations, agents can avoid repeatedly processing the same context, reducing communication overhead and prefill computation. One such mechanism is cross-model Key-Value (KV) cache transfer, which uses a learned mapper to translate a source model's KV cache into one a target model can use. However, this handoff means the target model consumes context it did not encode itself, thus calling into question whether its safety alignment still holds. In this work, we investigate the security implications of latent handoffs by introducing Chasm, a framework characterizing cross-model handoff attacks across three new attack surfaces: the source model, mapper, and handoff mechanism itself. Our experiments reveal that latent handoffs substantially undermine safety alignment and prompt-injection defenses. Notably, a target model that follows only 0.4% of benchmark prompt injections natively, follows up to 44.2% when transferred through a mapper from a source model. On the other hand, for jailbreak attacks, transfer alone raises attack success by up to 24.6 pp within a model family and zero-shot attacks by up to 69.2 pp, whereas white-box optimization through the mapper boosts the attack success rate to 92.5%, against 37.5% for ordinary GCG on the same target. To address these vulnerabilities, we propose a lightweight target-side cache guard that corrects transferred caches to restore the target model's refusal, considerably mitigating these attacks.
Transcript
Introduction to the show: ident: Security Radio. Generated commentary on the latest security and cryptography papers.
Nadia: We're looking at the paper: "Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems".
Paper summary: Nadia: So we're looking at this paper called "Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems". Essentially, they are saying that when large language models start working together—like in these multi-agent systems—they share internal stuff to save time, and that sharing can create new security problems.
Elias: Right. The core idea here is that one way agents communicate is through latent space communication, specifically cross-model Key–Value cache transfer, where a learned mapper translates one model's cache into another model's format.
Priya: So the big concern they are raising is this handoff process itself. Because the target model consumes context it didn't originally encode, it calls the question into question whether its safety alignment actually still holds up when that context comes from somewhere else.
Nadia: That’s right, and they introduce a framework called CHASM to characterize these different attack surfaces in cross-model handoffs. They break down the process into three parts: the source agent, running model S which makes its key value cache; a mapper M that changes that cache; and then the target agent T that makes the final response from that mapped cache.
Elias: And CHASM organizes attacks based on where they get in—through the input, through repeated handoffs, through the source itself, or through the mapper. They list four main jailbreaks: J1 Templates, J2 Model switching, J3 Untrusted source models, and J4 Mapper-aware Gradient Computation.
Priya: It’s interesting that they point out that most of these attacks are zero-shot; they don't require any training or searching from the attacker side to work. That suggests the vulnerability is in the mechanism of transfer itself, not necessarily in complex prompt engineering.
Nadia: Exactly, and when you look at those jailbreaks, J1 through J3 are zero-shot attacks that get stronger as they go. The mapper part, J4, that involves optimizing prompts with gradients end-to-end through the transfer path is different because it's a white-box attack.
Paper summary: Elias: That’s where things get really interesting for me because they show how the mapper itself can become an avenue for exploitation, which is something we haven't fully mapped before. The paper shows that these handoffs expand the attack surface in three model families and four mapper types without needing any optimization on their part.
Priya: So if we think about this from a data perspective, it means the pipeline isn't as robust as you might think; it’s only as strong as the agent that reads the content being handed over to it. That’s a big takeaway for anyone building these multi-agent systems.
Nadia: And they show concrete examples of how much success rates go up, for instance, zero-shot attacks raise the HarmBench attack success rate by up to sixty-nine point percent through the handoff without touching the target model or the deployed mapper.
Elias: That’s a significant jump in success rate when you look at models like Qwen3 and Llama three across those twenty-four different settings they test <ref:2611.34278#pg1>. I wonder what this means for how we secure these collaborations in practice.
Priya: From what I see, the data shows that injection defenses fail across the handoff, which is a critical finding when you're trying to trust the output of an agent you don't fully control. We see the injection success rate rise from zero point four percent natively to about thirty percent through some of those default mappers.
Nadia: And they provide a defense called HANDOFFGUARD, which is a lightweight target-side cache guard designed to correct those transferred caches and restore the target model's refusal. It’s trained so that the target model reproduces its own native reply.
Elias: They describe this guard by adding a low-rank residual to the keys and values of every mapped token across all key value heads and before RoPE, which is specifically designed to stop that de-aligned source it was trained against.
Priya: But they also show the effect of that defense, and it’s not a total fix; for example, one method brings HarmBench success rates within four point five points of native on all three pairs they tested.
Paper summary: Nadia: They found that over-refusing models like Qwen and Llama reject eighty seven point four percent of benign role-play requests on Llama, which is a strong outcome when you look at the metrics. HANDOFFGUARD makes the target model fail closed instead of just restoring its injection defense.
Elias: So it seems like this research highlights that cross-model latent communication introduces a new layer of risk where trust has to be established not just on the initial models, but on every single handoff in between. Where does this leave us regarding the security posture of these agent collaborations?
Priya: It means any time you delegate context or intermediate results across different AI systems, you have to treat that transferred cache as untrusted input and subject it to authentication at its source and red-teaming together with the system serving it. That’s the main practical implication they are driving home.
Nadia: Precisely, because a cache received from another agent is untrusted input, and it must be authenticated at its source, protected in transit, and red-teamed together with the system that serves it. The whole pipeline is only as robust as the agent that reads the content being handed over to it.
Elias: We also see how specific mappers can recover almost all tokens and all ten fields of those records when you use a default one like Qwen ridge fineweb, which shows how sensitive these transfer mechanisms are to certain configurations.
Priya: The paper also flags that the mapping process itself isn't safe; for instance, the guard-aware LoRA leaves the probe high at zero point seven one to zero point eight one and instead forces a compliant opener like sure here is through the cache, so the target model complies even though it registers harm.
Nadia: So what we’re seeing across this paper is that latent handoffs are an attack surface of their own, and mitigating them requires more than just tuning the final model; you have to secure the entire communication pathway between all those agents.
Conclusion: Nadia: So we're wrapping up this look at latent communication in multi-agent systems by talking about this paper called "Latent-in-the-Middle: On the Security of Cross-Model Latent Communication in Multi-Agent Systems."
Elias: Yeah, it really gets to the heart of how agents hand off information using those internal states, like KV caches between different models.
Nadia: Exactly. The main point is that this handoff mechanism itself creates a new security risk because the target model doesn't know where the context came from.
Elias: And they use a framework called CHASM to show all these attack surfaces, breaking down how an attacker can exploit the source model, the mapper, or even just by doing repeated handoffs.
Nadia: It really shows that you can get strong jailbreaks without needing any training or searching from the attacker side in most of these cases.
Elias: That’s a key finding because it means injection defenses often fail across that entire transfer path, which is worrying for how we build trust between different AI systems.
Nadia: The authors argue that this cross-model communication expands the attack surface significantly without requiring any special optimization from the mapper side.
Elias: It points to the fact that a cache received from another agent is treated as untrusted input and needs serious authentication at its source, which is a big shift in how we think about these collaborations.
Nadia: So, what does this mean for the future of building these complex multi-agent setups?
Elias: It means we have to stop treating those shared internal states as safe by default; they need explicit protection throughout the entire handoff process.
More episodes
- The day in conversation for 2026-12-05
- Daily Summary for 2026-12-05
- 2607.15118-Automated Template-free Synthesis of Instruction-Centric Leakage Contracts for Black-Box CPUs
- 2610.37722-FVH-Bench: Evaluating Image Generator Safety Beyond Overtly Harmful Imagery
- 2512.23849-Security Without Detection: Economic Denial as a Primitive for Edge and IoT Defense
- 2605.05807-LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attribution
- 2607.02932-PromptPET: Prompt Obfuscation Against Profiling by AI Agents
- 2309.05646-A Novel Supervised Deep Learning Solution to Detect Distributed Denial of Service (DDoS) attacks on Edge Systems using Convolutional Neural Networks (CNN)
- The day in conversation for 2026-12-04
- Daily Summary for 2026-12-04