TL;DR
NapMem shifts long-term user memory for LLM agents from passive, system-level retrieval to an active, agent-driven navigation process. By organizing user history into a multi-granularity "memory pyramid" and training the agent via reinforcement learning to use memory tools, NapMem enables precise, query-conditioned evidence gathering. This approach achieves state-of-the-art performance on memory-intensive benchmarks while significantly improving storage and inference efficiency.
What Problem Does This Paper Address?
For personalized conversational agents to be effective over long periods, they must maintain a persistent understanding of the user. Traditional memory systems rely on passive retrieval: when a user asks a question, a system-level pipeline (like a vector database) pre-selects context and injects it directly into the prompt.
The authors identify a major flaw in this setup: it treats the LLM as a passive consumer of pre-selected data. If the initial retrieval step fetches incomplete or noisy evidence, the agent has no way to look for more information or verify details, often leading to incorrect answers or hallucinations.
To bridge this gap, the paper introduces active memory navigation, reframing long-term memory as a structured action space that the agent can actively explore using tools.
Methods
The authors introduce NapMem (Navigate over Pyramid Memory), which consists of two main components:
- The Memory Pyramid: User interaction history is structured into four interconnected layers of varying granularity:
- Raw Conversations: The base layer containing message-level logs for exact verification.
- Memory Records: Atomic units categorizing information into facts, events, instructions, and preferences.
- Topic Tracks: Medium-range abstractions that consolidate related records into evolving narrative themes across multiple sessions.
- User Profile: The top layer providing a global, stable summary of user traits.
Crucially, these layers are connected via provenance links, allowing the agent to easily jump between high-level summaries and low-level source text.
- Tool-Based Navigation & RL Training: The agent is equipped with five specific tools (
search_records,search_conversation,get_records,get_conversation, andread_file) to traverse the pyramid.
Instead of relying on hand-crafted heuristics, the agent's navigation policy is optimized using Group Relative Policy Optimization (GRPO). The reward function evaluates final answer correctness, format validity, and efficient tool usage under a strict budget (maximum of 4 tool steps).
Datasets
NapMem was evaluated across six distinct benchmarks:
- Memory-Intensive Tasks:
- LoCoMo: Tests long-term conversational memory and cross-session reasoning.
- PersonaMem-v2: Evaluates implicit user preference and persona understanding.
- LongMemEval: Used as a held-out, out-of-distribution test for long-range recall and knowledge updates.
- Non-Memory Tasks (Generalization):
- GPQA-Diamond: Graduate-level scientific reasoning.
- BFCL-v3: Text-based function calling.
- V*Bench: Visual tool-use question answering.
Key Insights and Ideas
- Active Control Prevents Context Bottlenecks: Giving the agent agency over its memory search allows it to dynamically decide if it needs a broad summary (User Profile) or granular proof (Raw Conversations) based on intermediate evidence.
- Navigation Strategies Scale with Model Size: An analysis of tool behavior revealed that larger models (122B and 397B) naturally prefer starting their search with high-level files (Topic Tracks), whereas smaller models (9B) prefer starting with localized evidence like specific records.
- RL Calibrates Tool Restraint: One of the most striking findings is that reinforcement learning doesn't just teach the agent how to use tools, but also when to stop. On non-memory tasks where user history wasn't needed, the RL-trained model successfully suppressed unnecessary memory calls, dropping accidental tool invocations on GPQA-D from 34.51% down to 6.90%.
Key Results
- State-of-the-Art Performance: The RL-trained NapMem-9B model achieved an average score of 62.74 across the memory benchmarks, outperforming specialized baselines like Mem0 (59.25) and Zep (53.96), as well as its own massive, untrained 397B scaling variant (59.85).
- Generalization to Non-Memory Tasks: NapMem-9B w/ RL maintained or slightly improved the base model's accuracy on general reasoning and tool-use tasks while keeping unnecessary memory calls at zero for tool benchmarks.
- High Efficiency: NapMem proved highly storage-efficient, requiring only 4.83 GiB of total storage across the datasets—less than half of Mem0's footprint (10.44 GiB). Furthermore, because the agent stops searching once it finds sufficient evidence, it generated fewer completion tokens, leading to lower latency.
Limitations and Future Work
Despite its strong performance, the authors note a few limitations:
- Over-generalization Risks: Case studies showed that the agent occasionally over-generalizes isolated event memories into permanent user traits (e.g., assuming a user loves attending salsa dance socials every weekend based on a single successful fundraiser event). Future navigation policies need better calibration for evidence strength.
- Privacy and Forgetting: The current framework does not incorporate mechanisms for privacy constraints or the ability to delete/forget outdated user information.
- Real-World Complexity: The evaluation relies on static benchmarks, which may not fully capture the messy, open-ended nature of real-world human-agent interactions.
Summary updated