arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2502.15957cs.CLcs.AI
收藏

R$^3$Mem:通过可逆压缩桥接记忆保持与检索

R$^3$Mem: Bridging Memory Retention and Retrieval via Reversible Compression

Université de Montréal(蒙特利尔大学);Mila - Quebec AI Institute(米拉-魁北克人工智能研究所);Google(谷歌)

Xiaoqiang Wang, Suyuchen Wang, Yun Zhu, Bang Liu

AI总结:

本文提出R$^3$Mem,一种通过可逆压缩优化记忆保持与检索的记忆网络,采用虚拟令牌和分层压缩,在长上下文建模及检索增强任务中达到最优性能,并显著提升长时程交互表现。

摘要:

记忆在将大型语言模型(LLM)部署到实际应用时,对提升其性能起着关键作用。现有解决方案面临权衡:基于外部存储的显式记忆设计需要复杂的管理并产生存储开销,而通过参数存储信息的隐式记忆设计则难以实现可靠的检索。在本文中,我们提出R$^3$Mem,一种通过可逆上下文压缩同时优化信息保持(Retention)与检索(Retrieval)的记忆网络。具体而言,R$^3$Mem采用虚拟记忆令牌来压缩和编码无限长的历史记录,并通过分层压缩策略进一步增强,该策略将信息从文档级细化到实体级,以改善跨粒度的信息吸收。在检索方面,R$^3$Mem采用可逆架构,通过利用压缩信息反向调用模型来重建原始数据。通过参数高效微调实现,它可以无缝集成到任何基于Transformer的模型中。实验表明,我们的记忆设计在长上下文语言建模和检索增强生成任务中达到了最先进的性能。它还在诸如对话代理等长时程交互任务中显著优于传统记忆模块,展示了其在下一代检索系统中的潜力。

英文摘要:

Memory plays a key role in enhancing LLMs' performance when deployed to real-world applications. Existing solutions face trade-offs: explicit memory designs based on external storage require complex management and incur storage overhead, while implicit memory designs that store information via parameters struggle with reliable retrieval. In this paper, we propose R$^3$Mem, a memory network that optimizes both information Retention and Retrieval through Reversible context compression. Specifically, R$^3$Mem employs virtual memory tokens to compress and encode infinitely long histories, further enhanced by a hierarchical compression strategy that refines information from document- to entity-level for improved assimilation across granularities. For retrieval, R$^3$Mem employs a reversible architecture, reconstructing raw data by invoking the model backward with compressed information. Implemented via parameter-efficient fine-tuning, it can integrate seamlessly with any Transformer-based model. Experiments demonstrate that our memory design achieves state-of-the-art performance in long-context language modeling and retrieval-augmented generation tasks. It also significantly outperforms conventional memory modules in long-horizon interaction tasks like conversational agents, showcasing its potential for next-generation retrieval systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑