Abstract:
Latent interaction has emerged as a promising paradigm for improving the efficiency of multi-agent systems by replacing repeated text decoding and encoding with direct latent-state exchange. However, its security implications remain underexplored. This paper reveals a critical paradox: latent-interaction systems appear resistant to conventional textual prompt injection, yet this apparent robustness can create a false sense of security. Controlled measurements show that the attack-specific representation direction induced by textual prompts is attenuated during latent reasoning, rather than demonstrating intrinsic channel safety. Once an attacker directly manipulates the shared key-value memory, downstream behavior can still be hijacked without activating text-based safeguards. To address this threat, we propose LUCID, a cache security framework that performs approximate semantic projection on shallow Key states, localizes risky cache positions with fixed threat-semantic anchors, and purifies the corresponding Key and Value states across layers. A complementary K/V common-source consistency branch extends the framework to post-forward continuous manipulation that need not preserve explicit threat-control semantics. Extensive experiments across reasoning, knowledge question answering, and code generation tasks demonstrate that LUCID consistently suppresses latent injection while preserving more benign task information than cache-pruning baselines. Direct-representation comparisons, reconstruction evaluation, continuous latent attacks, and cross-backbone studies further characterize its detection mechanism, auditability, and deployment scope.