@hviana/sema 0.9.4 → 0.9.5

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.
Files changed (45) hide show
  1. package/AGENTS.md +16 -7
  2. package/dist/src/mind/learning.js +11 -12
  3. package/dist/src/mind/mind.js +4 -4
  4. package/dist/src/mind/types.d.ts +10 -15
  5. package/dist/src/store.d.ts +10 -10
  6. package/dist/src/store.js +5 -5
  7. package/docs/INDEX.md +62 -63
  8. package/docs/INVARIANTS.md +36 -18
  9. package/docs/architecture/bounded-reads.md +31 -71
  10. package/docs/architecture/caches.md +61 -81
  11. package/docs/architecture/closure.md +88 -107
  12. package/docs/architecture/commonality.md +47 -38
  13. package/docs/architecture/cost-model.md +57 -79
  14. package/docs/architecture/determinism.md +43 -55
  15. package/docs/architecture/evidence.md +158 -235
  16. package/docs/architecture/exact-vs-approximate.md +41 -35
  17. package/docs/architecture/factored-machinery.md +34 -20
  18. package/docs/architecture/fold-contract.md +110 -118
  19. package/docs/architecture/halo-sketch.md +105 -96
  20. package/docs/architecture/match-project.md +51 -42
  21. package/docs/architecture/mechanism-market.md +87 -91
  22. package/docs/architecture/memoization.md +60 -74
  23. package/docs/architecture/meter.md +37 -47
  24. package/docs/architecture/saturation.md +75 -101
  25. package/docs/architecture/store.md +118 -99
  26. package/docs/architecture/thresholds.md +66 -73
  27. package/docs/failures/tempting-but-wrong.md +139 -165
  28. package/docs/harness/gates.md +27 -32
  29. package/docs/mechanisms/alu.md +22 -69
  30. package/docs/mechanisms/cast.md +76 -71
  31. package/docs/mechanisms/confluence.md +22 -29
  32. package/docs/mechanisms/cover.md +58 -66
  33. package/docs/mechanisms/extraction.md +33 -37
  34. package/docs/mechanisms/prefix-completion.md +36 -39
  35. package/docs/mechanisms/recall.md +60 -53
  36. package/docs/mechanisms/reference.md +63 -49
  37. package/jsr.json +1 -1
  38. package/package.json +1 -1
  39. package/src/alu/README.md +90 -298
  40. package/src/derive/README.md +94 -256
  41. package/src/mind/learning.ts +11 -12
  42. package/src/mind/mind.ts +4 -4
  43. package/src/mind/types.ts +10 -15
  44. package/src/rabitq-ivf/README.md +11 -8
  45. package/src/store.ts +5 -5
@@ -1,256 +1,179 @@
1
1
  # Witnessed Evidence — The Question Names the Step
2
2
 
3
- > **Law:** a stored form is identified by the material at hand when every one of
4
- > its bytes lies in a W-window that material holds — in any order, at any place,
5
- > and wherever each piece of the material came from. A form witnessed in every
6
- > byte but one contiguous span of content is ANOTHER INSTANCE of the same
7
- > question: it says what the question's relation is, never what it asks about. A
8
- > step the question did not name has to be paid for by material the question
9
- > still owes.
10
-
11
- ## The operation — `src/mind/evidence.ts`
12
-
13
- `witness(form, indexes, W)` reads one form against a list of window indexes
14
- (`windowIndex`). It is the order-free reading of correspondence, beside
15
- `alignRuns` (which produces runs) and `junctionContainersFrom(…, unordered)`
16
- (which finds containers). It is exact, deterministic and linear: one index per
17
- source and one probe per window of the form. A window is credited to the LAST
18
- source that holds it, so source 0 (the question) is credited only with what
19
- nothing else at hand supplies. A form shorter than W is never witnessed. The
20
- form's own unwitnessed bytes come back as its `residue`.
21
-
22
- ## Where the material comes from
23
-
24
- The corpus records, for every continuation, the questions that establish it: its
25
- predecessors. A 2Wiki fact `The father of Frederick II is Peter III of
26
- Aragon.`
27
- is established by `Frederick II` and by `Frederick II father`. The asker's
28
- question rarely repeats either one byte for byte, but it often holds every byte
29
- of one of them.
30
-
31
- The derivation stands on more than the question. The node it is following is
32
- material too. On the second hop of
33
- `Where was the place of death of the
34
- director of film Beat Girl?` the node is
35
- `Edmond T. Gréville`, which the first hop reached and the asker never wrote. The
36
- establishing question `Edmond T.
37
- Gréville place of death` is held by neither the
38
- question nor the first hop's fact, only by both. Measured over 5,236 held-out
39
- 2WikiMultihopQA compositional questions, such a context is wholly witnessed by
40
- the question alone 69 times, and by the question plus the first hop 2,153 times.
41
-
42
- An establishing context is a DEPOSITED context: a predecessor with structural
43
- parents or containers is a span interned inside bigger forms, and it inherits
44
- their edges. Witnessing such a fragment named every fact it is a piece of (the
45
- fragment `born?` named nine strangers' birthplaces on the 2Wiki fixture with
46
- one-hop questions), so it never counts — the same structural predicate
47
- `pivotInto` reads.
3
+ > **Law:** the material at hand identifies a stored form when every byte of the
4
+ > form lies in a `W`-window that the material holds, in any order and wherever
5
+ > each piece came from. A form witnessed in every byte but one contiguous span
6
+ > of content is **another instance** of the same question: it says what the
7
+ > question's relation is, never what the question asks about. A step the
8
+ > question did not name is paid for from what the question still owes.
9
+
10
+ **Why.** A question rarely repeats the corpus's wording or byte order, and a
11
+ derivation stands on nodes the asker never wrote. Without a reading of what the
12
+ question _names_, a chain follows the most-poured continuation and voices a
13
+ stranger's fact. `Who is the director of The Jerk?` once walked on to Carl
14
+ Reiner's citizenship.
15
+
16
+ ## The operation — `witness` (`src/mind/evidence.ts`)
17
+
18
+ `witness(form, indexes, W)` reads one form against one window index per source
19
+ of material (`windowIndex`). It is the order-free reading, beside `alignRuns`
20
+ (ordered runs) and the unordered `junctionContainersFrom` (containers).
21
+
22
+ - It is exact and linear: one probe per window of the form.
23
+ - A window is credited to the last source that holds it, so the question
24
+ (source 0) is credited only with what nothing else supplies.
25
+ - A form shorter than `W` is never witnessed.
26
+ - The form's unwitnessed bytes come back as its `residue`.
27
+
28
+ ## The material
29
+
30
+ For every continuation, the corpus records the contexts that establish it, its
31
+ predecessors. `The father of Frederick II is Peter III of Aragon.` is
32
+ established by `Frederick II` and by `Frederick II father`. The material is the
33
+ question plus the node the derivation stands on. On the second hop of
34
+ `Where was the place of death of the director of film Beat Girl?`, the node is
35
+ `Edmond T. Gréville`, and `Edmond T. Gréville place of death` is held by neither
36
+ the question nor the node alone, only by both. Over 5,236 held-out 2Wiki
37
+ questions, the question alone witnessed such a context 69 times, and the
38
+ question plus the first hop 2,153 times.
39
+
40
+ Only a **deposited** context establishes anything. A predecessor with structural
41
+ parents or containers is a span inside bigger forms and inherits their edges.
42
+ Witnessing that fragment named every fact it is a piece of: `born?` named nine
43
+ strangers' birthplaces.
48
44
 
49
45
  ## Another instance of the question — `coInstanceFiller`, `byCoInstance`
50
46
 
51
- The question rarely spells the relation the way the corpus does.
52
- `When was the
53
- director of film Jinpa born?` reaches `Pema Tseden`, whose fact is
54
- established by `Pema Tseden date of birth`: no window joins `born` to
55
- `date of birth`, so nothing is witnessed. What joins them is another instance of
56
- the question.
57
-
58
- A **co-instance** is a stored context that shares the question's FRAME, its
59
- opening and its close byte for byte under the response's equivalence, around ONE
60
- different filler, and whose filler is a thing the corpus knows: a stored context
61
- with continuations of its own. `Where was Peter Jackson born?`, read against
62
- `Where was the director of film Beat Girl born?`, shares `Where was` and `born?`
63
- and leaves `Peter Jackson`. Three conditions make the reading exact, and each
64
- was measured necessary:
65
-
66
- - **Order.** A frame is not a bag of windows. Read order-free,
67
- `Lyon is a city in France` passes for an instance of
68
- `what if the capital of France were Lyon?`, which NAMES Lyon, and a
69
- coincidental window inside a filler splits it.
70
- - **The filler is an entity.**
71
- `Explain how photosynthesis converts sunlight
72
- into chemical energy.` shares
73
- a frame with `Explain how photosynthesis
74
- works.`, but its slot holds a
75
- description of the frame's own subject, and it answers the question. The
76
- filler is the longest stored context opening where the slot opens (up to one
77
- window earlier: the `T` of `Taika` can sit in the question's `as t`).
78
- - **The frame is unsaid.** Every frame window must be held by the material, so
79
- on the walk a frame a product already said cannot name a second step.
80
- `Who is the father of …?` names the second hop of
81
- `Who is the father of the director of film Beat Girl?` and not the
82
- grandfather. Scaffolding windows are exempt, because they are nobody's
83
- evidence (`is` in `Which country Leo Mittler is from?`).
84
-
85
- The co-instance's continuation is established by other contexts too
86
- (`Peter Jackson place of birth`), and the one holding the filler spells the
87
- relation the corpus's way: a RELATION FRAME, `` · `place of birth`. A frame
88
- counts only where two co-instances spell it alike. One alignment agrees with
89
- nothing, which is the bar `reference` holds a frame to (`MIN_INSTANCES`). The
90
- exact tier's second reading (`byCoInstance`, run only when no establishing
91
- context is witnessed outright) puts the node the derivation stands on in each
92
- frame and looks the result up by content: `Edmond T. Gréville place of birth`
93
- exists, so its continuation is named. Neither the equivalence nor the frame is
94
- stored as a unit, and nothing is approximate.
95
-
96
- **The proposals are the consensus climb's.** The climb already scores the stored
97
- forms the question's regions reach, and the co-instances are among its points.
98
- Its scored anchors are published on the question when it runs, and the tier
99
- reads the `chainReach(W)` most corroborated of them. It climbs nothing of its
100
- own. A first version climbed every question window itself and cost the 116-query
101
- battery +16% climb visits for zero namings. Two consequences follow, both
102
- pinned:
103
-
104
- - A pick made before the climb read less evidence than one made after, so the
105
- response's pick memo is cleared when the points arrive. Traced and untraced
106
- responses agree.
107
- - Recall's argument binding, which runs before the climb, asks for it first when
108
- the argument has several continuations and the question names none outright.
109
- That is exactly where the choice would otherwise be blind.
110
-
111
- A question the corpus holds verbatim is its own instance and reads no frames.
112
- Frames are read once per question (and once per walk material), and every node
113
- pays only the exact lookups.
114
-
115
- The same reading refuses the co-instance as an ANSWER, because its own
116
- continuation speaks of its own filler. Recall's consensus-anchor tier does not
117
- ground it: `Where was the performer of song God (John Lennon Song) born?`
118
- elected `Where was Nicki Minaj (Nicki Minaj Song) born?`. Fusion does not fuse
119
- it as a further topic. A CAST comparison does not take it as its dominant: it
120
- set `Where was Shakira (Shakira Song) born?` against `John Lennon` and voiced
121
- Shakira's birthplace.
122
-
123
- ## Arguments the question holds under the response's equivalence
124
-
125
- Recognition matches bytes and the query fold's own boundaries. 2Wiki title-cases
126
- its questions (`… of film Man At Bath work at?` for the stored `Man at Bath`),
127
- and a title inside a question lines up with none of the fold's cuts. When
128
- recall's argument binding finds no recognised argument, the stored forms the
129
- consensus climb reaches become candidates if the question holds them under the
130
- response's equivalence (`canonHeldPoints`: canonical containment,
131
- offset-preserving, so the span is the question's own). The approximate climb
132
- proposes and exact containment decides. This is read after the clean-resonance
133
- tier, so a near-identical question pays no climb for it. The canonical-form
134
- index it relies on is the one the trainer builds after training
135
- (`buildCanonIndex`, progress.ts).
136
-
137
- A fragment that answers other questions is no argument and no independent piece
138
- of the question either. It is set aside BEFORE the binding looks for one maximal
139
- argument, so `director` no longer cancels `Man at Bath`. The same predicate
140
- gates CAST's redirection: the substitute `ong)?`, the tail of every
141
- `… (… Song)?` question, voiced a stranger's birthplace.
47
+ `When was the director of film Jinpa born?` reaches `Pema Tseden`, whose fact is
48
+ established by `Pema Tseden date of birth`. No window joins `born` to
49
+ `date of birth`. What joins them is another instance of the question.
50
+
51
+ A **co-instance** is a stored context that shares the question's frame, its
52
+ opening and its close byte for byte under the response's equivalence (together
53
+ at least `W`), around one different filler. Three conditions make that reading
54
+ exact, and each was measured to be necessary:
55
+
56
+ - **Order.** Read order-free, `Lyon is a city in France` passes for an instance
57
+ of `what if the capital of France were Lyon?`.
58
+ - **The filler is an entity.** It is the longest stored context with
59
+ continuations of its own that opens where the slot opens, or up to one window
60
+ earlier. In `Explain how photosynthesis converts sunlight…` the slot holds a
61
+ description of the subject, and that is no other instance.
62
+ - **The frame is unsaid.** Every frame window must be held by the material, with
63
+ scaffolding windows exempt. So a frame a product already said cannot name a
64
+ second step: `father of` names the second hop of a father question, never the
65
+ grandfather.
66
+
67
+ The co-instance's continuation is also established by contexts that hold the
68
+ filler (`Peter Jackson place of birth`), and they spell the relation the
69
+ corpus's way, as a **relation frame** (`relationFrames`). A frame counts only
70
+ where two co-instances spell it alike, the same bar `reference` holds
71
+ (`MIN_INSTANCES`).
72
+
73
+ `byCoInstance` puts the node into each frame and looks the result up by content.
74
+ If `Edmond T. Gréville place of birth` exists, its continuation is named. It
75
+ runs only when nothing is witnessed outright. Neither the frame nor the
76
+ equivalence is stored, and nothing in the reading is approximate.
77
+
78
+ **The proposals are the climb's.** The tier reads the `chainReach(W)` most
79
+ corroborated of the consensus climb's ranked points (`asked.points`), and climbs
80
+ nothing itself. A first version climbed on its own and cost 16% more climb
81
+ visits for no naming at all. This has two consequences:
82
+
83
+ - the pick memo is cleared when the points arrive (`memoization.md`);
84
+ - recall's argument binding asks for the climb first when its choice would
85
+ otherwise be blind.
86
+
87
+ A question stored verbatim is its own instance and reads no frames.
88
+
89
+ **A co-instance is never the answer.** Its own continuation speaks of its own
90
+ filler. So:
91
+
92
+ - recall's consensus anchor refuses it, where once
93
+ `Where was Nicki Minaj (Nicki Minaj Song) born?` answered another performer's
94
+ question;
95
+ - fusion does not fuse it as a further topic;
96
+ - a CAST comparison does not take it as its dominant, where once Shakira's
97
+ birthplace was voiced against `John Lennon`.
98
+
99
+ ## Arguments held under the response's equivalence
100
+
101
+ 2Wiki title-cases its questions (`Man At Bath` for the stored `Man at Bath`),
102
+ and such a title lines up with none of the fold's cuts. When recall's argument
103
+ binding finds no recognised argument, the stored forms the climb reaches become
104
+ candidates, if the question canonically contains them at their own offsets
105
+ (`canonHeldPoints`). The climb proposes, and exact containment decides. This
106
+ relies on the canonical index the trainer builds (`buildCanonIndex`).
107
+
108
+ A fragment that answers other questions is set aside before the binding looks
109
+ for one maximal argument, so `director` no longer cancels `Man at Bath`. The
110
+ same predicate refuses CAST's redirection substitute `ong)?`, the tail of every
111
+ `… (… Song)?` question.
142
112
 
143
113
  ## Its consumers
144
114
 
145
- | Where | What it decides |
146
- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
147
- | `chooseNext` (traverse.ts) | **The exact tier.** It names the continuation one of whose establishing contexts (other than the node) is witnessed by the question plus the node, with the question supplying at least one window the node does not. It ranks first among the readings; the distributional ladder decides only when nothing is named, or among continuations named equally. |
148
- | `askedEvidence` (traverse.ts) | The question spans that named a pick. A mechanism projecting through the pick accounts for them, because evidence travels (mechanism-market.md). Recall's argument binding uses this. |
149
- | `preConsumed` (pipeline.ts) | When a grounding does not declare `used`, what it spoke for is the forms inside its answer that the question already holds. The entity the answer added stays pivotable. |
150
- | The walk (reasoning.ts) | A pivot is NAMED when one of its continuation's establishing contexts is witnessed by what of the question no product has said yet, plus the pivot. A named pivot MOVES. An unnamed one is offered only while the derivation still owes something, and the law then decides by carrying. No grounding owns the next step: a CAST grounding used to move through any term inside its answer, unasked (`Who is the director of The Jerk?` walked on to Carl Reiner's citizenship). |
151
- | `answersOtherQuestions` (traverse.ts) — cover sites and recall's argument binding | A FRAGMENT is a form that sits inside other forms, has several continuations, and leaves at least one window of the question beyond it. It answers other questions, so it leads somewhere for this question only when the question names one of its continuations. Recall's binding read the same fragment (`director`) and voiced the most-poured stranger's fact. |
152
- | `byCoInstance` (traverse.ts) | The exact tier's second reading: the relation read off another instance of the question, transferred to the node by an exact substitution. |
153
- | Recall's consensus anchor, fusion roots | A co-instance of the question is never voiced as its answer, nor fused as a further topic. |
154
- | CAST comparison (mechanisms/cast.ts) | A comparison voices two structures, so the question must evidence the analog with a window of its own: neither inside the dominant's runs nor scaffolding. `father of Frederick II?` evidenced `Peter III of Aragon father` only with `father` and `of`, and the comparison glued that bare question onto the answer. |
155
-
156
- A cover span made of nothing but scaffolding (every window a hub,
157
- `scaffoldSpans`) is not accounted. The form recognised there, such as the song
158
- `What` in the trained store, is one of thousands the bytes could name. This is
159
- measured only on the trained store (`What country is Jerry Bock a citizen of?`
160
- was won by `The performer of What is Melinda Marx.` glued onto the right fact).
161
- A synthetic fixture could not reproduce that regime, because content addressing
162
- folds every filler's `What` into a handful of shared nodes, so no suite test
163
- pins this rule.
115
+ | Where | What it decides |
116
+ | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
117
+ | `chooseNext` (`traverse.ts`) | **The exact tier.** A continuation is named when one of its establishing contexts other than the node is witnessed by the question plus the node, and the question supplies a window the node lacks. Named picks rank first; then the co-instance reading; then the distributional ladder. |
118
+ | `askedEvidence` (`traverse.ts`) | the question spans that named a pick, which a projecting mechanism then accounts for |
119
+ | `preConsumed` (`pipeline.ts`) | when a grounding declares no `used`: the forms inside its answer that the question already holds. The entity the answer added stays pivotable |
120
+ | the walk (`reasoning.ts`) | a named pivot moves; an unnamed one is offered only while the derivation still owes something, and the closure law decides it by carrying |
121
+ | `answersOtherQuestions` (`traverse.ts`) | a fragment (a form inside others, with several continuations, that leaves a window of the question outside it) leads somewhere only if the question names one of its continuations. Read by cover sites, recall's binding and CAST's redirection |
122
+ | recall's anchor, fusion roots, CAST comparison | a co-instance is never voiced or fused; a comparison needs a window of its own evidencing the analog |
164
123
 
165
124
  ## What the question owes
166
125
 
167
- The derivation is born owing only its discriminative material. The bytes a
168
- corpus-global scaffolding window reaches (`scaffoldExtents`, the same "hub"
169
- reading as `allWindowsAreScaffolding` and the bridge's `explainedSpan`) are
170
- nobody's debt. Otherwise a step could claim to pay `Who is the` by restating
171
- `is`, which every fact holds. Pricing is untouched: the ladder still charges
172
- every unexplained byte, because for a question made only of scaffolding,
173
- covering those bytes is the evidence. Making scaffolding free in the market was
174
- measured and refused, because it changed dialogue answers
175
- (`How are you
176
- today?`).
177
-
178
- The hub reading behind `scaffoldExtents` is floored at `chainReach(W)`
179
- containers. Inside one deposit's fold, a window is already contained by up to
180
- that many chunks and branches, so on a store of a few facts the √N reading would
181
- call every window frame. That count measures fold structure, not corpus
182
- commonality (`test/22`'s two-fact chains are exactly that regime).
126
+ A derivation is born owing only its discriminating material. Bytes reached by a
127
+ scaffolding window (`scaffoldExtents`, the hub reading, `commonality.md`) are
128
+ nobody's debt, so no step pays `Who is the` by restating `is`. A cover span made
129
+ only of scaffolding is not accounted. The trained store's song `What` is one of
130
+ thousands the bytes could name. Pricing is untouched: the ladder still charges
131
+ every unexplained byte. Making scaffolding free in the market was measured and
132
+ refused, because it changed dialogue answers (`How are you today?`).
183
133
 
184
134
  ## Bounds
185
135
 
186
- The exact tier reads at most √N establishing contexts per decision, floored at
187
- `chainReach(W)`. It asks the cheapest candidates first and compares scores
188
- afterwards in the continuations' own order. It abstains, metered as
189
- `askedReadsSaturated`, in two cases: the continuation read came back at the √N
190
- cap, or the question holds no window the node lacks. One short prefix read
191
- refuses most predecessors before a whole form is reconstructed. Picks are
192
- memoized per node per question.
136
+ The exact tier reads at most `√N` establishing contexts per decision, floored at
137
+ `chainReach(W)`, asking the cheapest first. It abstains (`askedReadsSaturated`)
138
+ when the read hits the cap, or when the question holds no window the node lacks.
139
+ Picks are memoized per node and per question.
193
140
 
194
141
  ## Measured
195
142
 
196
- 2Wiki held-out fixture: the evidence triples of 300 validation rows, deposited
197
- as `wiki2.ts` does, with the canonical-form index built as the trainer builds
198
- it, and asked the rows' own composed questions. Same evidence "plus instances":
199
- 261 one-hop questions about OTHER entities, built from other validation rows by
200
- replacing the first hop's phrase with its referent
201
- (`Where was the director of film X born?` → `Where was Óskar Jónasson born?`)
202
- and answered with the second hop's fact. No test entity has one.
203
-
204
- | Compositional correct (of 133) | Witnessing only (655b192) | Final |
205
- | ------------------------------ | ------------------------- | ----- |
206
- | Fixture | 52 | 56 |
207
- | Plus instances | 41 | 89 |
208
-
209
- The first hop is now right on 114 and 109 of the 133. Of the first hops still
210
- wrong, most name the entity differently from the corpus (`Clara Novello` for
211
- `Clara Anastasia Novello`). That is an alias, which no byte reading recovers.
212
-
213
- Removing CAST's unasked step cost six right answers on the fixture without
214
- instances: second hops that were right paraphrases taken without evidence
215
- (`work at`, `is from`, `When was … born`). The same licence produced the Carl
216
- Reiner extension on the trained store. Without an instance, nothing names those
217
- relations, and the chain stops at the first hop. The answers gained plus
218
- instances are those relations: `born` → place of birth, `Why did … die` → cause
219
- of death, `study`/`graduate from` → educated at, `work at` → employer, `is from`
220
- → country of citizenship.
221
-
222
- The inference count stays low. Two hops of `father` from a question that says
223
- `father` once, as in `paternal grandfather`, are not composed: the store holds
224
- no evidence that `grandfather` composes `father` twice.
225
-
226
- On the 31.7M-node store's 116-query battery, two dialogue answers changed
227
- (neither was correct before). The deterministic read counters rose about 4%
228
- (`bytesRead`, `ancestorVisits`, `edgeProbes`), with ANN queries up 1%. CPU on
229
- this workstation varies by ±15% between back-to-back runs of one build, and
230
- paired runs read 163 s against 152 s and 171 s, then 223 s against 203 s under
231
- outside load. The co-instance tier read 190 forms over the battery and named
232
- nothing there: on that store a frame's windows are scaffolding, and the one-hop
233
- questions it would need are not in the corpus.
143
+ The fixture holds the evidence triples of 300 held-out 2Wiki rows, deposited as
144
+ `wiki2.ts` does, with the canonical index built. "Plus instances" adds 261
145
+ one-hop questions about other entities.
146
+
147
+ | Compositional correct, of 133 | Witnessing only | Now |
148
+ | ----------------------------- | --------------- | --- |
149
+ | fixture | 52 | 56 |
150
+ | plus instances | 41 | 89 |
151
+
152
+ The first hop is right on 114 and 109 of 133. Most of the remaining first-hop
153
+ failures are aliases (`Clara Novello` for `Clara Anastasia Novello`), which no
154
+ reading of bytes recovers. The answers gained with instances are relations no
155
+ window spells: `born` → place of birth, `work at` → employer, `is from` →
156
+ citizenship.
157
+
158
+ On the 31.7M-node store's 116-query battery:
159
+
160
+ - two dialogue answers changed, neither of which had been correct;
161
+ - the read counters rose about 4%;
162
+ - the co-instance tier named nothing, because there the frame windows are
163
+ scaffolding and the one-hop instances are absent.
234
164
 
235
165
  ## Pins
236
166
 
237
- - `test/154` — witnessing semantics. The named continuation beats the
238
- most-poured one. The second hop is named by the question plus the introduced
239
- entity, whatever grounded the first hop. A question that names no further step
240
- is not extended. A fragment voices none of its continuations unless the
241
- question names one, in the cover and in recall's argument binding. A
242
- comparison needs two things named. An argument held only under the response's
243
- equivalence binds. Each assertion was verified by mutation.
244
- - `test/155` — the relation read off another instance of the frame; absent
245
- without two instances that agree; refused for a partly shared frame; never
246
- voiced as the answer; a frame a product already said names no further step; a
247
- description in the slot is no other instance; traced and untraced responses
248
- agree; fusion does not fuse a co-instance, nor does a comparison take one as
249
- its dominant. Verified by mutation.
250
- - `test/76` — a fact the corpus files under an instance's filler is no carriage:
251
- `reference` does not construct one for a new referent.
167
+ - `test/154` — witnessing: a named continuation beats the most-poured one;
168
+ question plus node names the second hop; an unnamed step is not taken; a
169
+ fragment voices nothing it was not asked; a comparison needs two named things;
170
+ an argument held only under the equivalence binds.
171
+ - `test/155` — the relation read off another instance: it needs two agreeing
172
+ instances; it refuses a partly shared frame, a said frame and a description in
173
+ the slot; it is never voiced as the answer; traced and untraced responses
174
+ agree; neither fusion nor a comparison takes a co-instance.
175
+ - `test/76` — a fact the corpus files under an instance's filler is no carriage.
252
176
  - `test/29` C3 — a further hop inside a comparison's seat waits to be asked.
253
- - Unpinned, measured only at fixture scale. Excluding fragments from
254
- establishing contexts is worth 16 answers on the fixture with one-hop
255
- questions. Refusing a fragment as CAST's redirection substitute is worth four.
256
- Fragments with inherited edges appear only at that scale.
177
+ - Measured only at fixture scale, with no pin: excluding fragments from
178
+ establishing contexts (16 answers), and refusing a fragment as CAST's
179
+ redirection substitute (4 answers).
@@ -1,49 +1,55 @@
1
- # Exact vs Approximate — The Law and Its Six Ladders
1
+ # Exact vs Approximate — Scores Propose, Bytes Dispose
2
2
 
3
- Vector scores (`resonate` / `resonateHalo`) are RaBitQ **estimates**. They rank
4
- candidates and gate broad regions; they never decide identity. Identity is
5
- content-addressed lookup — `resolve` / `findLeaf` / `findBranch` /
6
- `canonResolve` — with ONE exception: the store's near-merge (`store.ts`).
3
+ > **Law:** vector scores rank candidates and gate breadth. They never decide
4
+ > identity. Identity is content-addressed lookup: `resolve`, `findLeaf`,
5
+ > `findBranch`, `canonResolve`.
7
6
 
8
- ## The law
7
+ **Why.** Every score is a RaBitQ estimate: 1-bit stored codes scored against a
8
+ 4-bit query, never re-ranked with exact vectors (`geometry.ts`). A decision
9
+ taken on a score inherits the estimator's error, and an identity minted from one
10
+ corrupts every count built on it. A content address cannot be near-but-wrong. So
11
+ vectors, which cover both gists and halos, say where to look, and bytes say what
12
+ is there. Even recall's last echo re-folds the top hit's bytes rather than
13
+ trusting its estimate.
9
14
 
10
- > Scores propose, bytes dispose.
15
+ The one place two different contents share an id is the store's near-merge at
16
+ deposit. There, too, the gist only proposes, and the bytes decide: the two must
17
+ differ in a single span of at most `W` bytes (`store.md`). Nowhere else may a
18
+ `score >= threshold` test mint an identity. Thresholds gate breadth, not truth.
11
19
 
12
- Even recall's echo decision re-folds the top hit's bytes rather than trusting
13
- the estimate. No OTHER `score >= threshold` path may mint an identity;
14
- thresholds gate breadth, not truth.
20
+ ## Graded ladders — exact first, never reordered
15
21
 
16
- ## Graded evidence ladders
22
+ Six subsystems share one shape: an exact tier, then distributional (halo), then
23
+ geometric (gist) tiers. An earlier tier is always preferred, and an approximate
24
+ tier never overrides an exact one.
17
25
 
18
- Six subsystems share one shape — **exact → distributional → geometric** — with
19
- earlier tiers strictly preferred. Never reorder tiers; never let an approximate
20
- tier override an exact one.
26
+ | Site | Ladder, strong → weak |
27
+ | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `resolve` (`mind/primitives.ts`) | exact fold → canonical class (`canonResolve`, hash-then-verify) |
29
+ | `locate` (`mind/match.ts`) | exact bytes → halo role → gist |
30
+ | `alignGraded` (`mind/match.ts`) | literal `W`-gram runs → halo-matched sites → climb proposals |
31
+ | junction `bridge` (`mind/resonance.ts`) | containers by DAG ascent → continuation edges → halo-synonym containers → resonance |
32
+ | `crossRegionVotes` (`mind/attention.ts`) | exact joint containers → one synonym → two synonyms → `structuralResonance` (an imagined whole: hardest gate, no byte containment) |
33
+ | `chooseNext` (`mind/traverse.ts`) | a continuation the question names (`evidence.md`) → distributional support (`prevCount`, then halo mass) → first-inserted |
21
34
 
22
- | # | Site | Ladder (strong → weak) | File |
23
- | - | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
24
- | 1 | `resolve` | exact content-addressed fold → `canonResolve` (equivalence class, hash-then-verify) | `mind/primitives.ts` |
25
- | 2 | `locate` | exact bytes → halo role → gist | `mind/match.ts` |
26
- | 3 | `alignGraded` | literal W-gram runs → halo-matched sites + climb proposals (weave) | `mind/match.ts` / `pipeline-mechanism.ts` |
27
- | 4 | `bridge` | junction containers → edge → synonym → whole-gist | `mind/resonance.ts` |
28
- | 5 | `crossRegionVotes` | exact containers → single synonym → double → `structuralResonance` (synthetic gist, gated hardest — no byte containment) | `mind/attention.ts` |
29
- | 6 | `chooseNext` | an establishing context witnessed by the question ∪ the node (evidence.md) → distributional support (prevCount, poured mass) → first-inserted | `mind/traverse.ts` |
35
+ ## Asymmetries in attention
30
36
 
31
- ## Asymmetries (attention)
37
+ Two rules in `attention.ts` encode the law, and they must not be flattened:
32
38
 
33
- Two rules in `attention.ts` encode "exact decides" and must not be flattened:
34
-
35
- - Only the **EXACT** tier may explain ordinary votes away.
39
+ - Only the **exact** tier may explain other votes away.
36
40
  - Only **container-backed** evidence may consume its endpoints.
37
41
 
38
- ## Pins
39
-
40
- - `test/51` pins the cross-region tier ladder and its gating.
41
- - Recognition idempotence under trace (`test/42`) depends on exact identity
42
- remaining byte-determined, not score-determined.
43
-
44
42
  ## Adding a matcher
45
43
 
46
- Add a tier to the shared family in `mind/match.ts` with a derived gate
47
- (`geometry.ts`), never a private `score >= k` check. A new mechanism is a
44
+ Add a tier to the shared family in `mind/match.ts` with a gate derived in
45
+ `geometry.ts`, never a private `score >= k`. A new mechanism is a
48
46
  `(matcher, direction, gate)` configuration over that family
49
- (`docs/architecture/match-project.md`).
47
+ (`match-project.md`).
48
+
49
+ ## Pins
50
+
51
+ - `test/51` — the cross-region ladder and its gating.
52
+ - `test/56` — the substitution bridge admits a form as the same one only when
53
+ bytes explain it end to end.
54
+ - `test/42` — recognition stays idempotent, because identity is byte-determined,
55
+ not score-determined.