TL;DR
AtomMem reframes LLM agent memory management from a set of rigid, hand-crafted rules into a dynamic decision-making problem. By breaking memory workflows down into atomic CRUD (Create, Read, Update, Delete) operations and optimizing them via reinforcement learning (GRPO), the agent autonomously learns how and when to manage its memory based on task demands.
What Problem Does This Paper Address?
As LLM-based agents tackle increasingly complex, long-horizon tasks, effective memory management becomes a critical bottleneck. Most existing systems rely on static, expert-designed workflows—such as fixed exponential forgetting schedules or continuous memory fusion.
The authors argue that these "one-size-fits-all" approaches are too rigid. For instance, a fixed forgetting schedule might prematurely discard early, crucial cues in a long reasoning chain. As shown in Figure 1, a static rule that works perfectly for tracking a user's current goal can completely fail when the task requires remembering the user's initial goal.
To solve this, the paper introduces a flexible, learning-based framework where the model itself decides how to manipulate its memory store depending on the context.
Methods
AtomMem models memory management as a Partially Observable Markov Decision Process (POMDP), treating the internal memory state as a controllable part of the environment.
The core innovation lies in deconstructing high-level memory processes into four fundamental, atomic CRUD operations:
- Create: Inserts new content into a vector database.
- Read: Queries the database to retrieve relevant entries.
- Update: Modifies an existing entry using a unique identifier.
- Delete: Permanently removes an entry to clear space or eliminate redundancy.
Hybrid Memory Retrieval
AtomMem employs a dual-path retrieval mechanism:
- Scratchpad (Deterministic): A short-term memory buffer retrieved at every step to maintain global task state and immediate context.
- Vector Database (Selective): A long-term store accessed via query-based semantic similarity.
Optimization via RL
Instead of relying on complex, hand-crafted intermediate rewards for memory actions, the authors use Group Relative Policy Optimization (GRPO). The agent is trained using only task-level success as a terminal reward. The advantage is uniformly distributed across all tokens in the trajectory, allowing the model to jointly optimize both its task execution and its memory management strategy end-to-end.
Datasets
The authors evaluated AtomMem across two primary types of memory-intensive benchmarks:
- Long-Context QA: Evaluated on HotpotQA, 2WikiMultiHopQA, and Musique. To increase difficulty, these were augmented into "needle-in-a-haystack" style tasks (scaling up to 800 documents/112K tokens) and multi-question settings where the agent must answer multiple independent questions simultaneously.
- Web Benchmarks: Evaluated on GAIA and WebWalkerQA using the Asearcher dataset for training, requiring the agent to interact with external tools like Google Search and a URL reader over up to 40 turns.
Key Insights and Ideas
- The Shift to Active Maintenance: Early in training, the model heavily over-relies on
Readactions, leading to redundant retrievals. As reinforcement learning progresses,Readfrequency drops sharply whileCreate,Update, andDeleteactions steadily increase. The model actively learns to maintain a clean, compact memory store rather than passively hoarding data.
- The "Critical Few" Updates: Ablation studies revealed that while
Updateactions occur at a relatively low frequency compared toCreate, they are vital. DisablingUpdatecaused a massive performance drop, proving that selectively revising existing memories is essential for accurate synthesis as new evidence arrives. - Structural Synergy: Training curves show that neither a scratchpad-only nor a storage-only variant can match the performance of the full AtomMem system. The synergy between short-term tracking (scratchpad) and long-term storage (vector DB) is a structural necessity for complex reasoning.
Key Results
- State-of-the-Art Performance: Under the same Qwen3-8B backbone, AtomMem consistently outperformed prior static-workflow memory methods (like Mem0 and A-Mem) by 3 to 8 percentage points on average across all benchmarks.
- Robust Scalability: When tested on 800 documents—a $4\times$ extension of its 200-document training context—AtomMem maintained its performance lead, demonstrating excellent robustness against information overload and environmental noise.
- High Efficiency: Compared to baselines that serialize multi-LLM calls for memory processing, AtomMem achieved significantly higher processing efficiency, reducing wall-clock time per task (e.g., 97.6 seconds for AtomMem vs. 662.4 seconds for A-Mem).
Limitations and Future Work
Despite its strong performance, AtomMem faces a couple of key limitations:
- Computational Overhead: The RL optimization process is intensive, requiring roughly 2 to 3 days to converge on an 8-GPU cluster. This could become a bottleneck when scaling to even longer horizons.
- Coarse Credit Assignment: Currently, task-level rewards are distributed uniformly across all tokens. The authors note that developing a more precise credit assignment method—one that can measure the exact contribution of an individual memory entry to the final success—remains an open and challenging problem for future research.
Summary updated