STDP Simulator: Spike-Timing-Dependent Plasticity Learning Rule

simulator intermediate ~10 min
Loading simulation...
ΔW = +0.61% — moderate potentiation

With Δt = 10 ms (pre-before-post), the synapse is potentiated by 0.61%, reinforcing the causal connection between the two neurons.

Formula

ΔW = A+ × exp(-Δt/τ+) for Δt > 0 (LTP)
ΔW = -A− × exp(Δt/τ−) for Δt < 0 (LTD)
Effective window ≈ 3τ ms

The Timing Hypothesis

In 1949, Donald Hebb postulated that synapses strengthen when pre- and post-synaptic neurons fire together. But 'together' was vague. In 1998, Guo-qiang Bi and Mu-ming Poo discovered that it is the precise millisecond-scale timing that matters: if a presynaptic spike precedes the postsynaptic spike by 5–20 ms, the synapse potentiates; reverse the order and it depresses. This asymmetric window — the STDP rule — gave Hebb's postulate a mathematical backbone.

The STDP Learning Window

The STDP curve plots synaptic weight change (ΔW) against spike timing difference (Δt = t_post - t_pre). For positive Δt (causal pairing), ΔW follows an exponential decay: A+ × exp(-Δt/τ+). For negative Δt (anti-causal), it follows -A− × exp(Δt/τ−). The amplitudes A+ and A− and time constants τ+, τ− are tunable parameters that differ across brain regions and cell types. A slight asymmetry (A− > A+) ensures overall competition among synapses.

Self-Organization Without a Teacher

STDP enables unsupervised learning of temporal patterns. In a recurrent network, synapses that consistently participate in causal chains are reinforced, while decorrelated connections are pruned. This produces receptive fields, temporal sequences, and coincidence detection — hallmarks of cortical computation. Remarkably, STDP combined with lateral inhibition can perform competitive learning, clustering, and even independent component analysis without backpropagation.

Hardware Implementation

Neuromorphic engineers exploit STDP for on-chip learning. In Intel's Loihi, programmable spike traces at each synapse track recent activity and compute weight updates locally. Memristive devices offer an even more elegant solution: the conductance of a memristor naturally changes based on the timing of voltage pulses applied to its terminals, physically mimicking the STDP window. This makes memristor crossbar arrays promising substrates for large-scale, energy-efficient learning systems.

FAQ

What is STDP?

Spike-Timing-Dependent Plasticity is a biological learning rule where the direction and magnitude of synaptic weight change depend on the precise timing between pre- and post-synaptic spikes. If the presynaptic neuron fires just before the postsynaptic neuron (causal order), the synapse is strengthened (LTP). If the order is reversed, it is weakened (LTD).

Why does spike timing matter for learning?

STDP implements a form of temporal Hebbian learning — 'neurons that fire together wire together,' but with millisecond precision. The timing window (typically ±20 ms) allows neural circuits to learn causal relationships, detect temporal sequences, and self-organize sensory maps without a global teacher signal.

How is STDP implemented in neuromorphic hardware?

Neuromorphic chips implement STDP using local spike traces stored at each synapse. When a spike arrives, the trace is compared against the partner neuron's trace to compute Δt and update the weight. Memristive devices can perform this naturally, as their conductance changes depend on the relative timing of voltage pulses.

What is the difference between LTP and LTD?

Long-Term Potentiation (LTP) strengthens synapses, increasing the postsynaptic response. Long-Term Depression (LTD) weakens them. In STDP, LTP occurs for causal (pre-before-post) timing, while LTD occurs for anti-causal timing. The balance between LTP and LTD determines whether the network is stable or unstable.

Sources

Embed

<iframe src="https://homo-deus.com/lab/neuromorphic-computing/stdp-learning/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub