Dual-Cache Latent Space Communication between Heterogeneous Language Models
Organizations: Independent Researcher · Amazon Web Services (AWS) · University of Central Florida (UCF)
Abstract
Multi-agent LLM systems split work across models, so answering often requires knowledge that sits in another agent's context: a Sharer has encoded information that a Receiver needs to complete its task. They usually communicate by exchanging text, which puts autoregressive decoding on the critical path and reduces the exchange to a discrete message written without sight of the receiver's state. Recent latent protocols instead translate the sharer's key-value (KV) cache into the receiver's: C2C supports heterogeneous models but requires both to read the same input, while LCF-X removes this shared-context requirement through position-free sharer-cache pooling. Three restrictions remain: LCF-X compresses the sharer alone, supplies the same layer-local summary to every receiver position with no joint cross-layer memory to retrieve from, and assumes matched layer count and KV geometry. We introduce XKV, which lifts all three: learned-query attention pools both caches; self-attention over receiver-aligned layer tokens, with a learned layer map reconciling different depths, mixes the pooled summaries into a compact joint memory; and a shared position decoder lets every raw receiver cache position retrieve its own per-head-gated residual in the receiver's native KV geometry. Both models stay frozen and may differ in family, depth, KV-head count, head dimension, and tokenizer; only the translator is trained. Across 45 dataset-model-pair settings (six heterogeneous and three same-model ordered pairings, five datasets), XKV attains the highest macro score and best average rank, improving on LCF-X on every dataset (by 4.6 exact-match and 4.2 F1 points on ROPES) and surpassing text communication on four of the five, while training 76% fewer parameters and translating a cache pair 10.3x faster (5.8 vs. 59.9 ms); end to end, XKV is 26% faster than LCF-X and 6.8x faster than text communication.
Figures & tables
| Sharer Receiver | Method | ROPES | MuSiQue | QASC | StrategyQA | HotpotQA-bridge | Cross-dataset Avg. | |||
| EM | F1 | EM | F1 | Acc. | Acc. | EM | F1 | |||
| T2T | 35.8 | 45.2 | 4.6 | 12.2 | 78.6 | 64.1 | 16.6 | 27.1 | 45.44 | |
| LCF-X | 45.2 | 52.4 | 7.7 | 15.4 | 82.4 | 58.8 | 29.1 | 40.6 | 49.92 | |
| Qwen Qwen | XKV | 47.9 | 55.6 | 8.1 | 16.0 | 82.2 | 61.4 | 29.5 | 40.7 | 51.18 |
| Qwen Gemma | T2T | 42.4 | 48.6 | 6.8 | 14.5 | 65.8 | 51.9 | 22.4 | 34.0 | 42.96 |
| LCF-X | 43.9 | 51.3 | 6.0 | 13.3 | 49.2 | 60.8 | 23.3 | 34.0 | 41.72 | |
| Sharer Receiver | Method | ROPES | MuSiQue | QASC | StrategyQA | HotpotQA-bridge | Cross-dataset Avg. | ||||||
| Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | ||
| T2T | – | 955 | – | 974 | – | 328 | – | 848 | – | 995 | – | 820.0 | |
| LCF-X | 31 | 165 | 115 | 376 | 42 | 156 | 42 | 154 | 64 | 259 | 58.8 | 222.0 | |
| Qwen Qwen | XKV | 6 | 139 | 6 | 218 | 6 | 119 | 10 | 122 | 6 | 201 | 6.8 | 159.8 |
| T2T | – | 1549 | – | 1225 | – | 790 | – | 1884 | – | 1372 | – | 1364.0 | |
| LCF-X | 39 | 213 | 84 | 427 | 45 | 188 | 44 | 215 | 58 | 294 | 54.0 | 267.4 | |
| Variant | QASC | ROPES F1 | StrategyQA | Mean | Comm. (ms) | E2E (ms) | Params |
| Full XKV | 0.00 | 0.00 | 0.00 | 0.00 | 5.8 | 131.7 | 4.55M |
| -0.41 | -0.82 | -0.16 | -0.46 | 4.7 | 128.7 | 3.58M | |
| -1.98 | -0.44 | -0.08 | -0.83 | 3.7 | 127.1 | 3.43M | |
| LCFP | -0.82 | -2.00 | +0.01 | -0.94 | 39.1 | 183.7 | 3.53M |
| Sharer Receiver | Method | ROPES | MuSiQue | QASC | StrategyQA | HotpotQA-bridge | Cross-dataset Avg. | ||||||
| Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | Comm. | E2E | ||
| T2T | – | 955 | – | 974 | – | 328 | – | 848 | – | 995 | – | 820.0 | |
| LCF-X | 31 | 165 | 115 | 376 | 42 | 156 | 42 | 154 | 64 | 259 | 58.8 | 222.0 | |
| Qwen Qwen | XKV | 6 | 139 | 6 | 218 | 6 | 119 | 10 | 122 | 6 | 201 | 6.8 | 159.8 |
| Qwen Gemma | T2T | – | 914 | – | 971 | – | 291 | – | 855 | – | 1001 | – | 806.4 |
| LCF-X | 35 | 193 | 118 | 439 | 42 | 177 | 41 | 177 | 65 | 295 | 60.2 | 256.2 | |
| Setting | Value |
| Optimizer | AdamW |
| Learning rate | |
| LR schedule | linear warmup ( of total steps) |
| Effective batch size | 256 |
| Gradient clipping | |
| Pooling spans |
| Sharer | Receiver | LCF-X | XKV | T2T |
| Qwen-0.6B | Qwen-0.6B | 45.2/52.4 | 47.9 / 55.6 | 35.8/45.2 |
| Qwen-0.6B | Gemma-1B | 43.9/51.3 | 46.2 / 54.3 | 42.4/48.6 |
| Qwen-0.6B | Llama-3B | 51.4/58.5 | 57.3 / 61.8 | 50.6/58.0 |
| Gemma-1B | Qwen-0.6B | 47.2/53.7 | 49.1 / 55.4 | 31.9/42.5 |
| Gemma-1B | Gemma-1B | 45.5/51.4 | 48.1 / 55.6 | 31.8/42.1 |
| Gemma-1B | Llama-3B | 42.1/49.8 | 54.0 / 58.7 | 46.9/55.7 |
| Sharer | Receiver | LCF-X | XKV | T2T | ||
| Comm. | E2E | Comm. | E2E | E2E | ||
| Qwen-0.6B | Qwen-0.6B | 31 | 165 | 6 | 139 | 955 |
| Qwen-0.6B | Gemma-1B | 35 | 193 | 5 | 160 | 914 |
| Qwen-0.6B | Llama-3B | 36 | 148 | 6 | 119 | 927 |
| Gemma-1B | Qwen-0.6B | 42 | 182 | 6 | 159 | 1605 |
| Gemma-1B | Gemma-1B | 39 | 213 | 5 | 171 | 1549 |
| Sharer | Receiver | LCF-X | XKV | T2T |
| Qwen-0.6B | Qwen-0.6B | 7.7/15.4 | 8.1 / 16.0 | 4.6/12.2 |
| Qwen-0.6B | Gemma-1B | 6.0/13.3 | 5.4/12.5 | 6.8 / 14.5 |
| Qwen-0.6B | Llama-3B | 16.0/26.3 | 19.2 / 29.9 | 9.3/19.5 |
| Gemma-1B | Qwen-0.6B | 8.4 / 16.6 | 8.1/15.8 | 3.4/10.8 |
| Gemma-1B | Gemma-1B | 4.6/11.9 | 5.8/13.1 | 6.2 / 13.4 |
| Gemma-1B | Llama-3B | 17.8/28.3 | 19.4 / 30.0 | 9.4/18.3 |
| Sharer | Receiver | LCF-X | XKV | T2T | ||
| Comm. | E2E | Comm. | E2E | E2E | ||
| Qwen-0.6B | Qwen-0.6B | 115 | 376 | 6 | 218 | 974 |
| Qwen-0.6B | Gemma-1B | 118 | 439 | 5 | 253 | 971 |
| Qwen-0.6B | Llama-3B | 116 | 331 | 6 | 201 | 1006 |
| Gemma-1B | Qwen-0.6B | 91 | 370 | 6 | 229 | 1236 |
| Gemma-1B | Gemma-1B | 84 | 427 | 5 | 264 | 1225 |
| Sharer | Receiver | LCF-X | XKV | T2T |
| Qwen-0.6B | Qwen-0.6B | 82.4 | 82.2 | 78.6 |
| Qwen-0.6B | Gemma-1B | 49.2 | 55.1 | 65.8 |
| Qwen-0.6B | Llama-3B | 92.0 | 93.3 | 86.7 |
| Gemma-1B | Qwen-0.6B | 81.3 | 82.4 | 84.6 |
| Gemma-1B | Gemma-1B | 44.8 | 53.9 | 55.7 |
| Gemma-1B | Llama-3B | 92.9 | 93.0 | 89.4 |
| Sharer | Receiver | LCF-X | XKV | T2T | ||
| Comm. | E2E | Comm. | E2E | E2E | ||
| Qwen-0.6B | Qwen-0.6B | 42 | 156 | 6 | 119 | 328 |
| Qwen-0.6B | Gemma-1B | 42 | 177 | 5 | 136 | 291 |
| Qwen-0.6B | Llama-3B | 42 | 139 | 6 | 102 | 247 |
| Gemma-1B | Qwen-0.6B | 48 | 171 | 6 | 127 | 810 |
| Gemma-1B | Gemma-1B | 45 | 188 | 5 | 145 | 790 |
| Sharer | Receiver | LCF-X | XKV | T2T |
| Qwen-0.6B | Qwen-0.6B | 58.8 | 61.4 | 64.1 |
| Qwen-0.6B | Gemma-1B | 60.8 | 58.2 | 51.9 |
| Qwen-0.6B | Llama-3B | 72.9 | 73.6 | 73.4 |
| Gemma-1B | Qwen-0.6B | 59.3 | 62.0 | 65.9 |
| Gemma-1B | Gemma-1B | 58.2 | 58.8 | 57.6 |
| Gemma-1B | Llama-3B | 68.8 | 74.1 | 70.9 |
| Sharer | Receiver | LCF-X | XKV | T2T | ||
| Comm. | E2E | Comm. | E2E | E2E | ||
| Qwen-0.6B | Qwen-0.6B | 42 | 154 | 10 | 122 | 848 |
| Qwen-0.6B | Gemma-1B | 41 | 177 | 5 | 140 | 855 |
| Qwen-0.6B | Llama-3B | 42 | 139 | 6 | 109 | 807 |
| Gemma-1B | Qwen-0.6B | 48 | 170 | 6 | 126 | 1882 |
| Gemma-1B | Gemma-1B | 44 | 215 | 5 | 146 | 1884 |
| Sharer | Receiver | LCF-X | XKV | T2T |
| Qwen-0.6B | Qwen-0.6B | 29.1/40.6 | 29.5 / 40.7 | 16.6/27.1 |
| Qwen-0.6B | Gemma-1B | 23.3/34.0 | 23.8 / 34.7 | 22.4/34.0 |
| Qwen-0.6B | Llama-3B | 41.1/54.5 | 41.5 / 55.0 | 30.4/44.0 |
| Gemma-1B | Qwen-0.6B | 29.4/40.9 | 29.5 / 41.0 | 15.5/25.7 |
| Gemma-1B | Gemma-1B | 23.5/ 34.4 | 23.9 / 34.4 | 21.7/33.1 |
| Gemma-1B | Llama-3B | 40.2/53.5 | 41.5 / 55.1 | 30.4/44.5 |
| Sharer | Receiver | LCF-X | XKV | T2T | ||
| Comm. | E2E | Comm. | E2E | E2E | ||
| Qwen-0.6B | Qwen-0.6B | 64 | 259 | 6 | 201 | 995 |
| Qwen-0.6B | Gemma-1B | 65 | 295 | 5 | 240 | 1001 |
| Qwen-0.6B | Llama-3B | 65 | 224 | 6 | 169 | 999 |
| Gemma-1B | Qwen-0.6B | 62 | 266 | 7 | 213 | 1332 |
| Gemma-1B | Gemma-1B | 58 | 294 | 5 | 248 | 1372 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 82.2 | 81.6 | 80.8 | 81.7 |
| Qwen-0.6B | Gemma-1B | 55.1 | 53.8 | 49.6 | 51.9 |
| Qwen-0.6B | Llama-3B | 93.3 | 93.1 | 92.8 | 93.1 |
| Gemma-1B | Qwen-0.6B | 82.4 | 81.9 | 81.3 | 81.3 |
| Gemma-1B | Gemma-1B | 53.9 | 52.3 | 49.6 | 54.0 |
| Gemma-1B | Llama-3B | 93.0 | 93.6 | 93.2 | 93.5 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 6/119 | 5/118 | 4 / 115 | 48/320 |
| Qwen-0.6B | Gemma-1B | 5/ 136 | 4/139 | 3 /138 | 31/167 |
| Qwen-0.6B | Llama-3B | 6/102 | 5/102 | 4 / 101 | 33/130 |
| Gemma-1B | Qwen-0.6B | 6/127 | 5/128 | 4 / 123 | 39/161 |
| Gemma-1B | Gemma-1B | 5/ 145 | 4/146 | 3 /147 | 36/178 |
| Gemma-1B | Llama-3B | 6/108 | 5/110 | 4 / 106 | 38/146 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 47.9/55.6 | 49.5 / 56.6 | 46.3/53.5 | 45.6/52.7 |
| Qwen-0.6B | Gemma-1B | 46.2/ 54.3 | 47.0 /54.1 | 45.5/53.7 | 46.6/53.9 |
| Qwen-0.6B | Llama-3B | 57.3 / 61.8 | 53.3/59.2 | 55.6/61.2 | 53.7/60.3 |
| Gemma-1B | Qwen-0.6B | 49.1 / 55.4 | 45.6/52.1 | 44.9/51.7 | 44.7/53.6 |
| Gemma-1B | Gemma-1B | 48.1 / 55.6 | 46.7/54.2 | 47.0/53.8 | 44.0/51.2 |
| Gemma-1B | Llama-3B | 54.0/58.7 | 52.8/58.1 | 57.5 / 62.9 | 52.0/58.3 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 6/ 139 | 5/ 139 | 4 /140 | 34/171 |
| Qwen-0.6B | Gemma-1B | 5/ 160 | 4/163 | 3 /167 | 33/194 |
| Qwen-0.6B | Llama-3B | 6/119 | 5/118 | 4 / 116 | 34/147 |
| Gemma-1B | Qwen-0.6B | 6/159 | 6/153 | 4 / 147 | 39/186 |
| Gemma-1B | Gemma-1B | 5/171 | 4/ 169 | 3 / 169 | 38/210 |
| Gemma-1B | Llama-3B | 6/ 126 | 5/127 | 4 /127 | 40/167 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 61.4 | 63.2 | 61.7 | 63.2 |
| Qwen-0.6B | Gemma-1B | 58.2 | 58.2 | 57.3 | 59.1 |
| Qwen-0.6B | Llama-3B | 73.6 | 72.1 | 73.8 | 72.6 |
| Gemma-1B | Qwen-0.6B | 62.0 | 63.2 | 61.7 | 64.4 |
| Gemma-1B | Gemma-1B | 58.8 | 59.9 | 57.9 | 57.9 |
| Gemma-1B | Llama-3B | 74.1 | 73.0 | 77.1 | 73.6 |
| Sharer | Receiver | Full | LCFP | ||
| Qwen-0.6B | Qwen-0.6B | 10/122 | 5/ 118 | 4 /122 | 78/564 |
| Qwen-0.6B | Gemma-1B | 5/140 | 4/140 | 3 / 139 | 32/169 |
| Qwen-0.6B | Llama-3B | 6/109 | 5/ 103 | 4 /104 | 34/134 |
| Gemma-1B | Qwen-0.6B | 6/126 | 5/ 123 | 4 /128 | 38/161 |
| Gemma-1B | Gemma-1B | 5/ 146 | 4/148 | 3 /149 | 36/179 |
| Gemma-1B | Llama-3B | 6/112 | 6/116 | 4 / 108 | 43/152 |
| Method | Macro native score | Best datasets | Best/tied-best cells | Avg. rank |
| LCF-X | 49.76 | 0/5 | 4/45 | 2.29 |
| XKV | 52.37 | 4/5 | 31/45 | 1.37 |
| T2T | 48.86 | 1/5 | 11/45 | 2.34 |
| Method | Communication (ms) | E2E (ms) | E2E relative to XKV | Trainable params |
| LCF-X | 59.9 | 227.9 | 1.36 | 19.03M |
| XKV | 5.8 | 167.6 | 1.00 | 4.55M |
| T2T | – | 1139.5 | 6.80 | 0 |
| Dataset | vs. LCF-X | vs. T2T | Speedup vs. LCF-X | Speedup vs. T2T |
| ROPES | +4.20 | +7.68 | 1.24 | 8.90 |
| MuSiQue | +1.12 | +2.67 | 1.59 | 5.09 |
| QASC | +3.22 | -0.27 | 1.35 | 5.45 |
| StrategyQA | +3.84 | +1.10 | 1.26 | 9.99 |
| HotpotQA-bridge | +0.66 | +6.41 | 1.25 | 6.01 |
| Variant | score | Avg. rank | Best/tied-best | Component (ms) | E2E (ms) | Params |
| Full | +0.00 | 1.87 | 13/27 | 5.8 | 131.7 | 4.55M |
| -0.46 | 2.35 | 5/27 | 4.7 | 128.7 | 3.58M | |
| -0.83 | 3.02 | 5/27 | 3.7 | 127.1 | 3.43M | |
| LCFP | -0.94 | 2.76 | 5/27 | 39.1 | 183.7 | 3.53M |
| vs. Full | -0.46 | – | – | -18.5% | -2.3% | -21.2% |
| vs. Full | -0.83 | – | – | -36.9% | -3.5% | -24.5% |
Multi-Agent LLM Systems
Multi-agent large language model systems coordinate multiple AI agents to solve tasks through communication, specialization, shared tools, and memory.
See all 1,040 papers