The stateless architecture of Large Language Models inherently lacks the mechanism to preserve dynamic context, compelling agents to redundantly reprocess history to maintain long-horizon autonomy. While latent memory offers a solution, current approaches are hindered by architectural segregation, relying on auxiliary encoders that decouple memory from the reasoning backbone. We propose FlashMem, a framework that distills intrinsic memory directly from transient reasoning states via computation reuse. Leveraging the property that internal representations uniquely encode input trajectories, FlashMem identifies the last hidden state as a sufficient statistic for the interaction history. This enables a Shared-KV Consolidator to synthesize memory by attending directly to the backbone's frozen cache, eliminating redundant re-parameterization. Furthermore, a parameter-free Cognitive Monitor leverages attention entropy to adaptively trigger consolidation only when high epistemic uncertainty is detected. Experiments demonstrate that FlashMem matches the performance of heavy baselines while reducing inference latency by 5 times, effectively bridging the gap between efficiency and persistent cognition.


翻译:大型语言模型的无状态架构本质上缺乏保存动态上下文的机制,迫使智能体为维持长程自主性而冗余地重新处理历史信息。虽然潜在记忆提供了一种解决方案,但当前方法受限于架构隔离,依赖于将记忆与推理主干解耦的辅助编码器。我们提出了FlashMem,一个通过计算重用直接从瞬态推理状态中蒸馏内在记忆的框架。利用内部表示唯一编码输入轨迹的特性,FlashMem将最后隐藏状态识别为交互历史的充分统计量。这使得一个共享键值整合器能够通过直接关注主干网络的冻结缓存来合成记忆,从而消除了冗余的重新参数化。此外,一个无参数的认知监控器利用注意力熵,仅在检测到高认知不确定性时自适应地触发整合过程。实验表明,FlashMem在性能上与重型基线模型相当,同时将推理延迟降低了5倍,有效地弥合了效率与持久认知之间的鸿沟。

0
下载
关闭预览

相关内容

【Google AI-Yi Tay】Transformer记忆为可微搜索索引”(DSI)
专知会员服务
10+阅读 · 2022年3月4日
【NeurIPS2019】图变换网络:Graph Transformer Network
论文浅尝 | Know-Evolve: Deep Temporal Reasoning for Dynamic KG
开放知识图谱
36+阅读 · 2018年3月30日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员