LatentPress:超越文字與視覺的上下文壓縮

LatentPress: Context Compression Beyond Text and Vision

September 1, 2026
作者: Zhengze Zhou, Hejian Sang
cs.AI

摘要

壓縮的上下文通常以人類可讀的文字或必須經解碼的渲染圖像來承載,即使其消費者是語言模型亦然。我們提出 LatentPress,將對話歷史與長文件寫入第三種表示:連續的記憶標記(memory tokens)。凍結的解碼器可直接透過其輸入嵌入介面讀取這些記憶標記,且在推論時無需重建文字。一個與讀取器匹配的小型寫入器,在僅訓練一個適配器(4.2M–26.2M 個參數,約為解碼器的 0.1%)的情況下,即可達到 4–16 倍的壓縮。在 LongMemEval 上,LatentPress 在 7.70 倍壓縮時達到 0.504 的準確度,而未壓縮證據為 0.490,勝過文字摘要(0.184)與基於 OCR 的壓縮(0.426 至 0.312)。在 LongBench-QA 上,域內寫入器在 4–8 倍壓縮時之表現可與直接讀取原始上下文相當或超越之,而在 16 倍壓縮時則落後於原始上下文。寫入每個對話需 43 毫秒,約比文字摘要或 OCR 重建快一個數量級,而讀取速度則比原始上下文或快取 OCR 快 5–9 倍。我們在兩種遷移設定下驗證此介面:一是從 UltraChat 到 LongMemEval 記憶問答的零樣本遷移,二是從 LongMemEval 衍生之問答到未見之 LongBench 文件領域,從而確立了直接軟標記可作為文字與視覺之外、實際可行的面向機器之上下文介面。實驗的實作程式碼可在以下網址找到:https://github.com/xuyd16ai/context_softtoken_compress 。
English
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-16times while training only an adapter (4.2M-26.2M parameters, sim!0.1% of the decoder). On LongMemEval, LatentPress reaches 0.504 accuracy at 7.70times compression versus 0.490 for uncompressed evidence, outperforming text summaries (0.184) and OCR-based compression (0.426 to 0.312). On LongBench-QA, in-domain writers match or exceed raw-context reading at 4-8times compression, while 16times trails raw. Writing takes 43ms per conversation, roughly an order of magnitude faster than text summarization or OCR reconstruction, and reading is 5-9times 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 .
PDF1021September 5, 2026