acceptodds
Under review as a conference paper at ICLR 2027

DuCoMem: Efficient Long-Term Memory for LLMs through Dual Compression and Local Recovery

Abstract

External memory enables large language models (LLMs) to use long-term interaction histories, but its construction and retrieval costs grow rapidly as histories accumulate. Existing lightweight memory methods, however, compress the memory content to preserve its semantics, overlooking that the details discarded by compression, e.g., names, locations, or temporal cues, are often essential for locating the memory in response to future queries. Meanwhile, graph-based memories rely on the LLMs to construct semantic relations before any query arrives, incurring additional costs. In this paper, we propose DuCoMem, a dual compression memory framework that jointly compresses the memory content and graph structure while preserving on-demand access to the original records. Specifically, we first reveal that the content retention and content retrievability diverge under the compression. The residual addresses are then introduced to store the key details discarded by the compressor, such that the compact memories remain locatable. For graph compression, we first simplify a low-cost candidate graph by removing the redundant nodes and edges, and then use an LLM to check relations only on the smaller graph. During retrieval, DuCoMem starts from a few representative nodes on the compressed graph, reads the nearby original records, and searches further only when the evidence is not enough to answer the question. This design reduces the structure processed during construction and the search space explored during retrieval. Experimental results demonstrate that DuCoMem outperforms the strongest lightweight-memory baseline across model scales, with an average relative improvement of 23.7% in macro F1 across seven answering models on LoCoMo while maintaining a comparable token cost.

Then back it, or bet against it.

Related papers

Open the market on this paper to see 7 more related papers.