Manuscript Offprint

arXiv:2609.01507

LatentPress: Context Compression Beyond Text and Vision

Zhengze Zhou, Hejian Sang

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

Abstract

Compressed context is usually carried as human-readable text or as rendered images that must be decoded, even when its consumer is a language model. We introduce LatentPress, which writes conversational histories and long documents into a third representation: continuous memory tokens that a frozen decoder reads directly through its input-embedding interface, with no text reconstruction at inference. A small reader-matched writer compresses 4–16× while training only an adapter (4.2M–26.2M parameters, ~ 0.1% of the decoder). On LongMemEval, LatentPress reaches 0.504 accuracy at 7.70× compression versus 0.490 for uncompressed evidence, outperforming text summaries (0.184) and OCR-based compression (0.426→0.312). On LongBenchQA, in-domain writers match or exceed raw-context reading at 4–8× compression, while 16× trails raw. Writing takes 43 ms per conversation, roughly an order of magnitude faster than text summarization or OCR reconstruction, and reading is 5–9× faster than raw context or cached OCR. We validate the interface under two transfer settings, zero-shot from UltraChat to LongMemEval memory QA and from LongMemEval-derived QA to unseen LongBench document domains, establishing direct soft tokens as a practical machine-facing context interface beyond text and vision. The implementation of the experiments could be found at: https://github.com/xuyd16ai/context_softtoken_compress

1 Introduction

Long-running assistants and agents accumulate more history than they can afford to reread. A deployment trace may hold instructions, dialogue, plans, tool calls, observations, and environment feedback, yet a later decision often depends on only a small part of it. The same pressure appears whenever a language model must read long documents to answer a question. In both cases, the default machine-facing interface remains discrete text: systems retrieve text, summarize text, prune text, or reconstruct text from another modality before a language model can use it. Text is convenient for people and interoperable across systems, but a model need not require its stored or compressed context to be human-readable. This motivates a more direct question: can long context be written into a compact continuous representation that a frozen language model reads without first recovering the text?

We study this question at the representation layer. We separate context use into WRITE, which maps text to a compact state, and READ, which supplies that state to a frozen decoder for downstream QA. This abstraction covers both conversational histories and long documents. It does not attempt to replace retrieval, reflection, update policies, or conflict resolution in a complete memory system; instead, it asks what representation should cross the boundary between stored context and the model that consumes it.

We introduce LatentPress, a direct-read soft-token interface (Figure 1). A reader-matched writer reuses two frozen decoder layers together with a small trainable adapter to map text segments into continuous vectors. These vectors enter the frozen decoder through its input-embedding interface, followed by the question.

Making this interface useful requires two practical choices: how aggressively to compress each segment and what supervision teaches the writer to retain. The contribution we emphasize is the interface itself, not the compression schedule: for the per-segment rate we simply exploit whatever structure the input already exposes, and we treat where to spend the compression budget as a hand-specified heuristic rather than a learned component. Since token positions differ widely in how

∗^{*}Equal contribution.

Figure

LatentPress compresses a long conversation into a compact soft-token memory for direct reading

Figure 1: LatentPress overview, shown for conversational context. (A) A long, heterogeneous history containing segments with different information value. (B) LatentPress compresses the context into a short sequence of continuous soft tokens in a single, near-real-time forward pass. (C) The frozen LLM reads one concatenated sequence (the soft-token context followed by the question) and decodes the answer directly, with no text-reconstruction step. We also evaluate the same direct-read interface on long documents as a generalization beyond conversational memory.

much they contribute (Xu et al., 2026), conversational turns follow a simple structure-based schedule while unstructured long documents use a single uniform rate; learning this allocation automatically is a direction we leave to future work. For documents we additionally study how cross-domain and in-domain QA supervision affects the compressed reader.

How LatentPress differs from prior compression. Compressing context into continuous vectors is an established family, so we state up front what LatentPress changes (Table 1). Gist, AutoCompressor, and ICAE train or adapt an LLM-scale reader or encoder, whereas LatentPress leaves the downstream decoder entirely frozen and trains only a small reader-matched adapter ( ∼\sim0.1% of decoder parameters). Unlike ICAE and visual compression, its vectors are consumed directly at the decoder's input-embedding layer, with no text reconstruction at inference. xRAG also freezes the reader, but compresses one independently retrieved passage into a single token; LatentPress instead writes multi-turn histories and whole long documents, and can assign different rates to structured segments. The resulting distinction is not soft tokens alone, but a lightweight WRITE/READ interface that combines a frozen reader, direct soft-token consumption, and variable-length context compression. We discuss the closest mechanisms and use cases in the Related Work.

The experiments ask whether this interface is practical along four axes: accuracy, write cost, read cost, and trainable footprint. LongMemEval tests the accuracy and transfer behavior for conversational memory, where a writer trained on generic UltraChat conversations transfers to unseen memory-QA labels across three frozen readers (0.48–0.50 accuracy at 4.6–7.7× compression). LongBench-QA (Bai et al., 2024) removes the role structure and tests the same interface on long documents, both cross-domain and after in-domain task adaptation, where in-domain compressed readers match or exceed their raw-context baselines at mild compression while both transfer settings degrade at the most aggressive rate. The efficiency section then measures the two latency axes directly: encoded-token generation (43 ms per conversation) and warm-loaded inference from the compressed prefix (5–9× faster), using only a small trainable writer (4.2M–26.2M parameters).

References (41)