ALICE
givesKEY
toBOB
CONTEXT JAMMING / PROPOSED ARCHITECTURE / JULY 2026
A topological memory architecture that stores exact history once and lets reusable structure emerge as shared cells
The KV cache remembers by expansion. CAIRN begins with the opposite move: preserve the sequence as a reversible object, then let repeated reasoning change the shape of the archive around it.
This page explains an original architecture manuscript. It does not report a trained model, hardware prototype, peer-reviewed result, or measured benchmark.
The hidden expansion tax
CONCEPTUAL JOBSee why exact token storage is not the same problem as materializing layer-wise neural state.
A machine cannot losslessly compress every possible sequence below the information in that sequence. For one million tokens drawn from a 131,072-token vocabulary, the packed floor is 17 bits per token—2.125 MB.
The illustrative 80 GB KV figure is not that floor. It is an expansion into layer-specific floating-point projections. The archive has become a brain state.
One bar is visually clipped. At literal scale, the packed-token bar would be roughly 1/37,600 of the KV bar.
Order, causality, and provenance are lost long before size becomes the only issue.
Order collapses
CONCEPTUAL JOBFeel the difference between two sequences that contain the same parts but reverse the roles.
ALICE
givesKEY
toBOB
BOB
givesKEY
toALICE
A commutative sum sees the same names, verb, and object. A fixed recurrent state may retain the distinction, but it must continuously overwrite a finite carrier. Neither representation guarantees an exact source span.
CAIRN keeps the literal path and separately computes an order-sensitive algebraic signature. The signature routes. The ledger proves.
CAIRN therefore separates exact history from the structure used to navigate it.
Store once, structure later
CONCEPTUAL JOBGrasp the four-part memory state and the boundary between exact source and reusable structure.
Exact tokens, grammar rules, source spans
Entities, relations, paths, attached schemas
Local types, restriction maps, contradiction syndromes
Anchors, boundaries, time ranges, path classes
The first component is deliberately unglamorous: an exact, reversible ledger.
Exact history, shared nodes
CONCEPTUAL JOBWatch repeated phrases share nodes while unique material degrades gracefully to packed storage.
A straight-line grammar generates one sequence and nothing else. Repeated right-hand sides share nodes; a root expands back into the original tokens. Random access and substring extraction are known operations on grammar-compressed strings.
The guarantee is modest and crucial: incompressible text may remain linear in the number of tokens. It does not explode into a layer-by-layer floating-point shadow.
IMPLEMENTATION CAVEATReal CAIRN would use the manuscript's complete online parsing, hash-consing, and source-span descriptors. This is a teaching subset with deterministic pairwise parsing.
External basis: Bille et al., “Random Access to Grammar Compressed Strings” ↗
Exact storage preserves the source. It still needs an order-sensitive way to route through it.
Order as algebra, not position
CONCEPTUAL JOBExperience why the same event generators can produce different path signatures when their order changes.
(π=[0 0 1], v=[0 6 4])(π=[2 0 0], v=[0 1 1])IMPLEMENTATION CAVEATThe small event generators are chosen for legibility. The manuscript's finite semidirect-product construction is more general, and exact source verification remains mandatory.
Once paths retain order, repeated compatible paths can become one reusable structural move.
Reasoning becomes topology
CONCEPTUAL JOBSee how verified path families acquire a shared 2-cell and become traversable as one macro-transition.
Four transfer events may differ in person, object, and timestamp while sharing the same typed boundary. CAIRN first keeps them as separate 1-chains. A multi-gate consolidation rule then decides whether their shared pattern deserves a permanent cell.
Attaching the cell does not edit model weights. It changes which paths the memory can traverse as equivalent under explicit conditions.
IMPLEMENTATION CAVEATThe score terms follow the manuscript. The weights and thresholds here are fixed teaching values; an actual system would establish them offline and validate their stability.
A shortcut is useful only if retrieval can respect every condition attached to it.
Retrieval as constraint satisfaction
CONCEPTUAL JOBUnderstand retrieval as finding assignments that agree across a typed query neighborhood.
The query fixes a few anchors—an entity, relation, time range, or requested type. The solver extends those values through a bounded neighborhood. Compatible assignments survive. Contradictions remain visible as nonzero syndromes.
No plausible average is required.
IMPLEMENTATION CAVEATReal neighborhoods would be larger and more richly typed. This finite graph only demonstrates propagation, restriction-map agreement, and explicit nonzero syndrome.
The memory can now answer a query. The forward pass must decide when to ask and when to write.
Local workspace, structural memory
CONCEPTUAL JOBSeparate the short neural workspace from the discrete structural memory operations.
IMPLEMENTATION CAVEATwriter(h, x) is treated as a learned black box. The page reconstructs only the discrete structural operations that follow quantization.
Different operators imply a different machine beside the tensor accelerator.
Hardware that matches the abstraction
CONCEPTUAL JOBSee why sparse integer operators can move query-local pages instead of a full historical KV tensor.
Current frontier, query constraints, hot rewrite cells.
Hash, XOR, permutation, union-find, finite-field peeling.
Compressed adjacency, grammar nodes, immutable provenance.
IMPLEMENTATION CAVEATThe formulas expose the manuscript's scaling claim, not measured hardware. The p99 proxy uses 0.008 ms per fetched 4 KB page plus 0.35 ms fixed cost and must not be read as a benchmark.
The mechanism now has enough shape to compare directly with the four dominant paradigms.
Outside the four paradigms
CONCEPTUAL JOBArticulate the concrete mechanism that separates CAIRN from each familiar answer.
Being different does not make it work. The failure modes are concrete.
What could still break it
CONCEPTUAL JOBTreat the architecture as a research program with fatal engineering risks—not a solved product.
If the discrete writer misses a relation during ingestion, later paraphrased retrieval can fail even while literal recovery remains possible.
RECALL FAILUREBad consolidation can create more structural metadata than the sequence it was meant to organize.
SPACE FAILUREAn ambiguous query can expand a frontier until the output-sensitive advantage disappears.
LATENCY FAILURERepeated misinformation can become an efficient but false rewrite unless provenance and conflict gates hold.
TRUTH FAILUREThe offline type system must remain expressive without quietly becoming an embedding table under another name.
REPRESENTATION FAILUREUnseen information still has to be read once. CAIRN removes full-model prefill, not physics.
INGESTION FAILUREUnseen information still has to be read once. CAIRN removes the full-model prefill tax—not the cost of knowing.
A proposal earns credibility only by naming the tests that could kill it.
What would count as success
CONCEPTUAL JOBJudge exactness, retrieval quality, bandwidth, and tail latency together.
Random incompressible spans must return byte-for-byte source.
A differently worded query must recover the right typed path.
Reversing two transfers must reverse the answer.
Two incompatible sources must remain separate with provenance.
Alice seals the cobalt key in Locker 7.
Bob witnesses the seal and signs the ledger.
Alice gives the cobalt key to Bob.
Bob gives the cobalt key to Chen.
Chen stores the cobalt key in the north vault.
Source A records the vault code as 4312.
A tool log incorrectly claims Bob never held the key.
Source B records the vault code as 9914.
The audit snapshot freezes the trace with both sources intact.
The transfer path is Alice → Bob → Chen; step 5 adds storage location without changing possession.
Spans 3–5 · compatible role bindings · U(transfer path) verifiedIMPLEMENTATION CAVEATThis is a nine-event constructed trace, not a million-token benchmark. It exercises the proposed evaluation axes without measuring model quality.
The proposal ends where a real research program begins: with measurements that can say no.
CONTEXT JAMMING EXTENSION
An agent trace has observations, actions, tool outputs, and contradictions. That makes CAIRN suggestive. Suggestive is not the same as demonstrated.
The Agent Trace Consolidator is the second mode of the stress-test interactive above. Add repeated SEARCH → READ → CITE cycles, then inject a conflicting tool result.
EPISTEMIC LEDGER
The information lower bound, grammar mechanics, finite-group composition, coboundary definition, and pseudocode structure.
The integrated memory tuple, read/write system, consolidation behavior, hardware mapping, performance targets, and experimental program.
The bounded analogy to agent trace consolidation and multi-tool contradiction handling. It is not a result of the manuscript.
WORKING VOCABULARY
A directed acyclic graph whose shared nodes expand into repeated token sequences.
The order-sensitive transformation accumulated while traversing a path.
An operation for which applying A then B can differ from applying B then A.
A structure assembled from vertices, edges, surfaces, and higher-dimensional cells.
A surface attached along a closed boundary of paths; here it records a verified rewrite or reusable schema.
Typed local data plus maps that say how neighboring assignments must agree.
A compatible assignment of values across a region of the sheaf.
An operator measuring disagreement between neighboring local assignments.
A compact signal that one or more compatibility constraints are violated.
A context-free grammar that generates exactly one finite sequence.
Minimum description length: prefer a representation that explains the sequence with fewer encoded bits.
A new structure formed by declaring verified paths equivalent and replacing repeated traversal with a shared cell.
ARGUMENT-TO-SOURCE LEDGER
The primary source is an original technical proposal—not a paper with experimental results. Every diagram below is labeled by what it borrows and what the page invents to make the mechanism visible.
“CAIRN — Cohomological Algebraic Indexing over Rewrite Networks.” Technical proposal manuscript, July 2026. Author of the proposal. Associated with ACRA Insight research program and contextjamming.com.
No DOI or arXiv link exists.Philip Bille, Gad M. Landau, Rajeev Raman, Kunihiko Sadakane, Srinivasa Rao Satti, and Oren Weimann. “Random Access to Grammar Compressed Strings.”
Read the paper ↗Mirko Santello, Nicolas Toni, and Andrea Volterra. “Astrocyte function from information processing to cognition and cognitive impairment.”
Read the review ↗Repeated reasoning becomes a topological quotient. Factual context remains a reversible path.