把聊天记录压成模型直接读的“记忆码”,比文字摘要还准
我们一直以为,给 AI 的上下文要么是文字、要么是图片,总得先“翻译”成它能懂的东西。这篇反着来:把整段对话历史直接压成一种连续的“记忆码”,让模型像读输入一样直接读,中间不经过任何文字重建。做法是训练一个很小的“写入器”,把长文本压成 4 到 16 倍短的连续向量,冻结的大模型直接吃这些向量。在 LongMemEval 上,7.7 倍压缩时准确率 0.504,反而超过不压缩的原文 0.490;文字摘要只有 0.184,OCR 压缩也只有 0.426。写入一段对话只要 43 毫秒,比文字摘要或 OCR 快一个数量级,读取也快 5 到 9 倍。它不是你明天能用上的东西,但它指向一个方向:AI 之间交换信息,可能根本不需要“人话”。
📄 原文摘要(英文)
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 .