Home▸Neuroscience & Biophysics▸Synaptic Plasticity 2D: STDP Learning Rule

Synaptic Plasticity 2D: STDP Learning Rule

2D companion to the 3D synaptic-plasticity scene: two leaky integrate-and-fire neurons connected by one synapse that strengthens or weakens according to spike-timing-dependent plasticity (STDP), redrawn with plain Canvas 2D and the same exponential learning-window equations.

Neuroscience & Biophysics2DModerate60 FPS⇄ 3D version
2d-synaptic-plasticity ↗ Open standalone

This is the 2D counterpart to the 3D synaptic-plasticity scene. Two leaky integrate-and-fire neurons, PRE and POST, are wired by a single synapse whose weight is governed by spike-timing-dependent plasticity: when a presynaptic spike arrives shortly before the postsynaptic one, the synapse is potentiated; when it arrives after, the synapse is depressed. The size of each step follows the classic exponential STDP window, dw = A+ · exp(−dt/tau+) for potentiation and dw = −A− · exp(dt/tau−) for depression, with the weight clipped to [0, 1]. Drag the timing slider from negative to positive to flip the synapse between growing and shrinking, watch the spike trains scroll past, and see the live STDP curve mark exactly where your last pair landed.

⚙ Under the hood

2D companion to the 3D synaptic-plasticity scene: the same LIF-neuron-pair and exponential STDP equations, redrawn with plain Canvas 2D arcs and paths instead of a WebGL vector mesh. Tau− is locked to tau+ in this build to keep the control set to four sliders and a rate dial; the underlying learning rule is unchanged.

synaptic-plasticitystdphebbian-learningneurosciencelif-neuronspike-timing

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)