SCH: Stratified Context Hunting Framework
- Stratified Context Hunting (SCH) is a formal framework that addresses context-length limitations using hierarchical memory with three operators: extraction, coarsening, and traversal.
- The framework employs quantitative information-theoretic metrics to guide memory hierarchy design and optimize retrieval performance, ensuring minimal information loss.
- SCH subsumes multiple existing architectures by providing prescriptive rules and bounds, such as Fano-derived partition limits, for efficient context selection under resource constraints.
Stratified Context Hunting (SCH) is a formal framework addressing the context-length limitation in long-context and agentic systems through hierarchical memory. SCH decomposes memory organization and retrieval into three key operators—extraction (α), coarsening (C = (π, ρ)), and traversal (τ)—and introduces quantitative information-theoretic principles to guide the design and analysis of memory hierarchies and retrieval strategies. This formalism subsumes a wide spectrum of existing architectures, providing a unified vocabulary and prescriptive theory for optimizing context selection under resource constraints (Talebirad et al., 23 Mar 2026).
1. Core Components: Extraction, Coarsening, and Traversal
Extraction Operator (α)
The extraction operator α transforms raw or semi-structured data (e.g., documents, conversation transcripts, execution traces) into a unit graph . The atomic information units live in a product feature space , with one canonical factor holding textual content . Edge relations may encode syntactic or semantic relations. The extraction function is defined as
where chunking, annotation, or segmentation procedures are encoded within α.
Coarsening Operator ()
Coarsening reduces the granularity of to a smaller graph 0 via:
- Partitioning function 1 surjectively groups units, inducing partitions 2.
- Representative function 3 assigns a summary (representative) to each group in the same feature space. Coarsening decreases the number of information units, thus controlling memory footprint. 4 may implement referential labels, abstractive summaries, or embedding centroids.
Traversal Operator (τ)
Traversal selects a subset 5 of atomic units as context, taking as input the hierarchy 6, a query 7, and a token budget 8:
9
with the constraint 0. Practical traversal strategies include top-down refinement (beam search), collapsed search (ranking across all layers with expansion), multi-view parallel retrieval, and reasoning-based navigation.
2. Self-Sufficiency of Representatives and Coarsening–Traversal Coupling
The quality of a representative 1 for a group 2 is formalized by its self-sufficiency:
3
4 quantifies the fraction of Shannon information preserved by the representative. High self-sufficiency (5) enables retrieval of almost all group information from 6, whereas low self-sufficiency (7) indicates primarily referential summaries.
A query-conditioned variant,
8
captures the proportion of query-relevant information retained.
The coarsening–traversal (C–T) coupling is a rate–distortion relationship: if all group representatives satisfy 9, collapsed search yields at most 0 fraction information loss for any query. For low-SS representatives, only top-down refinement ensures detailed recovery, as collapsed search is insufficient.
Branching factor is additionally bounded via Fano's inequality: the number of partition groups 1 at a coarsened level is limited by the information content of representatives,
2
to achieve routing error at most 3.
3. SCH Algorithmic Instantiation
A worked SCH algorithm illustrates these principles on a document 4 (e.g., 5 tokens, context budget 6):
- Extraction (α): Split 7 into 8-token chunks, 9, 0.
- Hierarchy Construction:
- 1: 2 groups every 3 chunks (paragraph), 4 generates a 2-sentence LLM summary per group, producing 5.
- 6: 7 clusters 8 into 9 topics via UMAP+GMM, 0 generates a single-sentence topic summary per cluster, producing 1.
- Traversal (τ) Decisions:
- If 2 and 3 (measured with LLM-proxy 4), use collapsed search:
- Pool all units from 5, rank by query relevance, expand non-leaf nodes, and select atomic units to fill the token budget.
- If 6 is low (e.g., only domain labels), perform top-down, stepwise refinement.
- If 2 and 3 (measured with LLM-proxy 4), use collapsed search:
4. Comparative Analysis of SCH-Style Systems
The three-operator (α, π, ρ, τ) framework subsumes a broad set of hierarchical memory and retrieval systems. Empirical analysis maps at least eleven architectures, including RAPTOR, xMemory, H-MEM, SimpleMem, GraphRAG, PageIndex, MemoBrain, StackPlanner, AgeMem, InfiAgent, and Om, into this formalism.
Data-memory systems (e.g., RAPTOR, GraphRAG) typically differ in atomic extraction (sentence, entity-pair, episode), grouping schemes (e.g., clustering or structural mapping), representative quality (LLM summary vs. label vs. centroid), and traversal pattern (collapsed vs. refinement). Trace-memory systems (e.g., MemoBrain, StackPlanner) instantiate 7 over execution steps, coarsen by causal or stack structures, and traverse for execution trace reassembly.
| System Domain | Extraction Unit | Coarsening/Representative | Traversal Pattern |
|---|---|---|---|
| Data-memory | sentence, pair, episode | LLM-summary, centroid | collapsed/top-down |
| Trace-memory | execution step | causal/stack rep | refinement |
5. Design Insights and Theoretical Implications
SCH establishes several operational and theoretical principles:
- A unified pipeline: extraction, coarsening, traversal applies across agentic and retrieval-based memory architectures.
- Quantitative metrics (self-sufficiency 8) link representative quality to retrieval performance.
- Prescriptive design rule (C–T coupling): match high-SS representatives to collapsed search and low-SS representatives to incremental, top-down traversal.
- Fano-derived bounds guide partition granularity based on representative informativeness.
- Affinity or coherence in partitioning (9) is necessary for safe pruning during top-down traversal.
6. Limitations, Open Challenges, and Future Directions
Notable limitations of SCH include the assumption of static operators; dynamic, query-conditioned groupings or adaptive refinement of 0 may violate the separability and Markov assumptions intrinsic to the current formalism. The existing framework does not model the feedback between query-conditioned coarsening and traversal. The theoretical bounds for self-sufficiency and routing rely on idealized Shannon information; practical computation of tight proxies for LLM-based 1 remains an active area of research (Talebirad et al., 23 Mar 2026).
A plausible implication is that further advances in adaptive information-theoretic modeling and query-conditioned hierarchy construction may extend the prescriptive power of SCH to dynamic, online, and highly agentic language systems.