t = 0.0 s

Spike-Timing Spine Plasticity (2D)

This simulation drives a dendritic spine's structural plasticity directly from spike timing rather than from an abstract "coherence" knob. You choose a timing offset Δt between a presynaptic and a postsynaptic spike and a pairing frequency, then fire repeated pre/post pairs: each pair injects two calcium jumps into a leaky-integrator trace — one delayed by NMDA-receptor opening kinetics after the presynaptic spike, one from the backpropagating action potential at the postsynaptic spike — and the trace decays exponentially between pairs. A calcium-control-hypothesis ODE turns that trace into spine head growth or shrinkage every frame: enough coincident calcium crosses a potentiation threshold and the head grows toward a stable "mushroom" shape, too little (or none at all) lets the head decay back down. Two reference spines run the classic textbook timings continuously alongside yours (Δt ≈ +10 ms for LTP, Δt ≈ −40 ms for LTD) so you can see the sign flip in real time as you sweep Δt.