arXiv:2610.26840cs.CLOct 2026

Manuscript Offprint

arXiv:2610.26840

LatComm: Reusable Context Compression for Latent Communication between Large Language Models

Huawei Lin, Jinting Liu, Tan Yu, Weijie Zhao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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 57×57\times and answers the questions of an article 3×3\times faster.

1 Introduction

Motivation. Communication between large language models (LLMs) enables models to contribute different roles to a shared task, such as processing documents and answering questions (Wu et al., 2023; Hong et al., 2024; Du et al., 2024; Wang et al., 2025; Lin et al., 2025, 2026). In context-dependent workflows (Lewis et al., 2020; Yao et al., 2023), the same context is often used many times: one document can support many questions, and one observation can inform later decisions. When the context is passed as text, the model that receives it, called the receiver, processes all of its tokens again for every question (Figure 1a). Shared contexts therefore lead to repeated computation across models and questions (Gim et al., 2024; Liu et al.,

(a) Text passing

Figure

(b) Latent passing

(c) Cost per context

(d) Cost per question

Figure

Questions per context

Figure 1: Text passing vs. latent passing. (a) The receiver reads the context again for every question. (b) The context is encoded once and reused. (c, d) Measured cost on QuALITY.

2024b,a). For example, in the reading comprehension dataset QuALITY (Pang et al., 2022), each article comes with 18.1 questions on average. The receiver reads 5,915 tokens for each question, and 98% of them are the article (Figure 1d).

Latent passing. Latent passing avoids this repetition (Figure 1b). An encoder reads the context once and turns it into vectors, called latents. The latents are stored and reused, so the receiver reads only the question. To replace the text, the latents need three properties. They must be reusable: they are computed once, before any question is known. They must be compact: their size does not grow with the context length, so the cost of storing and reading them stays fixed. They must be readable by a different LLM, because systems often combine models of different sizes (Li et al., 2025; Belcak et al., 2025) and from different families (Chen et al., 2024; Ong et al., 2025; Wang et al., 2025). These

MethodQuery-independentFixed-budget compressionCross-LLM communicationBridge-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)✓✕✕✕
C2C (Fu et al., 2026)✕✕✓✓
LatentMAS (Zou et al., 2025)✕✕✕✕
LatComm (ours)✓✓✓✓

Table 1: Comparison of context compression and latent communication. Query-independent (reusable): the representation is produced without the question. Fixed-budget compression (compact): its size does not depend on the input length. Cross-LLM communication: latent representations pass from one LLM to a different LLM. Bridge-only training: only an interface between two frozen LLMs is trained.

properties are hard to combine. Latents built without the question and with a fixed size cannot keep only what one question needs, so the receiver must select the relevant information when it reads.

Existing approaches. Existing methods provide only some of these properties. A receiver can store its key-value cache to avoid re-reading (Gim et al., 2024; Liu et al., 2024b), but this cache grows with the context length and can be used only by the model that produced it. Context compression methods shorten what a model reads (Pan et al., 2024; Mu et al., 2023; Chevalier et al., 2023). ICAE compresses a context into fixed memory slots without the question, but it adapts the LLM with LoRA, and the slots are read by the same LLM (Ge et al., 2024). xRAG keeps both models frozen and stores one vector per document (Cheng et al., 2024). This vector is the output of a pretrained retrieval encoder, so the amount of context that it carries is fixed by that encoder. A larger representation would need a larger projector, and its trainable parameters would grow with the size of the representation. Latent communication methods pass representations between models in place of text (Ramesh and Li, 2025; Du et al., 2026; Yang and Eshraghian, 2025; Shi et al., 2026). C2C transfers representations between different frozen LLMs, but both models read the same input, so the transfer depends on the question and grows with the input length (Fu et al., 2026). Table 1 compares representative methods on four properties, and only LatComm has all four.

Approach and results. We introduce LatComm, a latent communication interface that separates encoding from reading (Figure 2). In the encoding step, a frozen context encoder LLM reads the context without the question, and learned context compressors map its token states into a fixed number of low-dimensional slots. These slots form a compressed packet, which is computed once, stored, and sent to the receiver for every question. Because the compressors read all token states of the encoder through cross-attention, a larger packet needs only more slot queries rather than a larger projector. In the reading step, a frozen receiver LLM reads the packet through cross-attention, and gates computed from its prompt control the contribution of each slot, so that different questions can use different parts of the same packet. Both LLMs stay frozen throughout, and only the compressors, readers, and gates are trained. The interface can therefore connect the same model, models of different sizes, or models from different families. On 12 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 57×57 \times and answers all questions of an article 3×3 \times faster (Figure 1c, d).

Contributions. Our contributions are as follows:

  • We formulate context communication between LLMs as two steps, encoding without the question and reading with the question, with a packet of fixed size between them.

  • We introduce LatComm, an interface between two frozen LLMs with context compressors, cross-attention readers, and per-layer, per-slot gates. It is trained in two stages, so that packets stored after the first stage remain valid.

  • We show that LatComm is more accurate than single-vector baselines, answers questions three times faster than text passing, and connects six LLM pairs of different sizes and families.

  • We release a PyTorch implementation with training and evaluation configurations. 1^{1}

1^{1}https://github.com/huawei-lin/LatComm

(a) Model overview

Frozen LLMs Trainable modules

Context Encoder LLM

Figure

(b) Inside LatComm

Figure

Figure 2: LatComm overview. (a) The encoder reads the context; the receiver reads a task prompt. LatComm connects selected layers and adds context information after each paired receiver block. Both LLMs remain frozen. (b) For one layer pair, a context compressor produces reusable slots ZiZ_i. The gates compare a summary of the receiver's prompt states with the compressed slots. The reader combines the gated slot values and adds the result to the receiver state.

References (20)