Skip to content

KVMARK: Fragile Watermarking for KV-Cache Integrity in Latent Multi-Agent Systems

Marjan Beheshti, Ronghua Xu

cs.CRarXiv:2611.20454

Abstract

Latent multi-agent communication directly transfers Key-Value (KV) cache tensors between transformer-based agents, bypassing text serialization entirely. While computationally efficient and reasoning accurate, this communication channel is opaque and vulnerable to man-in-the-middle tampering, a threat vector unaddressed by existing text-based or behavioral watermarks, which cannot operate on continuous internal representations. To address this vulnerability, we propose KVMark, a training-free, zero-bit KV-cache watermarking framework to verify inter-agent handoff integrity. Our framework introduces four core technical components: (1) position-dependent sign patterns that guarantee first-order statistical invisibility while preserving downstream attention survival; (2) per-head sign patterns with aligned detection to defeat head-averaging attacks; (3) a three-tier depth-aware strength schedule that equalizes detection sensitivity across transformer layers while maintaining invisibility against nine statistical profiling strategies; and (4) content-bound key derivation that cryptographically binds watermarks to input contexts, preventing replay attacks under Kerckhoffs's principle. Empirical evaluation on a four-agent latent pipeline demonstrates 100\% detection across 1,500 handoffs with a 0.0\% false positive rate (AUROC=1.0), 100\% layer-level tamper localization (17/17 attacked layers identified with 0/19 false positives), and no statistically significant reasoning accuracy degradation across four benchmarks (N=300--500). Furthermore, the framework enables multi-hop cascade verification to isolate compromised agents (500/500 detection at three hops), withstands adaptive white-box adversaries and the Out-of-Sight DiffMean attack (up to α=8.0), and generalizes seamlessly to Qwen3-8B without re-tuning (1,500/1,500 TPR).

Create a lesson