HyperMem: Hypergraph Memory for Long-Term Conversations
Authors: Juwei Yue, Chuanrui Hu, Jiawei Sheng, Zuyi Zhou, Wenyuan Zhang, Tingwen Liu, Li Guo, Yafeng Deng
Organizations: Institute of Information Engineering, Chinese Academy of Sciences · School of Cyber Security, University of Chinese Academy of Sciences · EverMind AI
Long-term memory is essential for conversational agents to maintain coherence, track persistent tasks, and provide personalized interactions across extended dialogues. However, existing approaches as Retrieval-Augmented Generation (RAG) and graph-based memory mostly rely on pairwise relations, which can hardly capture high-order associations, i.e., joint dependencies among multiple elements, causing fragmented retrieval. To this end, we propose HyperMem, a hypergraph-based hierarchical memory architecture that explicitly models such associations using hyperedges. Particularly, HyperMem structures memory into three levels: topics, episodes, and facts, and groups related episodes and their facts via hyperedges, unifying scattered content into coherent units. Leveraging this structure, we design a hybrid lexical-semantic index and a coarse-to-fine retrieval strategy, supporting accurate and efficient retrieval of high-order associations. Experiments on the LoCoMo benchmark show that HyperMem achieves state-of-the-art performance with 92.73% LLM-as-a-judge accuracy, demonstrating the effectiveness of HyperMem for long-term conversations.
Figures & tables
Figure 1: Memory structure comparison across Chunk-based RAG, Graph-based RAG, and our HyperMem.
Figure 2: Framework of HyperMem. The indexing detects episode boundaries, aggregates topics via hyperedges, and extracts facts. The retrieval performs coarse-to-fine search from topics to episodes to facts.
Methods
Single-hop
Multi-hop
Temporal
Open Domain
Overall
GraphRAG Edge et al. (2024)
79.55
54.96
50.16
58.33
67.60
LightRAG Guo et al. (2025)
86.68
84.04
60.75
71.88
79.87
HippoRAG 2 Gutiérrez et al. (2025)
86.44
75.89
78.50
66.67
81.62
HyperGraphRAG Luo et al. (2025)
90.61
80.85
85.36
70.83
86.49
OpenAI 1
63.79
42.92
21.71
62.29
52.90
LangMem 2
62.23
47.92
23.43
71.12
58.10
Table 1: Comparison of HyperMem with RAG-based and memory system methods on the LoCoMo benchmark. Evaluation metric is LLM-as-a-judge accuracy (%) scored by GPT-4o-mini. † indicates results obtained using GPT-4.1-mini. Results for RAG-based methods are reproduced using their official implementations. Results for memory systems are primarily sourced from Chhikara et al. (2025) ; Wang and Chen (2025) ; Li et al. (2025b) .
Figure 3: Ablation study across four question categories. FC: Fact context. EC: Episode context. TR: Topic-level retrieval. ER: Episode-level retrieval. The shaded region highlights the full HyperMem configuration.
Figure 4: Hyperparameter sensitivity analysis on LoCoMo. We evaluate the impact of embedding fusion weight α and Top-k selection at each hierarchical level (Topic, Episode, Fact) on retrieval performance.
Figure 5: Token usage vs. accuracy comparison. The x-axis shows relative token usage (Mem0 as 1.0 × baseline), and the y-axis shows LLM-as-a-judge accuracy.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8
Figure 6: Prompt template of episode boundary detection.
Figure 7: Prompt templates of topic aggregation.
Figure 8: Prompt templates of fact extraction.
Figure 9: Single-Hop Task. HyperMem precisely retrieves “dog shelter” while GraphRAG confuses it with “homeless shelter.”
Figure 10: Multi-Hop Task. HyperMem aggregates all 7 tournament mentions across 10 months via Topic hyperedges, while baselines fragment evidence.
Figure 11: Temporal Reasoning Task. HyperMem correctly identifies one pet at the queried time point, while baselines confuse subjects or miscount.
Figure 12: Open Domain Task. HyperMem infers John’s commitment to U.S.-based goals, while HyperGraphRAG incorrectly concludes he would relocate.
Large language models still struggle with reliable long-term conversational memory: simply enlarging context windows or applying naive retrieval often introduces noise and destabilizes responses. We present APEX-MEM, a conversational memory system that combines three key innovations: (1) a property graph which uses domain-agnostic ontology to structure conversations as temporally grounded events in an entity-centric framework, (2) append-only storage that preserves the full temporal evolution of information, and (3) a multi-tool retrieval agent that understands and resolves conflicting or evolving information at query time, producing a compact and contextually relevant memory summary. This retrieval-time resolution preserves the full interaction history while suppressing irrelevant details. APEX-MEM achieves 88.88% accuracy on LOCOMO's Question Answering task and 86.2% on LongMemEval, outperforming state-of-the-art session-aware approaches and demonstrating that structured property graphs enable more temporally coherent long-term conversational reasoning.
Long-term memory enables Large Language Models (LLMs) to maintain coherent and personalized interactions across extended conversations. However, existing memory systems face two key challenges: (1) Information Entanglement, where heterogeneous information is mixed within coarse-grained memory units; and (2) Organizational Mismatch, where memory structures based primarily on semantic similarity may overlook other associations. To address these challenges, we propose ETAMem, a multi-view memory framework that decouples heterogeneous conversational information and aligns memory representations and organization with its distinct characteristics. Specifically, heterogeneous information parsing extracts atomic memory units and identifies affective information. View-specific memory structuring then organizes these units into three complementary hierarchical views: Event, Affect, and Time. ETAMem incrementally maintains memory structures with adaptively calibrated thresholds. For retrieval, entropy-based retrieval allocates query-specific budgets across views and performs hierarchical search within each view. Experiments on LoCoMo and LongMemEval-S demonstrate that ETAMem outperforms state-of-the-art baselines, achieving relative accuracy improvements of 12.46% and 7.96%, respectively, while maintaining competitive token efficiency. Further analyses demonstrate the complementary benefits of different memory views.
Xinying Qian, Ying Zhang, Yu Zhao +3
Nankai University, Tianjin, China · Tiangong University, Tianjin, China · The University of Edinburgh, Edinburgh, United Kingdom
Long-term conversational large language model (LLM) agents require memory systems that can recover relevant evidence from historical interactions without overwhelming the answer stage with irrelevant context. However, existing memory systems, including hierarchical ones, still often rely solely on vector similarity for retrieval. It tends to produce bloated evidence sets: adding many superficially similar dialogue turns yields little additional recall, but lowers retrieval precision, increases answer-stage context cost, and makes retrieved memories harder to inspect and manage. To address this, we propose HiGMem (Hierarchical and LLM-Guided Memory System), a two-level event-turn memory system that allows LLMs to use event summaries as semantic anchors to predict which related turns are worth reading. This allows the model to inspect high-level event summaries first and then focus on a smaller set of potentially useful turns, providing a concise and reliable evidence set through reasoning, while avoiding the retrieval overhead that would be excessively high compared to vector retrieval. On the LoCoMo10 benchmark, HiGMem achieves the best F1 on four of five question categories and improves adversarial F1 from 0.54 to 0.78 over A-Mem, while retrieving an order of magnitude fewer turns. Code is publicly available at https://github.com/ZeroLoss-Lab/HiGMem.
Shuqi Cao, Jingyi He, Fei Tan
East China Normal University, Shanghai, China · Shanghai Jiao Tong University, Shanghai, China