HiMem: Hierarchical Long-Term Memory for LLM Long-Horizon Agents

Ningning Zhang, Xingxing Yang, Zhizhong Tan, Weiping Deng, Wenyong Wang
1/10/2026
cs.AI

Official code: jojopdq/HiMem (27 stars, Apache-2.0, last commit 2026-01-10).

Abstract

Although long-term memory systems have made substantial progress in recent years, they still exhibit clear limitations in adaptability, scalability, and self-evolution under continuous interaction settings. Inspired by cognitive theories, we propose HiMem, a hierarchical long-term memory framework for long-horizon dialogues, designed to support memory construction, retrieval, and dynamic updating during sustained interactions. HiMem constructs cognitively consistent Episode Memory via a Topic-Aware Event--Surprise Dual-Channel Segmentation strategy, and builds Note Memory that captures stable knowledge through a multi-stage information extraction pipeline. These two memory types are semantically linked to form a hierarchical structure that bridges concrete interaction events and abstract knowledge, enabling efficient retrieval without sacrificing information fidelity. HiMem supports both hybrid and best-effort retrieval strategies to balance accuracy and efficiency, and incorporates conflict-aware Memory Reconsolidation to revise and supplement stored knowledge based on retrieval feedback. This design enables continual memory self-evolution over long-term use. Experimental results on long-horizon dialogue benchmarks demonstrate that HiMem consistently outperforms representative baselines in accuracy, consistency, and long-term reasoning, while maintaining favorable efficiency. Overall, HiMem provides a principled and scalable design paradigm for building adaptive and self-evolving LLM-based conversational agents. The code is available at https://github.com/jojopdq/HiMem.

View on arXivView PDF

Code Implementations(1)

jojopdq/HiMemOfficial100%
Apache-2.0

A long-term memory for LLMs in multi-turn interactions

272Shell, PythonJun 3, 20259 months agoApache-2.0

Similar Papers

Cite this paper

@article{zhang2026himem,
  title  = {HiMem: Hierarchical Long-Term Memory for LLM Long-Horizon Agents},
  author = {Ningning Zhang and Xingxing Yang and Zhizhong Tan and Weiping Deng and Wenyong Wang},
  year   = {2026},
  eprint = {2601.06377},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.06377v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.06377.svg)](https://codeofpaper.com/paper/2601.06377)

Discussion