arXiv AI
Oct 9

REMORY: Learning Residual Memory for Context Compaction

REMORY is a neural memory network that augments a textual summary of an agent’s history with a small set of soft memory tokens. These tokens, conditioned on the summary, enable a frozen large language model to approximate the continuation it would generate using the full history, effectively acting as a residual connection along the sequence dimension. Experiments on SummHay and long‑horizon agent benchmarks show that REMORY improves source attribution, maintains insight coverage, and achieves near full‑context performance while using only 5.2% of the input positions, while also reducing repeated tool outputs and errors on BrowseComp and Terminal‑Bench 2.1.

By Hanchen Xia, Baoyou Chen, Yutang Ge, Naihao Deng, Senqiao Yang, Zilong Dong, Weihao Yuan, Siyu Zhu