The note network behind brain-ask. Notes are neurons and wikilinks are synapses. A query's vector hits light up a few neurons, and the activation spreads along the links to re-score the results.
A seed note fires every 3 s and the activation leaks along its links. This is personalized PageRank (PPR) in its plainest form.
a ← (1−L)a + L·D^-½WD^-½a, then k-winners-take-all, or PPR with α 0.5 for 10 iterations.graph LR Q[query] --> V[bge vector] V --> S[top-k stimulus] S --> N((note graph)) L[wikilinks] --> N G[growth edges] --> N H[Hebbian co-recall] --> N N --> P[PPR spread] P --> R[re-ranked hits] R --> A[brain-ask]
| experiment | measured | verdict |
|---|---|---|
| Wikipedia 5% (177k nodes), held-out links recall@10 | vectors 294 · k-WTA 289 · PPR 0.5/BETA 2/10 it 360 (+22.4%) | KEEP dense graphs |
| Wikipedia subset, seed 11 | vectors 815 · k-WTA 816 · PPR 907 (+11.3%) | KEEP |
| Brain vault, 29 paraphrase + 30 heldout (strict) | vectors 23/29 + 17/30 · PPR same · reorders 23/88 lists, gains 0 | NOT DEFAULT |
| PaperBrain answers (BRAIN_ASK_SHOW=paper), 60-question eval, hub slots in top 5 (scored 30) | 0 hubs, 3.9 hits shown · 22 hubs · --hub 0.5: 9 hubs, strict 29/30, MRR unchanged | ADOPTED paper/all |
| Brain + usage synapses from transcripts (query → opened note, 128), 61 held-out opens | vectors 21 · PPR 21, 0 lists moved, shuffle control 21 | KILLED |
| openai/math result network (22,438 results), held-out uses, 2 splits | vectors 581 / 594 · PPR 693 / 709 global (same-paper vectors 1,995 / 1,953 beat it) · within the paper 2,200 / 2,210 (+10 to 13%) | NO VERDICT IN SOURCE |
| Result network + cross-paper cosine bridges, cited papers recall@10 (test 91) | paper vectors 58 · PPR 68 · best statement pair 79 wins | KILLED |
| Inside the model: kNN-LM on Qwythos-9B, datastore by graph (GP) vs vectors (P), 20 test results, NLL | P 2.4288 · GP 2.4356 · LM alone 2.4136 best | KILLED |
| Brain vault + PaperBrain / Wikipedia 5% / both / co-commit bridges (brainnet bridge) | 40 in every arm (8 to 21 lists changed, 0 targets moved) | KILLED |
| Wikipedia 20% (1.18M neurons), held-out links recall@10 (8,426) | vectors 332 · spread 326 · PPR 375 (+13.0%) | ALIVE |
| Learned synapse weights cos^g deg^-d, 20% Wikipedia, test half (8,527) | vectors 335 · PPR 372 · pick 348 (-6.5%) | KILLED |
| Hebbian plasticity (learn, ETA × a_src × a_tgt), 2000 train pairs, 20% Wikipedia test half (8,527) | vectors 335 · PPR 372 · ETA 10: 372 (tune flat 82 at every ETA) | KILLED |
| Plasticity sparse (THETA 0.005, ETA 1000): memorise trained pairs / new sources / Brain usage (61) | PPR 24 / 24 / top5 16 · 34 (null 24) / 24 / 16, mean rank worse | KILLED memory, no transfer |
| Level 3: local model reorders PPR top 30, hidden Brain wikilinks (2 splits, 637) | vectors 183 · PPR 231 · model 273, +42 pooled 95% [20, 70] | CONFIRMED brain-link-propose |
| Brain vault + code-graph edges (8,939 notes sharing a code file) / denser PPR / empty network (falsifier), 2026-11-22 | recall unchanged in all · empty net moves latency 1.3 → 4.0 s only | KILLED |
| Brain vault, filter before the rank cut (dedupe + .coisignore before rank keeps 5), 2026-11-23 | paraphrase 22 → 24/29 · heldout 20/30 MRR 0.547 (iTools 8ef39d2) | DEFAULT |
| + Ornith 9B keyword expansion of the query (original kept), 2026-11-23 | paraphrase 23/29 MRR 0.741 · heldout 21/30 MRR 0.559 · +330 ms (2e3fc3c), default when :8080 up | DEFAULT |
| Brain vault frozen eval, 2026-11-13 (merged store, PPR + MiniLM rerank, default brain-ask) | verbatim 29/29 · paraphrase 23/29 · heldout 22/30 strict (was 17/30) · median 1.56 s | MEASURED |
| Same eval 2026-11-15, BRAIN_ASK_NET=0 vs default | net off: heldout 21/30, paraphrase MRR .718, distinct files 3.4-4.6, median 682 ms · net on: 22/30, .736, 5.0, 1125 ms · 62/88 lists changed | KEEP +1 heldout, file diversity for ~440 ms |
| Co-touch synapses (Brain notes an agent Read/Edit/Write within 5 touches), 2026-11-15 | 933 pairs, +1116 directed edges on 6.38M · eval identical, 0/88 lists changed | KILLED at this density |
Sort any column by clicking its header. The page filter (all / pass / miss / pending) at the top also applies to these rows.
Steps are not one continuous run. The 2026-11-13 heldout 22/30 and the 2026-11-22 "12 → 16/30" baseline come from different store states, so read direction, not exact slope. Gains are 1 to 2 queries on n=30.
graph LR Q[question] --> X[Ornith keywords] X --> B[BM25 + vectors k20] B --> F[dedupe + .coisignore] F --> R[brainnet rank 5] R --> S[shown]
Tap a stage to see what it does, its file and its measured effect.
Stores: merged $COIOS_DATA/merged (Brain + PaperBrain, rebuilt by refresh.sh); vq2 coios-brain/vq2; Wikipedia newera/.work/wikinet/p10. The older 552k-neuron merged figure (2026-10-30) is superseded.
<bin>.src before trusting a binary; mtime lies.brain-ask --net text Q. The default path returned 0 hits for modular-nightly (2026-11-18). A repo above one graph query (modular main, 457k nodes) needs the paged code-graph-net, or links come back short with no error (938 vs 15,022 call links).repo-net hook a linked worktree.brainnet rank, which cuts to 5. A filter after it only reorders.rank writes STORE/net.act: back it up before experimenting on the live Brain store.rank / predict output stays byte-identical to main (cmp). Gates: tests/check_brainnet.sh, tests/check_brainnet_ppr.sh.brainnet check is GPU only (tools/brainnet-check.sh). Sparse firing (EPS 1e-4) is re-proven by every wikinet-build.sh (top-20 at EPS == EPS 0 on 40 questions).| group | command | what |
|---|---|---|
| query | ask STORE Q.f32 K [BETA] [--ppr A I] [--show TAG] [--eps E] | query vector as stimulus (top 20 by cosine); score = stimulus + BETA (2) × PPR activation; brain-ask --net |
| query | rank STORE [K] [BETA] [--ppr A I] [--hub G] | stdin brainvec hits re-ranked by spread; brain-ask default path |
| query | spread STORE K SHOW PATH... [--hub G] | PPR 0.5/10 from given neurons; K most activated others; brain-spread |
| query | propose STORE NOTE K | K best notes NOTE does not link yet; brain-link-propose |
| build | build STORE VAULT [CUT] | vault to net.bin + net.paths (CUT: unix seconds) |
| build | graph STORE EDGES.tsv | net.bin from "U TAB V" path pairs (weight 1, both ways) |
| build | bridge A B OUT K MINCOS [--edges F] | union of A and B stores; each A neuron wired to its top-K cosine B neurons |
| build | knn STORE K MINCOS | each neuron's top-K cosine neighbours in other groups |
| build | reweight STORE OUT GAMMA DELTA | copy with w = max(cos,0)^GAMMA × (deg u deg v)^-DELTA |
| build | bits STORE | net.bits sign-bit prefilter (48 B a row) that ask scans first |
| eval | predict STORE HIDDEN.tsv [BETA] [SOURCES] [--ppr A I] [--same] [--dump F] | held-out link recall@10, vectors vs vectors + network |
| eval | hide STORE OUT PCT SEED | split: net.bin minus PCT % of weight-1 synapses; hidden.tsv lists them |
| eval | halves HIDDEN.tsv OUT | pick / test halves by FNV-1a parity of the source |
| eval | cites STORE CITES.tsv HALF | held-out group links (citations) recall@10: group vectors, best pair, PPR |
| eval | reach STORE CASES.tsv | hops from candidates to the target per case |
| eval | check STORE | GPU only, via tools/brainnet-check.sh STORE [K] |
| inspect | stats STORE | neurons, synapses by kind, categories |
| inspect | kcore STORE | core numbers: dense planets vs sparse clouds per category |
| inspect | view STORE OUT.svg | the network drawn, last rank query lit |
B = newera/.work/brainnet/brainnet (build: mojo build -I lib tools/brainnet.mojo). Also: serve STORE SOCK [IDLE_S] keeps the net resident; rank then takes 0.093 s at ~0.5 GB RSS.
Density was not the lever on the Brain: misses are words the index never heard. Remaining misses never reach the 20 candidates, so the next lever is first-stage: a stronger embedder (GPU re-embed) or synthetic questions per note.