---
title: 'KVComm: Selective KV Sharing Framework'
url: https://www.emergentmind.com/topics/kvcomm-5e92df27-c630-414d-8ac7-2628178d80ea
type: topic
---

# KVComm: Selective KV Sharing Framework

KVComm is a communication framework for multi-agent large language models in which a sender model transmits selected key-value (KV) pairs, rather than natural-language messages or hidden states, to a receiver model. In the formulation introduced in "KVComm: Enabling Efficient LLM Communication through Selective KV Sharing" [2510.03346], a sender \(\mathcal{M}_s\) processes a context \(C\), a receiver \(\mathcal{M}_r\) answers a query \(Q\), and communication is effected by sharing only a subset of the sender’s layerwise KV caches. The framework is designed to preserve rich contextual information while avoiding the repeated decoding cost and information loss of natural-language communication, and it is reported to achieve comparable performance to the Skyline upper bound while transmitting as few as \(30\%\) of layers’ KV pairs [2510.03346].

## 1. Conceptual basis and motivation

KVComm is motivated by a specific tension in multi-agent LLM systems: agents must convey relevant information \(I_C\), but common communication channels are either expensive or lossy. The paper positions natural-language debate and summarization as the dominant existing mechanism, but one that requires multiple decoding rounds and may lose information through token generation. It also contrasts KV sharing with activation-based approaches such as CIPHER and AC, arguing that embedding-space communication is indirect and that hidden-state communication suffers from “information concentration bias,” where the last token’s hidden state dominates later-layer computation [2510.03346].

The framework’s central claim is that KV pairs constitute a more suitable communication medium than a single hidden state. In decoder-only LLMs, keys and values are the operative memory representation used by attention. KVComm therefore treats them not as an implementation detail of single-model inference, but as a transferable representation between agents. Because the receiver does not have its hidden state overwritten, but instead receives additional memory entries in attention, it can “attend to both its own context and the information provided by \(\mathcal{M}_s\).” This design is presented as richer than hidden-state transfer and more efficient than text generation [2510.03346].

A common misunderstanding is that cheaper internal activations should necessarily dominate text-based communication. KVComm rejects that conclusion in its specific setting: the paper’s argument is not that all internal states are equally useful, but that KV pairs retain contextual structure without inducing the overwrite problem associated with hidden-state replacement or averaging.

## 2. Communication model and runtime mechanism

The framework assumes a sender-receiver configuration. The sender \(\mathcal{M}_s\) performs one prefill pass over the context \(C\), producing layerwise KV pairs \(\{(\mathbf{k}_s^l, \mathbf{v}_s^l)\}\) for \(l=1,\dots,L\). Rather than transmitting all layers, KVComm selects a subset \(\{l_i\}_{i=1}^M\) and sends only those KV pairs to the receiver. When the receiver processes \(Q\), the sender cache is inserted by concatenation at the selected layers:
\[
\mathbf{k}_r^l \leftarrow [\mathbf{k}_s^{l_i}; \mathbf{k}_r^l], \quad
\mathbf{v}_r^l \leftarrow [\mathbf{v}_s^{l_i}; \mathbf{v}_r^l].
\]
The sender and receiver are either the same model or fine-tuned versions of the same base LLM, so layer indices align one-to-one [2510.03346].

Operationally, the pipeline is lightweight. The sender prefills on \(C\), informative layers are selected, only those KV pairs are transmitted, the receiver uses them during prefill and decoding on \(Q\), and then generates the final answer. The method therefore avoids an additional natural-language generation stage and does not require the receiver to recompute the sender’s semantic representation from text alone [2510.03346].

This mechanism also clarifies why KVComm is selective rather than exhaustive. Sending every layer would maximize transferred internal state but would reduce the efficiency advantage. Sending only selected layers imposes an information bottleneck at the level of layerwise attention memory rather than at the level of generated tokens.

## 3. Layer selection and scoring rule

The distinctive component of KVComm is its layer-wise selection strategy. The ideal objective is stated as choosing a subset \(\mathcal{S}\subseteq \{1,\ldots,L\}\) of size \(M\) that maximizes the informativeness of the receiver’s output:
\[
\max_{\mathcal{S} \subseteq \{1,\ldots,L\}, |\mathcal{S}| = M}
f(\mathcal{M}_r(Q, \{(\mathbf{k}_s^{l}, \mathbf{v}_s^{l})\}_{l \in \mathcal{S}})),
\]
where \(f(\cdot)\) is the task metric. Because direct optimization is intractable, the paper introduces two hypotheses: H1, that intermediate layers contain the most transferable semantic knowledge, and H2, that layers with stronger attention distributions are more effective for communication [2510.03346].

To operationalize these hypotheses, KVComm defines an attention importance score
\[
\hat{S}_a^l = \frac{1}{HT} \sum_{h=1}^{H} \sum_{t=1}^{T} \sum_{c=1}^{C} a_{h,t,c}^l,
\]
normalizes it to \([0,1]\), and combines it with a Gaussian prior over depth,
\[
P^l = \exp\left(-\frac{(l - \mu)^2}{2\sigma^2}\right).
\]
The final layer score is
\[
S^l = \alpha S_a^l + (1 - \alpha) P^l,
\]
and the top \(M\) layers by \(S^l\) are selected [2510.03346].

The Gaussian prior centers the selection around intermediate layers, consistent with the paper’s interpretation that early layers emphasize surface form and late layers are more specialized for output prediction. The attention score then refines this prior by favoring layers whose KV memories are heavily used for context attention. The method is therefore not simply a middle-layer heuristic; it is a hybrid rule that biases toward intermediate depth while allowing non-contiguous selection of high-importance layers. In the reported experiments, \(\mu=L/2\), \(\sigma=10\), and \(\alpha\) is tuned per model family, with \(\alpha=1\) for Llama and \(0.8\) for Qwen and Falcon. The paper further states that the selection can be calibrated with only one example and still generalize well to the test set [2510.03346].

## 4. Evaluation protocol and empirical findings

The evaluation spans eight model pairs: four same-model pairs and four pairs of fine-tuned versions of the same base LLM. The model families are LLaMA, Qwen, and Falcon. The eight pairs are Llama-3.1-8B-Instruct with itself, Llama-3.2-3B-Instruct with itself, Qwen2.5-7B-Instruct with itself, Falcon3-7B-Instruct with itself, EvolCodeLlama-3.1-8B-Instruct \(\rightarrow\) ToolACE-2-Llama-3.1-8B, Llama-3.2-3B-Instruct-abliterated \(\rightarrow\) DeepSeek-R1-Distill-Llama-3B, Qwen2.5-7B-Instruct-Uncensored \(\rightarrow\) Bespoke-Stratos-7B, and falcon3-ultraset \(\rightarrow\) Falcon3-7B-Instruct-abliterated. Tasks include Countries, Tipsheets, HotpotQA, QASPER, MuSiQue, MultiFieldQA-en, 2WikiMQA, and TMATH. F1 is used for most tasks, while ROUGE-L Recall is used for TMATH. Baselines are Baseline, Skyline, Natural Language Debate, CIPHER, and AC with mean, replace, and sum variants [2510.03346].

Across datasets and model pairs, KVComm is reported to consistently outperform the communication baselines and approach the Skyline upper bound. With \(70\%\) of layers’ KV pairs transmitted, it can match Skyline-like performance on many tasks; with only \(30\%\) of layers selected, it often beats most baselines. The paper explicitly states that communicating as few as \(30\%\) of layers’ KV pairs yields up to a \(3\times\) reduction in communication relative to transmitting all layers’ KV pairs, and reports a \(2.5\times\) to \(6\times\) reduction in computation compared with Skyline [2510.03346].

The evaluation also reports cases in which KVComm exceeds Skyline. The authors interpret this as evidence that selective KV sharing can help the receiver focus on the most relevant information and can complement the receiver’s own strengths. Gains are smaller on TMATH, where the paper argues that mathematical reasoning may already be strongly supported by pretraining; AC also performs relatively well there because the hints are easy to exploit even when hidden-state communication is imperfect [2510.03346].

These results situate KVComm as a middle point between two extremes: full input merging, represented by Skyline, and minimal or lossy communication through text or single-state activations. Its empirical contribution is not merely accuracy at equal transmission cost, but the claim that selective KV transfer approximates upper-bound performance without requiring the receiver to solve the original concatenated-input problem directly.

## 5. Analyses, misconceptions, and theoretical framing

A major analytical theme in the paper is the inadequacy of hidden states as a default communication channel. KVComm studies hidden states directly and argues that the last token becomes most critical in later layers, demonstrating information concentration bias. Under this view, preserving the most important hidden-state signal implies preserving the last-token state; however, AC-style methods that replace or average the receiver’s last-token hidden state inevitably corrupt the receiver’s own information. The paper also reports that prepending all tokens’ hidden states works only under restrictive conditions: early-layer sender states must be combined with early-layer receiver states, the efficiency benefit is small if the sender states come from early layers, and performance drops if those states are injected into later receiver layers [2510.03346].

The layer-selection analyses are intended to validate H1 and H2. KVComm is compared against a contiguous chunk of layers, analogous to a Droidspeak-like strategy, and the contiguous approach is described as working only in a narrow hyperparameter region. Non-contiguous selection is more robust and often better for the same number of layers. Random selection is also consistently worse, especially at low transmission ratios such as \(0.3\), where careful selection matters most. An attention-distribution analysis further supports H2 by showing that higher attention-importance layers produce better performance, whereas low-score layers degrade performance [2510.03346].

On efficiency, the paper derives
\[
T(\text{Skyline}) - T(\text{KVComm}) =
O\!\Big( |C|d \big(L(2|Q|+T)-M(|Q|+T) \big) \Big),
\]
with the interpretation that savings grow as fewer layers \(M\) are selected. FLOPs measurements on Tipsheets and MultiFieldQA-en are reported to confirm the theoretical claim. This formulation also clarifies the framework’s systems-level objective: KVComm avoids the repeated decoding overhead of debate-based methods and reduces the recomputation inherent in Skyline because the receiver does not attend over the full concatenated context at every layer [2510.03346].

## 6. Scope, limitations, and related usages of the name

KVComm, as introduced in 2025, is restricted to sender-receiver pairs that share architecture or derive from the same base LLM, because it relies on one-to-one layer alignment. The selection strategy is calibrated on a small set and uses fixed hyperparameters \(\mu\), \(\sigma\), and \(\alpha\); the paper identifies dynamic or per-input selection as future work. It also studies only two-agent communication, even though the motivating setting is broader multi-agent systems. Finally, the method is described as orthogonal to standard inference accelerators and KV-cache compression methods, suggesting future composition with those techniques [2510.03346].

The term itself later became ambiguous. "KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems" uses a similar name for a distinct training-free framework that reuses and aligns KV caches across agents under diverse prefix contexts, with an anchor pool that estimates context-induced KV offsets and enables efficient prefilling rather than selective layer sharing [2510.12872]. "Q-KVComm: Efficient Multi-Agent Communication Via Adaptive KV Cache Compression" extends the communication theme in another direction, emphasizing direct transmission of compressed KV caches, adaptive layer-wise quantization, hybrid information extraction, and heterogeneous model calibration [2512.17914].

This suggests that “KVComm” has come to denote a broader class of representation-based inter-LLM communication methods. In the stricter historical sense, however, KVComm refers to the selective KV-sharing framework of 2025: a method in which a sender transmits only the most informative layers’ KV pairs so that a receiver can incorporate them through attention and answer a downstream query with substantially less communication than full-context transfer [2510.03346].

Source: https://www.emergentmind.com/topics/kvcomm-5e92df27-c630-414d-8ac7-2628178d80ea