Towards Root Memories: Benchmarking and Enhancing Implicit Logical Memory Retrieval for Personalized LLMs

Hongxun Ding, Xiang Yu, Chengbing Wang, Jianfei Xiao, Keqin Bao, Wenjie Wang, Xiangnan HearXiv 2026

TL;DR

Existing memory systems for Large Language Models (LLMs) rely heavily on semantic similarity, frequently missing memories that are logically critical but semantically distant from a user's query. To solve this, the authors introduce IMLogic, a benchmark for implicit logical memory retrieval, and RootMem, a framework that distills user histories into structured "root memories" to complement semantic search with personalized decision logic.

What Problem Does This Paper Address?

Personalized LLMs need long-term memory to provide tailored, safe responses. However, current retrieval methods (like vector embeddings) optimize for semantic similarity. This creates a massive vulnerability: they miss memories that share little surface text with the query but are logically vital.

For example, if a user asks for advice on buying an open-top fish tank, a semantic retriever will pull up past conversations about "fish." But it might completely miss a critical note from weeks ago mentioning that the user owns a cat—leading the LLM to recommend a dangerous setup. The authors define this as the "semantic gap" problem, where semantically similar distractors crowd out logically essential constraints.

Figure 1: Illustration of the implicit logical memory retrieval challenge. While semantic retrieval identifies the surface-aligned semantic memory ms, it may overlook the logically critical but semantically distant memory ml due to a semantic gap. To generate a correct and safe personalized response, the model must bridge this gap to retrieve and reason over ml.

Methods

The authors propose RootMem, a plug-and-play framework that operates in two stages:

  1. Root Memory Construction (Offline): Instead of storing raw, fragmented text, an LLM-based extractor ($\Phi_C$) periodically processes new memories into structured units: $U_i = \langle Ri, Ei \rangle$. Here, $R_i$ represents execution rules (the abstract logic governing when this memory matters), and $E_i$ represents personalized logical evidence (the concrete facts backing up the rule).
  2. Root Memory Routing (Online): During inference, an LLM-based router evaluates the user's query against the execution rules ($R_i$) of the root memories. If a rule matches, that unit is activated, and its logic/evidence block is appended to the standard semantically retrieved context ($M_{sem}$).

Datasets

To evaluate this challenge, the authors created IMLogic, the first high-quality benchmark explicitly designed for implicit logical memory retrieval in long-dialogue scenarios.

  • Composition: Built on top of HaluMem, it contains 20 long conversations (averaging 8.3k tokens), over 15,000 memory entries, and 2,216 implicit logic QA pairs.
  • Taxonomy: It categorizes logical associations into seven distinct types (e.g., State Constraints, Identity Shifts, Resource Constraints).
  • Pipeline: The benchmark pipeline uses a collaborative Generator-Judger-Refiner multi-agent loop to ensure queries are highly semantically similar to a distractor memory but logically dependent on a hidden target memory.
Figure 2: Overview of IMLogic construction pipeline.

Key Insights and Ideas

  • The Semantic Trap is Real: Traditional retrieval methods (lexical, dense semantic, and even complex graph-based approaches) perform poorly because they are easily misled by "Preference Traps"—options that blindly pander to the user's explicit query while ignoring hidden constraints.
  • Decoupling Logic from Text Bridges the Gap: By abstracting memories into explicit execution rules, the system can route memories based on applicability conditions rather than text overlap, effectively bypassing the semantic gap.
  • Ablation Highlights Routing Importance: Removing the Root Memory Router causes a significant performance drop (dropping from 55.23% to 50.90% accuracy), proving that selective activation is crucial to prevent irrelevant logical constraints from polluting the context.

Key Results

  • Memory-Level Performance: On the IMLogic multiple-choice task, RootMem achieved 55.23% accuracy, outperforming the strongest hybrid baseline (Query Reconstruction + Rerank) by 27.23% relatively.
  • Conversation-Level Performance: When plugged into existing state-of-the-art memory agents (like MemOS, LightMem, and EverMemOS), RootMem boosted their accuracy by an average of 26.36%, pushing all absolute accuracies above 50%.
  • Manageable Overhead: RootMem achieves these gains with a highly favorable latency profile by shifting the heavy logical modeling to offline consolidation, keeping online routing fast and practical (144.21s retrieval latency vs. 1762.14s for query reconstruction baselines).

Limitations and Future Work

  • Text-Only Modality: IMLogic and RootMem are currently restricted to text-based long dialogues, omitting multimodal memory inputs like images, video, or location data.
  • Offline Efficiency: While online routing is fast, the offline root memory construction process relies on batch LLM calls, which could be further optimized for production scale.
  • Query Diversity: The benchmark primarily focuses on recommendation, advice, and chatting, leaving other complex interaction types and multilingual settings unexplored.

Summary updated

BibTeX
@misc{ding2026towards,
  author = {Hongxun Ding and Xiang Yu and Chengbing Wang and Jianfei Xiao and Keqin Bao and Wenjie Wang and Xiangnan He},
  title = {{Towards Root Memories: Benchmarking and Enhancing Implicit Logical Memory Retrieval for Personalized LLMs}},
  year = {2026},
  eprint = {2606.23283},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.23283},
}
Figure