Summary
`docs/neuroscience-appendix.md:5-13` invokes CREB excitability windows (~6 hours), engram recruitment, and Hebbian dynamics. The current implementation is effectively a read-counter with frozen flags: decay is mathematically unreachable on realistic usage spans, the "active" flag is seeded once from YAML and never refreshed, LTD is absent, and engram competition isn't modelled.
Evidence
- Decay cliff unreachable. Hotness formula: `sigmoid(log1p(count)) * exp(-ln2/30d * age_days)` with 30-day half-life (`search.py:323-354`). Threshold for dormant is 0.05. A note used once needs `age_days > 130` to fall below — but earliest `note_usage.used_at` is 21 days old. Dormant-by-score is mechanically impossible until ~late July 2026.
- Static CREB flag. `note_metadata.status` is seeded from YAML frontmatter at migration (`schema.py:706`) and only changed by `run_excitability_demotion`. It doesn't refresh on read. The "6-hour CREB window" from the appendix is not implemented.
- LTD absent. Decay exists but doesn't run (see separate issue on auto-decay). Co-occurrence weights have no decay (see separate issue on co-occurrence noise).
- Hebbian only on graph path. `graph.py:263` records usage for neighbours. Semantic / FTS hits don't propagate activation.
- No engram competition. The boost is uniform 1.15× for all active notes.
Proposed fix
- Calibrate half-life to observable history. Drop default `half_life_days` from 30 to ~7 (or expose in `config.toml`). With 7-day half-life and 0.05 threshold, a note used once goes dormant after ~30 days — matches actual usage envelope. Location: `search.py:323, 357, 397, 455` (hard-coded).
- Implement a real CREB-like window. Replace static `note_metadata.status` boost with a computed float. On every `note_usage` insert, set `note_metadata.excitability_expires_at = now + 6h`; apply the 1.15× boost only while unexpired (`search.py:710-740`). Effect: recently-read notes genuinely attract linking — matches the appendix claim.
- Hebbian on all retrieval paths. `search.py:838, 1051-1110` records only the returned notes. Lift `graph.py:263`'s pattern: on semantic/FTS hits, also record a smaller-weight co-activation for 1-hop graph neighbours (via a `weight` column on `note_usage`).
- Engram competition. Instead of uniform 1.15×, scale boost by `1 / log(active_neighbour_count + e)` so dense hubs compete for retrieval mass rather than dominating.
- Purge/bucket `note_usage`. Currently `ORDER BY used_at DESC` on every hotness call (`search.py:335`). Bucket to one row per (note, day) with a counter. Effect: O(1) hotness computation, bounded storage.
Expected effect
The neuroscience framing becomes falsifiable: decay demonstrably fires, recent reads demonstrably boost, Hebbian propagation demonstrably changes retrieval. The project's core claim ships as code, not appendix.
Key files
- `src/neurostack/search.py:323-506, 710-740, 838, 1051-1110`
- `src/neurostack/schema.py:175-182, 258-268, 488-501, 690-725`
- `src/neurostack/graph.py:263`
- `docs/neuroscience-appendix.md:5-13`
Relationship to other issues
Depends on the auto-decay timer issue and the co-occurrence LTD issue — those fix the mechanics; this issue fixes the semantics.
Summary
`docs/neuroscience-appendix.md:5-13` invokes CREB excitability windows (~6 hours), engram recruitment, and Hebbian dynamics. The current implementation is effectively a read-counter with frozen flags: decay is mathematically unreachable on realistic usage spans, the "active" flag is seeded once from YAML and never refreshed, LTD is absent, and engram competition isn't modelled.
Evidence
Proposed fix
Expected effect
The neuroscience framing becomes falsifiable: decay demonstrably fires, recent reads demonstrably boost, Hebbian propagation demonstrably changes retrieval. The project's core claim ships as code, not appendix.
Key files
Relationship to other issues
Depends on the auto-decay timer issue and the co-occurrence LTD issue — those fix the mechanics; this issue fixes the semantics.