Work · Repository
neural-memory
Falsification benches for how a memory of a sound could be held in neural tissue: spiking-network and habituation models, with preregistered experiments. Mostly negative results.
- Python
- MIT licence
- 1 post
- 9 merged PRs
Posts about it
README
Renamed 2026-09-25 from sim-neural-memory, dropping the kind prefix; GitHub redirects the old URL. See the study protocol.
Simulations that test how a memory of a sound could be held in neural tissue. They are built as falsification benches: every mechanism has an off switch, every result sits beside its ablation and a plain baseline, and the experiments that matter were preregistered in git before they ran. Most of the results are negative. Every result is a statement about these models with their chosen parameters, never a measurement of tissue.
Status: paused (2026-09-24). Start with docs/FINDINGS.md, a one-page map of every
result, defect and open question.
What is here
| Part | Code | Result |
|---|---|---|
| A spiking network (Brian2, AdEx + T-type Ca²⁺ cells) with synaptic tagging and capture, asked to store several sound streams and replay them | src/neurotape/ |
docs/results/: recall at chance; stream identity survives only in the rank order of firing |
| Reproduction of Luboeinski & Tetzlaff 2021 | src/neurotape/experiments/repro_lt2021.py |
docs/repro/: the reference passes; neurotape recalls only with the paper’s LIF cell |
| A minimal numpy habituation model (Zilany auditory nerve → relay → depressing synapses → LIF E/I) | src/neurotape/habituation/ |
docs/habituation/ |
| E01-stentor-map (preregistered) | experiments/E01-stentor-map/ |
closed, FAIL |
| E02-local-negative-image (preregistered) | experiments/E02-local-negative-image/ |
closed, FAIL — depletion keeps no specific memory; a published single-cell receptor model drains untrained responses under a synthesis block |
Where every parameter came from: ASSUMPTIONS.md. Model versions and what each invalidates:
CHANGELOG.md. Registry of experiments: EXPERIMENTS.md.
How the experiments were run
The two preregistered experiments follow the KIT Adaptive Preregistration protocol, vendored in .agents/.
Each experiment folder holds its plan (PREREG.md), pinned environment (ENV.lock), frozen run.py and
analyse.py, DEVIATIONS.md, RESULTS.md, and raw outputs with checksums. Tags <EID>-prereg, -run and -closed mark the order things
happened in; the pull requests carry timestamped receipts. Much of the code, analysis and writing was produced
by an AI coding assistant (Claude) working under that protocol, directed and reviewed by the author.
Running it
uv venv --python 3.11 .venv && uv pip install --python .venv/bin/python -e ".[dev]"
uv pip install --python .venv/bin/python "Cython<3" pandas
uv pip install --python .venv/bin/python --no-build-isolation "cochlea @ git+https://github.com/mrkrd/cochlea.git"
.venv/bin/python -m pytest -q # ~10 min; builds small Brian2 networks
.venv/bin/ruff check . # correctness-only lint (see pyproject.toml)
cochlea (Zilany et al. 2014 auditory-nerve model) is GPL-3 and is installed, not vendored; the commit used is
pinned in each experiment’s ENV.lock.
The quickest check needs none of that: each experiment’s analyse.py needs only numpy, scipy and pyyaml and
re-derives every verdict from the committed outputs/:
.venv/bin/python experiments/E02-local-negative-image/analyse.py
Two shared tools are not public. This repo was split out of a private monorepo and still reads two tools
from it (src/neurotape/monorepo.py): a provenance stamper that writes provenance.json beside results (no
effect on any number), and a surrogate-data library used for the tape model’s secondary IAAFT null. Without
them, the tape decoder skips that null and records p_iaaft: null with the reason, the monorepo tests skip, and
anything that needs the stamper raises with an explanation. Nothing is substituted silently. “Reproducibility” in
docs/REVIEW.md lists exactly what runs and what does not.
Licence
MIT (LICENSE). cochlea, a runtime dependency, is GPL-3 and is installed separately, not included.
The .agents/ folder is the vendored KIT Adaptive Preregistration kit and carries its own licence.
Review
docs/REVIEW.md is a critical code and methods review done before release: bugs found,
which results they could affect, and what was fixed.
Changelog
E03-synthesis-block: can the receptor model hold Rajan 2026's synthesis-block results?
Preregistration in progress. Stops at the -prereg tag for the operator to hear predictions before any run.
🤖 Generated with Claude Code
singlecell: labile recycling factor and k_deg_scale switches (default = published), reusable R1-R8 gate
Co-Authored-By: Claude Opus 5.5 [email protected]
model-v0.3.0: single-cell habituation (Stentor) in a peer-reviewed simulator
Single-cell habituation package: published Stentor models (Rajan & Marshall 2025 receptor inactivation; Rajan 2022 two-state; Eckert 2024 CIFF) in Tellurium/libRoadRunner (SBML), each reproduced unmodified first, plus minimal switchable changes (two input channels, membrane readout, synthesis block, Wood gating variant) and a trace exporter. Plan: see PR description updates. No experiment runs here.
🤖 Generated with Claude Code
Update KIT Adaptive Preregistration to 6841edc
Vendored kit e64136a → 6841edc (.agents/kit_ap update). kit_ap check reports up to date. No experiment files touched.
🤖 Generated with Claude Code
Drop the sim- prefix: renamed to neural-memory
The repo was renamed from sim-neural-memory to neural-memory on GitHub (the old URL redirects). The kind now goes in a manifest rather than the name, per the study protocol.
- README, CLAUDE.md and
docs/FINDINGS.mdnow use the new name. FINDINGS.md still cites the research-corpus file2026-09-24-sim-neural-memory-habituation.mdby its real filename. monorepo.stamp()now recordsrepo.name = "neural-memory"in new provenance, andtests/test_monorepo.pychecks for it.provenance.jsonfiles already written keep the old name, since they are records.- Conversation logs are not touched.
Tests: 100 passed, the same as before the rename.
🤖 Generated with Claude Code
Conversation log
Session log entries written after the docs/findings merge.
🤖 Generated with Claude Code
Findings, pre-release review, lint and MIT licence
- docs/FINDINGS.md: every result across the project, and the project marked paused.
- docs/REVIEW.md: three independent code and methods reviews; dated corrections appended to the affected reports (nothing rewritten).
- ruff (correctness rules only) + lint workflow; the private-tool imports degrade loudly; MIT licence; public README.
- Test suite: 100 passed. No numerical change to any committed run.
🤖 Generated with Claude Code
E01-stentor-map: Stentor-mapped habituation constraints (SR1–SR3) on the depression cascade
Preregistered experiment. See experiments/E01-stentor-map/PREREG.md and RESULTS.md.
Closed: FAIL (E01-stentor-map-closed, f10f688). 90 runs, 0 failed, model-v0.1.0.
| pre-registered (efficacy) | observed (spikes) | verdict | |
|---|---|---|---|
| SR1-std: decrement deepens as recovery slows | 0.126 → 0.494 → 0.624 → 0.728 | 0.057 → 0.418 → 0.597 → 0.765 | PASS |
| SR1-std: half-point later | 4 → 6 → 6 → 7 | 4 → 5.5 → 8 → 8 | PASS |
| SR1-hebb_only: predicted null | no change | D16 unchanged (≤ ±0.023); median half point 4 → 4.5 | FAIL (half-point clause) |
| SR3-std: strong insert deepens | −0.21 % / −0.33 % | −0.69 % / −0.93 %, under MDE 3.5 % | UNINTERPRETABLE (analyse.py: FAIL) |
| SR3-hebb_only | deepening | −0.74 % (under MDE) / −3.46 % [−5.92, −1.00] | UNINTERPRETABLE (analyse.py: FAIL) |
| SR2: decrement–rate slope | +28.7 / +19.8 dB/decade | slow-rate decrement below the ±0.03 floor | not computable |
- Stentor’s longer retention after a block: not reproduced by the depression cascade (0 at ×1 and ×0.25; control at the floor at ×0.1 and frozen). It appears only in
hebb_only, on shrinking n. - No dishabituation in any arm.
- Deviations #1–#4 are in DEVIATIONS.md; #4 was decided with the outcome known.
- Exploratory (fast-forward vs direct gaps) is under
exploratory/. - Next EID: RESULTS.md §8.
- Merge with a merge commit, never a squash.
🤖 Generated with Claude Code
E02-local-negative-image: depletion's specificity map, B-vs-H removal, R&M receptor structure under a synthesis block
Preregistered experiment E02 (KIT Adaptive Preregistration). Design and the research behind it: docs/E02/RESEARCH.md; plan: experiments/E02-local-negative-image/PREREG.md. Runs against model-v0.2.0. Tag receipts are posted below as each tag is made.
Nothing runs until the operator approves the preregistration.
🤖 Generated with Claude Code