Daily Tech Briefing
AI 科技速览

每天 5 分钟内学习 AI。获取最新的人工智能新闻,理解其重要性,并学习如何将其应用于您的工作。

AI 快讯
arXiv Machine Learning · 2026/8/3 17:43:36

Structured Memory for Edge Language Models: Persistent Context and Corpus Retrieval via O(1) SSM State Injection

AI 中文解读
给大模型装上“记忆硬盘”——这项来自arXiv的新研究,让AI在手机、智能音箱等边缘设备上调用知识的速度提升了约4500倍。以前模型要回答一个问题,需要重新阅读大段参考文档,现在通过一种叫PRECOG的技术,把文档提前“压缩”成一个固定大小的状态,查询时直接“注入”模型,耗时从27秒骤降到6毫秒,从不可用变成即时响应。 通俗来说,这就像以前AI每次查资料都要把整本书从头翻一遍,而现在它提前做好了详细的“知识卡片”,提问时直接抽出最合适的那张递过去。这项技术只适用于一类特定的模型(状态空间模型),传统的Transformer架构因为记忆方式不同,做不到这种“即插即用”的知识调用。 对普通人而言,这意味着未来AI助手在手机或家用设备上也能像云端一样知识渊博,不需要联网上传隐私数据。无论是离线咨询、实时翻译还是语音问答,都能做到“秒回”,而且省电省流量。AI的响应速度和隐私保护,都可能因此迎来一次实实在在的升级。
Retrieval-augmented generation (RAG) imposes a prefill cost proportional to retrieved context length, and -- with Transformer backbones -- a KV-cache that grows with each generated token. State-Space Models (SSMs) avoid the second cost by construction; we eliminate the first, collapsing prefill from $O(L_{context})$ to $O(1)$ per query. We introduce PRECOG (Pre-Computed Context Injection), a retrieval mechanism that exploits a property unique to SSMs: the fixed-size, position-agnostic recurrent hidden state is a complete summary of everything the model has read. PRECOG pre-encodes document corpora offline as SSM hidden states and injects the best-matching state directly at query time, bypassing in-context re-ingestion entirely. The same state-injection mechanism enables SMC (Structured Memory Consolidation): a hierarchical persistent memory with cognitive-domain clustering, an adjustable fidelity-vs-storage dial, and $O(1)$ session initialization, which consolidates short-term episodic states into long-term semantic memory and fuses both with retrieved corpus states at query time. We demonstrate the system on TENNs-LLM, a 1.2B-parameter gated-SSM language model with a 192 KB hidden state. PRECOG matches in-context RAG answer quality, reducing prefill latency from $\sim$27 s to $<$6 ms on edge hardware -- a $\sim$4500$\times$ speedup that crosses the threshold from unusable to interactive. The mechanism is architecturally impossible for Transformer KV-caches, which are position-entangled and grow linearly with context length.
分享
阅读原文