LatComm: Reusable Context Compression for Latent Communication between Large Language Models
Organizations: Rochester Institute of Technology · NVIDIA
Abstract
Systems that combine several large language models (LLMs) often use one context for many questions. When the context is passed between models as text, the receiving model processes all of its tokens again for every question. Avoiding this cost requires a context representation that is compact, reusable across questions, and readable by a different LLM. Existing compression and latent communication methods each provide only some of these properties. We introduce LatComm, a Latent Communication interface that provides all three by separating encoding from reading: the context is encoded once without the question, and the receiver selects what to read for each question. A frozen context encoder LLM compresses the context into a fixed-size packet and sends it to a different frozen receiver LLM, which reads the packet through cross-attention, with gates computed from its prompt. On 12 multiple-choice question-answering datasets, LatComm improves average accuracy over single-vector baselines by up to 10.2 points. On QuALITY, it reduces the receiver's input by 57x and answers the questions of an article 3x faster.
Figures & tables
| Method | Query- independent | Fixed-budget compression | Cross-LLM communication | Bridge-only training |
|---|---|---|---|---|
| LLMLingua-2 ( Pan et al., 2024 ) | ✓ | ✓ | ✗ | ✗ |
| AutoCompressor ( Chevalier et al., 2023 ) | ✓ | ✗ | ✗ | ✗ |
| ICAE ( Ge et al., 2024 ) | ✓ | ✓ | ✗ | ✗ |
| xRAG ( Cheng et al., 2024 ) | ✓ | ✓ | ✗ | ✓ |
| CEPE ( Yen et al., 2024 ) | ✓ | ✗ | ✗ | ✗ |
| DroidSpeak ( Liu et al., 2024a ) | ✓ | ✗ | ✗ | ✗ |
| Method | Compute per question | One-time compute | Stored size | Cross- LLM |
|---|---|---|---|---|
| Text passing | – | ✓ | ||
| KV cache | ✗ | |||
| LatComm | ✓ |
| Task datasets (%) | Held-out datasets (%) | |||||||||||||||||
| Method | Encoder | CLOTH | Cosmos | HSwag | LogiQA | MCScr. | MuTual | OBQA | QuAL. | ReClor | SciQ | SIQA | SWAG | Avg | RACE | DREAM | QuAIL | Avg |
| Full text | ||||||||||||||||||
| Raw-text | 45.3 | 40.8 | 37.0 | 31.0 | 82.3 | 48.0 | 68.0 | 44.9 | 38.6 | 97.5 | 48.2 | 35.6 | 51.43 | 66.1 | 70.9 | 58.2 | 65.06 | |
| No context | ||||||||||||||||||
| Query-only | 25.0 | 44.8 | 28.9 | 26.0 | 62.6 | 32.3 | 53.6 | 32.2 | 27.8 | 77.1 | 37.7 | 27.3 | 39.60 | 39.1 | 36.2 | 34.0 | 36.41 | |
| Constant packet | 44.2 | 63.2 | 68.9 | 37.5 | 75.6 | 71.9 | 68.8 | 39.5 | 41.8 | 88.1 | 57.6 | 65.8 | 60.25 | 45.5 | 41.2 | 43.5 | 43.37 | |
| Context encoder | Receiver | Packet | |||
| Same model | |||||
| Qwen3.5-0.8B | Qwen3.5-0.8B | 24 | 32 | 256 | 384 KiB |
| Larger encoder | |||||
| Qwen3.5-4B | Qwen3.5-0.8B | 24 | 32 | 256 | 384 KiB |
| Qwen3.5-9B | Qwen3.5-0.8B | 24 | 32 | 256 | 384 KiB |
| Cross-family | |||||
| Task datasets (%) | Held-out datasets (%) | |||||||||||||||||
| Method | Encoder | CLOTH | Cosmos | HSwag | LogiQA | MCScr. | MuTual | OBQA | QuAL. | ReClor | SciQ | SIQA | SWAG | Avg | RACE | DREAM | QuAIL | Avg |
| Full text | ||||||||||||||||||
| Raw-text | 25.0 | 25.4 | 25.0 | 22.0 | 50.9 | 23.6 | 28.0 | 25.6 | 24.4 | 24.8 | 33.5 | 24.6 | 27.73 | 25.9 | 34.7 | 25.2 | 28.63 | |
| No context | ||||||||||||||||||
| Query-only | 25.4 | 25.5 | 25.7 | 25.8 | 48.9 | 23.8 | 26.4 | 25.9 | 25.8 | 23.5 | 33.7 | 25.2 | 27.98 | 26.4 | 34.6 | 25.2 | 28.74 | |
| Constant packet | 38.2 | 59.3 | 67.9 | 28.4 | 71.8 | 59.9 | 56.8 | 35.5 | 28.2 | 82.0 | 54.8 | 65.7 | 54.04 | 39.0 | 41.6 | 43.3 | 41.30 | |
| Encoder | Receiver | Constant packet | Embedding | LatComm |
|---|---|---|---|---|
| Same model | ||||
| Qwen3.5-0.8B | Qwen3.5-0.8B | 60.25 | 61.98 | 64.91 |
| Larger encoder | ||||
| Qwen3.5-4B | Qwen3.5-0.8B | 60.25 | 61.98 | 65.43 |
| Qwen3.5-9B | Qwen3.5-0.8B | 60.25 | 61.98 | 65.80 |
| Cross-family | ||||
| Quantity | Raw-text | LatComm |
|---|---|---|
| Per question | ||
| Receiver input tokens | 5,915 | 103 |
| Receiver time (ms) | 511 | 131 |
| Receiver peak memory (GiB) | 0.87 | 0.06 |
| Per context | ||
| Encoding time (s) | – | 0.71 |
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Train examples | Train context tokens | Avg. context | Eval |
|---|---|---|---|---|
| Stage 1: context reconstruction | ||||
| WikiText-103 | 446,282 | 100,278,346 | 224.7 | 1,057 |
| FineWeb-Edu | 1,553,718 | 1,033,473,862 | 665.2 | 13,926 |
| Stage 1 total | 2,000,000 | 1,133,752,208 | 566.9 | 14,983 |
| Stage 2: task supervision | ||||
| CLOTH | 76,660 | 34,320,807 | 447.7 | 11,516 |
| Setting | Stage 1 | Stage 2 |
|---|---|---|
| Data | ||
| Training examples | 2,000,000 | 282,441 |
| Epochs | 1 | 3 |
| Updates | 5,209 | 2,208 |
| Batch size | 384 | 384 |
| Optimization | ||
| Reconstruction | |||||
| Setting | Packet | Size | Loss | Acc. | Task Avg |
| Encoder | |||||
| Qwen3.5-0.8B | 384 KiB | 1.83 | 56.3 | 64.91 | |
| Qwen3.5-4B (default) | 384 KiB | 1.24 | 68.5 | 65.43 | |
| Qwen3.5-9B | 384 KiB | 0.95 | 75.1 | 65.80 | |
| Slots per pair | |||||
| Task datasets (%) | Held-out datasets (%) | ||||||||||||||||
| Packet given to the receiver | CLOTH | Cosmos | HSwag | LogiQA | MCScr. | MuTual | OBQA | QuAL. | ReClor | SciQ | SIQA | SWAG | Avg | RACE | DREAM | QuAIL | Avg |
| Same trained readers and gates | |||||||||||||||||
| Own packet | 52.2 | 61.8 | 73.4 | 37.9 | 80.8 | 73.9 | 79.6 | 43.2 | 49.8 | 92.3 | 66.5 | 73.2 | 65.39 | 52.3 | 52.5 | 44.6 | 49.82 |
| Packet of another context | 30.7 | 48.1 | 50.3 | 28.1 | 63.4 | 43.8 | 51.2 | 31.7 | 30.6 | 77.3 | 45.4 | 46.4 | 45.59 | 37.8 | 38.5 | 32.5 | 36.28 |
| No packet | 25.0 | 44.8 | 28.9 | 26.0 | 62.6 | 32.3 | 53.6 | 32.2 | 27.8 | 77.1 | 37.7 | 27.3 | 39.60 | 39.1 | 36.2 | 34.0 | 36.41 |
| Readers and gates trained with one fixed packet | |||||||||||||||||