From Isolated Conversations to Hierarchical Schemas: Dynamic Tree Memory Representation for LLMs
Alireza Rezazadeh, Zichao Li, Wei Wei, Yujia Bao
Abstract
Recent advancements in large language models have significantly improved their context windows, yet challenges in effective long-term memory management remain. We introduce MemTree, an algorithm that leverages a dynamic, treestructured memory representation to optimize the organization, retrieval, and integration of information, akin to human cognitive schemas. MemTree organizes memory hierarchically, with each node encapsulating aggregated textual content, corresponding semantic embeddings, and varying abstraction levels across the tree's depths. Our algorithm dynamically adapts this memory structure by computing and comparing semantic embeddings of new and existing information to enrich the model's context-awareness. This approach allows MemTree to handle complex reasoning and extended interactions more effectively than traditional memory augmentation methods, which often rely on flat lookup tables. Evaluations on benchmarks such as the Multi-Session Chat (MSC) and MultiHop RAG show that MemTree significantly enhances performance in scenarios that demand structured memory management. Figure 1: MemTree (subset) developed on the MultiHop RAG [18]. MemTree updates its structured knowledge when new information arrives, enhancing inference-time reasoning capabilities of LLMs. Related Work Recent large language models (LLMs), such as , PaLM [3], and LLaMA [19], excel in various natural language processing tasks but struggle with long-term memory and retrieving information from past interactions. Researchers have explored leveraging external memory for longrange reasoning in traditional RNNs [20, 16, 10, 12] . Building on these concepts, recent methods aim to augment LLMs with enhanced memory capabilities.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 08f1e83f-d388-42dd-a776-ddd5631d3e5eCited by top-tier papers16
- LightMem: Lightweight and Efficient Memory-Augmented GenerationJizhan Fang, Xinle Deng, Haoming Xu, Ziyan Jiang et al.ICLR 2026 · 162 citations
- CAM: A Constructivist View of Agentic Memory for LLM-Based Reading ComprehensionRui Li, Zeyu Zhang, Xiaohe Bo, Zihang Tian et al.NeurIPS 2025 · 29 citations
- From Single to Multi-Granularity: Toward Long-Term Memory Association and Selection of Conversational AgentsDerong Xu, Yi Wen, Pengyue Jia, Yingyi Zhang et al.ICLR 2026 · 28 citations
- Mem2ActBench: A Benchmark for Evaluating Long-Term Memory Utilization in Task-Oriented Autonomous AgentsYiting Shen, Kun Li, Wei Zhou, Songlin HuACL 2026 · 12 citations
- Explicit v.s. Implicit Memory: Exploring Multi-hop Complex Reasoning Over Personalized InformationZeyu Zhang, Yang Zhang, Haoran Tan, Rui Li et al.KDD 2026 · 11 citations
Builds on5
- Generative Agents: Interactive Simulacra of Human BehaviorJoon Sung Park, Joseph C. O'Brien, Carrie Jun Cai, Meredith Ringel Morris et al.UIST 2023 · 1,882 citations
- RAPTOR: Recursive Abstractive Processing for Tree-Organized RetrievalParth Sarthi, Salman Abdullah, Aditi Tuli, Shubh Khanna et al.ICLR 2024 · 460 citations
- MemoryBank: Enhancing Large Language Models with Long-Term MemoryWanjun Zhong, Lianghong Guo, Qiqi Gao, He Ye et al.AAAI 2024 · 394 citations
- Beyond Goldfish Memory: Long-Term Open-Domain ConversationJing Xu, Arthur Szlam, Jason WestonACL 2022 · 329 citations
- LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu et al.ICML 2024 · 316 citations
Related papers
- MemInsight: Autonomous Memory Augmentation for LLM AgentsRana Salama, Jason Cai, Michelle Yuan, Anna Currey et al.EMNLP 2025 · 1 citation
- M+: Extending MemoryLLM with Scalable Long-Term MemoryYu Wang, Dmitry Krotov, Yuanzhe Hu, Yifan Gao et al.ICML 2025
- MemGraphRAG: Memory-based Multi-Agent System for Graph Retrieval-Augmented GenerationChuanjie Wu, Zhishang Xiang, Yunbo Tang, Zerui Chen et al.KDD 2026 · 1 citation
- LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive MemoryDi Wu, Hongwei Wang, Wenhao Yu, Yuwei Zhang et al.ICLR 2025
- HGMem: Hypergraph-based Working Memory to Improve Multi-step RAG for Long-Context Complex Relational ModelingChulun Zhou, Chunkang Zhang, Guoxin Yu, Fandong Meng et al.ICML 2026 · 4 citations
