HyperMem: Hypergraph Memory for Long-Term Conversations

Juwei Yue, Chuanrui Hu, Jiawei Sheng, Zuyi Zhou, Wenyuan Zhang, Tingwen Liu, Li Guo, Yafeng DengarXiv 2026

TL;DR

Conversational agents struggle with long-term memory because traditional chunk-based and graph-based retrieval methods rely on pairwise relationships, fragmenting context that spans multiple sessions. HyperMem introduces a hierarchical hypergraph memory architecture (topics, episodes, facts) that leverages hyperedges to capture high-order, multi-element associations. This approach achieves state-of-the-art performance on long-term conversation benchmarks while significantly reducing token overhead.

What Problem Does This Paper Address?

For conversational AI to act as a true long-term companion, it must maintain coherence, track persistent tasks, and remember user context across weeks or months. Standard Retrieval-Augmented Generation (RAG) splits text into isolated chunks, losing the overarching narrative. Traditional Graph-RAG connects entities via pairwise edges (e.g., Entity A connects to Entity B).

However, human conversations involve high-order associations—where multiple episodes and facts are jointly dependent under a single theme. For instance, a user might discuss a marathon training plan across several months, interspersed with work updates. Pairwise graphs fail to capture these holistic, multi-element relationships, leading to fragmented retrieval when an agent tries to piece together a complex narrative scattered across time.

Figure 1: Memory structure comparison across Chunk- based RAG, Graph-based RAG, and our HyperMem.

Methods

HyperMem models long-term memory as a three-level hierarchical hypergraph:

  1. Topic Nodes: Overarching themes spanning long-term interactions.
  2. Episode Nodes: Temporally contiguous dialogue segments centered on a single topic.
  3. Fact Nodes: Atomic, structured assertions extracted from episodes.

Unlike standard graphs, HyperMem uses hyperedges to connect arbitrary sets of nodes (e.g., grouping all related episodes under a topic hyperedge, or all facts under an episode hyperedge).

The framework operates in two main phases:

  • Hypergraph Memory Construction & Indexing: An LLM detects episode boundaries from incoming dialogue streams, aggregates topically related episodes into shared topics, and extracts fine-grained facts. The system builds a dual index: a sparse keyword-based index (BM25) and a dense semantic index. Crucially, it introduces Hypergraph Embedding Propagation—a lightweight mechanism that refines node representations by aggregating embeddings from their incident hyperedges, aligning semantically related but temporally distant memories.
  • Coarse-to-Fine Retrieval: When a user queries the agent, HyperMem performs a top-down search. It first identifies relevant topics, expands to their constituent episodes, and finally selects the most pertinent facts to construct a focused context for response generation.
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.

Datasets

The authors evaluated HyperMem on the LoCoMo benchmark, a dataset specifically designed to evaluate long-term memory capabilities in conversational AI systems. LoCoMo features multi-session dialogues spanning several months and tests models across four question categories:

  • Single-hop: Direct fact retrieval.
  • Multi-hop: Reasoning and evidence aggregation across multiple dialogue turns.
  • Temporal reasoning: Time-sensitive queries requiring cross-session tracking.
  • Open Domain: Open-ended questions requiring broader context understanding.

Key Insights and Ideas

  • Hyperedges Prevent Temporal Fragmentation: In long-term chats, a user might drop a topic and return to it months later. Hyperedges seamlessly bind these scattered episodes under a unified thematic anchor, ensuring complete evidence collection for multi-hop reasoning.
  • Hierarchical Pruning Saves Tokens: Instead of feeding verbose raw transcripts into the LLM prompt, the coarse-to-fine retrieval strategy isolates only the exact atomic facts and concise episode summaries needed, heavily optimizing context window usage.
  • Structural Embedding Propagation Aligns Semantics: By propagating embeddings through the hypergraph structure, nodes that share a common topical context acquire aligned vector representations, boosting retrieval precision even if the user's query uses different wording.

Key Results

  • State-of-the-Art Accuracy: HyperMem achieved an overall 92.73% accuracy (scored via an LLM-as-a-judge framework using GPT-4o-mini), outperforming the strongest RAG baseline (HyperGraphRAG at 86.49%) and the best agent memory baseline (MIRIX at 85.38%).
  • Superb Multi-Hop & Temporal Reasoning: It excelled at complex tasks, hitting 93.62% on multi-hop questions (a 9.58% improvement over LightRAG) and 89.72% on temporal reasoning.
  • High Token Efficiency: HyperMem achieved its peak accuracy using significantly fewer tokens than traditional RAG methods. While GraphRAG and HyperGraphRAG require 25x to 35x more tokens than standard baselines, HyperMem's "Episode + Fact" configuration delivers superior accuracy at just 7.5x token usage.
Ablation study across four question categories.

Limitations and Future Work

  • Single-User Assumption: The current design assumes a single-user interaction. Extending HyperMem to multi-user or multi-agent environments introduces complex challenges regarding access control and memory isolation.
  • The Open Domain Bottleneck: Performance on Open Domain questions (70.83%) lags behind other categories because these queries often require external world knowledge not present in the conversation history. The authors note that integrating external knowledge bases is a promising future direction.

Summary updated

BibTeX
@misc{yue2026hypermem,
  author = {Juwei Yue and Chuanrui Hu and Jiawei Sheng and Zuyi Zhou and Wenyuan Zhang and Tingwen Liu and Li Guo and Yafeng Deng},
  title = {{HyperMem: Hypergraph Memory for Long-Term Conversations}},
  year = {2026},
  eprint = {2604.08256},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2604.08256},
}
Figure