Papers
Topics
Authors
Recent
Search
2000 character limit reached

Temporal Memory Tree (TMT)

Updated 13 January 2026
  • Temporal Memory Tree (TMT) is a hierarchical structure that organizes raw conversation data into progressively abstract representations for efficient memory retrieval.
  • It employs semantic-guided consolidation with LLM-generated summaries and strict temporal containment to maintain coherent dialogue context.
  • Empirical evaluations demonstrate TMT's improved recall accuracy and significant reduction in token usage compared to baseline memory frameworks.

A Temporal Memory Tree (TMT) is a formal structure introduced within the TiMem memory framework to support hierarchical, temporally coherent memory consolidation for long-horizon conversational agents whose interaction histories exceed the finite context window limitations of LLMs. TMTs enable systematic transformation of raw conversational observations into progressively abstracted representations—such as distilled persona-level summaries—while supporting efficient, complexity-aware memory retrieval. The TMT design is characterized by strict formal constraints, semantic-guided consolidation of memories via LLMs without fine-tuning, and algorithmic recall procedures balancing precision and efficiency (Li et al., 6 Jan 2026).

1. Formal Architecture of the Temporal Memory Tree

A TMT is defined as a rooted, level-indexed tree

T=(M,E,τ,σ)\mathcal{T} = (M, E, \tau, \sigma)

with the following components:

  • M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i: a collection of memory nodes partitioned into LL abstraction levels.
  • E⊆M×ME \subseteq M \times M: directed edges (mu,mv)(m_u, m_v), where mum_u is parent to mvm_v and â„“(mu)=â„“(mv)+1\ell(m_u) = \ell(m_v)+1.
  • Ï„:M→R2\tau: M \rightarrow \mathbb{R}^2: assigns a closed time interval Ï„(m)=[tstart(m),tend(m)]\tau(m) = [t_{\text{start}}(m), t_{\text{end}}(m)] to each node, with M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i0 for every M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i1.
  • M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i2: assigns each node a semantic summary (LLM-generated text string) and a fixed-dimensional embedding vector.

The tree satisfies the following constraints:

  1. Temporal Containment: Each parent’s interval contains that of its children.
  2. Progressive Consolidation: The number of nodes per level is non-increasing, i.e., M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i3 for M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i4.
  3. Hierarchy Level Marking: M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i5 for M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i6.

Raw dialogue turns M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i7 with timestamp M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i8 are grouped into base-level segments M=⋃i=1LMiM = \bigcup_{i=1}^{L} M_i9 (e.g., each user–assistant exchange). Corresponding leaf nodes LL0 have LL1 and LL2 produced by segment-level consolidation.

2. Semantic-Guided Memory Consolidation

At the core of TMT's memory abstraction is the semantic-guided consolidation operator at each level LL3: LL4 where:

  • LL5: child memories from level LL6 with intervals within grouping window LL7.
  • LL8: LL9 most recent nodes at level E⊆M×ME \subseteq M \times M0 for contextualization.
  • E⊆M×ME \subseteq M \times M1: human-designed instruction describing the abstraction goal at level E⊆M×ME \subseteq M \times M2 (e.g., factual summary, pattern extraction, persona distillation).

The consolidation process for each E⊆M×ME \subseteq M \times M3 proceeds as:

  1. Gather E⊆M×ME \subseteq M \times M4 and history E⊆M×ME \subseteq M \times M5.
  2. Format an LLM prompt using E⊆M×ME \subseteq M \times M6, passing texts of E⊆M×ME \subseteq M \times M7 and E⊆M×ME \subseteq M \times M8.
  3. The LLM returns a summary E⊆M×ME \subseteq M \times M9 and its encoding (mu,mv)(m_u, m_v)0 (using a fixed encoder such as Qwen3-Embedding).
  4. Create new node (mu,mv)(m_u, m_v)1 at level (mu,mv)(m_u, m_v)2 with (mu,mv)(m_u, m_v)3, (mu,mv)(m_u, m_v)4, and edges linking (mu,mv)(m_u, m_v)5 to all (mu,mv)(m_u, m_v)6.

No further fine-tuning is required beyond the initial LLM and embedding model setups.

3. Complexity-Aware Memory Recall

Memory recall from a TMT is dynamically tailored to query complexity:

  • Query Classification: A recall planner (mu,mv)(m_u, m_v)7 classifies input query (mu,mv)(m_u, m_v)8 with labels (mu,mv)(m_u, m_v)9, where mum_u0 and mum_u1 is a keyword set extracted for retrieval.
  • Leaf Activation: Each leaf node mum_u2 is scored:

mum_u3

with mum_u4 in TiMem. Top-mum_u5 nodes are selected as mum_u6.

  • Hierarchical Propagation: For each leaf mum_u7, ancestors at levels in mum_u8 (as determined by planner-defined retrieval strategy) are gathered into mum_u9. The candidate pool is:

mvm_v0

  • Recall Gating: A filtering function mvm_v1 (implemented as a single LLM call with candidate texts) selects relevant candidates:

mvm_v2

  • Final Ordering: Retained memories are sorted by hierarchy level and recency:

mvm_v3

yielding the final recall set mvm_v4.

4. Core Algorithms and Pseudocode

Key routines are expressed as follows:

â„“(mu)=â„“(mv)+1\ell(m_u) = \ell(m_v)+10

This operational structure performs segment insertion, scheduled hierarchical consolidation, and complexity-aware recall with rigorous temporal alignment.

5. Quantitative Results and Evaluation Methodology

TMT is primarily evaluated within the TiMem framework using datasets and metrics as summarized below.

Dataset Questions Task Categories/Types
LoCoMo 1,540 4
LongMemEval-S 500 6

Evaluation uses:

  • Accuracy (LLJ):

mvm_v5

  • F1/ROUGE-L: Compared at token level between generated and gold answers (on LoCoMo).
  • Recalled Context Length: Average number of tokens recalled per query.
  • Latency: 50th/95th percentiles for end-to-end recall time.

Reported results for TiMem using TMT:

  • LoCoMo: 75.30% ± 0.16 (vs. best baseline 69.24%)
  • LongMemEval-S: 76.88% ± 0.30 (vs. best baseline 68.68%)
  • Context reduction on LoCoMo: 52.2% fewer tokens than baseline on recalled context.

6. Manifold Analysis and Emergent Persona Structure

TMT's progressive memory abstraction yields distinct effects in manifold space, assessed via UMAP and clustering diagnostics. For LoCoMo (10-user, real-data):

  • Silhouette Score: 0.093 (level 1) to 0.574 (level 5), mvm_v6 improvement
  • Intrinsic Dimensionality: mvm_v7 across levels
  • Separation Ratio: mvm_v8

For LongMemEval-S (single persona, synthetic):

  • Spread (variance): Shrinks by 50% from L1 to L5
  • Intrinsic Dimension: mvm_v9
  • Radius95: Contracts by 44%

These observations indicate that, on genuine multi-user data, hierarchical consolidation amplifies user-specific features, resulting in well-separated persona clusters; on synthetic/homogeneous data, the primary effect is noise reduction and template convergence.

7. Significance and Implications

The TMT constitutes a foundational mechanism for temporally contiguous, hierarchically abstracted memory structures in long-horizon conversational agents. The combination of temporal containment, multi-level semantic consolidation, and complexity-aware recall produces improved accuracy and substantial reductions in recalled memory size relative to prior frameworks. This approach treats temporal continuity as an organizing principle, enabling stable personalization and robust scaling beyond the single-context window regime of present-day LLMs (Li et al., 6 Jan 2026). A plausible implication is applicability to broader domains requiring temporally structured, multi-level summary representations, suggesting cross-disciplinary utility in sequence modeling and lifelong learning.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Temporal Memory Tree (TMT).