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

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Xiaoqiang, Wang, Suyuchen, Zhu, Yun, Liu, Bang
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909505690796032
author Wang, Xiaoqiang
Wang, Suyuchen
Zhu, Yun
Liu, Bang
author_facet Wang, Xiaoqiang
Wang, Suyuchen
Zhu, Yun
Liu, Bang
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15957
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle R$^3$Mem: Bridging Memory Retention and Retrieval via Reversible Compression
Wang, Xiaoqiang
Wang, Suyuchen
Zhu, Yun
Liu, Bang
Computation and Language
Artificial Intelligence
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.
title R$^3$Mem: Bridging Memory Retention and Retrieval via Reversible Compression
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2502.15957