---
title: 'SCH: Stratified Context Hunting Framework'
url: https://www.emergentmind.com/topics/stratified-context-hunting-sch
type: topic
---

# SCH: Stratified Context Hunting Framework

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 [2603.21564].

## 1. Core Components: Extraction, Coarsening, and Traversal

### Extraction Operator (α)
The extraction operator α transforms raw or semi-structured data $D \in \mathcal{D}$ (e.g., documents, conversation transcripts, execution traces) into a unit graph $G_0 = (U_0, E_0)$. The atomic information units $U_0$ live in a product feature space $\mathcal{F} = \mathcal{F}_1 \times \cdots \times \mathcal{F}_p$, with one canonical factor $\mathcal{F}_c = \Sigma^*$ holding textual content $\varphi_c(u)$. Edge relations $E_0$ may encode syntactic or semantic relations. The extraction function is defined as
$$
\alpha: \mathcal{D} \rightarrow \mathcal{G}, \qquad \alpha(D) = G_0 = (U_0, E_0)
$$
where chunking, annotation, or segmentation procedures are encoded within α.

### Coarsening Operator ($C = (\pi, \rho)$)
Coarsening reduces the granularity of $G = (U, E)$ to a smaller graph $G' = (U', E')$ via:
- **Partitioning function** $\pi: U \twoheadrightarrow [m]$ surjectively groups units, inducing partitions $G_j = \pi^{-1}(j)$.
- **Representative function** $\rho: 2^U \rightarrow \mathcal{F}$ assigns a summary (representative) to each group in the same feature space.
Coarsening decreases the number of information units, thus controlling memory footprint. $\rho$ may implement referential labels, abstractive summaries, or embedding centroids.

### Traversal Operator (τ)
Traversal selects a subset $S \subseteq V_0$ of atomic units as context, taking as input the hierarchy $\mathcal{H}$, a query $q$, and a token budget $B$:
$$
\tau: (\mathcal{H}, q, B) \rightarrow S \subseteq V_0
$$
with the constraint $\sum_{u \in S} |\varphi_c(u)| \leq B$. 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 $\rho(G_j)$ for a group $G_j$ is formalized by its self-sufficiency:
$$
\operatorname{SS}(\rho, G_j) := \frac{I(G_j; \rho(G_j))}{H(G_j)} = 1 - \frac{H(G_j|\rho(G_j))}{H(G_j)}
$$
$\operatorname{SS} \in [0,1]$ quantifies the fraction of Shannon information preserved by the representative. High self-sufficiency ($\approx 1$) enables retrieval of almost all group information from $\rho(G_j)$, whereas low self-sufficiency ($\approx 0$) indicates primarily referential summaries.

A query-conditioned variant,
$$
\operatorname{SS}_Q(\rho, G_j, q) := \frac{I(q ; \rho(G_j))}{I(q; G_j)},
$$
captures the proportion of query-relevant information retained.

The coarsening–traversal (C–T) coupling is a rate–distortion relationship: if all group representatives satisfy $\operatorname{SS}(\rho, G_j) \geq 1 - \varepsilon$, collapsed search yields at most $\varepsilon$ 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 $m$ at a coarsened level is limited by the information content of representatives,
$$
m \leq 2^{(B + 1)/(1-\varepsilon)},
$$
to achieve routing error at most $\varepsilon$.

## 3. SCH Algorithmic Instantiation

A worked SCH algorithm illustrates these principles on a document $D$ (e.g., $5\,000$ tokens, context budget $B=500$):

1. **Extraction (α):** Split $D$ into $100$-token chunks, $U_0 = \{ u_1, \ldots, u_{50} \}$, $E_0 = \varnothing$.
2. **Hierarchy Construction:**
   - $C_1 = (\pi_1, \rho_1)$: $\pi_1$ groups every $5$ chunks (paragraph), $\rho_1$ generates a 2-sentence LLM summary per group, producing $U_1 = \{ v_1, ..., v_{10} \}$.
   - $C_2 = (\pi_2, \rho_2)$: $\pi_2$ clusters $U_1$ into $2$ topics via UMAP+GMM, $\rho_2$ generates a single-sentence topic summary per cluster, producing $U_2 = \{ w_1, w_2 \}$.
3. **Traversal (τ) Decisions:**
   - If $\operatorname{SS}(\rho_1) \approx 0.9$ and $\operatorname{SS}(\rho_2) \approx 0.85$ (measured with LLM-proxy $\operatorname{SS}_\theta$), use collapsed search:
     - Pool all units from $U_0 \cup U_1 \cup U_2$, rank by query relevance, expand non-leaf nodes, and select atomic units to fill the token budget.
   - If $\operatorname{SS}$ is low (e.g., only domain labels), perform top-down, stepwise refinement.

## 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 $\alpha$ 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 $\operatorname{SS}_\theta$) 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 ($\pi$) 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 $\rho$ 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 $\rho$ remains an active area of research [2603.21564].

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.

Source: https://www.emergentmind.com/topics/stratified-context-hunting-sch