RaMem: Contextual Reinstatement for Long-term Agentic Memory
Abstract
Long-term memory has become increasingly important for LLM agents that operate across extended interactions and evolving task contexts. Recent memory systems have made past experiences more persistent, compact, and retrievable, yet memory availability does not guarantee that the intended past episode remains identifiable. When semantically similar experiences from different episodes are compressed into reusable fragments, content-centric recall can marginalize the contextual distinctions that separate them. We refer to this failure as context collapse: episodically distinct memories become aliased under content-based retrieval, allowing contextually incompatible memories to compete with the intended trace. To address this problem, we propose Contextual Reinstatement for Agentic Memory (RaMem), which restores long-term recall in a joint content–context space. RaMem represents each memory as content bound to the episodic coordinates under which it was observed, and uses cues in the current query to reinstate the contextual coordinates needed to disambiguate recall. Because such cues may be incomplete or uncertain, Conservative Contextual Reinstatement activates contextual constraints only when they can be reliably grounded. RaMem then performs Validity-Constrained Recall, conditioning semantic relevance on compatibility with the reinstated context while retaining content-relevant memories as fallback, and preserves the resulting content–context binding during downstream reasoning. Experiments on long-term memory benchmarks show that RaMem consistently outperforms strong memory baselines, with average F1 gains exceeding 10% across several backbones.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.