64  Spike-timing dependent plasticity

A guide to the interactive demonstration

TipRun the demonstration

Open the STDP demo in a new tab →

A single self-contained HTML file sitting next to this guide. Everything runs in your browser — nothing to install, nothing uploaded, works offline.

This is the companion to the Hebbian plasticity demo. That one shows what plasticity does to a neuron over thousands of milliseconds; this one zooms in on a single pairing and shows how the synapse decides.

65 The question this answers

In 1998 Guo-qiang Bi and Mu-ming Poo paired presynaptic and postsynaptic spikes in cultured hippocampal neurons, repeating each pairing 60 times at 1 Hz, and varied the interval between the two. When the presynaptic spike came shortly before the postsynaptic one, the synapse strengthened (LTP). When it came shortly after, the synapse weakened (LTD). Either effect faded to nothing once the two spikes were more than a few tens of milliseconds apart. Plotting the change in strength against the interval gives the STDP curve most students meet first: LTP in the upper right, LTD in the lower left, with the switch at \(\Delta t = 0\).

The Hebbian demo took that curve as given. The obvious question is how a synapse could possibly measure the interval. It is a sub-micron structure at the end of a dendrite. It has no access to the soma, no clock, and no way to observe the cell as a whole. What it does have is an NMDA receptor, and that is enough to detect coincidence. Whether it is enough to decide the sign of the change is a separate question, taken up in Section 83.4.

66 The mechanism

You have already seen NMDA receptors as coincidence detectors. The demonstration makes the two coincident signals explicit and lets you slide them past each other.

66.1 Signal one: glutamate binding, after the pre spike

When the presynaptic spike reaches the terminal, glutamate is released and binds to NMDA receptors on the spine. Binding alone does nothing — the pore is plugged by a Mg²⁺ ion sitting in the channel, and no current flows. What binding does is start a clock. The receptors stay bound and available for a few tens of milliseconds, then let go.

In the demo this trace is drawn in the synapse’s own colour — orange at synapse A, teal at synapse B — because glutamate is local: it is released only where the presynaptic spike arrived. It jumps at the pre spike and decays with a 20 ms time constant. In the receptor close-up beside each spine, glutamate appears on the binding sites and the first lamp lights.

66.2 Signal two: depolarisation, after the post spike

The Mg²⁺ block is voltage-dependent. Depolarise the spine and the ion is electrostatically expelled, unplugging the channel. The depolarisation that matters here comes from the postsynaptic spike itself: when the cell fires, the action potential does not only travel down the axon, it also propagates back up the dendritic tree and briefly depolarises every spine on it.

In the demo this is the violet trace, labelled Mg²⁺ block relieved. It jumps when the post spike reaches the synapse and decays with a 20 ms time constant. In the cell panel you can watch the spike leave the soma and travel up both dendrites; in each close-up the Mg²⁺ ion leaves the pore as it arrives.

Notice what this signal is: a single global broadcast, identical at every synapse on the cell. It carries no information about which synapse did what.

66.3 The product

Calcium enters only where the two overlap. Glutamate without depolarisation leaves the channel plugged; depolarisation without glutamate leaves it closed. The calcium influx is therefore the product of the two signals, drawn as the dark shaded region in the demo.

\[ \text{Ca}^{2+}\text{ influx}(t) \;\propto\; \underbrace{G(t)}_{\text{glutamate bound}} \times \underbrace{D(t)}_{\text{block relieved}} \]

The peak of that product is the coincidence, reported as a percentage. With both signals decaying at \(\tau = 20\) ms, it works out to a clean exponential:

\[ \text{coincidence} = e^{-|\Delta t| / 20} \]

where \(\Delta t = t_{\text{post}} - t_{\text{pre}}\), Bi and Poo’s convention and the same one used by the pairing-delay slider in the Hebbian demo. The size of the weight change is proportional to this, less a small detection floor. That is why the STDP curve falls away exponentially on both sides of zero.

There is a simpler way to read the same result, and the demo draws it. Both signals jump and then only decay, so the product peaks at the moment of the later event, and its peak is just the height of the earlier signal at that moment. If pre came first, the coincidence is how much glutamate is still bound when the post spike arrives; if post came first, it is how much depolarisation is left when glutamate arrives. The lower-right panel marks that point with a ring on the earlier trace and states it in words: glutamate still 61% bound when the post spike arrives. Students can get the whole curve from this without the equation.

66.4 Where Δt is measured

The demo measures both spikes at the synapse, where the receptor sees them. That puts the switch from LTD to LTP exactly at \(\Delta t = 0\), as in the textbook curve.

Experiments cannot do this. They record both events at the soma: the start of the EPSP and the postsynaptic spike. The EPSP takes time to travel from the synapse to the soma, and the spike takes time to travel back, so the interval at the synapse differs from the one recorded at the soma by a few milliseconds at most. That is finer than the classic data resolve; the measured switch sits within a few milliseconds of zero.

The travel is still shown. In the cell panel and in the Zoom view of the lower-right panel, the spike leaves the soma 2 ms before it reaches the synapse.

66.5 Where the sign comes from — and where it does not

A coincidence detector is symmetric. The product of two exponentials with the same time constant gives exactly the same peak whether glutamate leads the depolarisation by 10 ms or trails it by 10 ms. The mechanism above cannot tell you the sign of the change. Protocols 2 and 3 show this directly: at \(\Delta t = +10\) and \(-10\) ms the coincidence is 61% in both, but one produces LTP and the other LTD.

It is tempting to say the difference shows up in the shape of the calcium transient. In this model it does not, and a student who looks closely will notice. Both signals switch on instantly and then only decay, so the calcium trace always jumps straight to its peak at the later event and then decays with a 10 ms time constant. At \(\pm 10\) ms the two calcium traces are identical in height, rise time, shape and total calcium; one is simply shifted along the time axis.

What does differ is which event opened the gate, and that is what the lower-right panel shows:

  • Pre before post. The gate is already open and decaying when the post spike arrives. Calcium influx begins with the post spike, and the read-off is taken from the glutamate trace.
  • Post before pre. The depolarisation is already decaying when glutamate arrives. Calcium influx begins with glutamate, and the read-off is taken from the violet depolarisation trace.

The model turns that order into a sign by rule — Bi and Poo’s rule: pre before post gives LTP, post before pre gives LTD. At \(\Delta t = 0\) the two arrive together, the rule has nothing to act on, and the model makes no change.

The biological account usually given for the rule is the calcium-control hypothesis: a large, fast calcium transient preferentially activates CaMKII and drives potentiation, while a smaller, more prolonged one preferentially activates phosphatases such as calcineurin and drives depression. For that to decide the sign, the two orders must produce different transients, which requires the two signals to have different time courses — a brief depolarisation and longer glutamate binding, closer to real NMDA kinetics. This model does not implement that, and doing so would not be a free improvement. Models of that kind (for example Shouval, Bear and Cooper, 2002) predict a second band of depression at long pre-before-post intervals, for which experimental support is weak. And at some cortical synapses timing-dependent LTD does not run through postsynaptic NMDA calcium at all, relying instead on metabotropic glutamate receptors, endocannabinoid signalling or presynaptic NMDA receptors (Sjöström, Turrigiano and Nelson, 2003; Bender et al., 2006).

So the demonstration asserts the sign rule rather than deriving it. Be explicit with students about which part of the model is mechanism and which part is summary; the honest version is more interesting than a seamless one.

67 How the demo compares with Bi and Poo

The STDP curve in the demo uses Bi and Poo’s axes and reproduces the features students are taught: LTP for pre before post, LTD for post before pre, a switch at zero, and an exponential fall-off over a few tens of milliseconds. Four differences are worth knowing before a student points them out.

  • Per pairing, not per protocol. Bi and Poo plotted the change after the whole protocol of 60 pairings. The demo plots the change produced by one pairing, as a percentage of the starting strength, so its peak is about 13% rather than tens of percent. The strength panel shows what repeated pairing adds up to. The step size was chosen to match the Hebbian demo, not a particular experiment, and twenty pairings here produce larger changes than typical measured values.
  • The real curve is lopsided; the demo’s is symmetric. In the measured curve the LTD side is shallower and wider than the LTP side: exponential fits to Bi and Poo’s data (Bi and Poo, 2001) give time constants of roughly 17 ms for LTP and 34 ms for LTD. Both sides are 20 ms here because both signals decay at 20 ms. Producing a wider LTD side from this mechanism would need the post signal to outlast glutamate binding, which a brief backpropagating spike does not — the same tension described in Section 83.4.
  • Real data are a cloud. Bi and Poo’s figure is a scatter of individual experiments with a lot of variability, most of all near zero. The demo’s points fall exactly on the curve.
  • The shape is not universal. The window differs between synapses and preparations, and at some synapses it is reversed, with pre before post producing depression (Bell et al., 1997). The textbook curve is the best-known case, not a law.

68 Reading the display

68.1 The STDP curve

Top right, and the panel the others explain. Change in strength per pairing, as a percentage of baseline, against \(\Delta t = t_{\text{post}} - t_{\text{pre}}\). The LTP lobe is shaded in magenta and labelled pre before post; the LTD lobe is shaded in blue and labelled post before pre. Where the curve runs flat and grey at the ends, the change is below the detection floor.

Dashed cursors mark the slider’s current timing at A and B, with a hollow circle at the model’s prediction for each. Filled dots are pairings you have actually run — orange for synapse A, teal for synapse B — and the small grey ones come from the sweep. The model curve is shown by default; untick Show model curve if you want the class to build it from the sweep before seeing it.

68.2 Inside one pairing

Bottom right. At the top is the pairing itself, drawn the way spike-pairing protocols usually are: one row for the pre spike, one for the post spike, and the interval \(\Delta t\) between them. Once the pairing has run, the interval is coloured by its outcome and labelled pre before post or post before pre.

Below that are the three traces described above, plotted against time relative to the post spike at the synapse. After the later event, a ring on the earlier trace marks the read-off, with the calcium peak sitting exactly on it, and a box spells it out and ends with the result: LTP: +7.2% per pairing. The dashed detection floor is the level below which the change is too small to measure; a real induction experiment has one too.

The tabs switch between synapse A and synapse B. Zoom shows −15 to +22 ms, where you can see the spike leave the soma 2 ms before it reaches the synapse. During a pairing the playback clock slows to a fifth of its speed within a few milliseconds of each event, and slow motion appears in the corner while it does. The time axis is unaffected; only the playback rate changes.

68.3 The cell

Two dendrites, each ending in a spine. Head size is synaptic strength, on the same scale as the Hebbian demo (starting at 1.2 mV, floor 0.3, ceiling 5.0).

During a pairing each spine shows a ring in its own colour for glutamate bound, a violet halo for the Mg²⁺ block being relieved, and a dark core for calcium entering. Beside each spine is a close-up of its NMDA receptor, drawn as the AND gate it is: glutamate on the binding sites, the Mg²⁺ ion either in the pore or pushed out of it, and calcium flowing only when both conditions hold. The three lamps underneath say the same thing in words.

Watch synapse B in protocol 2. It receives the same post spike at the same instant, and its Mg²⁺ lamp lights just as A’s does. What it does not have is glutamate bound at that moment, so its calcium lamp stays dark until its own pre spike arrives later. Same global signal, different local state, opposite outcome — that is synapse specificity, made concrete.

When a pairing changes a weight, the change appears beside the spine as ▲ LTP +7.2% or ▼ LTD −7.2%. The tag shows the change actually applied, which can be smaller than the change per pairing in the readout: potentiation shrinks as a synapse approaches its ceiling (a soft bound, as in the Hebbian demo), and depression stops at the floor.

68.4 Synaptic strength

Bottom left: the strength of A and B after every pairing, as a percentage of baseline, plotted the way LTP and LTD experiments plot their results. The region above 100% is shaded as LTP and the region below as LTD. This is where Repeat ×20 becomes visible: the two lines separate pairing by pairing, potentiation flattens as it approaches the ceiling, and depression stops dead at the floor.

68.5 Readout and predict mode

The readout follows the slider. For each synapse it shows the order of the two spikes and the coincidence; change per pairing and the verdict fill in once you have actually run a pairing at that timing.

Tick Predict first to hide the traces, the coincidence and the hollow prediction circles until Run is pressed. For a genuine prediction also untick Show model curve, since the curve itself gives the answer away.

69 The five protocols

69.1 Pre only, no post spike

Both synapses receive a presynaptic spike; the cell never fires. The NMDA receptors bind glutamate and stay plugged. In each receptor close-up only the first lamp lights. Coincidence 0%, no calcium, no change.

The point: this is the single-receptor version of protocol 2 in the Hebbian demo, where a perfectly synchronised input pattern presented for a full minute changed nothing. Now you can see why. Presynaptic activity satisfies exactly one of the two conditions the receptor requires.

69.2 Pre 10 ms before post

Synapse A: pre 10 ms before post, glutamate still 61% bound when the post spike arrives, +7.2% per pairing, a point on the LTP side of the curve. Synapse B, on the same cell and the same post spike, gets its pre spike 10 ms after the post spike: 61% coincidence, −7.2%, a point on the LTD side.

The point: one post spike, two synapses, opposite outcomes, decided entirely by which one had glutamate bound when the depolarisation arrived.

69.3 Post 10 ms before pre

The mirror image. Watch the dark calcium region in the lower-right panel: it now starts when glutamate arrives rather than with the post spike, and the read-off ring sits on the violet trace instead of the orange one.

The point: compare the calcium trace with protocol 2. It has the same height, the same shape and the same decay. Neither the size nor the shape of the transient explains why the sign flipped; only the order does. This is the observation that motivates Section 83.4.

69.4 Pre and post 60 ms apart

Pre still comes before post, but by 60 ms. By the time the post spike arrives only about 5% of the glutamate is still bound, the coincidence falls below the detection floor, and nothing measurable happens at either synapse.

The point: coincidence detection has a deadline, and the deadline is set by how long the receptors hold glutamate. That is why the STDP curve falls to zero on both sides.

69.5 Sweep the whole curve

Every odd \(\Delta t\) from −69 to +69 ms (odd steps skip the tie at zero), measured without changing the weights. The sweep takes about eight seconds: the slider moves, the lower-right panel shows each pairing and its read-off, and a grey point drops onto the curve.

The point: the shape of the Bi and Poo curve is not an assumption here. It follows from two exponentially decaying signals multiplied together. The LTP half is the glutamate trace read at the moment the post spike arrives, the LTD half is the depolarisation trace read at the moment glutamate arrives — each less the detection floor — and the width of both is the NMDA receptor’s own time constant.

70 Things to try

Predict before running. Untick Show model curve, tick Predict first, set the slider somewhere unusual — \(\Delta t = -15\), say — and ask the class whether the synapse will show LTP or LTD, and how strongly, before pressing Run.

Read a point off the traces. Set \(\Delta t = +20\). Before running, ask how much glutamate will still be bound when the post spike arrives. After one time constant it is 37%, and the curve’s height there is about 4% per pairing, roughly half the value at +10 ms.

Slow the playback to 0.02×. Each pairing then takes about six and a half seconds, with the clock slowing further around each event, and you can talk through the two signals arriving while the animation is still running.

Use Repeat ×20. A single pairing changes strength by a few percent, which is barely visible on the cell. Repeat ×20 plays twenty pairings in about two seconds. At \(\Delta t = +10\) ms synapse A climbs to about 217% of baseline, each gain a little smaller than the last, while synapse B reaches its floor of 25% on the eleventh pairing. The strength panel shows both. Bi and Poo used 60 pairings for the same reason.

Compare the two demos. In the Hebbian demo, set the pairing delay to +10 ms and run protocol 3, then set it to −10 ms and run protocol 4. Those are the same two conditions as protocols 2 and 3 here, played out over thousands of pairings instead of one.

71 Where the model simplifies

  • The sign is asserted, not derived. The calcium transient is the same shape for either order; only the order itself distinguishes them, and Bi and Poo’s rule maps order to sign. See Section 83.4. This is the model’s largest gap and the most honest thing to say out loud.
  • The sign switches as a step. LTD jumps to LTP across a single millisecond at \(\Delta t = 0\). Real measurements near zero are among the most variable in the window, and the transition is not this clean.
  • The window is symmetric. The measured curve has a wider, shallower LTD side. See Chapter 67.
  • Δt is measured at the synapse. Experiments measure it at the soma, which shifts the curve by a few milliseconds at most. See Section 66.4.
  • NMDA deactivation is faster here than in life. Real NMDA receptor currents decay over 50–200 ms, considerably longer than the 20 ms used here. The measured STDP window is nevertheless only tens of milliseconds wide, and reconciling those two facts is an active question. The 20 ms figure was chosen to match the window and to agree with the companion demo.
  • One pairing, in isolation. Real STDP depends on the frequency of pairing as well as the interval: the same \(\Delta t\) repeated at 50 Hz and at 1 Hz gives different outcomes, because calcium and the receptor state from one pairing are still present when the next arrives. Nothing here carries over between pairings.
  • No explicit calcium concentration or enzyme cascade. Calcium influx is shown; the concentration it produces, the CaMKII and phosphatase pathways it recruits, and the structural changes that follow are all compressed into a single number.
  • AMPA receptors are ignored. The EPSP’s own depolarisation does relieve some Mg²⁺ block in a real spine, so glutamate alone produces a little calcium rather than none. Here it produces none, which makes protocol 1 crisper than reality.
  • The receptor close-up is a cartoon. One drawn receptor stands for the population at the spine, and the gating is schematic: a real NMDA receptor also needs a co-agonist, glycine or D-serine, bound before it opens.
  • The spine is a point on an unbranched dendrite, and the backpropagating spike arrives undiminished. In a real neuron it attenuates with distance and can fail entirely in distal branches — which is precisely why some synapses are much harder to potentiate than others.

None of these affect the three things the demonstration exists to show: that a synapse detects coincidence through a single receptor, that the width of the STDP window is that receptor’s own time constant, and that the order of the two spikes determines whether the result is LTP or LTD — by Bi and Poo’s rule, which the model states openly rather than a mechanism it derives.