Skip to content

Adopt NMDA on aud->E (G_NMDA 60, B_SCALE 10); Brian2 port - #19

Merged
jmxpearson merged 1 commit into
mainfrom
adopt-nmda
Oct 23, 2026
Merged

jmxpearson merged 1 commit into
mainfrom
adopt-nmda

Conversation

@jmxpearson

Copy link
Copy Markdown
Member

Makes NMDA part of the shipped model.

Operating point: G_NMDA = 60, with the fast auditory→E weight lowered to B_SCALE = 10.

Sweep (5 seeds, intro notes on), across g_NMDA / B_SCALE:

setting duration extra spikes latency
30 / 10 56 ms 1.56 33.9 ms
40 / 10 57 ms 1.59 33.8 ms
60 / 10 63 ms 1.66 33.2 ms
40 / 12 59 ms 1.76 —
60 / 12 64 ms 1.82 —
80 / 12 66 ms 1.89 —

60 / 10 lengthens the response and weakens it; at B_SCALE 12, spikes rise above the no-NMDA model.

Ten-seed means vs the current model (no NMDA):

before after bird
duration 45.7 ms 60.6 ± 3.0 ms 90 ± 43
extra spikes / responder 1.79 1.66 ~0.8–1.0
peak change 44 Hz 35 Hz ~20
onset latency 31.5 ms 33.9 ± 1.8 ms 23 ± 12 (≤ 35)
reversed/trained 1.175 1.156 > 1

Caveats:

  • Latency is now the metric nearest its bound; some evaluation seeds would exceed 35 ms (the test seed gives 32.5).
  • Charge ratio: the NMDA:AMPA charge ratio at threshold is ~3.3, on the high side; 40 / 10 (~2.2) is the conservative alternative at 57 ms.

Brian2:

  • Implementation: NMDA is a fifth auditory→E synapse object, with per-synapse saturating gating summed through B, plus the Mg²⁺-blocked conductance term on E, using the same mV map as numpy. The guard is removed.
  • Parity: numpy vs Brian2 E rates are 33.5 vs 32.2 Hz without NMDA and 39.8 vs 37.9 Hz with it.

Artifacts: retrained ven_model.npz, and a pure-defaults run reproduces it byte-for-byte. Pins (3-SD tolerances), README, MODEL.md, design notes and MANIFEST are updated. 207 tests pass; ruff clean.

finchsim: still pinned to an older spiking-ven and model; upgrading it is a separate PR.

🤖 Generated with Claude Code

- Operating point: G_NMDA = 60 with the fast aud->E weight lowered to
  B_SCALE = 10, chosen by a sweep on top of the intro notes. Ten-seed means vs
  the model without NMDA: DAF duration 45.7 -> 60.6 ms, extra spikes 1.79 ->
  1.66, peak 44 -> 35 Hz, latency 31.5 -> 33.9 +/- 1.8 ms (bound 35),
  reversed/trained 1.175 -> 1.156.
- Brian2 runtime: NMDA as a fifth aud->E synapse object with per-synapse
  saturating gating summed through B, and the Mg2+-blocked conductance term
  on E (same mV map as numpy); the NotImplementedError guard is gone. Parity
  test: numpy vs Brian2 E rates agree within ~5% with and without NMDA.
- Retrained (pure-defaults run reproduces it byte-for-byte); slow-test pins
  with 3-SD tolerances, README table and NMDA section, MODEL.md, design notes
  and MANIFEST updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmxpearson
jmxpearson merged commit 128e6c5 into main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant