Many recent long-context and agentic systems address context-length limitations by adding hierarchical memory: they extract atomic units from raw data, build multi-level representatives by grouping and compression, and traverse this structure to retrieve content under a token budget. Despite recurring implementations, there is no shared formalism for comparing design choices. We propose a unifying theory in terms of three operators. Extraction ($α$) maps raw data to atomic information units; coarsening ($C = (π, ρ)$) partitions units and assigns a representative to each group; and traversal ($τ$) selects which units to include in context given a query and budget. We identify a self-sufficiency spectrum for the representative function $ρ$ and show how it constrains viable retrieval strategies (a coarsening-traversal coupling). Finally, we instantiate the decomposition on eleven existing systems spanning document hierarchies, conversational memory, and agent execution traces, showcasing its generality.
翻译:近期众多长上下文与智能体系统通过引入分层记忆机制来应对上下文长度限制:它们从原始数据中提取原子单元,通过分组与压缩构建多层表征,并在预算约束下遍历此结构以检索内容。尽管此类实现屡见不鲜,但目前仍缺乏用于比较设计选择的统一形式化框架。本文提出一个基于三种算子的统一理论:提取算子($α$)将原始数据映射为原子信息单元;粗化算子($C = (π, ρ)$)对单元进行划分并为每个分组指派表征;遍历算子($τ$)在给定查询与预算条件下选择需纳入上下文的单元。我们定义了表征函数$ρ$的自足性谱系,并阐明该谱系如何约束可行的检索策略(即粗化-遍历耦合)。最后,我们将该分解框架应用于涵盖文档层次结构、对话记忆与智能体执行轨迹等领域的十一个现有系统,验证了其通用性。