← All papers
First page of Context Cartography: Toward Structured Governance of Contextual Space in Large Language Model Systems

Context Cartography: Toward Structured Governance of Contextual Space in Large Language Model Systems

Zihua Wu, Georg Gartner

cs.AI Mar 21, 2026 · v1
An appendix formalizes and mechanically verifies five structural properties of the context-zone framework in Lean 4 using Mathlib.
The prevailing approach to improving large language model (LLM) reasoning has centered on expanding context windows, implicitly assuming that more tokens yield better performance. However, empirical evidence - including the "lost in the middle" effect and long-distance relational degradation - demonstrates that contextual space exhibits structural gradients, salience asymmetries, and entropy accumulation under transformer architectures. We introduce Context Cartography, a formal framework for the deliberate governance of contextual space. We define a tripartite zonal model partitioning the informational universe into black fog (unobserved), gray fog (stored memory), and the visible field (active reasoning surface), and formalize seven cartographic operators - reconnaissance, selection, simplification, aggregation, projection, displacement, and layering - as transformations governing information transitions between and within zones. The operators are derived from a systematic coverage analysis of all non-trivial zone transformations and are organized by transformation type (what the operator does) and zone scope (where it applies). We ground the framework in the salience geometry of transformer attention, characterizing cartographic operators as necessary compensations for linear prefix memory, append-only state, and entropy accumulation under expanding context. An analysis of four contemporary systems (Claude Code, Letta, MemOS, and OpenViking) provides interpretive evidence that these operators are converging independently across the industry. We derive testable predictions from the framework - including operator-specific ablation hypotheses - and propose a diagnostic benchmark for empirical validation.

Expanding LLM context windows does not govern how information moves between sensing, memory, and reasoning. Effects such as 'lost in the middle' show that contextual space has positional salience gradients and accumulates entropy. Context engineering lacks a formal spatial model explaining why particular management strategies are needed.

Context Cartography partitions the contextual universe into three zones: black fog (unobserved), gray fog (stored memory), and the visible field (active context). Information moves between zones through four transitions: sense, recall, evict, and expire. Seven operators adapted from cartographic generalization theory are defined: reconnaissance, selection, simplification, aggregation, projection, displacement, and layering. Five structural properties of the framework are formalized and machine-checked in Lean 4 with Mathlib.

Four systems (Claude Code, Letta, MemOS, OpenViking) are scored against a five-criterion rubric, giving post-hoc, interpretive evidence that these operators are being adopted independently across systems. The paper derives testable predictions, including operator-specific ablation hypotheses, and proposes a Context Cartography Diagnostic benchmark.

OperatorClaude CodeLettaMemOSOpenViking
Reconnaissance ρ5111
Selection σ2255
Projection π2555
Layering λ5555
System mean3.002.863.292.71
Operator implementation depth scores (1-5) across systems (excerpt)