Toward a Theory of Hierarchical Memory for Language Agents

Yashar Talebirad, Ali Parsaee, Csongor Y. Szepesvari, Amirhossein Nadiri, Osmar ZaianeMemAgent @ ICLR 2026 · DOI

TL;DR

This paper proposes a unifying theoretical framework for hierarchical memory systems in language agents, breaking them down into three core operations: extraction, coarsening, and traversal. This framework reveals a crucial "coarsening-traversal coupling" based on the self-sufficiency of memory representations, which dictates optimal retrieval strategies and offers a principled way to compare diverse existing systems.

What Problem Does This Paper Address?

Modern language agents often struggle with long contexts, even with larger context windows. This "context dilution" or "context rot" means models can't effectively utilize vast amounts of information. Hierarchical memory systems have emerged as a popular solution, organizing information at multiple levels of abstraction to improve retrieval efficiency. However, the field lacks a common language to describe and compare these systems, leading to fragmented research and difficulty in understanding design choices. This paper aims to bridge this gap by providing a formal, unifying theory for hierarchical memory.

Methods

The authors introduce a formal decomposition of hierarchical memory into three fundamental operators:

  • Extraction ($\alpha$): This operator maps raw data (text, traces, etc.) into atomic information units, forming an initial graph ($G_0$). This includes preprocessing steps like chunking and entity recognition.
  • Coarsening ($C = (\pi, \rho)$): This operator builds the hierarchy by iteratively grouping atomic units ($\pi$) and assigning a representative to each group ($\rho$). This process creates multi-level representations ($G_1, G_2, \dots, G_L$), where each level is a compressed version of the one below.
  • Traversal ($\tau$): This operator takes a query and a token budget to select relevant atomic units from the hierarchy to form the agent's context.

A key theoretical contribution is the concept of self-sufficiency of the representative function ($\rho$). This measures how much information a representative retains about its group. The paper posits a coarsening-traversal (C-T) coupling: high self-sufficiency allows for "collapsed search" across all levels, while low self-sufficiency necessitates "top-down refinement." This coupling dictates how the coarsening strategy should align with the traversal strategy for optimal performance. The paper also introduces computable proxies for self-sufficiency to enable practical testing.

Datasets

Not discussed in the paper. The paper focuses on a theoretical framework and instantiates it on existing systems rather than introducing new datasets.

Key Insights and Ideas

  • Unifying Framework: The $\alpha, C, \tau$ decomposition provides a powerful lens to understand and compare a wide range of hierarchical memory systems, from document retrieval to agent execution traces.
  • The C-T Coupling: The relationship between the self-sufficiency of memory representations and the traversal strategy is a critical insight. This coupling explains why certain retrieval methods work better with specific types of memory representations.
  • Self-Sufficiency Spectrum: Memory representations exist on a spectrum from highly detailed summaries (high self-sufficiency) to simple labels (low self-sufficiency). This spectrum directly influences how information can be efficiently retrieved.
  • Information Loss is Inevitable: Every coarsening step inherently loses information. The theory formalizes this loss and its implications for retrieval quality.
  • Coherence is Crucial for Traversal: Beyond informative representatives, the grouping strategy ($\pi$) must preserve local relevance geometry. If units within a group are not meaningfully related, top-down traversal can be misled.

Key Results

The paper's primary contribution is theoretical and conceptual, rather than quantitative. It successfully maps eleven existing systems (including RAPTOR, GraphRAG, xMemory, H-MEM, PageIndex, MemoBrain, and StackPlanner) onto the proposed $(\alpha, C, \tau)$ framework, demonstrating its generality. The paper also provides theoretical insights into the Fano bound and branching factor, and discusses how affinity and coherence influence traversal quality.

Limitations and Future Work

  • Static Hierarchy Assumption: The current framework assumes static hierarchies. In reality, hierarchies can evolve through insertion, restructuring, and decay, which breaks the Markov chain assumption and requires more dynamic models.
  • Testing the C-T Coupling: While the paper proposes the C-T coupling, controlled empirical validation across the self-sufficiency spectrum is still needed.
  • Formalizing Coherence Bounds: The paper suggests that the coherence gap ($\gamma_e$) bounds child relevance conditioned on parent relevance, but a formal characterization remains open.
  • Adaptive Information Theory: The authors suggest that formalizing dynamic hierarchies might require adaptive information theory or online learning approaches.
  • Empirical Validation: Future work includes validating the computable self-sufficiency proxies as predictors of retrieval quality and computing information-bottleneck-optimal representatives.

Summary updated

BibTeX
@misc{talebirad2026toward,
  author = {Yashar Talebirad and Ali Parsaee and Csongor Y. Szepesvari and Amirhossein Nadiri and Osmar Zaiane},
  title = {{Toward a Theory of Hierarchical Memory for Language Agents}},
  year = {2026},
  eprint = {2603.21564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.21564},
}
Figure