TL;DR
Shifting LLM multi-agent communication from natural language to latent spaces (like KV-caches) improves efficiency but introduces a stealthy, unreadable attack surface. This paper demonstrates that text-level adversarial behaviors can be extracted into latent "steering vectors" and injected directly into clean executions, severely degrading system performance without reusing any malicious text.
What Problem Does This Paper Address?
Traditional Large Language Model (LLM) multi-agent systems (MAS) rely on natural language to communicate. While this makes their reasoning transparent and inspectable, it introduces significant decoding overhead. To solve this, recent architectures explore latent communication, where agents collaborate by directly exchanging internal representations like hidden states or KV-caches.
However, moving coordination into an unreadable latent space removes it from the reach of standard text-based security filters. The authors investigate a critical security gap: Does latent-based collaboration eliminate adversarial risks, or does it merely hide them? Specifically, they study whether text-free interventions in the latent space can reactivate complex, structured attack behaviors during otherwise clean executions.
Methods
The authors introduce a latent attack framework grounded in representation steering. Instead of injecting adversarial text, the framework manipulates the internal activations of the models at inference time using a three-step pipeline:
- Paired Latent Construction: The multi-agent system is run twice on the same input—once under a clean setting and once under a text-based attack. The framework isolates pairs where the clean run succeeds but the text-attacked run fails.
- Attack Direction Extraction: The framework aligns the internal representations from these pairs and extracts a directional vector representing the "latent shift" caused by the attack. They compare three extraction methods: DiffMean (averaging displacements), PCA (finding the dominant principal direction), and RePS (an optimization-based approach using preference learning).
- Configurable Latent Attack Injection: During a completely clean execution, the extracted steering vector is additively injected into the system. The authors target two primary surfaces: nodes (local agent hidden states) and edges (inter-agent KV-cache handoffs).
Datasets
The framework was evaluated across three distinct benchmarks to test different reasoning capabilities and output formats:
- GSM8K: Multi-step mathematical reasoning.
- OpenBookQA: Knowledge-intensive, multiple-choice scientific question answering.
- HumanEval+: Functional code generation evaluated via executable unit tests.
Key Insights and Ideas
- The Vulnerability Shift: In text-based systems, attacks on agent roles (nodes) are typically more damaging than message tampering (edges). In latent-based systems, this pattern flips: edges (KV-cache handoffs) are significantly more vulnerable than nodes (local hidden states). Because downstream agents directly consume inherited KV-caches as working memory, latent perturbations bypass textual filtering entirely.
- Optimization Beats Pure Geometry: While geometric methods like PCA prove that text attacks leave a structural footprint in latent space, optimization-based extraction (RePS) is far more lethal. RePS explicitly trains the steering vector to favor the targeted incorrect output over the clean one.
- True Semantic Transfer: Latent injections do not merely corrupt the model into outputting gibberish or failing format constraints. Case studies revealed that they inject structured reasoning distortions (e.g., introducing an unstated "whole servings only" constraint into a math problem), precisely mirroring the logic of the original text-level attack.
- Strong Generalization: Latent attack vectors extracted from a small training split generalize remarkably well to unseen held-out data and can even transfer cross-dataset (e.g., vectors extracted from GSM8K successfully degrading performance on HumanEval+).
Key Results
- Severe Performance Degradation: On the GSM8K dataset using a Qwen3-4B backbone, injecting a RePS-optimized vector into the Planner-to-Critic communication edge dropped task accuracy from a clean 87.0% down to 13.3%.
- High Transferability: Edge-level PCA carriers preserved 92.0% of their degradation effect when applied to a completely disjoint held-out dataset split without any retuning.
- Feasible Runtime Detection: Although latent attacks are invisible to text inspectors, they leave statistical anomalies. A direction-agnostic layer-profile detector developed by the authors successfully flagged edge-level KV-cache attacks, achieving a True Positive Rate of up to 0.944 at a strict 5% False Positive Rate.
Limitations and Future Work
- Privileged Access Threat Model: The attack assumes an "internal-access" scenario (e.g., self-hosted open-weight models, compromised inference infrastructure, or malicious third-party middleware) where an adversary can read and write to intermediate latent states. It does not apply to closed, black-box API deployments.
- Discrete Search Space: The intervention configurations were selected using a discrete grid search over layers and strengths, potentially missing even more damaging vulnerabilities in the continuous latent space.
- Defense Execution Gap: While the paper proves that latent attacks can be accurately detected at runtime, it does not provide mechanisms for how a multi-agent system should safely recover, suppress, or reroute communication once an anomaly is flagged.
Summary updated