
Understanding Synaptic Plasticity Algorithms
, 4 min read
I learned about synaptic plasticity algorithms alongside the leaky integrate-and-fire neuron, and for a while I mixed the two up, so I want to separate them right away. Leaky integrate-and-fire is a computationally simple model of how a neuron behaves. Plasticity rules like spike-timing-dependent plasticity, Oja’s rule and the BCM rule describe how the connections between neurons change, and those connections are what a machine learning engineer would call the weights. This post is about the connections. How does the brain learn if backprop isn’t an option?
Spike-Timing-Dependent Plasticity
Spike-Timing-Dependent Plasticity, or STDP, takes the basic idea of Hebbian learning and makes it precise about timing. You might have heard the phrase “neurons that fire together, wire together.” It’s often attributed to Donald Hebb, but it’s a later paraphrase, usually credited to Carla Shatz in 1992. In his 1949 book “The Organization of Behavior”, Hebb proposed that when one neuron repeatedly takes part in firing another, the connection between them gets stronger. That left open what counts as “repeatedly takes part”, and how close in time the spikes need to be.
Experiments in the late 1990s answered that, first Markram and colleagues in cortical slices (1997) and then Bi and Poo in cultured hippocampal neurons (1998). They showed that the order and spacing of pre-synaptic and post-synaptic spikes decides whether the synapse strengthens or weakens, and a difference of a few milliseconds can change the outcome.
When a pre-synaptic neuron fires slightly before a post-synaptic neuron (within about 20 milliseconds), the synapse between them strengthens. The intuition is that if neuron A consistently fires right before neuron B, A might be helping to cause B’s firing, so it makes sense to strengthen that connection. If the post-synaptic neuron fires first, the synapse weakens, since A probably isn’t what’s driving B.

The graph above shows this relationship. Long term potentiation (LTP), or strengthening of the synapse, happens on the right side where (the time difference) is positive, meaning the pre-synaptic neuron fired first. Long term depression (LTD), or weakening, happens on the left side where is negative. The closer together the spikes are, the bigger the change.
For a positive (pre-before-post):
And for a negative (post-before-pre):
The parameters set the shape of the learning window:
- : maximum amount of strengthening (potentiation)
- : maximum amount of weakening (depression)
- : how quickly the strengthening falls off with time
- : how quickly the weakening falls off with time
You can change the time constants and amplitudes below and see what happens to the window:
STDP in the Brain and in Computing
I like that STDP is local. Each synapse only needs to know when its own pre- and post-synaptic neurons spiked. With backpropagation, something has to compute gradients and send them backward through the whole network, and it’s hard to see how real neurons would do that.
STDP has since been found in many brain regions and species, including the hippocampus and sensory cortex. The shape of the window varies: at some synapses depression is stronger than potentiation, at others it’s the reverse. That might reflect what each area needs to compute, though I don’t think that’s settled.
STDP can also learn sequences. If activity keeps flowing through neurons in the same order (A→B→C), STDP strengthens A→B and B→C, which is one reason people connect it to learning motor sequences and other inputs that unfold over time.
It has also influenced neuromorphic computing, where people build hardware that works more like the brain. Deep learning usually updates weights in discrete steps using gradients computed over the whole network, whereas STDP updates each weight continuously from local spike timing.
STDP is also only one of several plasticity mechanisms in the brain, which run on different timescales and respond to different signals.