@hviana/sema 0.4.7 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +290 -77
- package/HOW_IT_WORKS.md +2170 -735
- package/dist/example/train_base.d.ts +9 -3
- package/dist/example/train_base.js +21 -4
- package/dist/src/canon.d.ts +19 -0
- package/dist/src/canon.js +28 -0
- package/dist/src/geometry.d.ts +52 -0
- package/dist/src/geometry.js +87 -1
- package/dist/src/mind/bridge.js +27 -1
- package/dist/src/mind/frame-filler.d.ts +15 -0
- package/dist/src/mind/frame-filler.js +535 -0
- package/dist/src/mind/learning.js +6 -11
- package/dist/src/mind/mechanisms/cast.js +72 -2
- package/dist/src/mind/mechanisms/cover.js +6 -1
- package/dist/src/mind/mechanisms/extraction.js +27 -0
- package/dist/src/mind/mechanisms/recall.js +214 -34
- package/dist/src/mind/mind.d.ts +49 -1
- package/dist/src/mind/mind.js +137 -10
- package/dist/src/mind/pipeline-mechanism.d.ts +7 -0
- package/dist/src/mind/pipeline.js +29 -1
- package/dist/src/mind/prefix-completion.d.ts +59 -0
- package/dist/src/mind/prefix-completion.js +270 -0
- package/dist/src/mind/primitives.d.ts +29 -10
- package/dist/src/mind/primitives.js +52 -61
- package/dist/src/mind/recognition.js +119 -9
- package/dist/src/mind/traverse.d.ts +32 -0
- package/dist/src/mind/traverse.js +52 -0
- package/dist/src/mind/types.d.ts +55 -16
- package/dist/src/mind/types.js +68 -19
- package/dist/src/store.d.ts +21 -0
- package/dist/src/store.js +21 -0
- package/example/train_base.ts +21 -4
- package/package.json +1 -1
- package/src/canon.ts +28 -0
- package/src/geometry.ts +100 -1
- package/src/mind/bridge.ts +34 -0
- package/src/mind/frame-filler.ts +604 -0
- package/src/mind/learning.ts +5 -9
- package/src/mind/mechanisms/cast.ts +70 -2
- package/src/mind/mechanisms/cover.ts +6 -1
- package/src/mind/mechanisms/extraction.ts +27 -0
- package/src/mind/mechanisms/recall.ts +236 -37
- package/src/mind/mind.ts +154 -14
- package/src/mind/pipeline-mechanism.ts +7 -0
- package/src/mind/pipeline.ts +33 -1
- package/src/mind/prefix-completion.ts +314 -0
- package/src/mind/primitives.ts +59 -70
- package/src/mind/recognition.ts +117 -6
- package/src/mind/traverse.ts +52 -0
- package/src/mind/types.ts +98 -42
- package/src/store.ts +25 -0
- package/test/13-conversation.test.mjs +13 -0
- package/test/57-fusion-order.test.mjs +65 -0
- package/test/66-query-edge-whitespace.test.mjs +99 -0
- package/test/67-climb-anchor-breadth.test.mjs +113 -0
- package/test/68-extraction-unanchored.test.mjs +79 -0
- package/test/69-frame-filler.test.mjs +115 -0
- package/test/70-prefix-completion.test.mjs +170 -0
- package/test/71-embedded-canon-equivalence.test.mjs +121 -0
- package/test/72-prefix-candidate-supply.test.mjs +114 -0
- package/test/73-scaffolding-only-bridge-abstains.test.mjs +178 -0
- package/test/74-prefix-trap-not-sprung-early.test.mjs +114 -0
- package/test/75-multiturn-context-optimisation.test.mjs +1082 -0
package/HOW_IT_WORKS.md
CHANGED
|
@@ -41,6 +41,7 @@ or machine — can follow it from first principles.
|
|
|
41
41
|
- [22. Reasoning: the multi-hop chain](#22-reasoning-the-multi-hop-chain)
|
|
42
42
|
- [23. Fusion: multi-topic answers](#23-fusion-multi-topic-answers)
|
|
43
43
|
- [24. Articulation: answering in the asker's words](#24-articulation-answering-in-the-askers-words)
|
|
44
|
+
- [24.5 Conversations: the accumulated context](#245-conversations-the-accumulated-context)
|
|
44
45
|
- [25. Disambiguation: choosing among alternatives](#25-disambiguation-choosing-among-alternatives)
|
|
45
46
|
- [26. Auditability: provenance and the rationale](#26-auditability-provenance-and-the-rationale)
|
|
46
47
|
- **Part V — The whole algorithm in pseudocode**
|
|
@@ -204,7 +205,7 @@ This has three consequences that Sema uses constantly:
|
|
|
204
205
|
- **Robustness.** Corrupting a few coordinates of a high-dimensional vector
|
|
205
206
|
barely moves it; every comparison degrades gracefully rather than breaking.
|
|
206
207
|
|
|
207
|
-
### 2.3
|
|
208
|
+
### 2.3 Seat binding and why order becomes visible
|
|
208
209
|
|
|
209
210
|
A permutation π rearranges a vector's coordinates: the value at position π(i)
|
|
210
211
|
moves to position i. Two properties make permutations excellent binding
|
|
@@ -217,12 +218,12 @@ operators:
|
|
|
217
218
|
permutation "hides" the vector's identity behind the role.
|
|
218
219
|
|
|
219
220
|
Sema keeps a fixed **keyring** of independent random permutations π₀, π₁, π₂, …
|
|
220
|
-
— one per _seat_ (
|
|
221
|
-
children (c₀, c₁, …, cₖ), each child's vector is bound to its seat and
|
|
222
|
-
results are superposed:
|
|
221
|
+
— one per _seat_ (a positional coordinate inside a group). To encode an ordered
|
|
222
|
+
group of children (c₀, c₁, …, cₖ), each child's vector is bound to its seat and
|
|
223
|
+
the results are superposed:
|
|
223
224
|
|
|
224
225
|
```
|
|
225
|
-
encode(c₀, c₁, …, cₖ) =
|
|
226
|
+
encode(c₀, c₁, …, cₖ) = π_{s(0)}·v(c₀) + π_{s(1)}·v(c₁) + … + π_{s(k)}·v(cₖ)
|
|
226
227
|
```
|
|
227
228
|
|
|
228
229
|
Because the seats are _different_ permutations, "A in seat 0, B in seat 1" and
|
|
@@ -230,9 +231,34 @@ Because the seats are _different_ permutations, "A in seat 0, B in seat 1" and
|
|
|
230
231
|
of the representation**. And because independent permutations do not commute,
|
|
231
232
|
nesting the operation encodes _paths_: "the x that sits in seat 2 of the thing
|
|
232
233
|
in seat 1" has a distinct signature from "the x in seat 1 of the thing in seat
|
|
233
|
-
2". A whole tree can thus be folded
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
2". A whole tree can thus be folded into one fixed-width vector whose geometry
|
|
235
|
+
reflects the tree's entire shape and content. Sema calls the result of this fold
|
|
236
|
+
the tree's **gist**.
|
|
237
|
+
|
|
238
|
+
#### The two-ended coordinate frame
|
|
239
|
+
|
|
240
|
+
The seat assignment `s(k)` is not simply `k`. A group of `size` children is
|
|
241
|
+
anchored at **both ends of the keyring**: the front half of the children take
|
|
242
|
+
the lowest seats (0, 1, …), and the back half take the highest seats, counted
|
|
243
|
+
inward from the keyring's last slot. Formally, with `S` seats on the ring,
|
|
244
|
+
|
|
245
|
+
```
|
|
246
|
+
s(k) = k for k < ⌈size/2⌉ (anchored at the left end)
|
|
247
|
+
s(k) = S − size + k otherwise (anchored at the right end)
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
The assignment stays injective for any `size ≤ S`, so the algebra is unchanged;
|
|
251
|
+
what changes is _robustness_. Under a plain `s(k) = k` frame, prepending one
|
|
252
|
+
byte to a group re-seats every subsequent child and the group's gist rotates
|
|
253
|
+
into a nearly orthogonal direction. Under the two-ended frame, a byte inserted
|
|
254
|
+
at one edge moves only the coordinates anchored at _that_ edge; everything
|
|
255
|
+
anchored at the far end keeps its seat, and the interior of the group keeps its
|
|
256
|
+
geometry. This is the vector-side counterpart of the content-defined boundaries
|
|
257
|
+
of §10.2: one makes _identity_ insensitive to absolute offset, the other makes
|
|
258
|
+
_geometry_ insensitive to edge perturbation.
|
|
259
|
+
|
|
260
|
+
The keyring is sized `max(8, W)` seats, which is also the largest group the fold
|
|
261
|
+
is allowed to build (§10.2).
|
|
236
262
|
|
|
237
263
|
Note that this encoding step is **not** followed by a normalize: unlike the
|
|
238
264
|
classical VSA recipe (which renormalizes after every superposition), Sema's fold
|
|
@@ -309,7 +335,7 @@ alone. Two examples used constantly in Part IV:
|
|
|
309
335
|
span is long — the magnitude correction keeps "near-identical" meaning the
|
|
310
336
|
same absolute thing at every scale.
|
|
311
337
|
- **Recall's last-resort tier** (§21) and the **consensus climb's** per-region
|
|
312
|
-
vote (§17.
|
|
338
|
+
vote (§17.4) both convert a raw resonance score into a _query-relative
|
|
313
339
|
fraction_ — how much of the smaller side the larger side's content actually
|
|
314
340
|
accounts for — using exactly this norm-as-byte-count reading, rather than
|
|
315
341
|
trusting the raw cosine, which conflates "small thing fully inside a big
|
|
@@ -405,6 +431,54 @@ geometric closeness alone is scale-blind, so the decision is made by the bytes:
|
|
|
405
431
|
the two contents must be identical except for **one local span no wider than the
|
|
406
432
|
perception window**. Geometric evidence proposes; bytes dispose.
|
|
407
433
|
|
|
434
|
+
### 3.4 Equivalence classes: canonical resolution
|
|
435
|
+
|
|
436
|
+
Content addressing on raw bytes is exact, and exactness cuts both ways: "What",
|
|
437
|
+
"WHAT" and "what" are three different hashes, so a query that differs from
|
|
438
|
+
the trained form only in _surface_ resolves to nothing even though the content
|
|
439
|
+
is the same. Sema closes this gap without weakening content addressing, by a
|
|
440
|
+
second, explicitly labelled index.
|
|
441
|
+
|
|
442
|
+
A **canonicalizer** is an injected pure function mapping a byte span to the
|
|
443
|
+
canonical representative of its equivalence class. It is **modality-specific and
|
|
444
|
+
always supplied by the caller** — nothing in the store or the mind's core knows
|
|
445
|
+
what "case" or "whitespace" is. The text canonicalizer (the one the text entry
|
|
446
|
+
points inject) applies Unicode NFKC compatibility normalization, case folding,
|
|
447
|
+
and collapses interior whitespace runs to one space, while leaving _edge_
|
|
448
|
+
whitespace, punctuation, digits and word order untouched. A grid or audio
|
|
449
|
+
modality supplies its own, or none.
|
|
450
|
+
|
|
451
|
+
The store keeps a small **canon index** — a map from the 32-bit hash of a
|
|
452
|
+
canonical key to candidate node ids — built (and incrementally refreshed) by a
|
|
453
|
+
batch pass over the store's content-bearing nodes, exactly like index repair.
|
|
454
|
+
Only nodes whose canonical key _differs_ from their raw bytes are indexed; an
|
|
455
|
+
already-canonical form is found by the ordinary exact lookup.
|
|
456
|
+
|
|
457
|
+
Resolution therefore has two tiers, in the system's standing order of exact
|
|
458
|
+
before approximate:
|
|
459
|
+
|
|
460
|
+
1. the exact content-addressed fold-and-lookup (§3.1);
|
|
461
|
+
2. failing that, canonical resolution: canonicalize the span, try the exact
|
|
462
|
+
lookup of the _canonical bytes_, then probe the canon index by key hash.
|
|
463
|
+
|
|
464
|
+
Crucially, canonical keys are equivalence-class **labels, never content**. Every
|
|
465
|
+
candidate the hash proposes is verified by re-canonicalizing its stored bytes
|
|
466
|
+
and comparing, so a hash collision costs one read and never a wrong id — the
|
|
467
|
+
same hash-then-verify discipline the node table's own content hash uses. Among
|
|
468
|
+
verified candidates, one that leads somewhere (bears a continuation edge) is
|
|
469
|
+
preferred, ties breaking to the lowest id — a property of the corpus, not of the
|
|
470
|
+
seed. A verified candidate is then re-folded to the deposit-shaped node that
|
|
471
|
+
actually carries the edges and halos, so canonical resolution lands on the same
|
|
472
|
+
node the exact path would have reached had the query been spelled canonically.
|
|
473
|
+
|
|
474
|
+
Two adjacent conveniences belong to the same modality boundary. The text entry
|
|
475
|
+
point **retries a whole query with its outer edge whitespace trimmed** when the
|
|
476
|
+
first, byte-exact attempt grounds nothing: at the outer edges of a whole input
|
|
477
|
+
there is no neighbouring form for a trimmed span to swallow, so the hazard that
|
|
478
|
+
makes the canonicalizer preserve edge whitespace cannot arise there. The retry
|
|
479
|
+
is on the already-failed path only, so a form deliberately trained _with_ edge
|
|
480
|
+
padding still answers exactly.
|
|
481
|
+
|
|
408
482
|
---
|
|
409
483
|
|
|
410
484
|
## 4. Distributional structure
|
|
@@ -650,9 +724,10 @@ them are explicit:
|
|
|
650
724
|
│ Hilbert linearization (§6.3)
|
|
651
725
|
▼
|
|
652
726
|
PERCEPTION ┌─────────────────────────────────────────┐
|
|
653
|
-
(VSA, §2) │ the
|
|
654
|
-
│
|
|
655
|
-
│
|
|
727
|
+
(VSA, §2) │ the fold: content-defined cuts → flat │
|
|
728
|
+
│ segments → level grouping → tree │
|
|
729
|
+
│ every node gets a GIST (seat-bind + │
|
|
730
|
+
│ superpose; only the ROOT normalizes) │
|
|
656
731
|
└──────────────────┬──────────────────────┘
|
|
657
732
|
│ identical bytes ⇒ identical tree
|
|
658
733
|
▼
|
|
@@ -846,6 +921,44 @@ fan-out-limited decision in the pipeline uses this one bound, so the trade is
|
|
|
846
921
|
made once, consistently, and the cost of inference stays bounded by √N rather
|
|
847
922
|
than growing with the corpus.
|
|
848
923
|
|
|
924
|
+
The bound has two derived companions, both readings of "too common to
|
|
925
|
+
discriminate" that a single node's parent count cannot express:
|
|
926
|
+
|
|
927
|
+
- **The lateral-cone bound — the cumulative dual.** Within one deposit, an
|
|
928
|
+
upward climb is a _chain_ (each node's first parent); every parent _beyond_ a
|
|
929
|
+
node's first is an entry into another containing structure (hash-consing: a
|
|
930
|
+
shared subtree's extra parents are other deposits' chunks). A climb whose
|
|
931
|
+
_accumulated_ lateral entries exceed √N has spread across just as many
|
|
932
|
+
distinct containing structures as a single hub node would have — the same
|
|
933
|
+
commonness, distributed along the cone instead of concentrated at one node —
|
|
934
|
+
and is decided saturated. A deep chain inside _one_ structure accrues no
|
|
935
|
+
laterals, so legitimate deep scaffolding still climbs to its root at any
|
|
936
|
+
depth; what dies is cross-structure drift (profiled on a 17.7M-node store:
|
|
937
|
+
~20K distinct nodes visited per climb family, over 95% of them unique — not
|
|
938
|
+
memoisable — while the context account never decided).
|
|
939
|
+
|
|
940
|
+
- **The byte-atom commonality floor: N·W/256.** A single-byte leaf has no
|
|
941
|
+
structural parents _by construction_ (atoms are never linked into the kid or
|
|
942
|
+
containment tables), so a climb cannot observe its containment at all. Left
|
|
943
|
+
alone, the walk would see only the atom's own edges and report one context —
|
|
944
|
+
turning the most common content in the store into its most discriminative
|
|
945
|
+
voter (observed on a 325K-context store: every recognised single-letter site
|
|
946
|
+
voted a full ln N, and their pooled sum out-voted every genuine anchor). An
|
|
947
|
+
_unmeasurable_ commonality must not default to "maximally rare": it is bounded
|
|
948
|
+
below by the uniform expectation over the alphabet — N contexts, each holding
|
|
949
|
+
at least one segment of up to W of the 256 possible byte values, so an atom is
|
|
950
|
+
contained in ≥ N·W/256 contexts on average. When that floor exceeds √N, the
|
|
951
|
+
atom is a hub at this corpus scale and abstains from voting. Its own edges
|
|
952
|
+
remain fully traversable (exact recall, continuation picks, projections); only
|
|
953
|
+
its say as a consensus voter is withdrawn. Derived from N, W and the alphabet
|
|
954
|
+
size; never tuned.
|
|
955
|
+
|
|
956
|
+
A third device bounds work without bounding evidence: a **transparent chain** —
|
|
957
|
+
a run of nodes each with exactly one structural parent and no edges in or out —
|
|
958
|
+
contributes no root, no context and no lateral entry, so the whole run to its
|
|
959
|
+
first non-transparent ancestor is skipped in one bounded store read instead of
|
|
960
|
+
three probes per node.
|
|
961
|
+
|
|
849
962
|
### 8.9 The cost ladder: the one currency of every decision
|
|
850
963
|
|
|
851
964
|
The deduction system's rule costs form the **single cost currency of the whole
|
|
@@ -909,7 +1022,7 @@ discriminates — it is an entity, a filler, a name. Content reaching a corpus
|
|
|
909
1022
|
nothing anywhere. This is the half-dominance convention of §8.7, applied to the
|
|
910
1023
|
entire store.
|
|
911
1024
|
|
|
912
|
-
The climb's IDF weighting (§17.
|
|
1025
|
+
The climb's IDF weighting (§17.4), confluence's filler/scaffolding gate (§18.5),
|
|
913
1026
|
and every decision of the form "is this node a hub?" use corpus-global
|
|
914
1027
|
commonality. The halo index (§4, §12.2) is also corpus-global: a node's
|
|
915
1028
|
distributional signature is the superposition of ALL episodes it took part in,
|
|
@@ -1005,20 +1118,34 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1005
1118
|
|
|
1006
1119
|
- **Gist** — the VSA fold of a span's content; content similarity in one dot
|
|
1007
1120
|
product (§2.3).
|
|
1008
|
-
- **Seat / keyring** — the fixed random permutations that bind
|
|
1009
|
-
into a fold (
|
|
1121
|
+
- **Seat / keyring** — the fixed random permutations that bind positional
|
|
1122
|
+
coordinate into a fold; assigned in the **two-ended coordinate frame** (front
|
|
1123
|
+
children anchored at the ring's low seats, back children at its high seats) so
|
|
1124
|
+
an edge insertion re-seats only that edge (§2.3).
|
|
1010
1125
|
- **Alphabet** — the 256 deterministic byte vectors with graded similarity
|
|
1011
1126
|
(§2.4).
|
|
1012
|
-
- **
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1127
|
+
- **Content boundary / cut level** — where a stream segments, chosen by a
|
|
1128
|
+
bounded-window rolling hash over the bytes rather than by absolute offset; the
|
|
1129
|
+
same hash's divisibility gives each cut a LEVEL, and level-L cuts nest inside
|
|
1130
|
+
level-(L−1) cuts, which is what makes every node at every scale
|
|
1131
|
+
content-delimited (§10.2, §10.3).
|
|
1132
|
+
- **Segment** — the phrase-scale flat unit between two level-0 cuts; folds as
|
|
1133
|
+
ONE node with two-ended seats (§10.3).
|
|
1134
|
+
- **The fold** — segments folded flat, then grouped upward by cut level until
|
|
1135
|
+
one root remains (§10.3). **Linear**: only the fold's root is normalized, so
|
|
1136
|
+
every interior gist keeps a byte-proportional magnitude — the basis of
|
|
1137
|
+
angle-and-magnitude semantics (§2.6).
|
|
1138
|
+
- **Incremental fold** — a stream extending an already-folded one reuses every
|
|
1139
|
+
segment left of the new bytes (cuts are stable under append; a segment is a
|
|
1140
|
+
pure function of its own bytes), so growth costs O(new bytes) (§10.4).
|
|
1016
1141
|
- **Magnitude / contentLen** — the byte-proportional length an unnormalized
|
|
1017
1142
|
interior gist carries (norm ≈ √len); read back from the store as a span's
|
|
1018
1143
|
content length and used to convert a raw cosine into a query-relative or
|
|
1019
|
-
scale-aware fraction (§2.6, §8.1, §17.
|
|
1020
|
-
- **Stable prefix** —
|
|
1021
|
-
so
|
|
1144
|
+
scale-aware fraction (§2.6, §8.1, §17.4, §21).
|
|
1145
|
+
- **Stable prefix** — a caller-imposed (or store-detected) boundary set at which
|
|
1146
|
+
the fold splits and joins left-nested, so every cumulative prefix reappears as
|
|
1147
|
+
the same node inside the grown stream. Distinct from incremental reuse, which
|
|
1148
|
+
imposes nothing (§10.4).
|
|
1022
1149
|
|
|
1023
1150
|
**Memory**
|
|
1024
1151
|
|
|
@@ -1031,6 +1158,15 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1031
1158
|
share one node (§11).
|
|
1032
1159
|
- **Near-dedup** — merging a fresh root onto a geometrically identical,
|
|
1033
1160
|
byte-verified stored root (§11.2).
|
|
1161
|
+
- **Canonicalizer / canon index** — an injected, modality-specific map from a
|
|
1162
|
+
span to its equivalence class's representative, plus the store's hash index
|
|
1163
|
+
from canonical keys to node ids. The read-path fallback when exact
|
|
1164
|
+
content-addressed resolution misses; every candidate is verified by
|
|
1165
|
+
re-canonicalizing its bytes, so a collision costs a read, never a wrong id
|
|
1166
|
+
(§3.4).
|
|
1167
|
+
- **Suffix propagation** — every established right-edge suffix of a learned
|
|
1168
|
+
context inherits that context's continuation edge, so a fact stays reachable
|
|
1169
|
+
when it arrives with a different amount of history in front of it (§12.1).
|
|
1034
1170
|
- **Containment edge** — a durable "this window of bytes occurs inside that
|
|
1035
1171
|
chunk" record for sub-spans that are not structural children (§11.3).
|
|
1036
1172
|
- **Transparent chain (chainRun)** — a run of nodes each with exactly one
|
|
@@ -1057,7 +1193,7 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1057
1193
|
accepted (grid fragments of one whole legitimately overlap inside it), with a
|
|
1058
1194
|
strict-super-form requirement (holding both must be more than restating either
|
|
1059
1195
|
side). The bridge's Tier 1 connector search (§19.5) and cross-region
|
|
1060
|
-
attention's joint-context recovery (§17.
|
|
1196
|
+
attention's joint-context recovery (§17.8) ascend by the same shared, bounded,
|
|
1061
1197
|
cached walk. A per-response walk cache memoises every identity read across all
|
|
1062
1198
|
walks of one response, and junction seeds are computed once per candidate and
|
|
1063
1199
|
reused across all its pairs. Synonym junctions extend the ascent to halo
|
|
@@ -1079,7 +1215,10 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1079
1215
|
`hubBound` (≥ 2, the numerical cap passed to the store's LIMITed reads) and
|
|
1080
1216
|
`hubCap` (the list-side reading). Every fan-out walk and disambiguation uses
|
|
1081
1217
|
one of them; the store enforces the cap at read time so no per-query cost
|
|
1082
|
-
grows with the corpus.
|
|
1218
|
+
grows with the corpus. Its two derived companions are the **lateral-cone
|
|
1219
|
+
bound** (the same √N applied to a climb's accumulated cross-structure entries)
|
|
1220
|
+
and the **byte-atom commonality floor** N·W/256 (the honest stand-in for a
|
|
1221
|
+
containment an atom's structure cannot express) (§8.8).
|
|
1083
1222
|
- **Estimator noise floor** — 1/√D, one standard deviation of chance cosine
|
|
1084
1223
|
between random vectors. The smallest difference distinguishable from RaBitQ
|
|
1085
1224
|
quantisation error (§8.4). The consensus climb gates a region's vote on its
|
|
@@ -1101,13 +1240,15 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1101
1240
|
Defined once; every consumer of the corpus scale reads it. (§8.8, §17)
|
|
1102
1241
|
- **Expand-until-decided** — the climb's work is bounded by stopping the moment
|
|
1103
1242
|
the answer (saturated vs. voted) is known, through LIMITed store reads only
|
|
1104
|
-
(§17.
|
|
1105
|
-
proof of saturation past it.
|
|
1243
|
+
(§17.5). The walk is exact below √N distinct contexts and stops at the first
|
|
1244
|
+
proof of saturation past it. Five such proofs exist, each recorded by name in
|
|
1245
|
+
the trace: predecessor fan-in, distinct-context limit, parent fan-out, the
|
|
1246
|
+
lateral-cone limit, and byte-atom commonality (§8.8, §17.5).
|
|
1106
1247
|
- **Canonical contract** — the write/read convention for the store's
|
|
1107
1248
|
segmentation: the write side interns W−1 and W sliding windows and a
|
|
1108
1249
|
whole-stream flat branch; the read side chains leaf ids up to W² positions and
|
|
1109
1250
|
probes every prefix as a flat branch. Defined in one module; a drift between
|
|
1110
|
-
the sides silently breaks recognition. (§10.
|
|
1251
|
+
the sides silently breaks recognition. (§10.4, §11.3, §15.2)
|
|
1111
1252
|
- **Window IDs** — the canonical content-addressed identity of every W-sized
|
|
1112
1253
|
slice of a byte stream, offset → node id. Under this mapping, any content two
|
|
1113
1254
|
deposits share IS the same node (hash-consing paid the comparison at write
|
|
@@ -1119,10 +1260,23 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1119
1260
|
corpus minority of contexts discriminates (an entity, a filler); content
|
|
1120
1261
|
reaching a majority is frame scaffolding. (§18.3, §18.5)
|
|
1121
1262
|
- **Recognition** — decomposing a query into every stored form it contains, by
|
|
1122
|
-
structural and canonical readings (§15).
|
|
1123
|
-
|
|
1263
|
+
structural and canonical readings plus a query-edge pass (§15). Memoised by
|
|
1264
|
+
content and ALWAYS consulted, even under trace: the subtree-resolution cache
|
|
1265
|
+
makes a repeat call find FEWER sites, so the memo is a correctness contract,
|
|
1266
|
+
not an accelerator (§15.4).
|
|
1267
|
+
- **Site** — one recognised form: a query span plus the node it names. Admitted
|
|
1268
|
+
only if it leads somewhere, spans at least one perception window, and (for a
|
|
1269
|
+
byte atom) atoms still discriminate at this corpus scale (§15.3).
|
|
1270
|
+
- **Split / starts** — a form boundary falling inside a perceived leaf (the
|
|
1271
|
+
cover may cut there), and the offsets the query's own fold cut at (§15).
|
|
1124
1272
|
- **Cover** — the lightest-derivation goal: the query covered left to right by
|
|
1125
1273
|
recognised completions and carried literals (§19).
|
|
1274
|
+
- **Stop-here** — the cover's option to abandon an edge chain mid-way and emit
|
|
1275
|
+
the node as it stands, priced at CONCEPT above the chain's cost, so a shorter
|
|
1276
|
+
premature stop beats a longer one and a genuine fixpoint beats both (§19.3).
|
|
1277
|
+
- **Atom-chain gate** — a pure leaf-leaf FUSE is admitted only below the
|
|
1278
|
+
atom-hub scale; the fold-boundary exemption it replaced carried zero content
|
|
1279
|
+
information and once grounded a greeting as a fact (§19.3).
|
|
1126
1280
|
- **Fuse / recompose** — the search's discovery that adjacent fragments spell a
|
|
1127
1281
|
deeper learned form (§19.4).
|
|
1128
1282
|
- **Connector (bridge)** — learned material that belongs _between_ two spans,
|
|
@@ -1131,7 +1285,7 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1131
1285
|
carrying the glue), then Tier 2.5 synonym junctions (the same ascent over halo
|
|
1132
1286
|
siblings), then resonance as last resort; disambiguated by the response guide,
|
|
1133
1287
|
with the shortest interior preferred. The junction ascent is shared with
|
|
1134
|
-
cross-region attention (§19.5, §17.
|
|
1288
|
+
cross-region attention (§19.5, §17.8).
|
|
1135
1289
|
- **Concept hop** — borrowing a distributional sibling's continuation via
|
|
1136
1290
|
`haloSiblings` (the unified halo-sibling enumeration) and `guidedFirst` (the
|
|
1137
1291
|
guided-or-first convention for edge picks) (§19.3).
|
|
@@ -1142,13 +1296,23 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1142
1296
|
machinery, recursively, to let composites resolve deeper (§19.6).
|
|
1143
1297
|
- **Consensus climb / point of attention** — regions of the query vote, through
|
|
1144
1298
|
the DAG's parents, for the learned contexts they belong to. Regions come from
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
topics (§17).
|
|
1299
|
+
THREE sources: fold nodes, recognised sites (content-addressed nodes carrying
|
|
1300
|
+
their own identity — exact anchors that skip the ANN step), and coalesced
|
|
1301
|
+
resolvable windows recovering forms the query's own content cut split (marked
|
|
1302
|
+
_corroborating_: evidence for someone else's anchor, never a topic of their
|
|
1303
|
+
own). Pooled votes select the query's independent topics (§17).
|
|
1150
1304
|
- **Saturation** — a region whose upward climb hits hub fan-out abstains rather
|
|
1151
|
-
than voting noise (§17.
|
|
1305
|
+
than voting noise (§17.5).
|
|
1306
|
+
- **Peak / breadth / clusters** — the three read-outs beside an anchor's pooled
|
|
1307
|
+
vote: what its strongest single region said alone (the bar a consensus-floor
|
|
1308
|
+
consumer must read), the scale-invariant fraction of the query's own regions
|
|
1309
|
+
that corroborated it, and how many separate PLACES in the query did — the
|
|
1310
|
+
dispersion test that separates a genuine further topic from a strong
|
|
1311
|
+
coincidental echo (§17.6).
|
|
1312
|
+
- **Window coverage** — the fraction of a region's W-windows that are
|
|
1313
|
+
content-addressed; it SCALES the contrastive-margin bar rather than switching
|
|
1314
|
+
it, so grouping churn is not taxed as uncertainty and a 20%-attested region
|
|
1315
|
+
does not get a fully-attested one's exemption (§17.3).
|
|
1152
1316
|
- **Cross-region attention** — direct region-to-region interaction: two regions
|
|
1153
1317
|
that independently voted (at least one strongly) pair to recover their joint
|
|
1154
1318
|
context — the learnt whole containing both — by the same order-free junction
|
|
@@ -1167,14 +1331,31 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1167
1331
|
whose joined occurrence is itself a substring of the query is rejected —
|
|
1168
1332
|
binding is only evidence when the query mentions the forms apart. Consumed
|
|
1169
1333
|
candidates never re-pair. A joint container is exact evidence, voting at full
|
|
1170
|
-
strength.
|
|
1171
|
-
|
|
1334
|
+
strength. The ladder has FIVE tiers — exact containers, single synonym, double
|
|
1335
|
+
synonym, then structural resonance (a synthetic gist composed from the two
|
|
1336
|
+
sides' own vectors, the one tier with no byte containment behind it, gated on
|
|
1337
|
+
both sides being exact AND individually discriminative, plus a self-evidence
|
|
1338
|
+
and a contrastive-margin check). Two asymmetries follow: only EXACT evidence
|
|
1339
|
+
may explain ordinary votes away, and only container-backed evidence may
|
|
1340
|
+
consume its endpoints. Additive pooling alone cannot surface a context zero
|
|
1341
|
+
regions individually voted for; cross-region evidence fills that gap (§17.8).
|
|
1172
1342
|
- **CAST (counterfactual transfer)** — substitution / redirection / comparison
|
|
1173
1343
|
between independently learned structures the query weaves together. Alignment
|
|
1174
|
-
is **graded** (literal W-grams → halo-matched sites
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1344
|
+
is **graded** (literal W-grams → halo-matched sites → the climb's own
|
|
1345
|
+
proposal, gated on literal dominance and non-frame); the weave is capped at
|
|
1346
|
+
query scale, aligned over the ASKER's stream only, and deduplicated by "one
|
|
1347
|
+
place, one structure". Frame gates are **derived** (`MIN_WEAVE` from the weave
|
|
1348
|
+
minimum, `dominates` from half-dominance) and **weave-local** (majority of
|
|
1349
|
+
_aligned_ structures, not corpus-global IDF). (§18)
|
|
1350
|
+
- **Two-topic gate** — CAST's own single-vs-multi test, measured from the query
|
|
1351
|
+
rather than from how many points survived elimination: a second point must
|
|
1352
|
+
contribute a quantum of query bytes the widest point does not, OR the climb
|
|
1353
|
+
must report the query dispersed with the points elected a quantum apart and a
|
|
1354
|
+
quantum still unexplained (§18.3).
|
|
1355
|
+
- **Ignored-known principle** — a mechanism standing on its weakest licence must
|
|
1356
|
+
account for every STORED window of the query; leaving the query's own trained
|
|
1357
|
+
content in its gaps is the byte-structural signature of a scrap match. Guards
|
|
1358
|
+
CAST's frame-tier comparison and the bridge (§18.4, §19.5).
|
|
1178
1359
|
- **Confluence join** — the meet of independent constraint streams by
|
|
1179
1360
|
content-addressed identity: window IDs present in both anchors and absent from
|
|
1180
1361
|
the query name the entity satisfying all constraints at once. Answers
|
|
@@ -1182,11 +1363,26 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1182
1363
|
resolve. (§18.5)
|
|
1183
1364
|
- **Skill / exemplar** — a learned fact shaped "answer-is-a-span-of-context",
|
|
1184
1365
|
reusable as an extraction template on unseen text (§20).
|
|
1185
|
-
- **Recall tiers** — the graded fallback for whole-query resonance
|
|
1186
|
-
self-match
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1366
|
+
- **Recall tiers** — the graded fallback for whole-query resonance: exact
|
|
1367
|
+
self-match, argument binding, clean resonance, scaffolding-dominated
|
|
1368
|
+
consensus, the nearest grounded hit, then the three REFUSAL-PATH tiers
|
|
1369
|
+
(substitution bridge, prefix completion, frame-filler substitution), then echo
|
|
1370
|
+
or silence. Each reports _what it matched_ (`accounted`), its _moves_, and
|
|
1371
|
+
`unexplained`, so the decider compares it against every other mechanism in the
|
|
1372
|
+
same currency. (§21)
|
|
1373
|
+
- **Substitution bridge** — refusal-path grounding through corroborated
|
|
1374
|
+
substitutions: align the query byte-for-byte against a trained context and
|
|
1375
|
+
accept a mismatch only under corroboration, graded identity, and RAW BALANCE
|
|
1376
|
+
(the pre-expansion mismatch must be length-balanced). Its zero-substitution
|
|
1377
|
+
reading is the IDENTITY bridge, which is `complete` (§21.5).
|
|
1378
|
+
- **Prefix completion** — the query is a proper byte PREFIX of exactly one
|
|
1379
|
+
trained form, which is then voiced whole. Guarded by unreadable-continuation
|
|
1380
|
+
veto, a sub-quantum floor, and uniqueness on the continuation BYTES. Repairs a
|
|
1381
|
+
retrievability gap no k can close (§21.5).
|
|
1382
|
+
- **Frame-filler substitution** — INVENT A LOOKUP KEY, NEVER AN ANSWER: put a
|
|
1383
|
+
candidate filler where a definite description stands and require the store to
|
|
1384
|
+
already hold that key byte-exactly. Constituency is read relationally, from
|
|
1385
|
+
what a cohort of exemplars does NOT share (§21.5).
|
|
1190
1386
|
- **Accounted spans** — the query byte ranges a mechanism's own structural
|
|
1191
1387
|
evidence explains (aligned runs, located frames, voted regions, constraint
|
|
1192
1388
|
content). Query bytes outside them are priced at PASS each — the same rate the
|
|
@@ -1211,7 +1407,7 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1211
1407
|
(majority of contexts, across the store). The two quantities are formally
|
|
1212
1408
|
independent — a phrase common to 2 of 3 aligned exemplars but rare in the
|
|
1213
1409
|
corpus IS frame for CAST's purposes; substituting global IDF misfires on
|
|
1214
|
-
reordered single-fact queries. (§18.
|
|
1410
|
+
reordered single-fact queries. (§18.3)
|
|
1215
1411
|
- **Free-will architecture** — the grounding decider as a market: mechanisms are
|
|
1216
1412
|
decoupled (zero cross-imports), self-gating (binary structural preconditions),
|
|
1217
1413
|
budget-capped (√N, k, LIMITed reads), and evidence-carrying (`accounted`,
|
|
@@ -1224,11 +1420,22 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1224
1420
|
self-gating mechanism yields a candidate answer weighed in the one cost
|
|
1225
1421
|
ladder, and the lightest grounding derivation wins. Moves (STEP per
|
|
1226
1422
|
projection, CONCEPT per halo-mediated act) discriminate residually; PASS per
|
|
1227
|
-
unexplained byte dominates.
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
a mechanism whose floor
|
|
1231
|
-
|
|
1423
|
+
unexplained byte dominates. Grade ties prefer the candidate carrying fewer
|
|
1424
|
+
scaffolding bytes into its answer, then the mechanism list's order (cover,
|
|
1425
|
+
CAST, confluence, extract, recall). The decider uses admissible-floor pruning
|
|
1426
|
+
(a mechanism whose best-case floor cannot beat the incumbent is never run) —
|
|
1427
|
+
and a mechanism whose floor itself needs expensive precomputation to refine
|
|
1428
|
+
checks the SAME incumbent before paying for it (§14.1, §14.2).
|
|
1429
|
+
- **Scaffolding count** — answer bytes a candidate lifted from spans nothing
|
|
1430
|
+
recognised: the asker's own words carried through rather than derived.
|
|
1431
|
+
Reported, never priced — the ladder prices what is left _unaccounted_, and
|
|
1432
|
+
this orders candidates that tie on exactly that (§14.1).
|
|
1433
|
+
- **Complete** — a mechanism's declaration that its result is a stored form's
|
|
1434
|
+
own continuation reached through an identity claim about the query, so
|
|
1435
|
+
post-grounding must not extend it (§14.1, §22).
|
|
1436
|
+
- **Remainder** — the query bytes touched by neither the winning candidate's
|
|
1437
|
+
accounted spans nor any computed span; fusion fires only on a remainder of at
|
|
1438
|
+
least one perception quantum W (§14.1, §23).
|
|
1232
1439
|
- **Pivot** — the longest unconsumed learned context contained in the current
|
|
1233
1440
|
answer; the stepping stone of multi-hop reasoning (§22).
|
|
1234
1441
|
- **Fusion** — grounding each independent point of attention and joining the
|
|
@@ -1236,11 +1443,19 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1236
1443
|
- **Articulation** — re-voicing the answer in the asker's own words via halo
|
|
1237
1444
|
siblings (§24).
|
|
1238
1445
|
- **Echo** — the last-resort output that returns a stored form verbatim,
|
|
1239
|
-
explicitly flagged as not grounded (§21.
|
|
1446
|
+
explicitly flagged as not grounded (§21.6, §26).
|
|
1240
1447
|
- **Provenance** — which grounding mechanism produced the answer; part of every
|
|
1241
1448
|
response (§26).
|
|
1242
1449
|
- **Rationale** — the replayable trace of every rule application behind an
|
|
1243
1450
|
answer (§26).
|
|
1451
|
+
- **Meter / cost report** — the optional per-response accounting of the WORK an
|
|
1452
|
+
inference call performed, by layer and by nested phase. The profiling
|
|
1453
|
+
counterpart of the rationale: deterministic counters (diffable between runs),
|
|
1454
|
+
non-deterministic times, never read by inference (§26).
|
|
1455
|
+
- **Conversation** — an accumulated context (the full exchange as one byte
|
|
1456
|
+
stream) plus turn-boundary offsets and answered spans. Turns append raw bytes;
|
|
1457
|
+
the fold advances incrementally; the weave aligns only the asker's stream
|
|
1458
|
+
(§24.5).
|
|
1244
1459
|
|
|
1245
1460
|
**Computation**
|
|
1246
1461
|
|
|
@@ -1251,11 +1466,13 @@ the vocabulary the rest of the document (and the codebase) speaks.
|
|
|
1251
1466
|
pipeline never special-cases any mechanism by name or kind (§14.1, §16).
|
|
1252
1467
|
- **Precomputed** — the shared, response-scoped container every mechanism's
|
|
1253
1468
|
`floor`/`run` (and the post-grounding stages) receive: eager fields
|
|
1254
|
-
(recognition, computed spans, guide
|
|
1255
|
-
expensive structural analyses (the consensus
|
|
1256
|
-
span-shape classification, the identity-window
|
|
1257
|
-
|
|
1258
|
-
|
|
1469
|
+
(recognition, computed spans, guide, the evidence-breadth constant k) plus
|
|
1470
|
+
lazily-cached methods for the expensive structural analyses (the consensus
|
|
1471
|
+
climb `attention()`, the weave, span-shape classification, the identity-window
|
|
1472
|
+
reads and the shared reach memo), each computed at most once — async ones
|
|
1473
|
+
cached by promise, so concurrent askers await the same computation — reused
|
|
1474
|
+
across every consumer, billed to their own profiling phase, and never computed
|
|
1475
|
+
at all when no mechanism asks (§14.1, §14.2).
|
|
1259
1476
|
- **Extension** — a user- or built-in-supplied `PipelineMechanism` whose `parse`
|
|
1260
1477
|
recognises computations (arithmetic, logic, …) the mind should not have to
|
|
1261
1478
|
learn fact-by-fact; joins via `mechanismFactories` (§16).
|
|
@@ -1288,9 +1505,10 @@ order always produce a structurally identical store.
|
|
|
1288
1505
|
▼
|
|
1289
1506
|
leaves [l₀][l₁][l₂] … [lₙ]
|
|
1290
1507
|
│
|
|
1291
|
-
│ 3.
|
|
1292
|
-
│
|
|
1293
|
-
│
|
|
1508
|
+
│ 3. THE FOLD: content-defined cuts segment the stream; each segment
|
|
1509
|
+
│ folds FLAT (two-ended seat binding), and the segment roots group
|
|
1510
|
+
│ upward by cut LEVEL — every node at every scale delimited by
|
|
1511
|
+
│ content, never by absolute offset
|
|
1294
1512
|
▼
|
|
1295
1513
|
perceived tree (every node: bytes-or-kids + gist vector)
|
|
1296
1514
|
│
|
|
@@ -1323,83 +1541,178 @@ volume, or a stack of video frames is linearized along a Hilbert curve (§6.3) s
|
|
|
1323
1541
|
that spatial locality becomes stream locality. Nothing downstream knows or cares
|
|
1324
1542
|
which modality produced the stream — _geometry is only a reading order_.
|
|
1325
1543
|
|
|
1326
|
-
### 10.2
|
|
1327
|
-
|
|
1328
|
-
The fold
|
|
1544
|
+
### 10.2 Content-defined boundaries: why identity must not depend on offset
|
|
1545
|
+
|
|
1546
|
+
The naive fold groups a fixed number of items at a time, counting from byte 0.
|
|
1547
|
+
That is fatal for a content-addressed store, and the reason is worth stating
|
|
1548
|
+
precisely, because it is the single most consequential change in the perception
|
|
1549
|
+
layer.
|
|
1550
|
+
|
|
1551
|
+
Under a fixed-arity grid, a byte's contribution is a function of its **absolute
|
|
1552
|
+
offset**: the same run of bytes lands in different seats at a different
|
|
1553
|
+
position, so it folds into a _different subtree_ and interns as a _different
|
|
1554
|
+
node_. Insert one byte at the front of a stream and every downstream grouping
|
|
1555
|
+
shifts; the shared material with the previous deposit stops being shared. The
|
|
1556
|
+
size of the grouping quantum has nothing to do with it — any fixed modulus does
|
|
1557
|
+
this, and identity must not depend on the fold's arity at all.
|
|
1558
|
+
|
|
1559
|
+
Sema therefore lets the **bytes choose where the stream segments**. A rolling
|
|
1560
|
+
hash runs over a bounded window of the recent bytes; a cut is offered where that
|
|
1561
|
+
hash vanishes modulo W. Because the decision reads only a bounded window, a
|
|
1562
|
+
change upstream can move only the cut it falls inside — every downstream
|
|
1563
|
+
boundary, and therefore every downstream segment, is unchanged. Since each
|
|
1564
|
+
segment folds from its own seat 0, byte-identical content produces
|
|
1565
|
+
byte-identical subtrees wherever it occurs, and hash-consing then makes it the
|
|
1566
|
+
very same node id.
|
|
1567
|
+
|
|
1568
|
+
The rule is entirely mechanical, and every constant in it is derived:
|
|
1569
|
+
|
|
1570
|
+
- **The window** is W bytes wide, implemented as a cyclic polynomial (each byte
|
|
1571
|
+
enters as a table value and leaves rotated by the window width), so the
|
|
1572
|
+
register holds _exactly_ the last W raw bytes and nothing before them can
|
|
1573
|
+
reach the decision. The raw window is put through a two-round avalanche mix
|
|
1574
|
+
before the test, which is what makes the rule behave the same on a gradient or
|
|
1575
|
+
a sparse binary stream as it does on prose.
|
|
1576
|
+
- **The cut rate** is one offer per W bytes (`mix % W === 0`).
|
|
1577
|
+
- **The minimum segment length** is expressed _locally_, not as a count from the
|
|
1578
|
+
previous cut (a count carries the stream's initial phase forever, which is
|
|
1579
|
+
exactly the offset dependence being removed): a hit is taken only if the
|
|
1580
|
+
previous two positions did not hit.
|
|
1581
|
+
- **The maximum segment length** is the keyring's seat count, because a segment
|
|
1582
|
+
folds as one flat node and the fold has exactly that many seats to bind
|
|
1583
|
+
children into. An over-long stretch is split at strides from its own start —
|
|
1584
|
+
content-relative, and rare enough (mean segment ≈ 5–7 bytes against a bound of
|
|
1585
|
+
8) not to reintroduce a systematic phase.
|
|
1586
|
+
|
|
1587
|
+
The expected segment is therefore `minLen + W − 1` bytes — deliberately coarser
|
|
1588
|
+
than the fold's own arity. A segment is the flat **phrase-scale unit** the W-ary
|
|
1589
|
+
groups are built _from_, not a group of W children; the mechanisms downstream
|
|
1590
|
+
are fitted to that scale, and forcing the two to coincide was measured and
|
|
1591
|
+
refuted.
|
|
1592
|
+
|
|
1593
|
+
This reads **bytes, never text**. Measured over 400 real deposits under 1–7 byte
|
|
1594
|
+
shifts, downstream cuts survive 99.6–99.9% of the time and segments stay
|
|
1595
|
+
byte-identical 98.3–99.2% of the time — and the three rows that matter (deposit
|
|
1596
|
+
prose, non-Latin scripts, random binary) agree with each other. The arithmetic
|
|
1597
|
+
grid, on the same corpus, preserves 14.3%: only the shifts that happen to be
|
|
1598
|
+
multiples of the quantum. A boundary rule justified by where words or sentences
|
|
1599
|
+
fall would be importing an assumption the architecture rejects; random binary
|
|
1600
|
+
must, and does, behave exactly like prose.
|
|
1601
|
+
|
|
1602
|
+
### 10.3 The fold: segments, levels, and the tree above them
|
|
1603
|
+
|
|
1604
|
+
One rolling hash serves every scale. A cut is **level 0** when its mixed hash
|
|
1605
|
+
vanishes mod W, **level 1** when mod W², and so on — so level-L cuts are by
|
|
1606
|
+
construction a subset of level-(L−1) cuts, which is exactly the nesting a tree
|
|
1607
|
+
needs. Levels are read off the hash the cut was accepted at, so they cost
|
|
1608
|
+
nothing beyond the divisions already being done.
|
|
1329
1609
|
|
|
1330
1610
|
```
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1611
|
+
perceive(bytes):
|
|
1612
|
+
cuts, levels ← contentLevels(bytes) # §10.2, one pass
|
|
1613
|
+
segments ← the byte spans between consecutive cuts
|
|
1614
|
+
row ← [ flatFold(s) for each segment s ] # each segment = ONE flat node
|
|
1615
|
+
tree ← groupByLevel(row, levels, level = 1) # recurse upward
|
|
1616
|
+
normalize(tree.gist) # ONLY the finished root
|
|
1617
|
+
return tree
|
|
1618
|
+
|
|
1619
|
+
flatFold(segment): # 1 … maxSeats bytes
|
|
1620
|
+
gist ← Σₖ π_{s(k)} · alphabet[byteₖ] # two-ended seats (§2.3)
|
|
1621
|
+
return a node whose kids are the segment's byte leaves
|
|
1622
|
+
|
|
1623
|
+
groupByLevel(items, levels, L):
|
|
1624
|
+
group runs of items separated by cuts of level < L; a cut of level ≥ L
|
|
1625
|
+
ends the group. A group that would exceed the keyring is split at its
|
|
1626
|
+
STRONGEST interior cut (ties → the items' own content hash, so the split
|
|
1627
|
+
point is content-determined even where the levels are flat).
|
|
1628
|
+
if this level split nothing: climb to L+1 rather than spin.
|
|
1629
|
+
recurse on the groups until one root remains.
|
|
1346
1630
|
```
|
|
1347
1631
|
|
|
1348
1632
|
Properties worth noting:
|
|
1349
1633
|
|
|
1350
|
-
- **
|
|
1351
|
-
the
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
- **
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1634
|
+
- **A segment is one flat node.** Not a W-ary sub-tree: the cuts already claim
|
|
1635
|
+
the segment is a unit, and folding it flat is both lighter (one node instead
|
|
1636
|
+
of a group-plus-remainder pair) and the natural reading. Measured, splitting
|
|
1637
|
+
segments into `[W][rest]` cost 3,590 partial-arity nodes where the flat form
|
|
1638
|
+
costs 504, and inflated the distinct-node count by ~20%.
|
|
1639
|
+
- **The shape above the segments is content's too.** Grouping segment roots
|
|
1640
|
+
W-at-a-time from index 0 would reintroduce, one level up, the very bug content
|
|
1641
|
+
cuts exist to remove: a form spanning segments 12…17 would straddle two groups
|
|
1642
|
+
and be no node at all. Level-based grouping makes every node at every scale
|
|
1643
|
+
delimited by content, so identity is offset-free at _all_ scales.
|
|
1644
|
+
- **The tree is not a spine.** Joining segments left-nested would cost a node
|
|
1645
|
+
per segment on a single spine (a 3 KB deposit becoming a 450-deep chain of
|
|
1646
|
+
fresh D-vectors). Level grouping keeps the depth logarithmic in the number of
|
|
1647
|
+
segments.
|
|
1359
1648
|
- **Linear, not renormalized per level.** Only the completed root is normalized
|
|
1360
1649
|
to unit length; every interior gist is left at its raw superposed length. This
|
|
1361
1650
|
is a deliberate choice of similarity semantics, not a shortcut: an interior
|
|
1362
1651
|
node's magnitude grows with the amount of content folded into it (§2.6), so
|
|
1363
1652
|
the fold gives every span both an angle (what it resembles) and a magnitude
|
|
1364
|
-
(how much of it there is) for free, in the same vector.
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1653
|
+
(how much of it there is) for free, in the same vector. A single-leaf input is
|
|
1654
|
+
exempt — its "root" _is_ the shared alphabet vector, and normalizing in place
|
|
1655
|
+
would mutate the alphabet itself.
|
|
1656
|
+
- **Every level is meaningful.** Intermediate nodes are not scaffolding to be
|
|
1657
|
+
discarded; each one is a content-addressable span with a gist — perception
|
|
1658
|
+
manufactures the _addressable sub-structure_ that recognition and attention
|
|
1659
|
+
later depend on.
|
|
1660
|
+
- **W is the resolution quantum.** W sets the cut rate and the window width, and
|
|
1661
|
+
reappears throughout the system as the "one perceptual step" unit (the reach
|
|
1662
|
+
threshold, the near-dedup window, the canonical window lengths, alignment seed
|
|
1663
|
+
size).
|
|
1664
|
+
- **Total on any input.** A level that fails to split, or a row that would
|
|
1665
|
+
exceed the keyring, falls through to a plain fixed-arity fold for that row —
|
|
1666
|
+
rare enough not to reintroduce a systematic alignment.
|
|
1667
|
+
|
|
1668
|
+
### 10.4 Growing streams: incremental folding and the stable prefix
|
|
1669
|
+
|
|
1670
|
+
Because a cut is decided from a bounded window, **cuts are stable under
|
|
1671
|
+
append**: bytes added at the right edge cannot move a cut to their left
|
|
1672
|
+
(measured over a growing 12-turn context: 100% of prior cuts survive every
|
|
1673
|
+
append, zero tail churn). And because a level-0 segment is a pure function of
|
|
1674
|
+
its own bytes, a segment whose byte span is unchanged can be _reused_ rather
|
|
1675
|
+
than refolded — bit-identically, since reuse cannot change the tree, only skip
|
|
1676
|
+
work.
|
|
1677
|
+
|
|
1678
|
+
Both the deposit path and the conversation path exploit this. A stream that
|
|
1679
|
+
extends a previously folded one reuses every segment left of the new material
|
|
1680
|
+
and refolds only the right edge, costing O(new bytes) instead of O(context); the
|
|
1681
|
+
grouping above the segments is re-run whole, but it operates on segment roots (a
|
|
1682
|
+
few dozen items for a several-hundred-byte context) and only its right edge
|
|
1683
|
+
actually changes shape — measured at ~40 rebuilt nodes per turn, flat as the
|
|
1684
|
+
context grows sevenfold.
|
|
1685
|
+
|
|
1686
|
+
The reuse carries one precondition, discharged structurally by every caller
|
|
1687
|
+
rather than by care: the previous fold must be over a **byte-identical prefix**.
|
|
1688
|
+
Reuse is keyed on a segment's offsets, which is what makes it O(1) per segment,
|
|
1689
|
+
and offsets alone cannot witness that the underlying bytes agree — so the
|
|
1690
|
+
deposit cache is keyed by the prefix's own bytes, and a conversation's fold
|
|
1691
|
+
state advances only by append. A caller that cannot make that argument passes no
|
|
1692
|
+
previous fold at all; the cold path is always correct.
|
|
1693
|
+
|
|
1694
|
+
Nothing about this imposes structure. The deposit path folds over the stream's
|
|
1695
|
+
own content cuts and nothing else — it imposes no boundaries, knows nothing
|
|
1696
|
+
about turns, and reads no convention out of the bytes. That train/inference
|
|
1697
|
+
agreement is the whole contract: the node a context was trained as and the node
|
|
1698
|
+
`resolve(query)` reaches must be the _same_ node, and the only way to guarantee
|
|
1699
|
+
it is to give the deposit fold nothing extra to say.
|
|
1700
|
+
|
|
1701
|
+
**The stable prefix** is the one place a caller may impose boundaries, and it is
|
|
1702
|
+
a different property from incremental reuse. Given a sorted set of proper byte
|
|
1703
|
+
offsets, the fold splits there: each span between consecutive boundaries folds
|
|
1704
|
+
independently and the segment roots join **left-nested**, so every cumulative
|
|
1705
|
+
prefix reappears as an identical subtree — and, by hash-consing, the very same
|
|
1706
|
+
node — inside the grown stream. That buys prefix-_root_ identity, which a
|
|
1707
|
+
conversation's state machinery may want; conflating it with incremental reuse
|
|
1708
|
+
once put an imposed boundary set on the inference path and left it folding
|
|
1709
|
+
differently from the deposits it was querying.
|
|
1710
|
+
|
|
1711
|
+
Perception can also detect a stable prefix itself, when handed the store's
|
|
1712
|
+
lookup capabilities: the longest **proper** prefix of the stream whose
|
|
1713
|
+
leaf-sequence is already a known flat branch becomes a boundary. The prefix must
|
|
1714
|
+
be proper — a full-length match would mean the entire input is already stored,
|
|
1715
|
+
and splitting there would hide the input's own internal structure.
|
|
1403
1716
|
|
|
1404
1717
|
---
|
|
1405
1718
|
|
|
@@ -1433,6 +1746,12 @@ internLeaf / internBranch(content, gist):
|
|
|
1433
1746
|
the reverse (child → parent) structural edge
|
|
1434
1747
|
```
|
|
1435
1748
|
|
|
1749
|
+
Interning is memoised by tree-node identity. Because a grown stream shares its
|
|
1750
|
+
prefix's subtree _objects_ with the previous deposit (§10.4), a node already
|
|
1751
|
+
interned needs nothing again — its id is permanent and its intern-time side
|
|
1752
|
+
effects fired at first mint — so a memo hit skips the whole shared subtree and
|
|
1753
|
+
the intern walk costs O(new nodes) per deposit rather than O(context).
|
|
1754
|
+
|
|
1436
1755
|
Points of principle:
|
|
1437
1756
|
|
|
1438
1757
|
- **Exact dedup is the primary compression** and is intrinsic: it is what makes
|
|
@@ -1466,19 +1785,24 @@ behind three capabilities:
|
|
|
1466
1785
|
|
|
1467
1786
|
### 11.3 Sub-span windows and containment
|
|
1468
1787
|
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1788
|
+
Content-defined cuts make a segment's identity offset-free, but they still cut
|
|
1789
|
+
_somewhere_: a meaningful unit (say, a name) may straddle a boundary and never
|
|
1790
|
+
be a node of any tree. Deposition therefore additionally interns **sliding
|
|
1791
|
+
windows** of W and W−1 leaves across the stream, as flat branches — the two
|
|
1792
|
+
lengths being the quantum and its off-by-one neighbour, so a form straddling a
|
|
1793
|
+
seam is reachable from either cut. (Widening this to the reader's full segment
|
|
1794
|
+
scale was measured and refuted: it tripled the store and slowed ingest 80%
|
|
1795
|
+
without fixing a single test.) A window that does not coincide with a structural
|
|
1796
|
+
child of any chunk is linked to the chunk(s) it overlaps by a durable
|
|
1797
|
+
**containment edge** — a second, weaker parent relation meaning "these bytes
|
|
1798
|
+
occur inside that chunk". When a later climb starts from such a window (which
|
|
1799
|
+
has no structural parents of its own), it climbs through its containment parents
|
|
1800
|
+
instead. This closes the recognition seams that any chunking, however chosen,
|
|
1801
|
+
leaves behind.
|
|
1478
1802
|
|
|
1479
1803
|
Deposition also interns the **whole stream as one flat branch** (the sequence of
|
|
1480
1804
|
its byte-leaves). This gives every deposit a canonical byte-level identity
|
|
1481
|
-
independent of tree shape — the form the stable-prefix check of §10.
|
|
1805
|
+
independent of tree shape — the form the stable-prefix check of §10.4 looks up,
|
|
1482
1806
|
and a second content-addressed route to the same experience.
|
|
1483
1807
|
|
|
1484
1808
|
---
|
|
@@ -1505,6 +1829,22 @@ A _single_ input (no pair) still learns sequence: the parts of its root are
|
|
|
1505
1829
|
chained by edges at stride W, so a long document is traversable as a sequence of
|
|
1506
1830
|
its chunks.
|
|
1507
1831
|
|
|
1832
|
+
**Suffix propagation.** One edge per pair would make a learned fact reachable
|
|
1833
|
+
only from the _whole_ context that carried it — a problem for cumulative
|
|
1834
|
+
contexts, where the same question arrives with a different amount of history in
|
|
1835
|
+
front of it. So when a pair is deposited, every right-edge **suffix** of the
|
|
1836
|
+
context is checked, and a suffix that is itself an established form inherits the
|
|
1837
|
+
same continuation edge. Two disciplines keep this cheap and honest:
|
|
1838
|
+
|
|
1839
|
+
- The scan is gated by an existence probe, not by perception. Every deposit
|
|
1840
|
+
interns its whole byte stream as a flat branch of per-byte leaf ids (§11.3),
|
|
1841
|
+
so a suffix is a stored form exactly when that flat twin exists — one
|
|
1842
|
+
content-hash probe per offset, and only a hit pays for the deposit-shaped
|
|
1843
|
+
fold. The scan is skipped entirely for contexts shorter than 2W.
|
|
1844
|
+
- The inheriting suffix must already be **established**: reused across deposits
|
|
1845
|
+
(at least two structural parents), or bearing a halo _and_ already an edge
|
|
1846
|
+
source. A suffix that is merely someone's answer does not qualify.
|
|
1847
|
+
|
|
1508
1848
|
### 12.2 Halo pours: distributional bookkeeping
|
|
1509
1849
|
|
|
1510
1850
|
When a pair (context, continuation) is deposited, each side's **company
|
|
@@ -1578,15 +1918,20 @@ ingest(input, second = none):
|
|
|
1578
1918
|
else: ingestOne(input)
|
|
1579
1919
|
|
|
1580
1920
|
|
|
1581
|
-
deposit(input, tracked):
|
|
1921
|
+
deposit(input, tracked, conversational):
|
|
1582
1922
|
bytes ← flatten(input)
|
|
1583
|
-
tree ← perceive(bytes
|
|
1584
|
-
|
|
1923
|
+
tree ← perceive(bytes, reusing the segments of any cached fold over a
|
|
1924
|
+
byte-identical prefix) # §10.3, §10.4
|
|
1925
|
+
ids ← intern every node of tree, bottom-up # §11.1 (memoised by
|
|
1926
|
+
# tree-node identity)
|
|
1585
1927
|
intern sliding W / W−1 windows; record containment edges # §11.3
|
|
1928
|
+
(windows wholly inside chunks the previous deposit already
|
|
1929
|
+
interned are skipped)
|
|
1586
1930
|
intern the whole stream as a flat branch # §11.3
|
|
1587
1931
|
changed ← if tracked and a previous deposit exists:
|
|
1588
1932
|
the maximal new subtree vs. the previous deposit # §12.2
|
|
1589
1933
|
else: [ tree ]
|
|
1934
|
+
if conversational: cache this fold's segments under the stream's bytes
|
|
1590
1935
|
return (tree, rootId, ids, changed)
|
|
1591
1936
|
|
|
1592
1937
|
|
|
@@ -1596,15 +1941,20 @@ ingestOne(input): # a bare experience
|
|
|
1596
1941
|
parts ← the root's immediate children
|
|
1597
1942
|
if |parts| > W:
|
|
1598
1943
|
link parts[i] ──▶ parts[i+W] for each stride-W step # §12.1
|
|
1944
|
+
link the last strided part ──▶ the final part, when the stride
|
|
1945
|
+
does not land on it exactly (no tail is left unreachable)
|
|
1599
1946
|
else:
|
|
1600
1947
|
mark each part as a resonance target
|
|
1601
1948
|
|
|
1602
1949
|
|
|
1603
1950
|
ingestPair(context, continuation): # a fact
|
|
1604
|
-
(ctxTree, ctxRoot, ctxIds, changed) ← deposit(context, tracked = true
|
|
1951
|
+
(ctxTree, ctxRoot, ctxIds, changed) ← deposit(context, tracked = true,
|
|
1952
|
+
conversational = true)
|
|
1605
1953
|
(conTree, conRoot, _, _ ) ← deposit(continuation, tracked = false)
|
|
1606
1954
|
|
|
1607
1955
|
link ctxRoot ──▶ conRoot # the fact itself
|
|
1956
|
+
propagateSuffixes(ctxRoot, conRoot) # §12.1: established
|
|
1957
|
+
# suffixes inherit the edge
|
|
1608
1958
|
for each part in changed: # distributional evidence
|
|
1609
1959
|
pour halo(part) += π₁ · companySignature(conRoot)
|
|
1610
1960
|
pour halo(conRoot) += π₀ · companySignature(part)
|
|
@@ -1612,11 +1962,12 @@ ingestPair(context, continuation): # a fact
|
|
|
1612
1962
|
# index (lazily), per §12.3
|
|
1613
1963
|
```
|
|
1614
1964
|
|
|
1615
|
-
Costs, in broad strokes: perception is linear in the input length
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
O(changed parts) halo pours
|
|
1619
|
-
|
|
1965
|
+
Costs, in broad strokes: perception is linear in the input length (and, for a
|
|
1966
|
+
stream extending an already-folded one, linear in the _new_ bytes); interning is
|
|
1967
|
+
one content-addressed lookup per tree node, dominated by the O(n) leaves;
|
|
1968
|
+
relation learning is O(1) edges plus O(changed parts) halo pours, plus one
|
|
1969
|
+
content-hash probe per suffix offset. Nothing in the deposit path scans the
|
|
1970
|
+
corpus. **Training a fact takes one pass over the fact.**
|
|
1620
1971
|
|
|
1621
1972
|
### 13.1 Why storage stays viable: the economics of the store
|
|
1622
1973
|
|
|
@@ -1740,6 +2091,16 @@ structurally isolated nodes (single-parent, no edges, no halo — they bridge
|
|
|
1740
2091
|
nothing), and a converse repair pass re-indexes bridges that were missed.
|
|
1741
2092
|
Failures of these best-effort passes are counted visibly, never silent.
|
|
1742
2093
|
|
|
2094
|
+
**10. The canon index is batch-built, never maintained on the write path
|
|
2095
|
+
(equivalence viability).** The canonical-form index (§3.4) is built by a scan
|
|
2096
|
+
over content-bearing nodes, run after training and refreshed incrementally
|
|
2097
|
+
afterwards — the last indexed id is remembered in store metadata, so a refresh
|
|
2098
|
+
after further training visits only new rows. Keeping it current per deposit
|
|
2099
|
+
would put a canonicalization (a Unicode normalization, in the text case) on the
|
|
2100
|
+
hot write path for a capability that is a _fallback_ on the read path. The
|
|
2101
|
+
trade: a store that has never built the index simply has no canonical fallback —
|
|
2102
|
+
exact resolution is unaffected.
|
|
2103
|
+
|
|
1743
2104
|
### 13.2 The store's cost machinery, in pseudocode
|
|
1744
2105
|
|
|
1745
2106
|
```
|
|
@@ -1889,7 +2250,9 @@ Every ask travels one road:
|
|
|
1889
2250
|
│ literal connective, so the primary axis is "which mechanism │
|
|
1890
2251
|
│ explains more of the query", and move costs (STEP per │
|
|
1891
2252
|
│ projection, CONCEPT per halo-mediated act) discriminate │
|
|
1892
|
-
│ residually.
|
|
2253
|
+
│ residually. Grade ties prefer the candidate that carries │
|
|
2254
|
+
│ fewer unrecognised query bytes into its answer, then the │
|
|
2255
|
+
│ mechanism list's own order. │
|
|
1893
2256
|
│ │
|
|
1894
2257
|
│ Admissible-floor pruning, uniformly: `floor` is called for │
|
|
1895
2258
|
│ EVERY mechanism, every time; `run` only for one whose floor │
|
|
@@ -1921,32 +2284,87 @@ Every ask travels one road:
|
|
|
1921
2284
|
▼
|
|
1922
2285
|
┌───────────────────────────────────────────────────────────────────┐
|
|
1923
2286
|
│ REASON (§22) extend the grounded answer across facts, hop by hop │
|
|
2287
|
+
│ — skipped when the winner declared itself COMPLETE │
|
|
1924
2288
|
│ FUSE (§23) ground the query's OTHER points of attention and │
|
|
1925
|
-
│ join them with learned connectors
|
|
2289
|
+
│ join them with learned connectors — only when a │
|
|
2290
|
+
│ genuine REMAINDER of ≥ W query bytes was touched by │
|
|
2291
|
+
│ neither the winner's evidence nor any computed span │
|
|
1926
2292
|
│ ARTICULATE(§24) re-voice the result in the asker's own vocabulary │
|
|
1927
2293
|
└──────────────────────────────┬────────────────────────────────────┘
|
|
1928
2294
|
▼
|
|
1929
2295
|
answer bytes + provenance + (optionally) the full rationale
|
|
1930
2296
|
```
|
|
1931
2297
|
|
|
1932
|
-
The
|
|
2298
|
+
#### The tie-break: at equal grade, prefer the answer that invents less
|
|
2299
|
+
|
|
2300
|
+
Weights are compared at STEP resolution (`grade = ⌊weight/STEP⌋`), so sub-STEP
|
|
2301
|
+
bookkeeping never decides a cross-mechanism choice. The ladder prices what a
|
|
2302
|
+
candidate leaves _unaccounted_, which is the right primary question but cannot
|
|
2303
|
+
separate two candidates that leave the same bytes unaccounted. What still
|
|
2304
|
+
separates them is what they _did_ with those bytes: a candidate that carries an
|
|
2305
|
+
unexplained span into its answer is passing the asker's own words back as if
|
|
2306
|
+
they were derived; one that leaves them out has made a smaller, honest claim. So
|
|
2307
|
+
at equal grade the candidate reporting fewer **scaffolding** bytes (answer bytes
|
|
2308
|
+
lifted from spans nothing recognised) wins. Measured on a two-fact chain: cover
|
|
2309
|
+
and recall both graded 11001 over 11 unexplained bytes, cover answering "The
|
|
2310
|
+
capital of France is Paris famous for" — 11 bytes of scaffolding — against
|
|
2311
|
+
recall's 0, and only the list order decided it, in favour of the shallower
|
|
2312
|
+
reading. This never overrides the ladder; it orders _within_ one grade. Only
|
|
2313
|
+
when scaffolding also ties does the mechanism list's own order stand (cover,
|
|
2314
|
+
cast, confluence, extract, recall).
|
|
2315
|
+
|
|
2316
|
+
#### Completeness
|
|
2317
|
+
|
|
2318
|
+
A mechanism may declare its own result **complete** — a stored form's own
|
|
2319
|
+
continuation, reached through an identity claim about the query. Post-grounding
|
|
2320
|
+
then leaves it alone: a further multi-hop pivot could only chain _past_ the fact
|
|
2321
|
+
that produced the answer. This is the same reasoning the multi-hop stage's echo
|
|
2322
|
+
guard applies to a query that resolves exactly (§22), carried by the mechanisms
|
|
2323
|
+
that establish the identity by another route. Observed without it: a correct
|
|
2324
|
+
"What is the process of photosynthesis?" grounding was pivoted forward four
|
|
2325
|
+
times, out of the fact that answered it and into an unrelated conversational
|
|
2326
|
+
turn. The decider honours the property and never asks which mechanism set it —
|
|
2327
|
+
the market stays uniform.
|
|
2328
|
+
|
|
2329
|
+
#### Diagnostics
|
|
2330
|
+
|
|
2331
|
+
The decider also emits diagnostic signals — purely observational, never
|
|
1933
2332
|
affecting the decision itself:
|
|
1934
2333
|
|
|
1935
2334
|
- **Unexplained label** — every candidate carries `unexplained`, a
|
|
1936
2335
|
human-readable label for the query bytes its evidence left on the table.
|
|
1937
2336
|
Appears in the rationale trace; does not affect the weight (the PASS-per-byte
|
|
1938
2337
|
pricing already accounts for it arithmetically).
|
|
1939
|
-
- **
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
2338
|
+
- **Grounding decision data** — the `decideGrounding` step carries a structured
|
|
2339
|
+
payload: every candidate's provenance, exact weight, discrete grade,
|
|
2340
|
+
unexplained byte count, and which one was decided, plus the runner-up's grade
|
|
2341
|
+
margin. The same numbers the human-readable labels carry, exposed as data so a
|
|
2342
|
+
downstream tool need not parse free text.
|
|
2343
|
+
- **Narrow decision** — when the winner beats the runner-up by ≤ 1 grade unit,
|
|
2344
|
+
the rationale records a `narrowDecision` step. A margin of 0 means the
|
|
2345
|
+
tie-break above decided — the answer could change with one more training fact.
|
|
1944
2346
|
- **Thin grounding** — when the winning candidate's density (fraction of query
|
|
1945
2347
|
bytes actually accounted for by learnt structure) falls below `1/W` (the
|
|
1946
2348
|
smallest fraction the store's perceptual window can discriminate), the
|
|
1947
2349
|
rationale records a `thinGrounding` step. The answer stands; the label is a
|
|
1948
2350
|
signal for downstream consumers that the grounding is sparse.
|
|
1949
2351
|
|
|
2352
|
+
#### Why fusion is gated on a remainder, not on provenance
|
|
2353
|
+
|
|
2354
|
+
`accounted` is a **cost-ladder** quantity, not a coverage one: the cover
|
|
2355
|
+
deliberately leaves its masked computed spans out of `accounted` so that
|
|
2356
|
+
PASS-bridged bytes are still charged. A query fully explained by one computed
|
|
2357
|
+
span plus bridged connectors can therefore report `accounted: []` while nothing
|
|
2358
|
+
is actually left unexplained. The genuine remainder is what _neither_ the
|
|
2359
|
+
winner's accounted spans _nor_ any mechanism's computed span ever touched — and
|
|
2360
|
+
a remainder under one perception quantum W is bridging punctuation or
|
|
2361
|
+
whitespace, never a second topic. (Observed: a single space between two fully
|
|
2362
|
+
computed arithmetic spans registered as unaccounted, pulled in an unrelated
|
|
2363
|
+
corpus fact, and corrupted "4 6" into "4 63".) The same distinction is read a
|
|
2364
|
+
second time for _position_: fusion places the primary answer by its accounted
|
|
2365
|
+
spans when it has any, and by its computed spans when the grounding is a pure
|
|
2366
|
+
computation with no anchor of its own.
|
|
2367
|
+
|
|
1950
2368
|
### 14.2 Design invariants of the pipeline
|
|
1951
2369
|
|
|
1952
2370
|
Four rules hold everywhere and are worth reading the rest of Part IV against:
|
|
@@ -2047,16 +2465,22 @@ the modules of the implementation; see AGENTS.md, "Where things live".)
|
|
|
2047
2465
|
├───────────────────────────────────┤ └─────────┘
|
|
2048
2466
|
│ resonance (§19.5, §21, §22): │
|
|
2049
2467
|
│ bridge (→ junction) · │
|
|
2050
|
-
│ recallByResonance · │
|
|
2051
2468
|
│ pivotInto · meaningOf │
|
|
2469
|
+
├───────────────────────────────────┤
|
|
2470
|
+
│ recall's refusal-path tiers │
|
|
2471
|
+
│ (§21.5): substitutionBridge · │
|
|
2472
|
+
│ prefixCompletion · frameFiller │
|
|
2052
2473
|
└──┬──────────────┬────────────────┘
|
|
2053
2474
|
│ │
|
|
2054
2475
|
L2 DECOMPOSITION ┌──▼──────────┐ ┌─▼────────────────────────────┐
|
|
2055
2476
|
& TRAVERSAL │ recognition │ │ traverse: edgeAncestors · │
|
|
2056
2477
|
│ (§15): │ │ nextOf/prevOf · contains · │
|
|
2057
2478
|
│ sites/ │ │ chooseNext / chooseAmong │
|
|
2058
|
-
│ leaves/ │ │ (§25) · hubCap (§8.8)
|
|
2059
|
-
│ splits
|
|
2479
|
+
│ leaves/ │ │ (§25) · hubCap (§8.8) · │
|
|
2480
|
+
│ splits/ │ │ atomReach · reachOf · │
|
|
2481
|
+
│ starts │ │ leadsSomewhere │
|
|
2482
|
+
│ + canonical │ │ │
|
|
2483
|
+
│ contract │ │ │
|
|
2060
2484
|
└──┬──────────┘ └─┬────────────────────────────┘
|
|
2061
2485
|
│ │
|
|
2062
2486
|
L1 PRIMITIVES ┌──▼──────────────▼────────────────────────────┐
|
|
@@ -2174,7 +2598,7 @@ configuration table:
|
|
|
2174
2598
|
| :---------------------- | :-------------------------------- | :----------------------- | :---------------------------- |
|
|
2175
2599
|
| cover follow-edge (§19) | exact | forward | — (cost ladder) |
|
|
2176
2600
|
| concept hop (§19.3) | halo sibling | forward | concept threshold |
|
|
2177
|
-
| recall tiers 0–1 (§21) | identity / whole-query gist | both |
|
|
2601
|
+
| recall tiers 0–1 (§21) | identity / whole-query gist | both | scale-aware identity bar |
|
|
2178
2602
|
| skill extraction (§20) | locate (on the exemplar's frames) | read-out | per-step ladder gates |
|
|
2179
2603
|
| CAST substitution (§18) | graded (literal → halo) | insert | frame (MIN_WEAVE + dominates) |
|
|
2180
2604
|
| CAST redirection (§18) | graded (literal → halo) | both (on the substitute) | frame (MIN_WEAVE + dominates) |
|
|
@@ -2210,11 +2634,12 @@ Two boundaries of the unification are deliberate, not omissions:
|
|
|
2210
2634
|
grounding decider (§14.1) weighs every mechanism's candidate in the one cost
|
|
2211
2635
|
ladder, so a mechanism-level choice and a byte-level choice are the same kind
|
|
2212
2636
|
of decision. Ties (at STEP resolution — sub-STEP costs like MICRO are
|
|
2213
|
-
non-ordering bookkeeping and must not decide a cross-mechanism choice)
|
|
2214
|
-
the
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2637
|
+
non-ordering bookkeeping and must not decide a cross-mechanism choice) go to
|
|
2638
|
+
the candidate that carries fewer unrecognised query bytes into its answer, and
|
|
2639
|
+
only then to the mechanism list's own order (cover, cast, confluence, extract,
|
|
2640
|
+
recall) — cover runs first not because it is prioritised over the others by
|
|
2641
|
+
fiat, but because a computed span (§16) masks in at near-zero cost, which then
|
|
2642
|
+
prunes the rest through the SAME admissible-floor mechanism every mechanism is
|
|
2218
2643
|
subject to (§14.2), not a special rule.
|
|
2219
2644
|
|
|
2220
2645
|
### 14.5 The free-will architecture
|
|
@@ -2277,10 +2702,13 @@ internal.
|
|
|
2277
2702
|
|
|
2278
2703
|
Recognition answers: _which stored forms does this byte string contain, and
|
|
2279
2704
|
where?_ Its output — the **sites** (span → node), the query's perceived
|
|
2280
|
-
**leaves**,
|
|
2281
|
-
|
|
2705
|
+
**leaves**, the **splits** where a form boundary falls inside a leaf, and the
|
|
2706
|
+
**starts** (the offsets the query's own fold cut at) — is the raw material of
|
|
2707
|
+
every downstream mechanism.
|
|
2282
2708
|
|
|
2283
|
-
|
|
2709
|
+
Everything here is a bounded number of O(1) content-addressed probes per byte —
|
|
2710
|
+
never a scan of the corpus. Two complementary readings run over the query, and a
|
|
2711
|
+
third pass cleans up what both leave behind.
|
|
2284
2712
|
|
|
2285
2713
|
### 15.1 The structural reading
|
|
2286
2714
|
|
|
@@ -2288,47 +2716,106 @@ Perceive the query (the same fold as ingestion) and walk its own tree, asking
|
|
|
2288
2716
|
the store, bottom-up, to name each subtree: leaves by their bytes, branches by
|
|
2289
2717
|
their children's ids. Because perception is deterministic, any part of the query
|
|
2290
2718
|
that was ever deposited _as it appears here_ folds into the identical subtree
|
|
2291
|
-
and is named exactly.
|
|
2292
|
-
|
|
2293
|
-
|
|
2719
|
+
and is named exactly. A subtree that misses the exact lookup is retried through
|
|
2720
|
+
canonical equivalence (§3.4), so a form differing only in surface reaches its
|
|
2721
|
+
stored node.
|
|
2722
|
+
|
|
2723
|
+
Within each segment, contiguous sub-runs of leaves are probed too, and the
|
|
2724
|
+
segment's own **edges are trimmed** at several offsets — a content cut lands
|
|
2725
|
+
inside a unit, so the form the cut split sits against the segment's edge, and
|
|
2726
|
+
probing the segment minus its first or last k bytes recovers it. Duplicate
|
|
2727
|
+
(span, node) sites from different probes are collapsed: the same span must count
|
|
2728
|
+
once, or the cover search's cost model gives that span double weight.
|
|
2294
2729
|
|
|
2295
2730
|
### 15.2 The canonical reading
|
|
2296
2731
|
|
|
2297
|
-
The query's own fold may cut the stream differently from how training cut it
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
recorded as a **split**: the search may
|
|
2732
|
+
The query's own fold may cut the stream differently from how training cut it.
|
|
2733
|
+
The canonical reading re-derives the _store's_ segmentation directly on the
|
|
2734
|
+
query's bytes: at each position, chain the known single-byte leaves forward and
|
|
2735
|
+
probe each growing sequence as a flat branch, up to the canonical chain reach
|
|
2736
|
+
(W² positions — the deepest two-level composite the write side's windows can
|
|
2737
|
+
spell). This recovers forms _as training stored them_, regardless of how the
|
|
2738
|
+
query happens to segment. Where such a form's boundary falls strictly inside one
|
|
2739
|
+
of the query's leaves, that position is recorded as a **split**: the search may
|
|
2740
|
+
later cut the leaf there (§19.3).
|
|
2741
|
+
|
|
2742
|
+
A third pass then probes the query's own **edges** beyond the canonical chain's
|
|
2743
|
+
reach, because the first and last forms of a query are the ones a chain bounded
|
|
2744
|
+
at W² is most likely to truncate.
|
|
2305
2745
|
|
|
2306
2746
|
### 15.3 What counts as a site
|
|
2307
2747
|
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2748
|
+
Three admission rules, each of which exists because its absence produced a
|
|
2749
|
+
specific fabrication:
|
|
2750
|
+
|
|
2751
|
+
1. **It must lead somewhere.** A recognised span is admitted only if its node
|
|
2752
|
+
bears a continuation edge or a halo. A form that leads nowhere contributes
|
|
2753
|
+
nothing to any derivation, so recognition filters it out at the source.
|
|
2754
|
+
|
|
2755
|
+
2. **It must span at least one perception window.** Below W, byte overlap is
|
|
2756
|
+
chance rather than evidence — the same principle the identity bar states and
|
|
2757
|
+
the substitution bridge's attestation applies. This _replaces_ a false
|
|
2758
|
+
premise it once shared with the cover's fusion rule: both used to ask "does
|
|
2759
|
+
this offset sit on a fold boundary?", which under a fixed-arity fold meant
|
|
2760
|
+
the offset was a multiple of W and carried **zero** content information. The
|
|
2761
|
+
exemption therefore fired at a quarter of all offsets by arithmetic alone.
|
|
2762
|
+
|
|
2763
|
+
3. **Byte atoms are admitted only while atoms can still discriminate.** On a
|
|
2764
|
+
small store a single-letter fact is genuine learnt content and its site is
|
|
2765
|
+
essential; past the atom-hub bound (§8.8) every letter of every query would
|
|
2766
|
+
otherwise become a "recognised form" — the bridge then finds connectors
|
|
2767
|
+
between bare letters, the cover follows edges hanging off them, and pure
|
|
2768
|
+
noise grounds to an arbitrary learnt sentence instead of silence. Atoms stay
|
|
2769
|
+
available as leaves (PASS-carried literals) and through exact tier-0
|
|
2770
|
+
resolution regardless.
|
|
2311
2771
|
|
|
2312
2772
|
```
|
|
2313
2773
|
recognise(query):
|
|
2314
|
-
sites, leaves, splits ← ∅
|
|
2774
|
+
sites, leaves, splits, starts ← ∅
|
|
2775
|
+
atomsAreHubs ← atomIsHub(N) # §8.8
|
|
2776
|
+
emit(start, end, id):
|
|
2777
|
+
reject if id is an atom and atomsAreHubs
|
|
2778
|
+
reject if end − start < W
|
|
2779
|
+
reject unless leadsSomewhere(id) # edge or halo, via probes
|
|
2780
|
+
add once (span, id)
|
|
2781
|
+
|
|
2315
2782
|
# structural
|
|
2316
2783
|
tree ← perceive(query)
|
|
2317
2784
|
for each subtree s of tree (bottom-up, with byte offsets):
|
|
2318
|
-
id ← store lookup of s (
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2785
|
+
id ← store lookup of s, else canonResolve(s.bytes) # §3.4
|
|
2786
|
+
emit(span(s), id)
|
|
2787
|
+
within a segment: probe contiguous sub-runs, and the segment
|
|
2788
|
+
with k bytes trimmed from either edge
|
|
2789
|
+
|
|
2322
2790
|
# canonical
|
|
2323
|
-
for each position p
|
|
2324
|
-
chain known leaves from p
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2791
|
+
for each position p:
|
|
2792
|
+
chain known leaves from p, up to W² positions; emit every chained
|
|
2793
|
+
prefix that is a known flat branch
|
|
2794
|
+
# query edges, beyond the chain's reach
|
|
2795
|
+
probe the query's own leading and trailing spans directly
|
|
2796
|
+
|
|
2797
|
+
splits ← form boundaries falling inside a perceived leaf
|
|
2798
|
+
starts ← the offsets the query's own fold cut at
|
|
2799
|
+
return (sites, leaves, splits, starts)
|
|
2328
2800
|
```
|
|
2329
2801
|
|
|
2330
|
-
|
|
2331
|
-
|
|
2802
|
+
### 15.4 Why the recognition memo is not an optimisation
|
|
2803
|
+
|
|
2804
|
+
Recognition is memoised by query content, and that memo is **always** consulted
|
|
2805
|
+
— including while a rationale trace is attached, which is the one place the
|
|
2806
|
+
system otherwise deliberately bypasses its memos (§14.2).
|
|
2807
|
+
|
|
2808
|
+
The reason is a genuine non-idempotence. The structural walk resolves subtrees
|
|
2809
|
+
through a cache keyed on tree-node identity, and a conversation's incremental
|
|
2810
|
+
fold deliberately shares node _objects_ across turns (§10.4). By the second call
|
|
2811
|
+
on the same bytes, large parts of the tree are already cached, the walk stops
|
|
2812
|
+
short of recursing into them — and therefore stops **emitting their sites**.
|
|
2813
|
+
Observed live: 31 sites on the first call, 5 on an immediate repeat. Skipping
|
|
2814
|
+
the memo while tracing meant every traced turn re-ran recognition from scratch
|
|
2815
|
+
at each of the many call sites that recognise the same query, each call silently
|
|
2816
|
+
more incomplete than the last — measurably changing which mechanism grounded the
|
|
2817
|
+
answer, not merely costing time. The trace step still fires on every call, so a
|
|
2818
|
+
cache hit is never silent.
|
|
2332
2819
|
|
|
2333
2820
|
---
|
|
2334
2821
|
|
|
@@ -2343,10 +2830,13 @@ consulted once per query, before the grounding loop, over EVERY mechanism that
|
|
|
2343
2830
|
implements it. An extension's `parse` receives the raw query and returns
|
|
2344
2831
|
**computed spans** — byte ranges it recognises as computations, together with
|
|
2345
2832
|
the authoritative result bytes for each. The mind lends every extension the same
|
|
2346
|
-
four neutral capabilities it already has
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2833
|
+
four neutral capabilities it already has — resonant **meaning** matching (which
|
|
2834
|
+
of some labelled forms does this span mean?), grounded **continuation** lookup
|
|
2835
|
+
(where does this form lead?), geometric **segmentation** (coherent runs by the
|
|
2836
|
+
perception tree's own structure, so an extension's notion of "separator" is the
|
|
2837
|
+
learnt geometry's), and the perception window W as its **reach** — through the
|
|
2838
|
+
`ExtensionHost` port. It learns nothing about what the extension computes, and
|
|
2839
|
+
nothing in the port names any particular extension.
|
|
2350
2840
|
|
|
2351
2841
|
An extension joins through `Mind`'s `mechanismFactories` option: a factory
|
|
2352
2842
|
receiving the `ExtensionHost` and returning a `PipelineMechanism`. Once
|
|
@@ -2396,164 +2886,159 @@ dominate), or when it is about _two things at once_. The consensus climb answers
|
|
|
2396
2886
|
this with the machinery already on hand: geometry proposes, structure climbs,
|
|
2397
2887
|
and pooled weighted deduction decides.
|
|
2398
2888
|
|
|
2399
|
-
### 17.2
|
|
2889
|
+
### 17.2 Regions: the three sources of query evidence
|
|
2890
|
+
|
|
2891
|
+
A **region** is a span of the query offered as a voter. They come from three
|
|
2892
|
+
sources, each answering a different reading of "what parts does this query
|
|
2893
|
+
have?"
|
|
2894
|
+
|
|
2895
|
+
1. **Fold nodes.** Every branch of the query's own perceived tree, walked
|
|
2896
|
+
post-order and resolved against the store as it goes (so each region knows
|
|
2897
|
+
whether its bytes name a stored node). A region that _dominates_ the query
|
|
2898
|
+
(§8.7) is admitted only when it is the sole structure — a broad wrapper
|
|
2899
|
+
cannot discriminate between topics. Segments themselves are exempt from that
|
|
2900
|
+
filter: a segment is the smallest grouped unit, wrapping nothing, so it can
|
|
2901
|
+
never be the wrapper the rule excludes. (Subdividing a long segment into
|
|
2902
|
+
W-scale tiles was measured and refuted: it reintroduces a fixed stride inside
|
|
2903
|
+
the segment, and the extra votes reorder the climb. A region must come from
|
|
2904
|
+
the fold, not from a stride over it.)
|
|
2905
|
+
|
|
2906
|
+
2. **Recognised sites.** Content-addressed nodes the query literally contains
|
|
2907
|
+
(§15). A site _is_ an exact structural anchor where a fold region is
|
|
2908
|
+
approximate, and it fills the gap the fold creates: a word the cut splits is
|
|
2909
|
+
two partial gists that may not resonate distinctively, while the site names
|
|
2910
|
+
the whole word by identity. Sites carry their **node id** with them — a site
|
|
2911
|
+
that claimed exactness while dropping its identity forced the climb to
|
|
2912
|
+
re-derive the anchor through the ANN, so which stored node an exact site
|
|
2913
|
+
voted with turned on approximate rank. Sites are never marked as chunks: they
|
|
2914
|
+
overlap each other and the fold's segments, and the saturated-interval
|
|
2915
|
+
builder (§17.5) requires disjoint regions in byte order.
|
|
2916
|
+
|
|
2917
|
+
3. **Forms the query's own cut split** (_corroborating_ regions). The fold walk
|
|
2918
|
+
enumerates fold nodes only, so a stored form the content cut happens to split
|
|
2919
|
+
is not addressable at all — however discriminative it is. Measured:
|
|
2920
|
+
`request_id=1042` against a 200-record log, cut as `...uest_id=|10|42 and r`,
|
|
2921
|
+
where "1042" reaches exactly one context of 205 (maximal IDF) and cast no
|
|
2922
|
+
vote, while the scaffolding "=10" — matching every record 1000–1099 — did.
|
|
2923
|
+
The write side already made these reachable (§11.3 interns each form at both
|
|
2924
|
+
canonical window lengths precisely so one straddling a cut resolves from
|
|
2925
|
+
either side); the read side simply never used the guarantee. So every
|
|
2926
|
+
W-window that resolves, is not already inside a fold region, and climbs
|
|
2927
|
+
somewhere non-saturated is admitted — and **overlapping admissions are
|
|
2928
|
+
coalesced into maximal spans**, because admitting every resolvable window is
|
|
2929
|
+
a redundancy problem, not a threshold problem (on a 5-context corpus, 26
|
|
2930
|
+
bytes yielded 17 "unique" windows that were all fragments of one word;
|
|
2931
|
+
coalesced, they yield the one span that word belongs to). These regions are
|
|
2932
|
+
marked **corroborating**: they are evidence for someone else's anchor, never
|
|
2933
|
+
points of attention of their own — the query never wove them as independent
|
|
2934
|
+
structures, the fold did.
|
|
2935
|
+
|
|
2936
|
+
### 17.3 Voting: the per-region evidence ladder
|
|
2400
2937
|
|
|
2401
2938
|
```
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
# 1. REGIONS — TWO sources, both structural:
|
|
2405
|
-
# a) PERCEIVED SUBTREES of the query (every branch level of the river
|
|
2406
|
-
# fold). A region that dominates the query (covers more than half)
|
|
2407
|
-
# is admitted only if it is the sole structure.
|
|
2408
|
-
# b) RECOGNISED SITES — content-addressed nodes the query literally
|
|
2409
|
-
# contains (§15). A site IS an exact structural anchor; perceived
|
|
2410
|
-
# sub-regions are approximate (W-byte chunks whose gist must resonate
|
|
2411
|
-
# to find an anchor). Sites fill the gap perception creates: a word
|
|
2412
|
-
# crossing a W-boundary is split into chunks whose partial gists may
|
|
2413
|
-
# not resonate distinctively, but the site names the whole word by
|
|
2414
|
-
# exact content identity. Sites that overlap sub-regions add
|
|
2415
|
-
# corroborating evidence; sites in gaps fill them.
|
|
2416
|
-
# Recognition is memoised per response — adding sites costs zero.
|
|
2417
|
-
regions ← subtrees of perceive(query) ∪ recognise(query).sites
|
|
2418
|
-
|
|
2419
|
-
# 2. VOTE — each region finds its best anchor in the DAG and climbs to
|
|
2420
|
-
# the edge-bearing contexts ("roots") that contain it.
|
|
2421
|
-
# Perceived sub-regions resonate their gist into the content index;
|
|
2422
|
-
# site-regions already carry an exact node id and skip the ANN query
|
|
2423
|
-
# entirely — they climb directly from the resolved node.
|
|
2424
|
-
# The climb uses EXPAND-UNTIL-DECIDED (§17.4): it stops the moment the
|
|
2425
|
-
# answer (saturated vs. voted, with exact contextsReached) is known —
|
|
2426
|
-
# all reads through it are LIMITed at √N, so the cost is bounded by the
|
|
2427
|
-
# hub convention, never by the corpus.
|
|
2939
|
+
voteRegions(query, regions, k, N):
|
|
2428
2940
|
for each region r:
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
# bytes the joint container LITERALLY CONTAINS yet whose roots are
|
|
2490
|
-
# FULLY DISJOINT from the junction's is SUPERSEDED — the exact joint
|
|
2491
|
-
# evidence explains those bytes away (grid aliasing). Partial
|
|
2492
|
-
# agreement (shared roots) corroborates and is kept.
|
|
2493
|
-
crossVotes ← []
|
|
2494
|
-
superseded ← ∅
|
|
2495
|
-
seedsOf(ri) ≔ junctionSeeds(ctx, query[regions[ri].start..regions[ri].end])
|
|
2496
|
-
# computed once, reused across all pairs of this candidate
|
|
2497
|
-
consumed ← ∅ # a candidate in one junction never re-pairs
|
|
2498
|
-
for each pair (a, b) of eligible candidates (non-overlapping,
|
|
2499
|
-
at least one strong voter, not both covered by one known region,
|
|
2500
|
-
≤ k total probes, skipping consumed candidates):
|
|
2501
|
-
left ← query[a.start..a.end]
|
|
2502
|
-
right ← query[b.start..b.end]
|
|
2503
|
-
containers ← junctionContainersFrom(left, right, cap,
|
|
2504
|
-
seedsOf(a), seedsOf(b), undefined, unordered = true)
|
|
2505
|
-
if containers is empty:
|
|
2506
|
-
# Tier 2.5 fallback — same ascent over halo siblings
|
|
2507
|
-
containers ← junctionSynonyms(left, right, maxInterior,
|
|
2508
|
-
unordered = true)
|
|
2509
|
-
if containers not empty:
|
|
2510
|
-
best ← the container covering the MOST remaining candidates
|
|
2511
|
-
(cachedRead + indexOf per extra, never an extra walk);
|
|
2512
|
-
ties → shortest interior → lowest id
|
|
2513
|
-
if best's joined occurrence is a query substring: continue
|
|
2514
|
-
reach ← edgeAncestors(best.id)
|
|
2515
|
-
if reach is discriminative (not saturated, idf > 0):
|
|
2516
|
-
w ← mutual · ln(N / contextsReached) / |roots|
|
|
2517
|
-
crossVotes.push(vote for best.id's roots at weight w,
|
|
2518
|
-
span covering all composed candidates)
|
|
2519
|
-
consumed.add(a); consumed.add(b); consumed.add(all extras)
|
|
2520
|
-
# Explaining away: individual votes whose bytes the container
|
|
2521
|
-
# literally contains and whose roots are fully disjoint from
|
|
2522
|
-
# the junction's are superseded
|
|
2523
|
-
for each individual vote rv:
|
|
2524
|
-
if rv.roots shares any root with reach.roots: keep
|
|
2525
|
-
if containerBytes literally contains rv's query bytes:
|
|
2526
|
-
superseded.add(rv)
|
|
2527
|
-
break # a is consumed — move to next unconsumed candidate
|
|
2528
|
-
|
|
2529
|
-
# 3. POOL — votes (INDEPENDENT, minus any superseded by cross-region
|
|
2530
|
-
# evidence, + CROSS-REGION) accumulate through the
|
|
2531
|
-
# arithmetic semiring (§5.3): each region is an axiom; each
|
|
2532
|
-
# (region → anchor) contribution is a summing rule; a vote for a
|
|
2533
|
-
# TERMINAL answer node redistributes to the ≤ √N contexts that lead
|
|
2534
|
-
# to it (via prevFirst, capped at the store level). Independent
|
|
2535
|
-
# corroboration ADDS.
|
|
2536
|
-
votes ← pooledConclusions
|
|
2537
|
-
|
|
2538
|
-
# 4. COMMIT — rank anchors by vote. The dominant anchor always stands.
|
|
2539
|
-
# A FURTHER (non-overlapping) anchor becomes an independent point of
|
|
2540
|
-
# attention only if its vote clears BOTH:
|
|
2541
|
-
# · the natural break (the steepest ratio drop in the sorted votes —
|
|
2542
|
-
# a scale-free "where does signal end" test), and
|
|
2543
|
-
# · the consensus floor ln N + ½ (§8.6 — more than any single
|
|
2544
|
-
# region could contribute alone).
|
|
2545
|
-
return the surviving points, each with its query span and vote
|
|
2941
|
+
|
|
2942
|
+
# ── how exact is this region? ────────────────────────────────────
|
|
2943
|
+
# `known` used to mean "these bytes resolve to ONE stored node", which
|
|
2944
|
+
# conflates two things: whether the store has seen the content, and
|
|
2945
|
+
# whether THIS query's cut grouped it the way the deposit did. Under
|
|
2946
|
+
# content-defined cuts those routinely differ.
|
|
2947
|
+
cov ← 1 if the whole region resolves
|
|
2948
|
+
← fraction of r's W-windows that resolve otherwise
|
|
2949
|
+
← 0 if r is shorter than one window W
|
|
2950
|
+
(below one window, byte identity is chance)
|
|
2951
|
+
known ← cov ≥ 1
|
|
2952
|
+
|
|
2953
|
+
# ── choose the anchor: EXACT FIRST, ANN only if needed ───────────
|
|
2954
|
+
anchor ← r.id # a site: exact, carries its identity
|
|
2955
|
+
?? canonicalChunkId(r.bytes) # a segment's canonical identity
|
|
2956
|
+
?? contentIndex.nearest(r.gist, k)[0]
|
|
2957
|
+
# The ANN query is DEFERRED behind the exact path and paid only when
|
|
2958
|
+
# actually consulted (the fallbacks and the margin below) — on
|
|
2959
|
+
# segment-heavy queries this removes the resonate() call for most
|
|
2960
|
+
# regions, the single largest remaining inference sink.
|
|
2961
|
+
score ← 1 for an exact anchor (identity, not an estimate); else the hit's
|
|
2962
|
+
|
|
2963
|
+
# ── a diluted segment votes with the span that carries its evidence ──
|
|
2964
|
+
# A content segment folds FLAT, so its gist superposes every one of its
|
|
2965
|
+
# bytes: an entity inside a longer segment is averaged with whatever
|
|
2966
|
+
# scaffolding shares it. Measured: `ike stee` resonates to the WRONG
|
|
2967
|
+
# deposit at 0.297 while the sub-span `stee` resonates to the right one
|
|
2968
|
+
# at 0.627. Entered only after the exact path failed; candidates are the
|
|
2969
|
+
# segment's two EDGE W-spans (a cut lands INSIDE a unit, so the remnant
|
|
2970
|
+
# sits against the cut); selection by score²·idf — the same quantity the
|
|
2971
|
+
# vote is weighted by, never score alone. The region's SPAN narrows with
|
|
2972
|
+
# its gist, so breadth, clusters and cross-region pairing all see where
|
|
2973
|
+
# the evidence really sits.
|
|
2974
|
+
|
|
2975
|
+
reach ← expandUntilDecided(anchor) # §17.5
|
|
2976
|
+
if reach has no roots and is not saturated:
|
|
2977
|
+
ORPHAN FALLBACK — walk the remaining hits nearest-first; the
|
|
2978
|
+
top-ranked anchor climbing nowhere is an accident of approximate
|
|
2979
|
+
ranking, not evidence the region relates to nothing.
|
|
2980
|
+
else if reach is saturated and the anchor was approximate:
|
|
2981
|
+
SATURATED-TIE FALLBACK — a hub may only claim its abstention when it
|
|
2982
|
+
is DISTINGUISHABLY nearest. Two scores against one query differ by
|
|
2983
|
+
√2× the estimator's error ≈ 1/√D, so any hit within that band is the
|
|
2984
|
+
same rank at measurement resolution; the first tied hit that climbs
|
|
2985
|
+
somewhere non-saturated votes instead. Beyond the band the hub is
|
|
2986
|
+
genuinely nearest and its abstention stands. An exact anchor never
|
|
2987
|
+
enters: its identity is not an estimate.
|
|
2988
|
+
if reach is saturated: the region ABSTAINS # §17.5
|
|
2989
|
+
|
|
2990
|
+
idf ← ln(N / contextsReached); df ← ln(1 + contextsReached)
|
|
2991
|
+
wf ← idf | df | idf + df # the DF MODE — see §17.4
|
|
2992
|
+
if wf ≤ 0: ABSTAIN
|
|
2993
|
+
|
|
2994
|
+
# ── contrastive-margin gate (approximate evidence only) ──────────
|
|
2995
|
+
margin ← score − (score of the best hit reaching a DIFFERENT conclusion)
|
|
2996
|
+
if margin ≤ estimatorNoise(D) · (1 − cov): ABSTAIN
|
|
2997
|
+
|
|
2998
|
+
mutual ← min(1, score·ratio) · min(1, score/ratio) # §17.4
|
|
2999
|
+
vote (mutual · wf)/|roots| for each root reached, and
|
|
3000
|
+
(mutual · idf)/|roots| as the FOCUS weight
|
|
2546
3001
|
```
|
|
2547
3002
|
|
|
2548
|
-
|
|
3003
|
+
Three details of that ladder carry their own arguments:
|
|
3004
|
+
|
|
3005
|
+
- **Coverage scales the bar; it does not switch it.** Measured over 42 voting
|
|
3006
|
+
regions, `known` as a boolean loses a wide band: 43% of "unknown" regions are
|
|
3007
|
+
_partially_ content-addressed and 5% are _fully_ addressed while failing the
|
|
3008
|
+
whole-region test — grouping churn taxed as uncertainty. Promoting the partial
|
|
3009
|
+
band wholesale is over-crediting (it grants a region attested one window in
|
|
3010
|
+
five the same exemption a fully attested one gets). So a region pays the
|
|
3011
|
+
estimator's noise floor _in proportion to how much of it is not
|
|
3012
|
+
content-addressed_: cov = 1 pays nothing, cov = 0 pays the full floor. No new
|
|
3013
|
+
constant — the floor is unchanged and the coverage is read off the store by
|
|
3014
|
+
the same content addressing.
|
|
3015
|
+
|
|
3016
|
+
- **The margin gates; it does not scale the weight.** A surviving region votes
|
|
3017
|
+
at its genuine strength. Using the margin as a multiplier conflates
|
|
3018
|
+
"discriminative" with "strong": a genuinely discriminative span whose rival
|
|
3019
|
+
happened to score close got a tiny vote, systematically compressing correct
|
|
3020
|
+
scaffolding-dominated groundings below the consensus floor so they grounded
|
|
3021
|
+
nothing.
|
|
3022
|
+
|
|
3023
|
+
- **Sub-window regions vote, but not as exact.** Below one window a three-byte
|
|
3024
|
+
string is interned by triviality rather than by evidence. Such a region is not
|
|
3025
|
+
dropped (dropping them cost 35 tests — short regions do carry real evidence);
|
|
3026
|
+
what it must not carry is the exact tier's full mutual weight and its
|
|
3027
|
+
exemption from the margin. Measured: a three-byte segment voting exact at
|
|
3028
|
+
mutual 1.00 with idf 4.22 pushed an unrelated exemplar past the consensus
|
|
3029
|
+
floor and licensed CAST to compare content the query never named.
|
|
3030
|
+
|
|
3031
|
+
### 17.4 The weighting: document frequency, and mutual explanation
|
|
2549
3032
|
|
|
2550
3033
|
A region that climbs to few contexts is _specific_ — strong evidence about what
|
|
2551
|
-
the query concerns. A region that climbs to half the corpus
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
3034
|
+
the query concerns. A region that climbs to half the corpus says almost nothing.
|
|
3035
|
+
Weighting by ln(N/c) — the classical inverse-document-frequency form (Spärck
|
|
3036
|
+
Jones 1972) — expresses exactly this, with N the store's count of learned
|
|
3037
|
+
contexts, and dividing by the number of roots reached splits a region's voice
|
|
3038
|
+
among the candidates it cannot distinguish. Two further readings of the same
|
|
3039
|
+
reach are available and selectable (`inverse`, `direct` = ln(1+c), `combined` =
|
|
3040
|
+
their sum); inverse is the default every mechanism uses, the others exist for
|
|
3041
|
+
corpora where commonality itself is the signal.
|
|
2557
3042
|
|
|
2558
3043
|
The geometric factor is not the raw resonance score but a **mutual-explanation
|
|
2559
3044
|
weight** that reads both angle and magnitude (§2.6). Under the linear fold,
|
|
@@ -2566,52 +3051,117 @@ smaller side even holds; left uncapped, that impossible surplus would let a
|
|
|
2566
3051
|
small region echoing inside a large context, or the reverse, vote above its
|
|
2567
3052
|
physical evidence). The product of the two capped fractions is the mutual weight
|
|
2568
3053
|
that replaces a bare score: it is exactly the same quantity a plain squared
|
|
2569
|
-
cosine approximated implicitly
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
3054
|
+
cosine approximated implicitly, made explicit and safe at every scale. The
|
|
3055
|
+
magnitude read is itself capped at len·D — beyond that the mutual weight is
|
|
3056
|
+
already ~0, so no full walk of a huge hit is ever paid for.
|
|
3057
|
+
|
|
3058
|
+
The margin gate that precedes this weighting (§17.3) stays in raw cosine units
|
|
3059
|
+
deliberately: it tests the RaBitQ estimator's own noise floor, which lives in
|
|
3060
|
+
cosine space, not in byte-magnitude space.
|
|
2575
3061
|
|
|
2576
|
-
### 17.
|
|
3062
|
+
### 17.5 Saturation: expand-until-decided
|
|
2577
3063
|
|
|
2578
3064
|
The climb's work is bounded by **expand-until-decided**: the walk stops as soon
|
|
2579
3065
|
as it knows whether the reach is saturated (the material is too common to
|
|
2580
|
-
discriminate) or a concrete vote (exact roots and contextsReached).
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
- **
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
3066
|
+
discriminate) or a concrete vote (exact roots and contextsReached). Five
|
|
3067
|
+
decisions can end it, each recorded by name in the trace, and each reached
|
|
3068
|
+
through LIMITed store reads only:
|
|
3069
|
+
|
|
3070
|
+
- **Predecessor fan-in.** `prevCount` — an indexed O(1) count — decides "≥ √N
|
|
3071
|
+
distinct contexts" without materialising the predecessor list.
|
|
3072
|
+
- **Distinct-context limit.** The set of learned contexts visited crossing √N
|
|
3073
|
+
decides saturation by a set-size check.
|
|
3074
|
+
- **Parent fan-out.** `parentsFirst(id, √N+1)` — reading √N+1 parents proves
|
|
3075
|
+
"more than √N" exactly. Below √N the read _is_ the full parent list, so the
|
|
3076
|
+
walk is exact.
|
|
3077
|
+
- **Lateral-cone limit.** The accumulated cross-structure entries of the whole
|
|
3078
|
+
climb crossing √N (§8.8).
|
|
3079
|
+
- **Byte-atom commonality.** An atom whose uniform-expectation floor N·W/256
|
|
3080
|
+
exceeds √N (§8.8).
|
|
3081
|
+
|
|
3082
|
+
Two more disciplines bound the work without bounding the evidence: **containment
|
|
3083
|
+
paging** (a window's containers are paged in chunks of √N, so a distinctive
|
|
3084
|
+
window's containers are walked in full while a common window's corpus-sized list
|
|
3085
|
+
is abandoned at the first saturated page) and the **transparent-chain hop**
|
|
3086
|
+
(§8.8). The whole climb is memoised per start node in a **shared reach memo**
|
|
3087
|
+
that lives as long as the store is unwritten — ordinary and conversational asks
|
|
3088
|
+
share it, every ingest invalidates it, and a traced response always gets a cold
|
|
3089
|
+
one.
|
|
3090
|
+
|
|
3091
|
+
A region whose climb triggers any "decided: saturated" condition abstains rather
|
|
3092
|
+
than vote noise. Saturation is also _recorded_: a leading saturated stretch of
|
|
3093
|
+
the query (a boilerplate preamble) is treated as scaffolding, and further points
|
|
3094
|
+
of attention are only admitted beyond it. The dual use — abstain from voting,
|
|
3095
|
+
and mark scaffolding — is what keeps long templated queries from diluting their
|
|
3096
|
+
own payload.
|
|
3097
|
+
|
|
3098
|
+
### 17.6 Pooling and commitment
|
|
3099
|
+
|
|
3100
|
+
Votes accumulate through the **arithmetic semiring** (§5.3), run through the
|
|
3101
|
+
very same `lightestDerivation` engine the cover search uses: each surviving
|
|
3102
|
+
region is an axiom, each (region → anchor) contribution is a summing rule, and a
|
|
3103
|
+
vote for a _terminal_ answer node redistributes to the ≤ √N contexts that lead
|
|
3104
|
+
to it. Independent corroboration ADDS — a pooled-evidence decision is one
|
|
3105
|
+
weighted rule of the same deduction system, not a hand-rolled tally alongside
|
|
3106
|
+
it.
|
|
3107
|
+
|
|
3108
|
+
Each ranked anchor then carries four read-outs, and they answer different
|
|
3109
|
+
questions:
|
|
3110
|
+
|
|
3111
|
+
| Field | Meaning |
|
|
3112
|
+
| :------------ | :-------------------------------------------------------------------------------------------------- |
|
|
3113
|
+
| **vote** | the pooled sum — grows with how many places corroborated |
|
|
3114
|
+
| **peak** | what the strongest single contributing region said on its own |
|
|
3115
|
+
| **start–end** | that same strongest region's query span — the minimal honest statement of what a grounding rests on |
|
|
3116
|
+
| **breadth** | the fraction of the query's own (non-corroborating) regions whose evidence this anchor accounts for |
|
|
3117
|
+
| **clusters** | how many distinct PLACES in the query corroborate it, merging contributors closer than W |
|
|
3118
|
+
|
|
3119
|
+
The distinctions are load-bearing. A consumer holding a point to the consensus
|
|
3120
|
+
floor — a bar priced for _one_ region's maximally discriminative evidence — must
|
|
3121
|
+
read **peak**, not vote: six scaffolding regions summing past the floor is not
|
|
3122
|
+
the same claim as one region clearing it. And `start–end` is the argmax region,
|
|
3123
|
+
not a hull over every contributor: widening it to everything that voted made
|
|
3124
|
+
recall out-bid mechanisms that had genuinely explained more.
|
|
3125
|
+
|
|
3126
|
+
**Breadth** is the scale-invariant confidence the raw IDF vote cannot give (an
|
|
3127
|
+
absolute, ln N-scaled quantity means "strong" on a small store and "weak" on a
|
|
3128
|
+
large one for the same degree of genuine consensus). **Clusters** answers a
|
|
3129
|
+
different question again — not how _much_ evidence, but how many separate places
|
|
3130
|
+
carry it. Both breadth and raw region count were tried as the further-topic gate
|
|
3131
|
+
and falsified: breadth starves a genuine, evenly split multi-topic query (no
|
|
3132
|
+
root in a real N-way split can exceed half the vote), and raw count does not
|
|
3133
|
+
separate a short structurally simple echo from a real topic. A coincidental
|
|
3134
|
+
match is structurally confined to _one_ cluster however strong its vote; a
|
|
3135
|
+
genuine further topic is named in its own distinctive wording somewhere the
|
|
3136
|
+
scaffolding does not reach, always a separate cluster.
|
|
3137
|
+
|
|
3138
|
+
Commitment then proceeds down the ranked list:
|
|
3139
|
+
|
|
3140
|
+
- The first non-overlapping anchor is **dominant** and always grounds; only the
|
|
3141
|
+
leading-saturation gate applies to it.
|
|
3142
|
+
- Any **further** anchor must clear both the **natural break** (the steepest
|
|
3143
|
+
ratio drop in the sorted votes — a scale-free "where does signal end" test)
|
|
3144
|
+
and the **consensus floor** ln N + ½ (§8.6), and must lie past any leading
|
|
3145
|
+
saturated stretch. The floor matters because the natural break is scale-free
|
|
3146
|
+
but not floor-free: on a large, topic-diverse corpus the steepest ratio in a
|
|
3147
|
+
long noise tail can sit far below any real signal.
|
|
3148
|
+
- An anchor overlapping one already placed is absorbed, never re-elected.
|
|
3149
|
+
|
|
3150
|
+
The natural break is read over the anchors the **query itself pointed at** —
|
|
3151
|
+
votes standing only on corroborating evidence (§17.2, source 3) are excluded
|
|
3152
|
+
from the distribution. They are exact, hence high-IDF, hence they land at the
|
|
3153
|
+
top and shift the cut; a two-topic query then elects three roots.
|
|
3154
|
+
|
|
3155
|
+
### 17.7 What consumes the climb
|
|
3156
|
+
|
|
3157
|
+
The climb is computed once per response (memoised by query content, k and DF
|
|
3158
|
+
mode) and consumed by five mechanisms: recall's scaffolding tier (§21), CAST's
|
|
3159
|
+
identification of woven structures (§18), confluence's constraint-stream
|
|
3160
|
+
detection (§18.5), extraction's search for a skill exemplar (§20), and fusion's
|
|
3161
|
+
grounding of further topics (§23). The cross-region pass (§17.8) runs inside the
|
|
3162
|
+
climb, consuming its region votes and the shared junction ascent.
|
|
3163
|
+
|
|
3164
|
+
### 17.8 Cross-region attention: the binding problem
|
|
2615
3165
|
|
|
2616
3166
|
Additive pooling has a blind spot. Two regions whose independent climbs land on
|
|
2617
3167
|
_different_ contexts leave their **joint context** — the learnt whole that
|
|
@@ -2713,21 +3263,71 @@ _corroborates_ it (partial agreement — a different slice of the same context)
|
|
|
2713
3263
|
and is kept. Votes whose bytes the container does not hold at all (a genuine
|
|
2714
3264
|
second topic) are untouched.
|
|
2715
3265
|
|
|
2716
|
-
**
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
3266
|
+
**The graded ladder — five tiers, exact before approximate.** The pairing walks
|
|
3267
|
+
one ladder and stops at the first tier that finds anything, all tiers sharing a
|
|
3268
|
+
single walk budget and the per-response walk cache:
|
|
3269
|
+
|
|
3270
|
+
1. **Exact** — containers of the two forms themselves, by content-addressed DAG
|
|
3271
|
+
ascent, order-free.
|
|
3272
|
+
2. **Single synonym** — the same ascent with one side replaced by a halo
|
|
3273
|
+
sibling.
|
|
3274
|
+
3. **Double synonym** — both sides replaced.
|
|
3275
|
+
4. **Structural resonance** — the only tier with no byte containment behind it,
|
|
3276
|
+
reached only when every DAG tier found nothing _and_ no already-corroborated
|
|
3277
|
+
region sits between the endpoints (a between-region with its own vote means
|
|
3278
|
+
the gap already means something specific; an ANN guess must not override it).
|
|
3279
|
+
Each side's own gist — and the literal middle bytes, when there are any — are
|
|
3280
|
+
composed positionally into a **synthetic gist** (§2.3's algebra applied to
|
|
3281
|
+
existing vectors, never to a concatenated byte string, and never interned),
|
|
3282
|
+
which is resonated into the content index. Because nothing byte-level backs
|
|
3283
|
+
it, this tier is gated much harder than the DAG ones: **both** sides must be
|
|
3284
|
+
content-addressed _and_ individually discriminative (a shared,
|
|
3285
|
+
non-discriminative preamble can be exact without being evidence of anything,
|
|
3286
|
+
and composing its gist manufactures a plausible-looking but spurious
|
|
3287
|
+
neighbour); the pair must satisfy the same phrase-scale contract the DAG
|
|
3288
|
+
tiers hold their glue to; a candidate whose reach is exactly one side's _own_
|
|
3289
|
+
already-voted conclusion is rejected as self-evidence (that is the side's
|
|
3290
|
+
resonance rediscovering itself through a gist still dominated by its own
|
|
3291
|
+
direction); and the selected proposal must beat the best differently-
|
|
3292
|
+
concluding rival by more than the estimator's noise floor. Proposals are
|
|
3293
|
+
ranked by ANN score × the semantic confidence of the sibling substitution
|
|
3294
|
+
that produced them, so an exact-sided variant outranks a double-synonym one
|
|
3295
|
+
at equal ANN score.
|
|
3296
|
+
|
|
3297
|
+
Two asymmetries follow from where each tier's evidence comes from, and both are
|
|
3298
|
+
deliberate:
|
|
3299
|
+
|
|
3300
|
+
- **Only exact evidence may explain votes away.** Single-synonym, double-synonym
|
|
3301
|
+
and structural-resonance junctions may _add_ supporting evidence but never
|
|
3302
|
+
remove it: their own evidence is a substitution or a guess, and letting their
|
|
3303
|
+
byte containment behave like exact containment would let an approximation
|
|
3304
|
+
override a genuine, independently voted region.
|
|
3305
|
+
- **Only container-backed evidence consumes its endpoints.** Consuming a
|
|
3306
|
+
candidate asserts "its evidence is already composed at full joint strength" —
|
|
3307
|
+
a claim only a real container can make. A structural-resonance pick has none,
|
|
3308
|
+
so consuming its endpoints would lock up candidates on the strength of a
|
|
3309
|
+
guess. Measured: a resonated pair consumed "red", after which "red" ▸ "circle"
|
|
3310
|
+
was never probed and the exact junction `red circle` — a stored whole, sitting
|
|
3311
|
+
right there — went unfound. Both votes now stand and pooling decides between
|
|
3312
|
+
them, which is what the mechanism market is for.
|
|
3313
|
+
|
|
3314
|
+
**Voting.** A joint container found by a DAG tier is **exact** evidence — it
|
|
3315
|
+
literally holds the composed forms — so it votes at full strength (score = 1, no
|
|
3316
|
+
estimator); a synonym or structural pick votes at its own confidence instead.
|
|
3317
|
+
Weighting is otherwise the same mutual-explanation and IDF discipline as
|
|
3318
|
+
single-region votes, with the combined byte length of all composed candidates as
|
|
3319
|
+
the region size. A junction whose every composed part is a _corroborating_
|
|
3320
|
+
region (§17.2) inherits that flag: composing two forms the query's own cut split
|
|
3321
|
+
does not weave a point of attention, and without the inheritance such evidence
|
|
3322
|
+
re-entered the root election as a first-class anchor (measured over the suite:
|
|
3323
|
+
130 accepted junctions, 44 standing on at least one corroborating region, and 12
|
|
3324
|
+
standing on nothing else — precisely the leak). One genuine fold region among
|
|
3325
|
+
the parts means the query did point here, and the junction anchors on it.
|
|
3326
|
+
|
|
3327
|
+
The combined pool (independent votes, minus any superseded by exact cross-region
|
|
3328
|
+
evidence, plus the cross-region votes) means a joint context with no
|
|
3329
|
+
single-region support can still become a point of attention when its combined
|
|
3330
|
+
evidence clears the consensus floor (§8.6).
|
|
2731
3331
|
|
|
2732
3332
|
---
|
|
2733
3333
|
|
|
@@ -2739,60 +3339,149 @@ Some queries do not ask about one learned thing; they _weave together several_
|
|
|
2739
3339
|
"what if X had Y's property?", "compare X and Y", a sentence that grafts one
|
|
2740
3340
|
learned frame onto another's subject. CAST (Counterfactual trAnSfer) detects the
|
|
2741
3341
|
weave by **graded alignment** — the same evidence ladder as `locate()`: literal
|
|
2742
|
-
W-gram runs first, then distributional role
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
3342
|
+
W-gram runs first, then distributional role, then the climb's own conclusion. It
|
|
3343
|
+
transfers structure between the woven parts. CAST is the byte-level, formalized
|
|
3344
|
+
descendant of case-based reasoning's _adaptation_ step (Kolodner 1992).
|
|
3345
|
+
|
|
3346
|
+
Its preconditions are all structural (per invariant §14.2), and each one is a
|
|
3347
|
+
separate refusal with its own trace note:
|
|
3348
|
+
|
|
3349
|
+
1. the query is at least two perception windows long, and something has been
|
|
3350
|
+
learnt;
|
|
3351
|
+
2. the climb (§17) ranks at least two anchors;
|
|
3352
|
+
3. the weave (§18.2) leaves at least two aligned points that are genuinely **two
|
|
3353
|
+
topics** (§18.3);
|
|
3354
|
+
4. at least one aligned point is a **committed root** of the climb — CAST
|
|
3355
|
+
refuses to transfer through content the climb itself never settled on;
|
|
3356
|
+
5. something is actually **woven**: some aligned run falls outside every
|
|
3357
|
+
recognised site, _or_ two points in the current turn restate two _different_
|
|
3358
|
+
sites (which is exactly what a comparison naming both entities looks like).
|
|
3359
|
+
|
|
3360
|
+
The last one carries a conversation-specific clause. A multi-turn query is the
|
|
3361
|
+
whole transcript, so an earlier turn's own question is an aligned point too —
|
|
3362
|
+
traced: the weave for "And what is the capital of Spain?" holds "What is the
|
|
3363
|
+
capital of France?" beside the new question. Two points, two named sites, and
|
|
3364
|
+
nothing woven at all: one of them is conversation history. So the "two different
|
|
3365
|
+
sites" reading requires both points to have evidence in the **current turn** —
|
|
3366
|
+
the bytes past the last answered span. Single-turn queries have no answered
|
|
3367
|
+
spans, so the current turn is the whole query and nothing changes.
|
|
3368
|
+
|
|
3369
|
+
If any of this fails, CAST returns nothing and the grounding decider considers
|
|
3370
|
+
the remaining candidates.
|
|
3371
|
+
|
|
3372
|
+
### 18.2 The weave: graded alignment over the asker's own stream
|
|
3373
|
+
|
|
3374
|
+
The weave is a shared, lazily computed analysis (§14.1), not CAST's private
|
|
3375
|
+
machinery. For each of the first k ranked anchors:
|
|
2760
3376
|
|
|
2761
3377
|
1. **Literal** — `alignRuns`: W-gram seed-and-extend. Every W-gram of the query
|
|
2762
3378
|
is indexed; each W-gram of the context that matches seeds a run, extended
|
|
2763
3379
|
greedily in both directions; overlaps resolved longest-first. Weight = 1.0
|
|
2764
3380
|
(exact match is full evidence).
|
|
2765
3381
|
|
|
2766
|
-
2. **Halo** — where the query has
|
|
2767
|
-
recognised sites with halos are matched to the exemplar context's own
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
3382
|
+
2. **Halo** — where the query has no literal coverage from this anchor,
|
|
3383
|
+
recognised sites with halos are matched to the exemplar context's own sites
|
|
3384
|
+
(gate: the concept threshold). The run's weight is the cosine itself —
|
|
3385
|
+
measured evidence, not an invented constant.
|
|
3386
|
+
|
|
3387
|
+
3. **The climb's own proposal** — a second pass, after every literal run is
|
|
3388
|
+
placed. `alignRuns` seeds on W-grams, so two forms differing by a single byte
|
|
3389
|
+
share no run at all: on "How is ice like steel?" against a store holding "Ice
|
|
3390
|
+
is cold", the query's "ice" and the stored "Ice" agree on only three bytes
|
|
3391
|
+
and are never seeded, so that structure entered the weave carrying nothing
|
|
3392
|
+
but the scaffolding every exemplar shares. The climb had _already_ identified
|
|
3393
|
+
it — electing "Ice is cold" from one span and "Steel is hard" from another,
|
|
3394
|
+
through gates the aligner has no equivalent of. So the climb **proposes** the
|
|
3395
|
+
pairing (which structure, which query span) and **bytes decide** its terms,
|
|
3396
|
+
under three gates, each one measured: the span must take only query bytes no
|
|
3397
|
+
literal run claimed (run inline with pass 1, a higher-ranked candidate's
|
|
3398
|
+
proposal trimmed a lower-ranked candidate's byte-for-byte match out of
|
|
3399
|
+
existence); the literal agreement must **dominate** the span (a climb vote is
|
|
3400
|
+
not by itself an alignment — where the proposal is real, agreement is
|
|
3401
|
+
overwhelming); and the span must not be **frame** (literal dominance alone is
|
|
3402
|
+
too weak at this scale — a four-byte span agrees three-of-four with half the
|
|
3403
|
+
corpus by accident).
|
|
3404
|
+
|
|
3405
|
+
Three structural disciplines shape what the weave admits:
|
|
3406
|
+
|
|
3407
|
+
- **Weave-scale anchors only.** CAST transfers between things the _query_ weaves
|
|
3408
|
+
— query-scale structures. A context an order of magnitude beyond the query is
|
|
3409
|
+
not woven by it (the query can at most quote a fragment, which recognition and
|
|
3410
|
+
the cover already handle), so an anchor is read through a prefix-capped read
|
|
3411
|
+
of W × the asker's own byte count and dropped if it exceeds it. Profiled on a
|
|
3412
|
+
17.7M-node store, uncapped weaves spent 5–8 s per query recognising
|
|
3413
|
+
conversation-length anchors that could never form a weave point.
|
|
3414
|
+
- **The asker's stream only.** Completed replies remain available to recognition
|
|
3415
|
+
and the climb as conversation context, but the alignment cuts the answered
|
|
3416
|
+
spans out, aligns the remaining segments as one compacted stream, and splits
|
|
3417
|
+
every run back across the original offsets so no evidence crosses an omitted
|
|
3418
|
+
boundary (§24.5). Otherwise weave work grows with answer length and the engine
|
|
3419
|
+
analogises against its own previous output.
|
|
3420
|
+
- **One place, one structure.** A stored sentence and the entity it names are
|
|
3421
|
+
not two independent structures when the query's evidence for them is the same
|
|
3422
|
+
bytes — they are one place read at two grains, and admitting both lets a nest
|
|
3423
|
+
of containing sentences outvote the entity the query actually named (measured:
|
|
3424
|
+
comparison seated on a 49-byte sentence instead of the 17-byte entity). A
|
|
3425
|
+
point earns its place the same way a second point earns CAST's entry: at least
|
|
3426
|
+
one perception quantum of query bytes no better-voted point already explains.
|
|
3427
|
+
Points arrive in the climb's vote order — which structures belong in the weave
|
|
3428
|
+
is the climb's call, not a local run measure.
|
|
3429
|
+
|
|
3430
|
+
**Runs are never trimmed against each other.** A point keeps every byte it
|
|
3431
|
+
aligned; exclusivity is a property of _structures_, not of individual query
|
|
3432
|
+
bytes. This is worth recording because the trimming that used to happen was
|
|
3433
|
+
invisible and load-bearing in the wrong way: a point's first run — which three
|
|
3434
|
+
CAST branches read as "the filler", "the seat", "the name" — was whichever run
|
|
3435
|
+
survived the cut, so those schemas were reading an elimination order as though
|
|
3436
|
+
it were evidence, and the query's own bytes were truncated on the way
|
|
3437
|
+
("Shakespeare" surviving as "Shakes"). Each consumer now derives its own reading
|
|
3438
|
+
from the runs.
|
|
3439
|
+
|
|
3440
|
+
Finally, the per-byte **depth** counts _structures_, not weight: the frame test
|
|
3441
|
+
below compares `depth[i]` against a count of aligned points, so accumulating
|
|
3442
|
+
graded weight there would compare weight-mass against a cardinality. Measured
|
|
3443
|
+
with only that toggled: 9 candidates collapsing to 2 points made 29 of 42 bytes
|
|
3444
|
+
read as frame; counting distinct covering candidates leaves 6 of 42, which
|
|
3445
|
+
decouples the frame gate from however many points happen to survive.
|
|
3446
|
+
|
|
3447
|
+
### 18.3 Two gates: two topics, and frame
|
|
3448
|
+
|
|
3449
|
+
**Two topics.** `points.length ≥ 2` reads as "two structures to transfer
|
|
3450
|
+
between", but measured, it functions as "the query is about more than one
|
|
3451
|
+
thing", and it only discriminates because the weave eliminates hard enough that
|
|
3452
|
+
a single-topic query cannot reach two points — the condition carried by the
|
|
3453
|
+
elimination, not by anything CAST measures. What actually separates a genuine
|
|
3454
|
+
comparison from a single-topic query is _content_: a real comparison's points
|
|
3455
|
+
are evidenced by **different query spans**, while a single-topic query's extra
|
|
3456
|
+
points align to the same shared frame the first one already explains. So two
|
|
3457
|
+
points count as two topics when either:
|
|
3458
|
+
|
|
3459
|
+
- a second point contributes at least one perception quantum of query bytes the
|
|
3460
|
+
best-covered point does not; **or**
|
|
3461
|
+
- the climb found the query **dispersed** (two committed roots, or one whose
|
|
3462
|
+
cluster count reaches two — §17.6) _and_ the points were elected from places
|
|
3463
|
+
at least a quantum apart, _and_ at least a quantum of query bytes remains
|
|
3464
|
+
unexplained by the widest point.
|
|
3465
|
+
|
|
3466
|
+
Each clause is there because the others were measured insufficient: dispersion
|
|
3467
|
+
alone let CAST into a near-tie and a list skill whose points the climb elects
|
|
3468
|
+
from the same place; and without the unexplained-bytes clause, a query that is a
|
|
3469
|
+
_prefix of one stored fact_ disperses into two clusters purely because the fact
|
|
3470
|
+
repeats a phrase, while that one point's runs cover every query byte — the same
|
|
3471
|
+
topic corroborated twice, not two topics.
|
|
3472
|
+
|
|
3473
|
+
**Frame.** Both components of the frame gate are derived from the weave itself,
|
|
3474
|
+
not tuned:
|
|
2783
3475
|
|
|
2784
3476
|
1. **MIN_WEAVE** — the minimum number of aligned structures to form a weave: the
|
|
2785
|
-
same `2` that gates CAST entry
|
|
2786
|
-
|
|
2787
|
-
|
|
3477
|
+
same `2` that gates CAST entry. Frame requires evidence _beyond_ the minimum
|
|
3478
|
+
pair — a third structure agreeing — so the depth gate is
|
|
3479
|
+
`depth[i] > MIN_WEAVE`. One definition, two uses.
|
|
2788
3480
|
|
|
2789
|
-
2. **Half-dominance** — `dominates(part, whole)` (§8.7), the same test
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
are NOT a majority: `¬dominates(framedCount, runLen)`.
|
|
2794
|
-
|
|
2795
|
-
In full:
|
|
3481
|
+
2. **Half-dominance** — `dominates(part, whole)` (§8.7), the same test region
|
|
3482
|
+
collection, `liftAnswer`, and confluence's filler gate all use. A byte is
|
|
3483
|
+
frame when the structures covering it are a majority of all aligned
|
|
3484
|
+
structures; a run is usable when its framed bytes are _not_ a majority.
|
|
2796
3485
|
|
|
2797
3486
|
```
|
|
2798
3487
|
frame(i) ⇔ depth[i] > MIN_WEAVE ∧ dominates(depth[i], aligned)
|
|
@@ -2800,10 +3489,18 @@ usable(qs,qe) ⇔ ¬dominates(framedCount(qs, qe), qe − qs)
|
|
|
2800
3489
|
```
|
|
2801
3490
|
|
|
2802
3491
|
The frame gate is the canonical example of **weave-local commonality** (§8.10):
|
|
2803
|
-
`aligned` counts the structures aligned with _this query_, not the corpus.
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
3492
|
+
`aligned` counts the structures aligned with _this query_, not the corpus.
|
|
3493
|
+
Replacing the weave-local majority with corpus-global IDF misfires on reordered
|
|
3494
|
+
single-fact queries. See §8.10 for the general theory and the full table of
|
|
3495
|
+
which mechanism uses which measure.
|
|
3496
|
+
|
|
3497
|
+
One more derived reading sits beside the gates: the weave's **dominant** is its
|
|
3498
|
+
principal _structure_ — the aligned point explaining the most query bytes — not
|
|
3499
|
+
the climb's top-ranked _topic_. The two used to coincide, but the contrastive
|
|
3500
|
+
margin (§17.3) ranks the query's own exact site first, while CAST's schemas all
|
|
3501
|
+
orient around the frame-bearing structure: the substitution seat is displaced
|
|
3502
|
+
_in_ the dominant, and comparison seats the analogs by the contexts that
|
|
3503
|
+
establish their roles.
|
|
2807
3504
|
|
|
2808
3505
|
### 18.4 Three transfer schemas
|
|
2809
3506
|
|
|
@@ -2843,6 +3540,20 @@ best-evidenced genuine hub among the candidates. The answer voices each analog
|
|
|
2843
3540
|
by the context that establishes its role, joined by a learned connector when one
|
|
2844
3541
|
exists.
|
|
2845
3542
|
|
|
3543
|
+
Comparison carries one further guard, because its weakest licence — frame-tier
|
|
3544
|
+
evidence under a root the consensus floor does not trust — is the easiest to
|
|
3545
|
+
satisfy by accident. Under that licence the two analogs' aligned runs must
|
|
3546
|
+
account for **every stored window of the query**: the ignored-known principle
|
|
3547
|
+
(§19.5). This is the byte-structural separator that no local threshold could
|
|
3548
|
+
find. A legitimate small-corpus comparison ("How is ice like steel?") leaves
|
|
3549
|
+
only _unattested_ spans ("How ", " like ") unexplained, while a scrap-matched
|
|
3550
|
+
junk pair leaves the query's own trained content dismissed as gaps. Halo-tier
|
|
3551
|
+
analogs are exempt — distributional company is independent evidence in its own
|
|
3552
|
+
right. A **trusted root is not** exempt: the root's trust says the climb settled
|
|
3553
|
+
on something, which is a different question about a different quantity from
|
|
3554
|
+
whether _this comparison's_ evidence covers what the store knows. Measured, the
|
|
3555
|
+
two disagreed exactly where it mattered, and comparison fired on a junk analog.
|
|
3556
|
+
|
|
2846
3557
|
Whatever CAST produces, the anchors it consumed are marked as such, so the
|
|
2847
3558
|
reasoning stage (§22) does not re-walk the same facts. Each schema reports its
|
|
2848
3559
|
own `accounted` — the runs of exactly the points that schema transferred
|
|
@@ -2953,8 +3664,37 @@ BRIDGE Cover(i) ∧ Out(i, j) → Cover(j)
|
|
|
2953
3664
|
material survives between rewritten parts.
|
|
2954
3665
|
|
|
2955
3666
|
FOLLOW-EDGE Form(i, j, n) → Form(i, j, n′) cost STEP
|
|
2956
|
-
where n ──▶ n′ is a learned continuation edge.
|
|
2957
|
-
|
|
3667
|
+
where n ──▶ n′ is a learned continuation edge. EVERY hop
|
|
3668
|
+
costs STEP, first or fifth, so a chain's total cost is
|
|
3669
|
+
proportional to its length and the lightest derivation is the
|
|
3670
|
+
SHORTEST successful one. (Charging later hops nothing made
|
|
3671
|
+
every stopping point at any depth tie, leaving the choice to
|
|
3672
|
+
whichever arrived first.) With several continuations the
|
|
3673
|
+
disambiguator (§25) is offered first; the engine keeps the
|
|
3674
|
+
first arrival at a given cost, so an evidence-backed edge wins
|
|
3675
|
+
ties deterministically rather than by exploration order.
|
|
3676
|
+
A form born by RECOMPOSITION continues at MICRO instead —
|
|
3677
|
+
once parts are consolidated into a learned whole, following it
|
|
3678
|
+
to its answer is the recomposition completing.
|
|
3679
|
+
|
|
3680
|
+
STOP-HERE Form(i, j, n) reached via edges → Out(i, j, bytes(n))
|
|
3681
|
+
cost CONCEPT
|
|
3682
|
+
Give up mid-chain and emit the node as it stands. Priced by
|
|
3683
|
+
the same ordering that makes a synonym dearer than a direct
|
|
3684
|
+
edge: a premature stop at depth D costs D·STEP + CONCEPT, so a
|
|
3685
|
+
shorter premature stop beats a longer one and a genuine
|
|
3686
|
+
fixpoint (below, +0) beats any premature stop at equal depth.
|
|
3687
|
+
The search settles here only when continuing dead-ends or
|
|
3688
|
+
grows costlier than giving up. These bytes are the node's OWN
|
|
3689
|
+
— never the recursive re-cover, which is reserved for the one
|
|
3690
|
+
place it is load-bearing.
|
|
3691
|
+
|
|
3692
|
+
GROUND Form(i, j, n), a genuine FIXPOINT → Out(i, j, bytes) cost 0
|
|
3693
|
+
The chain reached a node with no whole-node continuation
|
|
3694
|
+
anywhere. RECOMPLETION (§19.6) runs HERE and only here —
|
|
3695
|
+
once, at the chain's actual end — so its cost tracks the
|
|
3696
|
+
answer's own structure rather than how densely the corpus
|
|
3697
|
+
interconnects the nodes passed through on the way.
|
|
2958
3698
|
|
|
2959
3699
|
CONCEPT-HOP Form(i, j, n), n edge-less → Form(i, j, s′) cost CONCEPT
|
|
2960
3700
|
where s is a halo sibling of n above the concept threshold and
|
|
@@ -2962,29 +3702,26 @@ CONCEPT-HOP Form(i, j, n), n edge-less → Form(i, j, s′) cost CONCEPT
|
|
|
2962
3702
|
a literal edge. (Siblings are pre-resolved before the search,
|
|
2963
3703
|
since index queries are asynchronous.)
|
|
2964
3704
|
|
|
2965
|
-
GROUND Form(i, j, n), n terminal, reached via edges
|
|
2966
|
-
→ Out(i, j, bytes(n)) cost 0
|
|
2967
|
-
The chain's endpoint becomes answer bytes for the span. Before
|
|
2968
|
-
emitting, RECOMPLETION (§19.6) may resolve deeper.
|
|
2969
|
-
|
|
2970
3705
|
SPLIT Out literal, containing a split position k (§15.2)
|
|
2971
3706
|
→ the two halves cost 0
|
|
2972
3707
|
The query's own chunking is not sacred; a form boundary the
|
|
2973
|
-
store knows can cut a leaf.
|
|
3708
|
+
store knows can cut a leaf. Demand-driven: emitted only when
|
|
3709
|
+
a split point actually falls inside this out.
|
|
2974
3710
|
|
|
2975
3711
|
FUSE Out(i, j) ∧ Out(j, k) adjacent → Out(i, k) cost 0
|
|
2976
|
-
The concatenation may name a known node (
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
3712
|
+
The concatenation may name a known node (as a short leaf; as
|
|
3713
|
+
the branch of the two sides' nodes; or by canonical
|
|
3714
|
+
re-perception when a side is a completed rewrite). Kept alive
|
|
3715
|
+
only while it could still grow into a form. Subject to the
|
|
3716
|
+
ATOM-CHAIN GATE below.
|
|
2980
3717
|
|
|
2981
3718
|
RECOMPOSE the fused pair → Form(i, k, node) cost 0
|
|
2982
3719
|
Two already-rewritten parts fusing into a node that itself
|
|
2983
|
-
continues is a RECOMPOSITION: its onward FOLLOW-EDGE
|
|
2984
|
-
so the consolidated whole strictly beats leaving the
|
|
2985
|
-
split.
|
|
2986
|
-
|
|
2987
|
-
chunk of some one-shot phrase.
|
|
3720
|
+
continues is a RECOMPOSITION: its onward FOLLOW-EDGE costs
|
|
3721
|
+
MICRO, so the consolidated whole strictly beats leaving the
|
|
3722
|
+
parts split. A guard requires the fused node to be
|
|
3723
|
+
halo-bearing — learned as a meaningful unit, not an accidental
|
|
3724
|
+
interior chunk of some one-shot phrase.
|
|
2988
3725
|
|
|
2989
3726
|
SPLICE Out(recognised L) ∧ Out(recognised R), a learned connector
|
|
2990
3727
|
exists between L's and R's answers → Out(L+connector+R) cost 0
|
|
@@ -2997,6 +3734,24 @@ The A\* heuristic is ε per uncovered byte beyond an item's right edge —
|
|
|
2997
3734
|
admissible because ε is the minimum per-position cost, and what keeps the search
|
|
2998
3735
|
output-sensitive (§5.2, §8.9).
|
|
2999
3736
|
|
|
3737
|
+
**The atom-chain gate on FUSE.** A pure leaf-leaf fuse — neither side already a
|
|
3738
|
+
recognised completion — is opportunistic cross-leaf recovery: the probe has no
|
|
3739
|
+
idea _why_ two leaves are adjacent, only that their concatenation happens to
|
|
3740
|
+
spell a trained form. At hub scale, where atoms themselves no longer
|
|
3741
|
+
discriminate (§8.8), that coincidence is noise. This gate used to exempt any
|
|
3742
|
+
fuse starting at a position the query's own fold cut at, documented as "real
|
|
3743
|
+
structural evidence" — and under a fixed-arity fold those positions were exactly
|
|
3744
|
+
{0, W, 2W, …}, carrying no content information whatsoever. What it cost, on a
|
|
3745
|
+
17.9M-node store: "In which country is the Eiffel Tower?" fused two byte atoms
|
|
3746
|
+
at offset 4 — trusted only because 4 ≡ 0 (mod W) — into the trained form "hi",
|
|
3747
|
+
followed its edge, and grounded a greeting as a fact, explaining 2 of 37 bytes.
|
|
3748
|
+
The exemption was removed rather than replaced: there was no cheap signal that
|
|
3749
|
+
meant what it claimed, and inventing one would be worse than admitting the
|
|
3750
|
+
absence. Genuine cross-leaf forms are not lost — recognition's canonical pass
|
|
3751
|
+
already probes every byte offset and emits them as sites, which arrive here as
|
|
3752
|
+
recognised outs and stay exempt. Below hub scale nothing changes: on a small
|
|
3753
|
+
store, coincidence is rare and every chain is real evidence.
|
|
3754
|
+
|
|
3000
3755
|
### 19.4 What the cost ladder buys, concretely
|
|
3001
3756
|
|
|
3002
3757
|
- Coverage dominates: the search _must_ account for every byte, and prefers
|
|
@@ -3006,6 +3761,9 @@ output-sensitive (§5.2, §8.9).
|
|
|
3006
3761
|
- Free fusion/recomposition means the search always finds the _deepest
|
|
3007
3762
|
consolidated reading_: if "D E" recomposes into a learned "DE" that continues
|
|
3008
3763
|
to F, the answer is F, not "D′ E′".
|
|
3764
|
+
- A chain's cost is proportional to its LENGTH, so among successful chains the
|
|
3765
|
+
shortest wins; and a genuine fixpoint always beats giving up early at the same
|
|
3766
|
+
depth, while a shorter premature stop beats a longer one.
|
|
3009
3767
|
- Ties resolve by the fixed conventions of §25 — deterministically.
|
|
3010
3768
|
|
|
3011
3769
|
### 19.5 Connectors: learned joins (the bridge)
|
|
@@ -3014,7 +3772,7 @@ When an answer has several parts, what belongs _between_ them? Sema asks the
|
|
|
3014
3772
|
store through a **graded junction ladder** — exact evidence before approximate,
|
|
3015
3773
|
the same discipline as `locate` (§14.4). The junction search is extracted into
|
|
3016
3774
|
one shared procedure so that both the bridge (a connector between answer pieces)
|
|
3017
|
-
and cross-region attention (§17.
|
|
3775
|
+
and cross-region attention (§17.8, the joint context of query regions) ascend by
|
|
3018
3776
|
the same bounded, cached walk:
|
|
3019
3777
|
|
|
3020
3778
|
1. **Junction containers, by content-addressed identity.** Hash-consing means
|
|
@@ -3043,8 +3801,17 @@ the same bounded, cached walk:
|
|
|
3043
3801
|
When several junctions qualify, the **response guide** (the query's gist — the
|
|
3044
3802
|
same disambiguator every projection uses) picks by resonance; ties prefer the
|
|
3045
3803
|
shortest interior (a junction should not insert unnecessary glue), then the
|
|
3046
|
-
lowest node id (deterministic — a property of the corpus, not the seed).
|
|
3047
|
-
|
|
3804
|
+
lowest node id (deterministic — a property of the corpus, not the seed). An
|
|
3805
|
+
_empty_ interior found by evidence is a confirmed adjacency, returned as such
|
|
3806
|
+
and never confused with a miss. No learned evidence at any tier ⇒ no connector
|
|
3807
|
+
invented.
|
|
3808
|
+
|
|
3809
|
+
Bridge results are memoised per response, keyed on the **bytes** of the pair
|
|
3810
|
+
(one code unit per byte — an injective encoding). The cover's connector
|
|
3811
|
+
pre-resolution asks for the same pair through several site/answer combinations,
|
|
3812
|
+
and fusion and CAST re-ask pairs the cover already resolved, so each unique pair
|
|
3813
|
+
is walked once. The key must be injective on raw bytes: a lossy text decoding
|
|
3814
|
+
gave `[65,0,66]` and `[65,66,0]` the same key and therefore the same connector.
|
|
3048
3815
|
|
|
3049
3816
|
Connectors are pre-resolved for the query's adjacent site pairs (and for
|
|
3050
3817
|
first-to-later pairs of longer groups), then handed to the search, where SPLICE
|
|
@@ -3063,6 +3830,12 @@ being recompleted is not re-entered (cycle guard), node identities are finite,
|
|
|
3063
3830
|
and finished recompletions are memoised — so chains run exactly as deep as the
|
|
3064
3831
|
graph licenses, and stop.
|
|
3065
3832
|
|
|
3833
|
+
It runs at **one** place only: the chain's genuine fixpoint (§19.3's GROUND).
|
|
3834
|
+
Offering it at every premature stop instead makes a query's total cost scale
|
|
3835
|
+
with how densely the corpus happens to interconnect the nodes passed through —
|
|
3836
|
+
corpus density — rather than with the answer's own hop count, which is exactly
|
|
3837
|
+
the output-sensitivity the rest of the search is built to preserve.
|
|
3838
|
+
|
|
3066
3839
|
### 19.7 Reading out the answer
|
|
3067
3840
|
|
|
3068
3841
|
The finished derivation's chosen spans, left to right, are the cover.
|
|
@@ -3105,17 +3878,26 @@ not interchangeable:
|
|
|
3105
3878
|
|
|
3106
3879
|
```
|
|
3107
3880
|
extractBySkill(query):
|
|
3108
|
-
ranked ←
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3881
|
+
ranked ← the climb's FULL ranked list (§17) — not just the committed
|
|
3882
|
+
roots: extraction needs ONE anchor that IS a span-shaped
|
|
3883
|
+
exemplar, and it may sit below the further-topic floor
|
|
3884
|
+
for each cand in the first k of ranked: # bounded — see below
|
|
3885
|
+
exemplar ← spanShapedOf(cand.anchor):
|
|
3886
|
+
context ← the anchor's bytes (or, for a terminal answer node,
|
|
3887
|
+
the longest span-shaped context among ≤ √N of its
|
|
3888
|
+
predecessors; query-gist resonance breaks length ties)
|
|
3889
|
+
answer ← its continuation
|
|
3890
|
+
span-shaped ⇔ answer is a contiguous span of context, a
|
|
3891
|
+
recognised subtree of it, or an ordered sparse
|
|
3892
|
+
subsequence (a multi-piece answer)
|
|
3893
|
+
if not exemplar: continue
|
|
3894
|
+
built ← buildFromExemplar(query, exemplar) # below
|
|
3895
|
+
if built = ∅ or |built.bytes| < W: continue # sub-quantum
|
|
3896
|
+
if built.accounted = ∅: continue # UNANCHORED
|
|
3897
|
+
return built
|
|
3898
|
+
return ∅ # no skill applies; decider moves on
|
|
3899
|
+
|
|
3900
|
+
buildFromExemplar(query, exemplar):
|
|
3119
3901
|
runs ← decompose the exemplar answer into its pieces within the context
|
|
3120
3902
|
for each piece:
|
|
3121
3903
|
framePre ← up to W bytes of context before the piece
|
|
@@ -3128,6 +3910,38 @@ extractBySkill(query):
|
|
|
3128
3910
|
answer ← the concatenated analogs
|
|
3129
3911
|
```
|
|
3130
3912
|
|
|
3913
|
+
**Why the loop retries, and why it is bounded.** The span-shape test is
|
|
3914
|
+
deliberately permissive (a sparse subsequence), so it accepts exemplars whose
|
|
3915
|
+
relation to the query is coincidental gap-matching. Stopping at the _first_ such
|
|
3916
|
+
exemplar let a coincidental match early in the ranked list win outright and read
|
|
3917
|
+
out a sub-quantum fragment — observed: a 3-byte "Hel" pulled from an unrelated
|
|
3918
|
+
exemplar, while a later ranked anchor would have read the query's own "Hello…"
|
|
3919
|
+
correctly. So an exemplar that produces nothing usable is treated like a
|
|
3920
|
+
structural non-match and the loop continues.
|
|
3921
|
+
|
|
3922
|
+
The retry is bounded at the same evidence-breadth constant k every other
|
|
3923
|
+
consumer of a ranked list self-limits to. The frame matcher's exact-byte tier
|
|
3924
|
+
has no significance correction of its own — short W-byte frames are cheap to
|
|
3925
|
+
match by pure chance — so trying every ranked anchor turns that per-anchor
|
|
3926
|
+
chance into a near-certainty over enough attempts: on a pure-gibberish query,
|
|
3927
|
+
170 anchors deep found an unrelated exemplar whose short frame happened to
|
|
3928
|
+
byte-match, producing an answer. That is the same failure mode recall's own
|
|
3929
|
+
chance correction exists to prevent (§21.4). Bounding at k keeps the "genuinely
|
|
3930
|
+
relevant but not root-significant" exemplars the loop was built for, without the
|
|
3931
|
+
tail's chance collisions.
|
|
3932
|
+
|
|
3933
|
+
**An unanchored read is not an extraction.** If _no_ frame of the exemplar was
|
|
3934
|
+
located in the query at all, nothing ties the bytes just read to this question —
|
|
3935
|
+
the skill applied its exemplar's geometry to a query it never matched. Observed:
|
|
3936
|
+
"Which city is France's seat of government?" answered "Which ci" — a fragment of
|
|
3937
|
+
the query itself — from an unrelated exemplar. Requiring at least one located
|
|
3938
|
+
frame is the structural evidence that permissiveness leaves out. This test is
|
|
3939
|
+
scoped to extraction on purpose: the same veto at the pipeline's density check
|
|
3940
|
+
was tried and reverted, because `accounted` is empty _by convention_ on recall's
|
|
3941
|
+
own tiers, so a veto there refused six legitimate reverse-recall groundings.
|
|
3942
|
+
Here the field is this mechanism's own output and carries its documented
|
|
3943
|
+
meaning.
|
|
3944
|
+
|
|
3131
3945
|
The demo in the README is this mechanism: three "X was painted by Y" examples
|
|
3132
3946
|
make ("…was painted by …", painter) a span-shaped exemplar; the unseen
|
|
3133
3947
|
sentence's frames locate; the analogous span — a painter never taught as an
|
|
@@ -3174,81 +3988,348 @@ query bytes its frames did not cover (§14.1).
|
|
|
3174
3988
|
|
|
3175
3989
|
Recall handles queries whose own decomposition composed nothing: resonate the
|
|
3176
3990
|
_whole query's gist_ and ground the nearest learned form. It is the most
|
|
3177
|
-
fallback-like mechanism — its
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3991
|
+
fallback-like mechanism — most of its tiers carry the full PASS·|query|, so they
|
|
3992
|
+
can only win as the sole grounding (the honest price of an ungrounded answer) —
|
|
3993
|
+
but it participates in the same decider as every other mechanism, and its floor
|
|
3994
|
+
is free to state (one STEP-grade projection).
|
|
3995
|
+
|
|
3996
|
+
What it is _not_ is a single ladder of resonance scores. Recall is where the
|
|
3997
|
+
system's honest-failure path lives, and over time it has accumulated a graded
|
|
3998
|
+
sequence of **structural** claims, each strictly weaker than the last, each with
|
|
3999
|
+
its own guards, and each running only where the alternative was silence. Nothing
|
|
4000
|
+
below the clean-resonance tier costs anything on an answering path.
|
|
3182
4001
|
|
|
3183
4002
|
#### The asymmetry of forward and reverse
|
|
3184
4003
|
|
|
3185
|
-
The deduction system (§5, §19) is a **forward** engine: its rules
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
query in the forward direction the search operates in.
|
|
4004
|
+
The deduction system (§5, §19) is a **forward** engine: its rules all move from
|
|
4005
|
+
premises toward conclusions in the direction of the learned edges. There is no
|
|
4006
|
+
backward rule — no inference step that consumes a conclusion to produce a
|
|
4007
|
+
premise. This is not an omission; it is the formalism: a derivation is a
|
|
4008
|
+
directed hyperpath from axioms to a goal, and the cost ladder prices each
|
|
4009
|
+
forward step. A reading against the edge direction — `reverseContext`, which
|
|
4010
|
+
asks "what establishes this?" rather than "what does this lead to?" — produces
|
|
4011
|
+
bytes but no derivation.
|
|
3194
4012
|
|
|
3195
4013
|
The grounding decider expresses this exactly: reverse readings get
|
|
3196
|
-
`accounted = []
|
|
3197
|
-
|
|
3198
|
-
expensive grounding, available when nothing composes forward, impossible to
|
|
4014
|
+
`accounted = []`, so their weight is the full PASS·|query| plus a STEP — the
|
|
4015
|
+
most expensive grounding, available when nothing composes forward, impossible to
|
|
3199
4016
|
prefer when anything does. The decider _derives_ this from the evidence the
|
|
3200
|
-
formalism itself declares
|
|
3201
|
-
|
|
3202
|
-
Every tier grounds through the shared projections of §14.4
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
**
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
**
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
4017
|
+
formalism itself declares.
|
|
4018
|
+
|
|
4019
|
+
Every tier grounds through the shared projections of §14.4 — recall owns no
|
|
4020
|
+
grounding machinery of its own.
|
|
4021
|
+
|
|
4022
|
+
#### Two guards every tier shares
|
|
4023
|
+
|
|
4024
|
+
Because every tier below is a claim about the query, two failure modes recur,
|
|
4025
|
+
and both are checked at every exit:
|
|
4026
|
+
|
|
4027
|
+
- **Restatement.** A candidate whose bytes _are_ the query's own — exactly, or
|
|
4028
|
+
under the response's canonical equivalence — may only conclude through
|
|
4029
|
+
disciplined reverse recall. Voicing its bytes echoes the question back at
|
|
4030
|
+
itself; projecting it forward is "whatever followed these bytes in some
|
|
4031
|
+
document".
|
|
4032
|
+
- **Restated fragments.** A projection that is a proper byte-subspan of the
|
|
4033
|
+
query restates part of the question and is never an answer. This matters most
|
|
4034
|
+
in conversations, where each earlier turn is itself a trained form and would
|
|
4035
|
+
otherwise read as the next thing to say.
|
|
4036
|
+
|
|
4037
|
+
### 21.1 Tier 0 — exact self-match, and argument binding
|
|
4038
|
+
|
|
4039
|
+
**Exact self-match (content-addressed).** If the query _resolves_ — it is
|
|
4040
|
+
literally a stored node — answer with the context that predicts it (the reverse
|
|
4041
|
+
projection; among several predecessors, the query gist picks by resonance). This
|
|
4042
|
+
tier never consults the ANN index: identity is exactly decidable, and an
|
|
4043
|
+
estimated score must never stand in for it (§6.2). `accounted = []`,
|
|
4044
|
+
`moves = STEP`.
|
|
4045
|
+
|
|
4046
|
+
**Argument binding.** The query is not itself a stored form, but it _contains_ a
|
|
4047
|
+
recognised constituent that is an edge **source** — a learnt pair's left side
|
|
4048
|
+
carried inside a wrapper ("How do you say 'thank you' in French?"). The wrapper
|
|
4049
|
+
is scaffolding; the argument is the span that leads somewhere, so its
|
|
4050
|
+
continuation, guided by the whole query's gist, is the answer. Matching the
|
|
4051
|
+
wrapper while ignoring the argument is worse than silence, so anything short of
|
|
4052
|
+
**one unambiguous binding** falls through: constituents must clear two
|
|
4053
|
+
perception windows (the same 2W bar confluence binds under), nested recognitions
|
|
4054
|
+
collapse to their maximal span, two distinct maximal arguments mean the query
|
|
4055
|
+
asks about neither alone, and another substantial recognised form _outside_ the
|
|
4056
|
+
chosen argument means this is not one argument in a wrapper but several
|
|
4057
|
+
independently meaningful pieces — which is exactly the shape of an accumulated
|
|
4058
|
+
conversation. Accounts for the argument's span; one STEP.
|
|
4059
|
+
|
|
4060
|
+
### 21.2 Tier 1 — clean resonance, at the scale-aware identity bar
|
|
4061
|
+
|
|
4062
|
+
If the top hit clears the **scale-aware identity bar** (§8.1) the query
|
|
4063
|
+
essentially _is_ a learned form. The bar is per-hit, not per-tier: hits are
|
|
4064
|
+
ranked nearest-first and the walk stops at the first one below it, because
|
|
4065
|
+
grounding a lower hit under this tier's "near-identical" label would launder
|
|
4066
|
+
byte-overlap noise (observed: "merci" projecting through the unrelated near hit
|
|
4067
|
+
"meraih"). A hit that restates the query concludes only through reverse recall;
|
|
4068
|
+
otherwise `project` tries forward first, then reverse. A forward grounding
|
|
4069
|
+
accounts for the whole query (an identity-grade match); a reverse reading
|
|
4070
|
+
accounts for nothing. One STEP either way.
|
|
4071
|
+
|
|
4072
|
+
### 21.3 Tier 2 — scaffolding-dominated: two independent readings of consensus
|
|
4073
|
+
|
|
4074
|
+
If the top score clears only the significance bar (§8.3) — real but diluted,
|
|
4075
|
+
typically because shared boilerplate dominates the gist — ground the consensus
|
|
4076
|
+
climb's dominant anchor. The question is when that anchor may be trusted, and
|
|
4077
|
+
the answer is **two alternative readings, never a substitution**:
|
|
4078
|
+
|
|
4079
|
+
- its **pooled vote** clears the consensus floor ln N + ½ (§8.6) — the reading
|
|
4080
|
+
that legitimately fires on a small store, where ln N is low; **or**
|
|
4081
|
+
- its **breadth** clears half-dominance _and_ its **peak** exceeds ln 2 — the
|
|
4082
|
+
scale-invariant reading (§17.6).
|
|
4083
|
+
|
|
4084
|
+
Both clauses are needed, and each was falsified alone. The absolute vote is an
|
|
4085
|
+
ln N-scaled quantity: measured on a 325K-context store, a junk attractor
|
|
4086
|
+
out-voted every correct anchor (12.69 against 8.19–10.77), so no vote threshold
|
|
4087
|
+
admits the right anchors without admitting fabrication — while breadth > ½
|
|
4088
|
+
admitted exactly the correct ones. Conversely, _replacing_ the vote test with
|
|
4089
|
+
breadth broke seven tests, because breadth starves a genuine, evenly split
|
|
4090
|
+
multi-topic query (no root in a real N-way split can exceed half the vote). Peak
|
|
4091
|
+
is required beside breadth because breadth asks how much of the query
|
|
4092
|
+
corroborates the anchor, never whether the anchor _says_ anything: on a
|
|
4093
|
+
one-context store every region trivially corroborates the only anchor there is,
|
|
4094
|
+
breadth is 1 while the anchor's IDF is 0, and "explain quantum chromodynamics"
|
|
4095
|
+
answered a lone cat fact. Requiring the per-region contribution ln(N/c) to
|
|
4096
|
+
exceed ln 2 is requiring c·2 < N — half-dominance again, in the IDF's own units.
|
|
4097
|
+
|
|
4098
|
+
One further gate asks about the **query** rather than the anchor: a query every
|
|
4099
|
+
one of whose windows is corpus-global scaffolding gives the corpus nothing to be
|
|
4100
|
+
held to, and this tier — which exists to serve scaffolding-dominated queries —
|
|
4101
|
+
is exactly where that runs out. Measured: "What is the capital " answered a Sri
|
|
4102
|
+
Lanka fact on breadth 0.667, every window it spells being a hub, while the
|
|
4103
|
+
probes this tier serves correctly all retain at least one discriminating window.
|
|
4104
|
+
(Dispersion was tried here and falsified: the fabrication and a legitimate
|
|
4105
|
+
no-punctuation probe have identical cluster profiles.)
|
|
4106
|
+
|
|
4107
|
+
The tier accounts for exactly the query span whose evidence carried the winning
|
|
4108
|
+
point of attention (§17.6's `start`–`end`), not the whole query — a consensus
|
|
4109
|
+
vote for "ice" among scaffolding does not explain the word "steel". One CONCEPT.
|
|
4110
|
+
|
|
4111
|
+
### 21.4 Tier 3 — the nearest grounded hit, at the query-relative fraction
|
|
4112
|
+
|
|
4113
|
+
Walk the hits nearest-first and ground the first whose grounding explains enough
|
|
4114
|
+
of the **query**. The gate is not the raw cosine (§2.6): root gists are unit
|
|
4115
|
+
vectors, but under the linear fold cos = shared/√(len_q · len_g), so a query
|
|
4116
|
+
fully contained in a much longer grounded answer scores √(len_q/len_g) — the raw
|
|
4117
|
+
cosine punishes honest containment and lets a long answer sharing only
|
|
4118
|
+
scaffolding pass. Converting to `cos · √(len_g / len_q)` measures what the reach
|
|
4119
|
+
bar is supposed to mean: how much of THE QUERY the store accounts for.
|
|
4120
|
+
|
|
4121
|
+
That conversion carries one trap, and it is closed by an existing bar. The same
|
|
4122
|
+
√(len_g/len_q) factor amplifies the estimator's own chance floor: a stored form
|
|
4123
|
+
100× longer multiplies a noise-level cosine by ten and lifted pure gibberish
|
|
4124
|
+
past the reach bar (observed). Only the **above-chance** part of a similarity is
|
|
4125
|
+
evidence of shared content, so the significance bar (3/√D, §8.3) is subtracted
|
|
4126
|
+
before the conversion. Derived from the existing bars; never tuned.
|
|
4127
|
+
|
|
4128
|
+
### 21.5 The refusal path — three structural tiers before silence
|
|
4129
|
+
|
|
4130
|
+
Everything geometric has now failed. Three tiers remain, each making a
|
|
4131
|
+
**structural** claim about the query that resonance cannot state, and all three
|
|
4132
|
+
read the _same_ candidate list — memoised, so the expensive branch runs at most
|
|
4133
|
+
once per response. That list is the ranked hits, widened to an exhaustive index
|
|
4134
|
+
scan only when the top hit clears the concept threshold: when the query gist has
|
|
4135
|
+
no concept-level match to anything stored, an exhaustive scan would only score
|
|
4136
|
+
more vectors below the bar (profiled at 38–40K vectors scored per refusing query
|
|
4137
|
+
on a 325K-context store, costing 44% of think). Whether the gist ranks
|
|
4138
|
+
_anything_ at concept level is the discriminator — corpus size never was.
|
|
4139
|
+
|
|
4140
|
+
#### The substitution bridge
|
|
4141
|
+
|
|
4142
|
+
**The gap.** A query phrased through a near-synonym of a trained word ("Name the
|
|
4143
|
+
biggest planet" against a corpus that only ever says "largest planet") reaches
|
|
4144
|
+
nothing, even though the fact is trained and the pairing is corroborated across
|
|
4145
|
+
the corpus. Words are never independently addressable nodes — deposition interns
|
|
4146
|
+
whole streams plus W−1/W leaf windows, and a word mid-sentence falls between
|
|
4147
|
+
those scales — so no halo ever links "biggest" to "largest".
|
|
4148
|
+
|
|
4149
|
+
**The mechanism.** The query's own content-addressed windows are probed against
|
|
4150
|
+
the store; the rarest anchor a bounded climb (the same `edgeAncestors` the
|
|
4151
|
+
consensus vote uses) to the trained contexts containing them, alongside the
|
|
4152
|
+
already-ranked resonance proposals. Each candidate context is aligned to the
|
|
4153
|
+
query byte-for-byte around the anchor, leaving mismatched spans. A mismatch
|
|
4154
|
+
grounds as a **substitution** only under three derived gates:
|
|
4155
|
+
|
|
4156
|
+
- **Corroboration** — the query-side span is itself corpus-attested: every
|
|
4157
|
+
W-window inside it resolves as a stored form, at least one reused across ≥ 2
|
|
4158
|
+
containers (the same bar suffix propagation gates inheritance with, §12.1). An
|
|
4159
|
+
untrained word can never substitute.
|
|
4160
|
+
- **Graded identity** — lexical geometry first, at the concept threshold;
|
|
4161
|
+
differently spelled forms fall through to VSA company, whose bundled halos
|
|
4162
|
+
must clear the significance bar (the same distributional bar analogy strength
|
|
4163
|
+
uses).
|
|
4164
|
+
- **Raw balance** — the mismatch, _before_ expansion absorbs any matched
|
|
4165
|
+
flanking bytes, must be roughly length-balanced on both sides
|
|
4166
|
+
(`dominates(min, max)`, half-dominance again). This is the guard that closed a
|
|
4167
|
+
real wrong-answer gap: "France" → "Spain si(nce)" had a 3-byte query span
|
|
4168
|
+
standing for 8 candidate bytes, an asymmetry a genuine morphological synonym
|
|
4169
|
+
never has and an arbitrary sentence divergence always does. Three more
|
|
4170
|
+
plausible fixes were implemented and refuted first — requiring non-vacuous
|
|
4171
|
+
frame consensus, excluding self-witness, and demanding candidate-side
|
|
4172
|
+
attestation — each of which broke the legitimate synonym case or failed to
|
|
4173
|
+
discriminate at all.
|
|
4174
|
+
|
|
4175
|
+
A candidate is accepted when its aligned-plus-substituted spans **dominate** the
|
|
4176
|
+
query and every unexplained gap stays within one perception window. Beyond that,
|
|
4177
|
+
the **ignored-known principle** applies: a span may be dismissed only when the
|
|
4178
|
+
store has never seen it, so an unaccounted range that contains a stored window
|
|
4179
|
+
is grounds for refusal. Genuinely novel spans remain tolerable. (This same test
|
|
4180
|
+
guards CAST's frame-tier comparison, §18.4.)
|
|
4181
|
+
|
|
4182
|
+
Two guards sit at the exit. A projection contained in a substituted span is the
|
|
4183
|
+
substitution **restated as knowledge** — the observed failure where a bridge
|
|
4184
|
+
through " England." → " Germany." would have voiced "Germany". And a **strict
|
|
4185
|
+
byte prefix** with zero substitutions is refused here and deferred to the next
|
|
4186
|
+
tier, which owns that shape: the claim "a trained context IS this query up to
|
|
4187
|
+
filler" is false in exactly the way that matters when the candidate's extra tail
|
|
4188
|
+
is the discriminating part (measured on a 4,300-fact fixture, "what is the value
|
|
4189
|
+
of" bridged to one arbitrary pick among 4,300 equally matching contexts).
|
|
4190
|
+
|
|
4191
|
+
Both bridge readings account for their aligned spans — matched **and**
|
|
4192
|
+
substituted. A corroborated substitution is not a gap in the explanation; it is
|
|
4193
|
+
an explanation the mechanism paid a CONCEPT for, and leaving its span
|
|
4194
|
+
unaccounted charges the same act twice, the second charge being far the larger
|
|
4195
|
+
(measured: a bridge matching 28 of 29 bytes declared the whole query unexplained
|
|
4196
|
+
and lost to a comparison voicing the wrong country). The **identity** reading —
|
|
4197
|
+
zero substitutions — is additionally marked `complete` (§14.1): the query _is_
|
|
4198
|
+
that trained context, so its continuation is the whole read-out.
|
|
4199
|
+
|
|
4200
|
+
#### Prefix completion
|
|
4201
|
+
|
|
4202
|
+
The query is not _similar_ to a trained form; it is a **proper prefix** of one —
|
|
4203
|
+
every byte a literal match, in order, from offset zero. That is the strongest
|
|
4204
|
+
grounding relation in the store, stronger than a corroborated substitution and
|
|
4205
|
+
stronger than resonance, which only claims an angle. Nothing is invented: the
|
|
4206
|
+
answer IS a trained form, voiced whole.
|
|
4207
|
+
|
|
4208
|
+
The earlier tiers cannot reach it, for two independently measured reasons.
|
|
4209
|
+
`resolve(prefix)` is null — a proper prefix of a deposited stream has no branch
|
|
4210
|
+
of its own. And the form is frequently absent from the ranked list _at any k_:
|
|
4211
|
+
measured, cos(query, form) = 0.5752 while the form is missing from `resonate` at
|
|
4212
|
+
k = 24, 256 and 2048, with lower-scoring forms returned instead, because k only
|
|
4213
|
+
reorders within the IVF clusters already probed. This is a **retrievability**
|
|
4214
|
+
gap, not a semantic one. When the candidate list supplies nothing, a second
|
|
4215
|
+
supply proposes from the write side's own leaf-id window index: leaf ids are
|
|
4216
|
+
position-invariant (content-addressed on single bytes) where a fold is not, so a
|
|
4217
|
+
prefix shares the deposit's window nodes exactly and reaches it by climbing
|
|
4218
|
+
containment then parents, under the same √N budget everything else obeys.
|
|
4219
|
+
|
|
4220
|
+
Three guards, each falsified into existence, none droppable:
|
|
4221
|
+
|
|
4222
|
+
1. **An unreadable continuation vetoes.** Reads are bounded, so a candidate
|
|
4223
|
+
opening with the query but _saturating_ the read continues in a way nobody
|
|
4224
|
+
can see. It must not be quietly skipped — the skip is what manufactures a
|
|
4225
|
+
fragment. Measured: a query matched both a whole 138-byte form (saturating)
|
|
4226
|
+
and a 34-byte interior node; skipping the saturated candidate removed the
|
|
4227
|
+
only evidence that disagreed, uniqueness then passed, and a mid-form slice
|
|
4228
|
+
was voiced as an answer.
|
|
4229
|
+
2. **The continuation must reach one grouping window.** Below W it is
|
|
4230
|
+
sub-quantum — the fold groups nothing from it.
|
|
4231
|
+
3. **Uniqueness.** Several trained forms may open with the query and continue
|
|
4232
|
+
differently; then the corpus does not say which the asker means. Distinct
|
|
4233
|
+
continuations ⇒ refuse. Uniqueness is judged on the continuation _bytes_, not
|
|
4234
|
+
the candidate id: one continuation reached through two forms is one answer.
|
|
4235
|
+
|
|
4236
|
+
This is the documented **prefix trap**, and it is real — just not for every
|
|
4237
|
+
prefix. Measured over 15 battery probes, exactly one yields a unique
|
|
4238
|
+
continuation, and all three honest-silence probes yield none. The tier accounts
|
|
4239
|
+
for the whole query and costs one STEP; it is _not_ marked complete, since the
|
|
4240
|
+
form may carry more past the remainder voiced.
|
|
4241
|
+
|
|
4242
|
+
#### Frame-filler substitution
|
|
4243
|
+
|
|
4244
|
+
The remaining shape is compositional: "What is the capital of the country where
|
|
4245
|
+
the Eiffel Tower is?" sits one edge away from the trained "What is the capital
|
|
4246
|
+
of France?", differing by a single contiguous span where a **definite
|
|
4247
|
+
description** stands in a **proper noun's** place. Every earlier tier correctly
|
|
4248
|
+
declines — the constituent is not an edge source, the gist tiers are blind (cos
|
|
4249
|
+
= 0.0076, with "capital of Spain" scoring _higher_), and the bridge refuses on
|
|
4250
|
+
raw balance, as it must: a short span standing for a long one is exactly how a
|
|
4251
|
+
wrong fact once got voiced.
|
|
4252
|
+
|
|
4253
|
+
The reframing is the point. The bridge asks whether two spans are _similar_; a
|
|
4254
|
+
description and the noun it denotes are not similar, they are
|
|
4255
|
+
**co-referential**, so no similarity threshold can separate this case from that
|
|
4256
|
+
fabrication. So this tier does not try:
|
|
4257
|
+
|
|
4258
|
+
> **It invents a lookup key, never an answer.**
|
|
4259
|
+
|
|
4260
|
+
Build the query with a candidate filler in the description's place, and require
|
|
4261
|
+
the **store itself** to already hold that key, byte-exactly, by content address.
|
|
4262
|
+
The answer is then the trained continuation of a form the store verifiably has —
|
|
4263
|
+
the same grounding tier 0 performs. A key the store does not hold is discarded.
|
|
4264
|
+
|
|
4265
|
+
Four guards, each falsified into existence on a 15.7M-node store:
|
|
4266
|
+
|
|
4267
|
+
1. The evidence hit must literally contain the description's **rarest** unit.
|
|
4268
|
+
Pooling fillers from every ranked hit gave one query nine resolving keys
|
|
4269
|
+
dominated by the wrong one; qualifying on any _shared_ unit earned a
|
|
4270
|
+
confident wrong answer off the scaffolding unit "write".
|
|
4271
|
+
2. The frame must be **non-empty** — the description is a proper sub-span.
|
|
4272
|
+
Otherwise a "substitution" replaces the whole query.
|
|
4273
|
+
3. The key must **resolve** byte-exactly and lead somewhere.
|
|
4274
|
+
4. Exactly **one** stored form may survive. "What is the capital of Zamunda?"
|
|
4275
|
+
produces 24 resolving keys in weaker variants (Chile, India, Japan, Italy…) —
|
|
4276
|
+
fabrication, refused by ambiguity. The same discipline argument binding
|
|
4277
|
+
applies.
|
|
4278
|
+
|
|
4279
|
+
Resolution alone is not the safety argument: holding the frame fixed and varying
|
|
4280
|
+
only the filler makes byte-exact resolution look like a perfect filter, but when
|
|
4281
|
+
the description is searched too, 95,836 candidate keys were tried and 9
|
|
4282
|
+
resolved. Resolution is necessary, never sufficient; the guards are what make it
|
|
4283
|
+
sound.
|
|
4284
|
+
|
|
4285
|
+
**Where constituency comes from.** This tier substitutes one _constituent_ for
|
|
4286
|
+
another, so it must know where a constituent begins — and there is no character
|
|
4287
|
+
class here, no separator, no "word", because Sema has none. A byte value cannot
|
|
4288
|
+
say whether it delimits; asserting a class over the alphabet overrides what the
|
|
4289
|
+
corpus is able to state itself. The reading used is the store's own, already
|
|
4290
|
+
spelled out in the weave and CAST's frame gate: **a byte is frame when more than
|
|
4291
|
+
half the aligned structures share it, and a span is frame when more than half
|
|
4292
|
+
its bytes are.** Scaffolding is what many exemplars have in common; content is
|
|
4293
|
+
what tells them apart. So the spans come from literal alignment and the
|
|
4294
|
+
judgement is half-dominance — both modality-free by construction; in a grid the
|
|
4295
|
+
padding value would fall out as frame on exactly this test, with nothing
|
|
4296
|
+
rewritten. Asking "what are the units of this byte string?" has no answer here,
|
|
4297
|
+
and every attempt to derive one failed: the fold's own cuts land
|
|
4298
|
+
mid-constituent, interning is uninformative because every W-window is interned,
|
|
4299
|
+
and recognition returns only whole learnt forms — all three read _one_ string
|
|
4300
|
+
alone. Constituency is **relational**, a property of what the corpus agrees on
|
|
4301
|
+
across exemplars, and only a comparison can expose it.
|
|
4302
|
+
|
|
4303
|
+
The tier accounts for the whole query at CONCEPT + STEP, under the same
|
|
4304
|
+
restatement and manufactured-answer guards: a projection contained in the filler
|
|
4305
|
+
is the substitution restated as knowledge.
|
|
4306
|
+
|
|
4307
|
+
### 21.6 Echo, or silence
|
|
4308
|
+
|
|
4309
|
+
If everything above declines, one decision remains: echo the nearest stored
|
|
4310
|
+
form, or say nothing.
|
|
4311
|
+
|
|
4312
|
+
An echo returns a stored form's bytes _as_ the answer — a near-identity claim
|
|
4313
|
+
about the query — and identity-grade decisions are never made on an estimated
|
|
4314
|
+
score (§6.2): a RaBitQ estimate overshooting the reach bar echoed a wrong-entity
|
|
4315
|
+
neighbour (observed). The bytes are being read anyway in order to be echoed, so
|
|
4316
|
+
the decision uses their **exact** fold: one fold of the top hit, measured in the
|
|
4317
|
+
same query-relative, chance-corrected units as tier 3.
|
|
4318
|
+
|
|
4319
|
+
- Below the reach threshold (§8.2) — **return nothing**. The store holds nothing
|
|
4320
|
+
related. Silence is a first-class output.
|
|
4321
|
+
- If the nearest form _is_ the query restated — **return nothing**. Restating
|
|
4322
|
+
the question answers nothing.
|
|
4323
|
+
- Otherwise return the form's bytes, explicitly flagged as an **echo**: within
|
|
4324
|
+
reach, but not a grounded fact. It accounts for nothing and carries no move
|
|
4325
|
+
cost, so it can only win as the sole grounding — the honest price of an
|
|
4326
|
+
ungrounded answer. The flag travels in the response's provenance
|
|
4327
|
+
(`recall-echo`, §26) so a confident-looking parrot is always distinguishable
|
|
4328
|
+
from an answer.
|
|
4329
|
+
|
|
4330
|
+
Every tier also carries `unexplained` — a human-readable label for the query
|
|
4331
|
+
bytes its evidence left on the table (§14.1) — appearing in the rationale trace
|
|
4332
|
+
alongside `accounted` and `moves`.
|
|
3252
4333
|
|
|
3253
4334
|
---
|
|
3254
4335
|
|
|
@@ -3287,18 +4368,66 @@ Picasso" continues onward to what the store knows _about Picasso_: the extracted
|
|
|
3287
4368
|
answer contains the learned context "Pablo Picasso", whose continuation is the
|
|
3288
4369
|
Cubism fact.
|
|
3289
4370
|
|
|
4371
|
+
Two further disciplines bound what may be hopped through:
|
|
4372
|
+
|
|
4373
|
+
- **A grounding that declared itself complete is not extended at all** (§14.1).
|
|
4374
|
+
The answer is already a trained form's own continuation, reached through an
|
|
4375
|
+
identity claim about the query, so a pivot could only chain past the fact that
|
|
4376
|
+
produced it.
|
|
4377
|
+
- **What a mechanism WITHHELD may not be re-opened.** CAST's comparison cites
|
|
4378
|
+
two analogs and deliberately refuses their own downstream facts, so pivoting
|
|
4379
|
+
into one undoes the mechanism's own refusal one step later (observed: a pivot
|
|
4380
|
+
through a stored fragment of an analog's name reached the biography CAST had
|
|
4381
|
+
declined). The rule reads the used anchors' **continuations** — the content
|
|
4382
|
+
actually withheld — not their own bytes: a comparison's seat sentence
|
|
4383
|
+
legitimately contains further terms with their own unrelated facts, and those
|
|
4384
|
+
genuine hops must still fire. Only a mechanism carrying its own `used` set
|
|
4385
|
+
(CAST and confluence) gets this; for every other provenance the consumed set
|
|
4386
|
+
is derived by re-recognising the answer — "everything in it" rather than "what
|
|
4387
|
+
it voiced" — and a containment rule over that would suppress every legitimate
|
|
4388
|
+
pivot.
|
|
4389
|
+
|
|
3290
4390
|
---
|
|
3291
4391
|
|
|
3292
4392
|
## 23. Fusion: multi-topic answers
|
|
3293
4393
|
|
|
3294
|
-
If the query carries several independent points of attention (§17)
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
4394
|
+
If the query carries several independent points of attention (§17), each further
|
|
4395
|
+
committed point grounds its own answer, and the pieces are joined **in query
|
|
4396
|
+
order** — the order the question posed its topics — with a learned connector
|
|
4397
|
+
(§19.5) between each adjacent pair where one exists. A missing connector joins
|
|
4398
|
+
the pieces bare and records the degradation in the trace. Thus "ice fire" (two
|
|
4399
|
+
topics) becomes "cold hot" — or "cold and hot", if the corpus ever joined such
|
|
4400
|
+
answers with "and".
|
|
4401
|
+
|
|
4402
|
+
Fusion fires only on a genuine **remainder**: query bytes touched by neither the
|
|
4403
|
+
winning candidate's evidence nor any computed span, and at least one perception
|
|
4404
|
+
quantum of them (§14.1). Three further gates decide whether there is really a
|
|
4405
|
+
second topic to fuse:
|
|
4406
|
+
|
|
4407
|
+
- **An answer drawn from the query's own text is left alone.** Extraction
|
|
4408
|
+
already spans all the query's pieces, so fusing would only add noise from
|
|
4409
|
+
unrelated stored contexts. The test is **strict containment** — the answer
|
|
4410
|
+
resolves inside the query's tree, or is a contiguous byte run of it. The
|
|
4411
|
+
earlier sparse-subsequence reading was trivially satisfied by short answers
|
|
4412
|
+
over long queries and silently starved multi-topic queries of fusion.
|
|
4413
|
+
|
|
4414
|
+
- **A lone root is ordinarily the primary answer's own source**, so there is
|
|
4415
|
+
nothing to fuse. The exception is a primary that never touched the climb at
|
|
4416
|
+
all — a pure computation has no anchor of its own — where the lone root was
|
|
4417
|
+
admitted unconditionally by the commit rule and was never checked against
|
|
4418
|
+
anything. There it may be promoted, but only on **breadth** (the
|
|
4419
|
+
scale-invariant reading, §17.6; the raw IDF vote cannot serve, since a genuine
|
|
4420
|
+
root on a large store can score below its own floor while a coincidental echo
|
|
4421
|
+
on a small one scores comfortably above its smaller one).
|
|
4422
|
+
|
|
4423
|
+
- **A second point must stand on structurally separate evidence.** Breadth alone
|
|
4424
|
+
is not enough for a computed primary: the ALU answers "2+2 equals what?" with
|
|
4425
|
+
4, the store's own arithmetic table supplies a lone root whose breadth
|
|
4426
|
+
dominates _because it is corroborated by the computation's own bytes_, and
|
|
4427
|
+
fusing it voiced an unrelated sum. So the further point's query span must sit
|
|
4428
|
+
at least one perception quantum away from the primary's — the same separation
|
|
4429
|
+
the climb's cluster count uses to tell independent evidence neighbourhoods
|
|
4430
|
+
apart. Not a score, and not a tuned bar: the fold's own quantum.
|
|
3302
4431
|
|
|
3303
4432
|
---
|
|
3304
4433
|
|
|
@@ -3318,6 +4447,61 @@ cover does not compose, the answer stands unchanged.
|
|
|
3318
4447
|
|
|
3319
4448
|
---
|
|
3320
4449
|
|
|
4450
|
+
## 24.5 Conversations: the accumulated context
|
|
4451
|
+
|
|
4452
|
+
A conversation is not a separate inference mode. It is the ordinary pipeline run
|
|
4453
|
+
over an **accumulated context** — the full exchange so far, as one byte stream —
|
|
4454
|
+
and everything that makes that cheap and honest falls out of the fold's own
|
|
4455
|
+
properties (§10.4).
|
|
4456
|
+
|
|
4457
|
+
A conversation handle owns three things: the accumulated bytes, the byte offsets
|
|
4458
|
+
where each turn ended, and the incremental fold state. A turn is appended by
|
|
4459
|
+
**raw byte concatenation plus an offset**; the engine's own reply is appended
|
|
4460
|
+
the same way, and the span it occupies is recorded. The conversation's state
|
|
4461
|
+
(context, boundaries, answered spans) is serialisable, so a conversation can be
|
|
4462
|
+
saved and resumed; a restored one starts with fold state its next turn can
|
|
4463
|
+
reuse, and is otherwise indistinguishable from a live one.
|
|
4464
|
+
|
|
4465
|
+
**There is no separator question.** A turn boundary is an _offset_, held by the
|
|
4466
|
+
conversation, never a character the geometry scans for. Nothing downstream finds
|
|
4467
|
+
boundaries by looking at content at all. A separator inside a _corpus_ is
|
|
4468
|
+
ordinary content: if a trainer joins turns with a newline, those newlines are
|
|
4469
|
+
bytes in the stream, folded like every other byte, and a replay reproduces them
|
|
4470
|
+
by passing them inside the turn. Differing separator bytes between a corpus and
|
|
4471
|
+
a query is therefore an ordinary _content_ difference — measured like any other
|
|
4472
|
+
wording difference, degrading rather than failing closed — not an
|
|
4473
|
+
incompatibility and not a convention to agree on.
|
|
4474
|
+
|
|
4475
|
+
Three properties make this work:
|
|
4476
|
+
|
|
4477
|
+
- **Growth is O(turn), not O(context).** The context grows by append, cuts are
|
|
4478
|
+
stable under append, and unchanged segments are reused by object identity, so
|
|
4479
|
+
a turn refolds only the right edge (§10.4). That object identity is also what
|
|
4480
|
+
the subtree-resolution cache is keyed on, so recognition over the grown
|
|
4481
|
+
context costs O(suffix) too. Measured: ~92% of nodes reused by identity, ~40
|
|
4482
|
+
rebuilt nodes per turn, flat as the context grows sevenfold.
|
|
4483
|
+
- **The conversation fold imposes nothing.** It is exactly the tree
|
|
4484
|
+
`perceive(context)` builds for the same bytes — which is exactly the tree the
|
|
4485
|
+
_deposit_ path folded when it learnt them. That agreement is the whole point:
|
|
4486
|
+
when it was absent, the alignment family went quadratic (measured: 5.2M cells
|
|
4487
|
+
on a 476-byte context, against 0 when the two sides agree). Turn boundaries
|
|
4488
|
+
remain exact API metadata; they are not a fold instruction.
|
|
4489
|
+
- **The engine's own answers are context, but not evidence to analogise
|
|
4490
|
+
against.** Completed replies stay available to recognition and the climb — a
|
|
4491
|
+
later turn can refer to what was _answered_, not only to what was asked. But
|
|
4492
|
+
CAST's weave aligns only the **asker's** stream: the answered spans are cut
|
|
4493
|
+
out, the remaining segments aligned as one compacted stream, and every run
|
|
4494
|
+
split back across the original offsets so no evidence crosses an omitted
|
|
4495
|
+
boundary. Without this, weave work grows with answer length and the engine
|
|
4496
|
+
analogises against its own previous output.
|
|
4497
|
+
|
|
4498
|
+
Each conversation carries its own perception, recognition and climb memos, which
|
|
4499
|
+
are swapped into the response-scoped slots for the duration of a turn — the same
|
|
4500
|
+
lifecycle an ordinary ask uses, so a memo present in one path can never be
|
|
4501
|
+
missing from the other. At most one turn may be in flight per Mind.
|
|
4502
|
+
|
|
4503
|
+
---
|
|
4504
|
+
|
|
3321
4505
|
## 25. Disambiguation: choosing among alternatives
|
|
3322
4506
|
|
|
3323
4507
|
Learned knowledge is plural: a context may have many continuations; a
|
|
@@ -3326,10 +4510,26 @@ fixed regimes — and which regime applies is a matter of _direction_:
|
|
|
3326
4510
|
|
|
3327
4511
|
- **Forward (which continuation?): structural evidence.** Candidates are often
|
|
3328
4512
|
short spans whose gists are dominated by accidental byte correlations, so
|
|
3329
|
-
geometry is _not_ consulted
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
4513
|
+
geometry is _not_ consulted — the guide's **presence** gates disambiguation (a
|
|
4514
|
+
null guide means no query is in flight, so structural walkers keep plain
|
|
4515
|
+
first-edge behaviour), but its value is deliberately unused. The winner is the
|
|
4516
|
+
candidate predicted by the most **distinct contexts** (diversity of
|
|
4517
|
+
independent evidence, read as one indexed count — never a materialised reverse
|
|
4518
|
+
fan-in), tie-broken by **halo mass** (sheer episodic repetition), then by
|
|
4519
|
+
insertion order (first-learned). Candidates are capped at the hub bound √N, so
|
|
4520
|
+
a strongly supported edge inserted beyond the cap is invisible here — the
|
|
4521
|
+
deliberate trade against paying O(fan-out) on every disambiguation.
|
|
4522
|
+
|
|
4523
|
+
There is deliberately **no significance floor** on this choice. That floor is
|
|
4524
|
+
calibrated for pooled, IDF-weighted climb votes, where each corroborating
|
|
4525
|
+
region contributes at most ln N and the floor grows with N exactly as that
|
|
4526
|
+
ceiling does. A continuation's support count is a different kind of quantity —
|
|
4527
|
+
how often one specific fact was retold, bounded by nothing that grows with the
|
|
4528
|
+
corpus — so gating an N-invariant count against an N-growing threshold
|
|
4529
|
+
guarantees failure once N is large enough (observed: a fact corroborated
|
|
4530
|
+
2-to-1-1-1 refused at N ≈ 325K, falling back to a noisy concept hop). The
|
|
4531
|
+
comparison above already _is_ the "genuinely competing" test: a tie leaves
|
|
4532
|
+
first-inserted as the pick, and a strict winner is real evidence at any scale.
|
|
3333
4533
|
- **Reverse (which context?): geometric evidence.** Candidate contexts are whole
|
|
3334
4534
|
learned experiences — long enough that their gists are semantically meaningful
|
|
3335
4535
|
— so the winner is the context whose gist best resonates with the query's gist
|
|
@@ -3382,6 +4582,31 @@ yields the property regulated and safety-critical settings actually require: any
|
|
|
3382
4582
|
output can be reproduced exactly and attributed to enumerable stored facts and
|
|
3383
4583
|
rules.
|
|
3384
4584
|
|
|
4585
|
+
**The work meter** — the profiling counterpart of the rationale. Where the
|
|
4586
|
+
rationale says _why_ an answer was chosen, the meter says what it _cost_: an
|
|
4587
|
+
optional per-response accumulator that counts the work one inference call
|
|
4588
|
+
performs at every layer (store reads by kind and by byte volume, index queries
|
|
4589
|
+
and vectors actually scored, perceptions and recognitions with their byte
|
|
4590
|
+
counts, climbs and ancestor visits, alignment cells, junction ascents and the
|
|
4591
|
+
nodes they popped, mechanism floors/runs/skips, candidates considered) and times
|
|
4592
|
+
named **phases**. Four properties make it trustworthy:
|
|
4593
|
+
|
|
4594
|
+
1. **Never read by inference.** A counter that reached a decision would end
|
|
4595
|
+
determinism. The engine's side is write-only.
|
|
4596
|
+
2. **Counts are the product; times are the hint.** The counters are
|
|
4597
|
+
deterministic, so two runs are diffable and a work regression is visible
|
|
4598
|
+
without a stopwatch; only the millisecond totals are not.
|
|
4599
|
+
3. **Phases nest and carry their own counter deltas**, so "which phase did those
|
|
4600
|
+
byte reads?" is answerable at all. Phase totals are inclusive and must never
|
|
4601
|
+
be summed.
|
|
4602
|
+
4. **A logical operation is counted once, and a shared analysis is charged to
|
|
4603
|
+
itself** — never to whichever mechanism happened to pay for it on everyone's
|
|
4604
|
+
behalf.
|
|
4605
|
+
|
|
4606
|
+
The meter is off by default and free when off. It also observes one honest
|
|
4607
|
+
limitation: a traced response bypasses the response memos, so it measures a
|
|
4608
|
+
different machine — profile without a trace attached.
|
|
4609
|
+
|
|
3385
4610
|
---
|
|
3386
4611
|
|
|
3387
4612
|
---
|
|
@@ -3401,8 +4626,11 @@ as in §8; thresholds by their §8 names. Store operations (`resolve`, `next`,
|
|
|
3401
4626
|
# ── geometry (VSA, §2) ────────────────────────────────────────────────
|
|
3402
4627
|
alphabet[b] ≔ deterministic unit vector for byte b (recursive
|
|
3403
4628
|
refinement 16→64→256, seeded)
|
|
3404
|
-
π₀ … π_{S−1} ≔ fixed independent random permutations (the keyring)
|
|
3405
|
-
|
|
4629
|
+
π₀ … π_{S−1} ≔ fixed independent random permutations (the keyring),
|
|
4630
|
+
S = max(8, W) seats
|
|
4631
|
+
seat(size, k) ≔ k if k < ⌈size/2⌉ # two-ended frame
|
|
4632
|
+
≔ S − size + k otherwise # (§2.3)
|
|
4633
|
+
fold(v₀ … vₖ) ≔ Σᵢ π_{seat(k+1, i)}·vᵢ # NOT normalized — only
|
|
3406
4634
|
# a fold's finished ROOT is
|
|
3407
4635
|
# (§2.6): interior gists
|
|
3408
4636
|
# keep a byte-proportional
|
|
@@ -3418,25 +4646,43 @@ fracOfQuery(cos, otherLen, qLen) ≔ min(1, cos · √(otherLen / max(1, qLen)))
|
|
|
3418
4646
|
# of shared content (§2.6, §21)
|
|
3419
4647
|
|
|
3420
4648
|
# ── perception (§10) ──────────────────────────────────────────────────
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
4649
|
+
contentLevels(bytes): # §10.2 — the ONE boundary rule
|
|
4650
|
+
h ≔ rolling window of the last W raw bytes (cyclic polynomial)
|
|
4651
|
+
for each position i:
|
|
4652
|
+
m ≔ avalanche(h) # two rounds
|
|
4653
|
+
hit ≔ (m mod W = 0)
|
|
4654
|
+
if hit and neither of the previous 2 positions hit:
|
|
4655
|
+
lvl ≔ max L with m mod W^(L+1) = 0
|
|
4656
|
+
emit a cut at i+1 with level lvl
|
|
4657
|
+
force a cut whenever a segment would exceed S seats
|
|
4658
|
+
return (cuts, levels)
|
|
4659
|
+
|
|
4660
|
+
perceive(bytes, boundaries ≔ ∅):
|
|
4661
|
+
if boundaries ≠ ∅: # §10.4 stable prefix
|
|
4662
|
+
fold each span between consecutive boundaries by contentFold,
|
|
4663
|
+
join the span roots LEFT-NESTED, normalize the root, return
|
|
4664
|
+
return contentFold(bytes)
|
|
4665
|
+
|
|
4666
|
+
contentFold(bytes):
|
|
4667
|
+
(cuts, levels) ≔ contentLevels(bytes)
|
|
4668
|
+
segs ≔ [ flatFold(bytes[e_i .. e_{i+1})) for consecutive cut edges ]
|
|
4669
|
+
# each segment = ONE flat node, kids = its byte leaves,
|
|
4670
|
+
# gist = Σₖ π_{seat(n,k)}·alphabet[byteₖ] (§10.3)
|
|
4671
|
+
tree ≔ groupByLevel(segs, levels, 1)
|
|
4672
|
+
# items separated by a cut of level < L share a parent; a
|
|
4673
|
+
# group exceeding S seats splits at its strongest interior
|
|
4674
|
+
# cut (ties → the items' own content hash); climb L when a
|
|
4675
|
+
# level splits nothing
|
|
4676
|
+
normalize(tree.gist) # ONLY the finished root — every
|
|
3432
4677
|
# interior gist keeps its raw,
|
|
3433
4678
|
# byte-proportional magnitude (§2.6)
|
|
3434
|
-
return
|
|
4679
|
+
return tree # every node has gist + kids/bytes
|
|
3435
4680
|
|
|
3436
4681
|
gistOf(bytes) ≔ perceive(bytes).gist
|
|
3437
4682
|
resolve(bytes) ≔ intern-lookup of perceive(bytes), bottom-up:
|
|
3438
4683
|
leaves by findLeaf, branches by findBranch(kidIds);
|
|
3439
|
-
null the moment any part is unknown
|
|
4684
|
+
null the moment any part is unknown;
|
|
4685
|
+
then canonResolve(bytes) as the equivalence fallback (§3.4)
|
|
3440
4686
|
read(node) ≔ concatenation of the node's leaf bytes, left to right
|
|
3441
4687
|
|
|
3442
4688
|
# ── thresholds (§8) ───────────────────────────────────────────────────
|
|
@@ -3454,13 +4700,22 @@ ingestPair(context, continuation):
|
|
|
3454
4700
|
(ctxTree, ctxRoot, ctxIds, changed) ≔ deposit(context, tracked)
|
|
3455
4701
|
(conTree, conRoot, _, _) ≔ deposit(continuation, untracked)
|
|
3456
4702
|
link(ctxRoot → conRoot)
|
|
4703
|
+
propagateSuffixes(ctxRoot → conRoot) # §12.1: every ESTABLISHED
|
|
4704
|
+
# right-edge suffix of the context inherits the same edge. Gated by
|
|
4705
|
+
# one flat-branch existence probe per offset (no fold unless it hits),
|
|
4706
|
+
# skipped for contexts shorter than 2W; established ⇔ ≥2 structural
|
|
4707
|
+
# parents, or (halo > 0 ∧ already an edge source).
|
|
3457
4708
|
for part in changed:
|
|
3458
4709
|
pourHalo(ctxIds[part], π₁·companySignature(conRoot)); massOf(part) += 1
|
|
3459
4710
|
pourHalo(conRoot, π₀·companySignature(part)); massOf(conRoot) += 1
|
|
3460
4711
|
# link/pour lazily admit both subtrees' interiors to the content index
|
|
3461
4712
|
|
|
3462
4713
|
deposit(input, tracked):
|
|
3463
|
-
tree ≔
|
|
4714
|
+
tree ≔ contentFold(flatten(input)) # no imposed boundaries — the
|
|
4715
|
+
# deposit tree IS what inference
|
|
4716
|
+
# perceives for the same bytes;
|
|
4717
|
+
# segments of an already-folded
|
|
4718
|
+
# byte-identical prefix are reused
|
|
3464
4719
|
for node in postorder(tree):
|
|
3465
4720
|
id(node) ≔ intern(node) # §11.1 ladder:
|
|
3466
4721
|
# exact-dedup →
|
|
@@ -3498,12 +4753,22 @@ think(query, mechanisms ≔ defaultMechanisms):
|
|
|
3498
4753
|
# by every mechanism's floor/run AND by the post-grounding stages:
|
|
3499
4754
|
guide ≔ gistOf(query)
|
|
3500
4755
|
pre ≔ Precomputed(rec, computed, guide, k) # eager fields only.
|
|
3501
|
-
#
|
|
4756
|
+
# k ≔ 2·recallQueryK — the response's ONE evidence-breadth
|
|
4757
|
+
# constant, read by the climb, the weave and every resonance probe.
|
|
4758
|
+
# Every EXPENSIVE analysis is a lazily-cached method; an async one
|
|
4759
|
+
# is cached BY PROMISE (the first caller starts it, every later
|
|
4760
|
+
# caller awaits the same one):
|
|
3502
4761
|
# pre.attention() — the consensus climb (§17)
|
|
3503
4762
|
# pre.weave() — graded alignment over ranked anchors
|
|
3504
4763
|
# pre.spanShapedOf(a) — per-anchor skill classification
|
|
3505
|
-
# pre.
|
|
3506
|
-
#
|
|
4764
|
+
# pre.spanShapedAll() — the same for every ranked anchor,
|
|
4765
|
+
# sharing the per-anchor cache
|
|
4766
|
+
# pre.windowsOf(a) / pre.queryWindows / pre.queryResolved /
|
|
4767
|
+
# pre.reachMemo — the content-addressed identity reads
|
|
4768
|
+
# (reachMemo is the store-lifetime memo
|
|
4769
|
+
# the climb itself uses — §17.5)
|
|
4770
|
+
# Each shared analysis bills its OWN profiling phase, never the
|
|
4771
|
+
# mechanism that happened to first-touch it.
|
|
3507
4772
|
# Computed at most once, shared by every consumer; NEVER computed
|
|
3508
4773
|
# if no surviving mechanism asks — a query an extension decided
|
|
3509
4774
|
# outright never pays for a climb.
|
|
@@ -3556,26 +4821,46 @@ think(query, mechanisms ≔ defaultMechanisms):
|
|
|
3556
4821
|
consider({ bytes: r.bytes, provenance: r.provenance ?? mech.provenance,
|
|
3557
4822
|
weight: r.weight ?? weigh(r.accounted, r.moves),
|
|
3558
4823
|
used: r.used, accounted: r.accounted,
|
|
3559
|
-
unexplained: r.unexplained
|
|
4824
|
+
unexplained: r.unexplained, complete: r.complete,
|
|
4825
|
+
scaffolding: r.scaffolding })
|
|
4826
|
+
|
|
4827
|
+
# consider(c): skip empty bytes; take c when its GRADE is lower; at EQUAL
|
|
4828
|
+
# grade take it when it carries fewer scaffolding bytes; otherwise keep
|
|
4829
|
+
# the incumbent (the list order).
|
|
3560
4830
|
|
|
3561
4831
|
if best = ∅: return ∅
|
|
3562
4832
|
# ── Diagnostics (observational, never affect the decision) ──────────
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
4833
|
+
emit decideGrounding trace with every candidate's
|
|
4834
|
+
(provenance, weight, grade, unexplainedBytes, decided) + runnerUpMargin
|
|
4835
|
+
if runnerUp exists and margin ≤ 1: emit narrowDecision trace
|
|
3566
4836
|
density ≔ |union(best.accounted)| / query.length
|
|
3567
4837
|
if density < 1/W: emit thinGrounding trace
|
|
3568
4838
|
|
|
3569
|
-
(answer, provenance
|
|
3570
|
-
best.used ?? ∅)
|
|
4839
|
+
(answer, provenance) ≔ (best.bytes, best.provenance)
|
|
3571
4840
|
|
|
3572
4841
|
# ── Post-grounding ──────────────────────────────────────────────────
|
|
3573
4842
|
consumed ≔ per provenance: cast.used | join.used | sites of
|
|
3574
4843
|
recognise(answer) | ∅ (recall/recall-echo consume nothing)
|
|
3575
|
-
#
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
4844
|
+
# WITHHELD, NOT VOICED: for cast/join only, the used anchors' own
|
|
4845
|
+
# CONTINUATIONS (capped at √N) are handed to reason as content the
|
|
4846
|
+
# mechanism deliberately declined — a pivot may not re-open them, while
|
|
4847
|
+
# terms merely CONTAINED in what was voiced stay pivotable.
|
|
4848
|
+
voiced ≔ (provenance ∈ {cast, join})
|
|
4849
|
+
? [ read(n) for id in consumed, n in nextFirst(id, hubBound) ]
|
|
4850
|
+
: ∅
|
|
4851
|
+
answer ≔ best.complete ? answer # §22
|
|
4852
|
+
: reason(query, answer, consumed, voiced)
|
|
4853
|
+
|
|
4854
|
+
# FUSE on a genuine REMAINDER, not on provenance: bytes touched by
|
|
4855
|
+
# neither best.accounted nor any computed span. Under one quantum W it
|
|
4856
|
+
# is bridging punctuation, never a second topic.
|
|
4857
|
+
explained ≔ best.accounted ∪ { [u.i, u.j] for u in pre.computed }
|
|
4858
|
+
if unaccounted(explained) ≥ W:
|
|
4859
|
+
primarySpans ≔ best.accounted ≠ ∅ ? best.accounted
|
|
4860
|
+
: spans of pre.computed
|
|
4861
|
+
unclimbed ≔ best.accounted ≠ ∅ ∧ every accounted span IS a
|
|
4862
|
+
computed span # a pure computation has no anchor
|
|
4863
|
+
answer ≔ fuseAttention(query, answer, primarySpans, unclimbed) # §23
|
|
3579
4864
|
return (answer, provenance)
|
|
3580
4865
|
```
|
|
3581
4866
|
|
|
@@ -3633,113 +4918,215 @@ system(L, sites, concepts, leaves, splits, connectors, computed):
|
|
|
3633
4918
|
### 27.5 The consensus climb (§17)
|
|
3634
4919
|
|
|
3635
4920
|
```
|
|
3636
|
-
climbAttention(query, k):
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
the
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
4921
|
+
climbAttention(query, k, mode ≔ inverse):
|
|
4922
|
+
# ── REGIONS — three sources (§17.2) ──────────────────────────────
|
|
4923
|
+
regions ≔ fold nodes of perceive(query), each resolved against the
|
|
4924
|
+
store as the walk goes; a region DOMINATING the query is
|
|
4925
|
+
dropped unless it is the sole structure (segments exempt —
|
|
4926
|
+
a segment wraps nothing)
|
|
4927
|
+
regions ∪= recognise(query).sites, each CARRYING its node id
|
|
4928
|
+
regions ∪= coalesced maximal spans of resolvable W-windows no fold
|
|
4929
|
+
region contains and whose climb is neither saturated nor
|
|
4930
|
+
rootless # marked CORROBORATING: evidence, not a topic
|
|
4931
|
+
|
|
4932
|
+
for each region r:
|
|
4933
|
+
cov ≔ 1 if r resolves whole; else the fraction of r's W-windows
|
|
4934
|
+
that resolve; 0 when |r| < W (below one window, identity is
|
|
4935
|
+
chance)
|
|
4936
|
+
anchor ≔ r.id ?? canonicalChunkId(r.bytes) ?? nearest(r.gist, k)[0]
|
|
4937
|
+
score ≔ 1 for an exact anchor, else the hit's estimate
|
|
4938
|
+
# a diluted segment may re-anchor on one of its two EDGE W-spans,
|
|
4939
|
+
# chosen by score²·idf — the same quantity its vote is weighted by
|
|
3646
4940
|
reach ≔ expandUntilDecided(anchor, HUB(N)):
|
|
3647
|
-
#
|
|
3648
|
-
# · prevCount(id) —
|
|
3649
|
-
# ·
|
|
3650
|
-
# ·
|
|
3651
|
-
# ·
|
|
3652
|
-
# ·
|
|
3653
|
-
#
|
|
4941
|
+
# ONLY LIMITed store reads; five decisions end it:
|
|
4942
|
+
# · prevCount(id) > √N — predecessor fan-in
|
|
4943
|
+
# · distinct contexts past √N — context limit
|
|
4944
|
+
# · parentsFirst(id, √N+1) — parent fan-out
|
|
4945
|
+
# · accumulated laterals > √N — lateral cone (§8.8)
|
|
4946
|
+
# · atomReach(N) > √N — byte atom (§8.8)
|
|
4947
|
+
# containersSlice pages containment at √N; transparent
|
|
4948
|
+
# chains hop in ONE read; below √N every read IS the
|
|
4949
|
+
# full set → exact. Memoised in the shared reach memo.
|
|
4950
|
+
if reach has no roots and not saturated: try lower hits (orphan)
|
|
4951
|
+
if reach saturated and anchor approximate: try hits tied within
|
|
4952
|
+
estimatorNoise(D) of the top (saturated-tie)
|
|
3654
4953
|
if reach.saturated: abstain
|
|
3655
|
-
|
|
4954
|
+
idf ≔ ln(N / reach.contexts); df ≔ ln(1 + reach.contexts)
|
|
4955
|
+
wf ≔ mode = direct ? df : mode = combined ? idf + df : idf
|
|
4956
|
+
if wf ≤ 0: abstain
|
|
4957
|
+
if not (cov ≥ 1): # contrastive margin
|
|
4958
|
+
margin ≔ score − score of the best hit reaching a DIFFERENT
|
|
4959
|
+
conclusion
|
|
4960
|
+
if margin ≤ estimatorNoise(D)·(1 − cov): abstain
|
|
4961
|
+
mutual ≔ min(1, score · ratio) · min(1, score / ratio) # §17.4
|
|
3656
4962
|
where ratio ≔ √( max(1, contentLen(anchor, region.len·D))
|
|
3657
4963
|
/ max(1, region.len) )
|
|
3658
4964
|
# contentLen capped at region.len·D — beyond that the
|
|
3659
4965
|
# mutual weight approaches zero and the full walk is waste
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
#
|
|
3666
|
-
#
|
|
3667
|
-
#
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
|
|
3693
|
-
|
|
4966
|
+
vote (mutual·wf)/|reach.roots| for each root, carrying
|
|
4967
|
+
(mutual·idf)/|reach.roots| as the FOCUS weight
|
|
4968
|
+
(a terminal answer root redistributes over prevFirst(root,
|
|
4969
|
+
HUB(N)) — capped at the store level, never materialised)
|
|
4970
|
+
|
|
4971
|
+
# ── CROSS-REGION (§17.8) — five tiers, exact before approximate ──
|
|
4972
|
+
# Candidates: regions that voted; a KNOWN non-voting region may be the
|
|
4973
|
+
# WEAK side of a pair whose other side voted; two non-voting regions
|
|
4974
|
+
# never pair. Only MAXIMAL spans compose. Order-free, n-ary, with a
|
|
4975
|
+
# self-evidence guard. Seeds computed once per candidate; all reads
|
|
4976
|
+
# through the shared per-response walk cache.
|
|
4977
|
+
cross ≔ []; superseded ≔ ∅; consumed ≔ ∅
|
|
4978
|
+
for each eligible pair (a, b), ≤ k probes total:
|
|
4979
|
+
containers ≔ junctionContainersFrom(left, right, unordered) # exact
|
|
4980
|
+
if ∅: containers ≔ junctionSynonyms(left, right) # single, double
|
|
4981
|
+
if ∅ and both sides KNOWN and both STRONG and no voted region lies
|
|
4982
|
+
between them:
|
|
4983
|
+
pick ≔ structuralResonance(a, b) # synthetic gist from the two
|
|
4984
|
+
# sides' own vectors + the literal middle; rejects a
|
|
4985
|
+
# candidate reaching exactly one side's own conclusion;
|
|
4986
|
+
# requires margin > estimatorNoise(D) over the best
|
|
4987
|
+
# differently-concluding rival
|
|
4988
|
+
best ≔ the container covering the MOST remaining candidates;
|
|
4989
|
+
ties → shortest interior → lowest id
|
|
4990
|
+
if best's joined occurrence is a query substring: continue
|
|
4991
|
+
reach ≔ edgeAncestors(best.id, HUB(N))
|
|
4992
|
+
if not saturated and idf > 0:
|
|
4993
|
+
confidence ≔ 1 for an exact container, else the tier's own
|
|
4994
|
+
w ≔ mutual(confidence) · ln(N / reach.contexts) / |reach.roots|
|
|
4995
|
+
cross.push(vote for best.id's roots at w, span covering all
|
|
4996
|
+
composed candidates; CORROBORATING when every
|
|
4997
|
+
composed part was)
|
|
4998
|
+
if the pick is container-backed: # never for tier 4
|
|
4999
|
+
consumed += {a, b, extras}
|
|
5000
|
+
if the tier is EXACT: # explaining away
|
|
3694
5001
|
for each individual vote rv:
|
|
3695
5002
|
if rv.roots shares any root with reach.roots: keep
|
|
3696
|
-
if containerBytes
|
|
5003
|
+
else if containerBytes contains rv's query bytes:
|
|
3697
5004
|
superseded.add(rv)
|
|
3698
|
-
|
|
5005
|
+
|
|
5006
|
+
# ── POOL AND COMMIT (§17.6) ──────────────────────────────────────
|
|
3699
5007
|
pooled ≔ lightestDerivation in the (+,+) semiring over the union
|
|
3700
5008
|
of the independent votes (minus superseded) and cross # §5.3
|
|
3701
|
-
ranked ≔ anchors by pooled vote, descending
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
|
|
5009
|
+
ranked ≔ anchors by pooled vote, descending, each carrying
|
|
5010
|
+
peak, start–end (its strongest region), breadth, clusters
|
|
5011
|
+
cut ≔ steepest ratio drop (natural break) over the focus votes of
|
|
5012
|
+
anchors the QUERY pointed at (corroborating-only excluded)
|
|
5013
|
+
roots ≔ [ranked[0]] # dominant: always grounds
|
|
5014
|
+
∪ { further non-overlapping anchors past any leading saturated
|
|
5015
|
+
stretch whose focus vote ≥ max(cut, FLOOR(N)) }
|
|
3705
5016
|
return (roots, ranked)
|
|
3706
5017
|
```
|
|
3707
5018
|
|
|
3708
5019
|
### 27.6 Recall, reasoning, fusion (§21–23)
|
|
3709
5020
|
|
|
3710
5021
|
```
|
|
3711
|
-
recallByResonance(query):
|
|
3712
|
-
whole_ ≔ [[0, query.length]]
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
|
|
3716
|
-
|
|
5022
|
+
recallByResonance(query, pre):
|
|
5023
|
+
whole_ ≔ [[0, query.length]]; nothing ≔ []
|
|
5024
|
+
restates(b) ≔ b = query, or canon(b) = canon(query)
|
|
5025
|
+
fragment(g) ≔ |g| < |query| ∧ query CONTAINS g # a restated fragment
|
|
5026
|
+
# — never an answer
|
|
5027
|
+
# every tier below exits through both guards
|
|
5028
|
+
|
|
5029
|
+
# ── tier 0: exact self-match ─────────────────────────────────────
|
|
5030
|
+
q ≔ pre.queryResolved
|
|
5031
|
+
if q ≠ ∅:
|
|
5032
|
+
g ≔ reverseContext(q, guide, prevFirst(q, hubBound))
|
|
3717
5033
|
if g ≠ ∅: return { bytes: g, accounted: nothing, moves: STEP }
|
|
5034
|
+
|
|
5035
|
+
# ── tier 0b: argument binding ────────────────────────────────────
|
|
5036
|
+
if q = ∅:
|
|
5037
|
+
args ≔ MAXIMAL recognised sites with |s| ≥ 2W, |s| < |query|,
|
|
5038
|
+
hasNext(s)
|
|
5039
|
+
if |args| = 1 and no OTHER site of ≥ 2W lies outside it:
|
|
5040
|
+
g ≔ follow(args[0], guide)
|
|
5041
|
+
if g ≠ ∅ ∧ ¬fragment(g):
|
|
5042
|
+
return { bytes: g, accounted: [args[0].span], moves: STEP }
|
|
5043
|
+
|
|
3718
5044
|
hits ≔ contentIndex.nearest(gistOf(query), k)
|
|
3719
5045
|
if hits = ∅: return ∅
|
|
3720
|
-
|
|
5046
|
+
|
|
5047
|
+
# ── tier 1: clean resonance, at the SCALE-AWARE identity bar ─────
|
|
5048
|
+
idBar ≔ identityBar(D, W, |query|) # §8.1
|
|
5049
|
+
if hits[0].score ≥ idBar:
|
|
3721
5050
|
for h in hits:
|
|
3722
|
-
|
|
5051
|
+
if h.score < idBar: break # per HIT, not per tier
|
|
5052
|
+
if h = q or restates(read(h)): # only reverse recall may
|
|
5053
|
+
g ≔ reverseContext(h, guide) # conclude from a restating hit
|
|
5054
|
+
if g ≠ ∅: return { bytes: g, accounted: nothing, moves: STEP }
|
|
5055
|
+
continue
|
|
5056
|
+
g ≔ project(h, guide)
|
|
3723
5057
|
if g ≠ ∅: return { bytes: g, accounted: whole_, moves: STEP }
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
5058
|
+
|
|
5059
|
+
# the query-relative, CHANCE-CORRECTED fraction shared by tiers 2-4
|
|
5060
|
+
fracOfQuery(cos, otherLen) ≔
|
|
5061
|
+
min(1, max(0, cos − SIG) · √(otherLen / max(1, |query|)))
|
|
5062
|
+
|
|
5063
|
+
# ── tier 2: scaffolding-dominated ────────────────────────────────
|
|
5064
|
+
if hits[0].score ≥ SIG:
|
|
5065
|
+
forest ≔ pre.attention().roots
|
|
5066
|
+
if forest ≠ ∅ ∧ ¬allWindowsAreScaffolding(query) ∧
|
|
5067
|
+
( forest[0].vote ≥ FLOOR(N) # small-store read
|
|
5068
|
+
∨ (DOMINATES(forest[0].breadth, 1) # scale-invariant
|
|
5069
|
+
∧ forest[0].peak > ln 2) ):
|
|
3730
5070
|
g ≔ project(forest[0].anchor, guide)
|
|
3731
|
-
if g ≠
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
5071
|
+
if g ≠ ∅ ∧ ¬fragment(g):
|
|
5072
|
+
return { bytes: g,
|
|
5073
|
+
accounted: [[forest[0].start, forest[0].end]],
|
|
5074
|
+
moves: CONCEPT }
|
|
5075
|
+
|
|
5076
|
+
# ── tier 3: the nearest grounded hit ─────────────────────────────
|
|
5077
|
+
for h in hits:
|
|
3735
5078
|
g ≔ project(h, guide)
|
|
3736
|
-
if g ≠ ∅
|
|
3737
|
-
contentLen(g), query.length) ≥ REACH:
|
|
5079
|
+
if g ≠ ∅ ∧ fracOfQuery(cos(gistOf(query), gistOf(g)), |g|) ≥ REACH:
|
|
3738
5080
|
return { bytes: g, accounted: nothing, moves: STEP }
|
|
3739
|
-
|
|
5081
|
+
|
|
5082
|
+
# ── the REFUSAL PATH — one shared, memoised candidate list ───────
|
|
5083
|
+
wideIds() ≔ hits[0].score ≥ CONCEPT_BAR
|
|
5084
|
+
? exhaustive resonate(gistOf(query), hubBound) # ids only
|
|
5085
|
+
: hits # the gist ranks nothing
|
|
5086
|
+
# at concept level
|
|
5087
|
+
|
|
5088
|
+
# 3b. substitution / identity bridge
|
|
5089
|
+
bridged ≔ substitutionBridge(query, wideIds)
|
|
5090
|
+
# anchors: rarest query windows → edgeAncestors, plus wideIds
|
|
5091
|
+
# align byte-for-byte; a mismatch substitutes only under
|
|
5092
|
+
# CORROBORATION ∧ GRADED IDENTITY ∧ RAW BALANCE
|
|
5093
|
+
# accept when matched+substituted DOMINATES the query, every
|
|
5094
|
+
# gap ≤ W, and ¬dismissedKnownContent(query, accounted)
|
|
5095
|
+
if bridged ≠ ∅:
|
|
5096
|
+
g ≔ project(bridged.id, guide)
|
|
5097
|
+
manufactured ≔ g lies inside one of bridged's substituted spans
|
|
5098
|
+
strictPrefix ≔ bridged.subs = ∅ ∧ query is a strict byte prefix
|
|
5099
|
+
of read(bridged.id) # deferred to 3b′
|
|
5100
|
+
if g ≠ ∅ ∧ ¬restates(g) ∧ ¬manufactured ∧ ¬strictPrefix ∧ ¬fragment(g):
|
|
5101
|
+
return { bytes: g, accounted: bridged.accounted,
|
|
5102
|
+
moves: CONCEPT·|bridged.subs| + STEP,
|
|
5103
|
+
complete: bridged.subs = ∅ } # the IDENTITY bridge
|
|
5104
|
+
|
|
5105
|
+
# 3b′. prefix completion — the candidate list first, then the write
|
|
5106
|
+
# side's own leaf-id window index as the supply of last resort
|
|
5107
|
+
completed ≔ prefixCompletion(query, wideIds())
|
|
5108
|
+
?? prefixCompletion(query, prefixCandidates(query))
|
|
5109
|
+
# guards: an UNREADABLE continuation VETOES; the continuation
|
|
5110
|
+
# must reach W; distinct continuation BYTES ⇒ refuse
|
|
5111
|
+
if completed ≠ ∅:
|
|
5112
|
+
return { bytes: completed.form, accounted: whole_, moves: STEP }
|
|
5113
|
+
|
|
5114
|
+
# 3c. frame-filler substitution — invent a KEY, never an answer
|
|
5115
|
+
filled ≔ frameFillerSubstitution(query, wideIds())
|
|
5116
|
+
# the evidence hit must hold the description's RAREST unit;
|
|
5117
|
+
# the frame must be non-empty; the constructed key must
|
|
5118
|
+
# RESOLVE and lead somewhere; exactly ONE may survive
|
|
5119
|
+
if filled ≠ ∅:
|
|
5120
|
+
g ≔ project(filled.id, guide)
|
|
5121
|
+
if g ≠ ∅ ∧ ¬restates(g) ∧ g ⊄ filled.filler ∧ ¬fragment(g):
|
|
5122
|
+
return { bytes: g, accounted: whole_, moves: CONCEPT + STEP }
|
|
5123
|
+
|
|
5124
|
+
# ── echo or silence — decided on the EXACT fold, never an estimate ─
|
|
5125
|
+
topBytes ≔ read(hits[0])
|
|
5126
|
+
if fracOfQuery(cos(gistOf(query), gistOf(topBytes)), |topBytes|) < REACH:
|
|
3740
5127
|
return ∅ # silence
|
|
3741
|
-
return
|
|
3742
|
-
|
|
5128
|
+
if restates(topBytes): return ∅ # restating the question
|
|
5129
|
+
return { bytes: topBytes, accounted: [], moves: 0, echoed: true }
|
|
3743
5130
|
|
|
3744
5131
|
reason(query, answer, consumed₀): # §22
|
|
3745
5132
|
q ≔ resolve(query)
|
|
@@ -3785,10 +5172,15 @@ pivotInto(answer, consumed): # §22 — the stepping stone
|
|
|
3785
5172
|
longest such span wins; ∅ if none # resonance proposes,
|
|
3786
5173
|
# bytes confirm
|
|
3787
5174
|
|
|
3788
|
-
fuseAttention(query, primary):
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
5175
|
+
fuseAttention(query, primary, primarySpans, unclimbed): # §23
|
|
5176
|
+
# (think already gated this on a REMAINDER of ≥ W bytes — §14.1)
|
|
5177
|
+
if containsSpan(query, primary): return primary # STRICT containment:
|
|
5178
|
+
# resolved inside the query's tree, or a
|
|
5179
|
+
# contiguous byte run of it
|
|
5180
|
+
roots ≔ pre.attention().roots
|
|
5181
|
+
lonePromotes ≔ unclimbed ∧ |roots| = 1 ∧ roots[0].breadth > ½
|
|
5182
|
+
∧ every primarySpan is ≥ W bytes away from roots[0]
|
|
5183
|
+
if |roots| = 0 or (|roots| ≤ 1 ∧ ¬lonePromotes): return primary
|
|
3792
5184
|
qv ≔ guide (the response guide, already computed — once, not per root)
|
|
3793
5185
|
pieces ≔ [primary] ∪ [ project(r.anchor, qv) for r in roots[1:] ,
|
|
3794
5186
|
dropping ∅ and duplicates ]
|
|
@@ -3890,14 +5282,31 @@ counterfactualTransfer(query, sites, roots, ranked):
|
|
|
3890
5282
|
# gates are checked once in the floor, not duplicated here.
|
|
3891
5283
|
# If roots/ranked not given (standalone call), compute the climb.
|
|
3892
5284
|
|
|
3893
|
-
# ──
|
|
3894
|
-
MIN_WEAVE ≔ 2; points
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
#
|
|
3899
|
-
|
|
5285
|
+
# ── the weave (§18.2), computed once and shared ──────────────────
|
|
5286
|
+
MIN_WEAVE ≔ 2; (points, depth) ≔ pre.weave()
|
|
5287
|
+
# · anchors read prefix-capped at W · |asker bytes|; oversized dropped
|
|
5288
|
+
# · aligned over the ASKER's compacted stream (answered spans cut out,
|
|
5289
|
+
# runs split back across the original offsets)
|
|
5290
|
+
# · pass 1: literal W-gram runs (weight 1) → halo-mated sites (weight
|
|
5291
|
+
# = the cosine); depth[i] counts distinct covering STRUCTURES
|
|
5292
|
+
# · pass 2: the climb's own (anchor, span) proposals, admitted only on
|
|
5293
|
+
# unclaimed bytes, with literal agreement DOMINATING the span, and
|
|
5294
|
+
# not framed
|
|
5295
|
+
# · "one place, one structure": a point needs ≥ W bytes no better-voted
|
|
5296
|
+
# point already covers; runs are never trimmed against each other
|
|
5297
|
+
|
|
5298
|
+
# ── two-topic gate (§18.3) ───────────────────────────────────────
|
|
5299
|
+
aligned ≔ |points| when some point owns ≥ W bytes the widest does not,
|
|
5300
|
+
OR (climb dispersed ∧ points elected ≥ W apart ∧
|
|
5301
|
+
≥ W query bytes unexplained by the widest)
|
|
5302
|
+
else 1
|
|
5303
|
+
if aligned < 2: return []
|
|
5304
|
+
|
|
5305
|
+
# frame gate (weave-local): frame(i) ⇔ depth[i] > MIN_WEAVE ∧ dominates(depth[i], aligned)
|
|
5306
|
+
dominant ≔ the point covering the MOST query bytes # structure, not topic
|
|
5307
|
+
require some point ∈ roots # a committed root
|
|
3900
5308
|
require some run outside every recognised site
|
|
5309
|
+
OR (two points in the CURRENT turn restating two DIFFERENT sites)
|
|
3901
5310
|
|
|
3902
5311
|
results ≔ [] # multi-candidate: each schema records independently
|
|
3903
5312
|
runSpans(p) ≔ p's free runs as [qs, qe] pairs
|
|
@@ -4047,41 +5456,64 @@ pours halos both ways. The three painter names, having each appeared as an
|
|
|
4047
5456
|
answer following a painting-frame, acquire similar halos; "was painted by …"
|
|
4048
5457
|
spans become shared, many-parent interior structure.
|
|
4049
5458
|
|
|
4050
|
-
Query: `"The Weeping Woman was painted by Pablo Picasso."`
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
query
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
and
|
|
5459
|
+
Query: `"The Weeping Woman was painted by Pablo Picasso."` (47 bytes)
|
|
5460
|
+
|
|
5461
|
+
The trace below is the one the engine actually emits, with its real weights.
|
|
5462
|
+
|
|
5463
|
+
1. **Recognise (§15).** Two learnt forms that lead somewhere — " Pablo Picasso"
|
|
5464
|
+
material and the painting-frame span — plus 47 perceived leaves. "The Weeping
|
|
5465
|
+
Woman" resolves to nothing: never seen.
|
|
5466
|
+
2. **Compute (§16).** No extension claims any span; the ALU abstains on its
|
|
5467
|
+
structural precondition.
|
|
5468
|
+
3. **Consensus climb (§17).** Fourteen regions (twelve perceived, two
|
|
5469
|
+
recognised); every one votes. The pooled ranking is led by the Picasso
|
|
5470
|
+
context (vote 3.28, peak 1.56, breadth 0.46, clusters 2, elected from the
|
|
5471
|
+
query span 33–46), then the three painting exemplars at 1.18, 1.10 and 0.94.
|
|
5472
|
+
With `corpusN = 5` the consensus floor is 2.11 and the natural break sits at
|
|
5473
|
+
3.28, so exactly **one** point of attention commits — the rest are rejected
|
|
5474
|
+
below both bars or absorbed as overlaps. Cross-region attention probes ten
|
|
5475
|
+
pairs and binds none: one pair's exact containers are all rejected by the
|
|
5476
|
+
**self-evidence guard** (§17.8), and the rest are ineligible for structural
|
|
5477
|
+
resonance because at least one side is not content-addressed.
|
|
5478
|
+
4. **Grounding decider (§14.1).** Four mechanisms produce candidates, weighed in
|
|
5479
|
+
the one ladder:
|
|
5480
|
+
|
|
5481
|
+
| Mechanism | Weight | Unexplained bytes | Moves |
|
|
5482
|
+
| :--------------- | --------: | ----------------: | :-------------------------- |
|
|
5483
|
+
| cover (§19) | 34001.001 | 34 | one edge + ε bridging |
|
|
5484
|
+
| **CAST** (§18) | **14001** | **14** | one STEP (redirection) |
|
|
5485
|
+
| extraction (§20) | 29013 | 29 | CONCEPT + 3 located frames |
|
|
5486
|
+
| recall (§21) | 34001 | 34 | one STEP (argument binding) |
|
|
5487
|
+
|
|
5488
|
+
Every one of them found the same answer bytes by a different route — the
|
|
5489
|
+
strategies are redundant by design. What separates them is **how much of the
|
|
5490
|
+
query each explains with learnt structure**. CAST's redirection schema
|
|
5491
|
+
accounts for 33 of the 47 bytes: the query names a substitute ("Pablo
|
|
5492
|
+
Picasso") wholly and freshly for the thing the dominant structure is about,
|
|
5493
|
+
and none of that structure's own continuations appears in the query, so the
|
|
5494
|
+
substitute's own grounded fact replaces the displaced one. Extraction reads
|
|
5495
|
+
the analogous span out correctly — the same painter — but its three located
|
|
5496
|
+
frames explain only 18 bytes, and recall's argument binding explains 13.
|
|
5497
|
+
Confluence abstains (one constraint stream); the ALU is skipped.
|
|
5498
|
+
|
|
5499
|
+
**Decider:** CAST wins by a 15,012-grade margin — comfortably wide, so no
|
|
5500
|
+
`narrowDecision` is recorded.
|
|
5501
|
+
|
|
5502
|
+
5. **Reason (§22).** The answer already _is_ the Picasso context's continuation,
|
|
5503
|
+
so the forward chain finds no unconsumed pivot and fixes immediately.
|
|
5504
|
+
6. **Fuse (§23).** One committed point of attention, and the remainder is under
|
|
5505
|
+
one quantum — nothing to fuse.
|
|
5506
|
+
7. **Articulate (§24).** No answer form is a halo sibling of an asker concept;
|
|
5507
|
+
the answer stands.
|
|
5508
|
+
|
|
5509
|
+
Answer: **"Pablo Picasso co-founded the Cubist movement"** — containing no word
|
|
5510
|
+
of the question. Provenance: `cast`. Every step above is present, with spans,
|
|
5511
|
+
node ids, costs, and data-flow edges, in the rationale when one is requested.
|
|
5512
|
+
|
|
5513
|
+
_(This is a four-fact store; on a larger corpus the same query can ground
|
|
5514
|
+
through extraction or cover instead. That the answer is stable while the route
|
|
5515
|
+
is not is the market working as designed — which is why provenance is part of
|
|
5516
|
+
every response.)_
|
|
4085
5517
|
|
|
4086
5518
|
The second demo query, `"a museum charges 12*4 for a family ticket"`: the ALU
|
|
4087
5519
|
claims the span `12*4` with result bytes `48`; recognition's sites overlapping
|
|
@@ -4092,7 +5524,7 @@ the computed span (recognised, STEP + ε), and lifting drops the framing:
|
|
|
4092
5524
|
### 27.10 Determinism, stated as an invariant
|
|
4093
5525
|
|
|
4094
5526
|
Every function above is deterministic given (seed, store contents): the alphabet
|
|
4095
|
-
and keyring are seeded; perception is
|
|
5527
|
+
and keyring are seeded; perception is a pure function of the bytes; interning is
|
|
4096
5528
|
content-addressed; the deduction engine breaks ties by fixed conventions;
|
|
4097
5529
|
disambiguation bottoms out in corpus-determined orderings; the ANN index is
|
|
4098
5530
|
deterministic for a fixed build. Hence: **same seed + same deposits (in order) +
|
|
@@ -4133,7 +5565,7 @@ terms of art borrowed from the literature.
|
|
|
4133
5565
|
- **Hyperdimensional computing** — Kanerva's (2009) umbrella term for computing
|
|
4134
5566
|
with high-dimensional random vectors; synonym of VSA as used here. §2.
|
|
4135
5567
|
- **IDF** — inverse document frequency; the specificity weighting of the
|
|
4136
|
-
consensus climb (Spärck Jones 1972). §17.
|
|
5568
|
+
consensus climb (Spärck Jones 1972). §17.4.
|
|
4137
5569
|
- **Instance-based learning** — generalization at query time from stored
|
|
4138
5570
|
instances. §1.1.
|
|
4139
5571
|
- **Merkle DAG** — a graph whose node identities derive from content (Merkle
|
|
@@ -4156,17 +5588,20 @@ n = input/query length; D = dimension; W = fold window; N = learned contexts; k
|
|
|
4156
5588
|
all index queries are sub-linear in the collection (empirically ≈ N^0.32
|
|
4157
5589
|
distance computations).
|
|
4158
5590
|
|
|
4159
|
-
| Operation | Cost
|
|
4160
|
-
| :------------------------- |
|
|
4161
|
-
| Perceive | O(n·D) vector work; O(n) nodes
|
|
4162
|
-
| Deposit (intern + windows) | O(n) content-addressed probes
|
|
4163
|
-
| Learn a pair | O(1) edge + O(changed) halo pours
|
|
4164
|
-
| Recognise | O(n·W) bounded probes
|
|
4165
|
-
|
|
|
4166
|
-
|
|
|
4167
|
-
|
|
|
4168
|
-
|
|
|
4169
|
-
|
|
|
5591
|
+
| Operation | Cost | Where |
|
|
5592
|
+
| :------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------- |
|
|
5593
|
+
| Perceive | O(n) rolling-hash pass + O(n·D) vector work; O(n) nodes. A stream EXTENDING an already-folded one costs O(new bytes) — cuts are stable under append and unchanged segments are reused (§10.4) | §10 |
|
|
5594
|
+
| Deposit (intern + windows) | O(n) content-addressed probes; the intern walk itself is O(new nodes) when a prefix was already interned | §11 |
|
|
5595
|
+
| Learn a pair | O(1) edge + O(changed) halo pours + one flat-branch probe per suffix offset (suffix propagation, §12.1) | §12 |
|
|
5596
|
+
| Recognise | O(n·W) bounded probes | §15 |
|
|
5597
|
+
| Canonical resolution | one canonicalization + one hash probe + one verify read per candidate; only on an exact-lookup miss | §3.4 |
|
|
5598
|
+
| Consensus climb | O(regions · k) index queries + expand-until-decided: work bounded by √N per region regardless of corpus size (LIMITed store reads, indexed existence probes) | §17 |
|
|
5599
|
+
| Cover search | output-sensitive A\*LD: proportional to the lightest derivation, not the corpus (§5.2); the dominant per-query index cost is connector pre-resolution, O(sites) queries | §19 |
|
|
5600
|
+
| Recall (answering tiers) | O(k) index probes + graded structural checks | §21 |
|
|
5601
|
+
| Recall (refusal path) | Nothing on an answering path. One shared candidate list (exhaustive only when the top hit clears the concept bar), then O(\|query\|) content-hash probes, ≤ W anchor climbs, and one O(\|query\|·\|candidate\|)-bounded alignment each; the frame filler's probe budget is √N | §21.5 |
|
|
5602
|
+
| Reasoning | ≤ K hops, each bounded by the answer's subtree | §22 |
|
|
5603
|
+
| Storage | O(distinct subtrees); vector index over resonance targets only, 1-bit codes (32× compression) | §3, §12.3 |
|
|
5604
|
+
| Profiling | free when off; when on, one counter bump per logical operation and one timer per named phase — never read by inference | §26 |
|
|
4170
5605
|
|
|
4171
5606
|
Nothing on any per-query path scans the corpus; every fan-out is capped at the
|
|
4172
5607
|
hub bound, and the cap is enforced at the _store level_ through LIMITed reads
|