Synaptic Plasticity and Learning Rules
Memory is not stored as a fixed pattern, but as the collective strength of billions of modifiable connections. Each synapse can be potentiated or depressed according to rules shaped by evolution. The simplest of these rules — neurons that fire together, wire together — was proposed by Donald Hebb in 1949. Decades later, experiments revealed that the precise timing of pre- and postsynaptic spikes, down to millisecond resolution, governs whether a synapse grows or shrinks. This article explores the mathematical framework behind synaptic plasticity, from Hebb's postulate to the spike-timing-dependent plasticity (STDP) learning window.
1. Hebb's postulate and Hebbian learning
In 1949, Canadian psychologist Donald Hebb wrote one of the most influential sentences in neuroscience: "When an axon of cell A is near enough to excite cell B and repeatedly or persistently takes part in firing it, some growth process or metabolic change takes place in one or both cells such that A's efficiency, as one of the cells firing B, is increased." This became known as Hebb's postulate, often shortened to "neurons that fire together, wire together."
In mathematical terms, Hebb's postulate can be written as a synaptic weight update rule. Let wij be the strength of the synapse from presynaptic neuron j to postsynaptic neuron i, and let xj and yi be their respective activity levels. The simplest continuous Hebbian rule is:
where η is a small positive learning rate.
This rule has an immediate problem: it is unstable. Because positive activity always increases positive weights, a positive-feedback loop will cause weights to grow without bound — runaway excitation. All practical Hebbian learning rules include normalization or decay terms to prevent this.
Covariance rule
A subtle fix is to use deviations from mean activity rather than raw firing rates. The covariance rule (Sejnowski, 1977) replaces activities with their deviations from mean:
This allows w to decrease when both cells are below average, implementing a form of anti-Hebbian depression.
The covariance rule captures the statistical concept of correlation: the synaptic weight converges toward the covariance of pre- and postsynaptic activities, making it a conceptual precursor to principal component analysis (PCA) in neural networks.
2. Long-term potentiation and depression
Hebb's postulate remained largely theoretical until 1973, when Timothy Bliss and Terje Lømo discovered long-term potentiation (LTP) in the rabbit hippocampus. Delivering a brief burst of high-frequency stimulation (tetanic stimulation) to the perforant pathway produced a sustained — sometimes permanent — increase in synaptic efficacy, lasting hours to weeks. This was the first direct experimental evidence that synaptic strength could be durably modified by activity.
The complementary phenomenon, long-term depression (LTD), was confirmed by Masao Ito in 1982 in the cerebellum: sustained low-frequency co-activation of parallel fibres and climbing fibres caused a lasting decrease in Purkinje cell synaptic responses. LTD is now understood as a key mechanism in cerebellar motor learning.
Molecular mechanism of LTP
The dominant model for LTP induction involves the NMDA receptor, which acts as a coincidence detector. The NMDA receptor channel requires two simultaneous conditions to open:
- Presynaptic release of glutamate, which binds to the receptor.
- Postsynaptic depolarisation, which displaces the Mg²⁺ ion blocking the channel pore at rest.
When both conditions are met, Ca²⁺ flows into the postsynaptic cell, activating kinases (CaMKII, PKC) that phosphorylate AMPA receptors and insert additional AMPA receptors into the membrane, increasing synaptic conductance. This molecular mechanism directly implements Hebb's postulate at the biophysical level: a synapse is strengthened only when pre- and postsynaptic neurons are simultaneously active.
| Property | LTP | LTD |
|---|---|---|
| Stimulation protocol | High-frequency burst (tetanus) | Prolonged low-frequency stim. |
| Synaptic weight change | Increase (+) | Decrease (−) |
| Ca²⁺ signal | Large, fast transient | Small, prolonged rise |
| Key kinases/phosphatases | CaMKII, PKC (kinases) | PP1, PP2B (phosphatases) |
| AMPA receptor trafficking | Insertion into synapse | Internalisation from synapse |
| Brain region (example) | Hippocampus CA1 | Cerebellum, striatum |
The Ca²⁺ hypothesis provides a unified explanation for both LTP and LTD: high Ca²⁺ transients recruit kinases and induce LTP, while moderate, prolonged Ca²⁺ elevations preferentially activate phosphatases and induce LTD. The outcome depends on the amplitude and time course of the Ca²⁺ signal, not merely on its presence.
3. Spike-timing-dependent plasticity
Tetanic stimulation protocols used to induce LTP in early experiments are pharmacological conveniences — they don't reflect how neurons actually communicate during behaviour. Real neurons fire action potentials at irregular times, and a more physiologically relevant question is: how does the precise timing of individual pre- and postsynaptic spikes determine whether a synapse is potentiated or depressed?
Spike-timing-dependent plasticity (STDP) is the discovery that synaptic weight changes depend on the millisecond-scale interval between pre- and postsynaptic spike times. The key experiments, performed independently by Markram et al. (1997) in cortical slices and by Bi and Poo (1998) in cultured hippocampal neurons, demonstrated a causal asymmetry:
- If a presynaptic spike arrives before the postsynaptic spike (causal order, Δt = tpost − tpre > 0), the synapse is potentiated (LTP).
- If the presynaptic spike arrives after the postsynaptic spike (anti-causal order, Δt < 0), the synapse is depressed (LTD).
The magnitude of the weight change decays exponentially as |Δt| increases, approaching zero for time intervals beyond ~100 ms. This causal rule is often described as a temporal Hebbian rule: a synapse is strengthened when it could plausibly have caused the postsynaptic spike.
4. The STDP learning window
The relationship between timing interval Δt and weight change Δw is called the STDP learning window (or STDP kernel). The classic asymmetric exponential form is:
Biologically measurable parameters vary significantly across synapse types and brain regions. Cortical layer 5 pyramidal neurons show τ₊ ≈ 17 ms and τ₋ ≈ 34 ms (Sjöström et al., 2001), while hippocampal cultures exhibit more symmetric windows. Some synapses display symmetric STDP (both causal and anti-causal spikes produce LTP), while inhibitory synapses often show reversed STDP where the polarity is flipped.
Nearest-neighbour approximation
In a train of spikes, each postsynaptic spike interacts with multiple presynaptic spikes. The nearest-neighbour interaction rule considers only the most recent pre and post spike for each update, significantly simplifying implementation while capturing most of the biological phenomenology. The full all-to-all interaction sums contributions from all previous spike pairs:
Nearest-neighbour simplification:
Δw ≈ W(t_post^last − t_pre^last)
Implementations using trace variables (eligibility traces) efficiently compute STDP without storing spike times explicitly. Pre- and postsynaptic traces decay exponentially and are updated on each spike event, enabling online learning in spiking neural network simulations.
Trace-based implementation
r_pre += 1 (increment pre-trace)
w += −A₋ · o_post (LTD: post fired recently)
On each postsynaptic spike:
o_post += 1 (increment post-trace)
w += +A₊ · r_pre (LTP: pre fired recently)
Between spikes:
dr_pre/dt = −r_pre / τ₊
do_post/dt = −o_post / τ₋
5. The BCM rule and sliding threshold
Pure Hebbian rules are unstable and cannot distinguish between selective and non-selective potentiation. In 1982, Elie Bienenstock, Leon Cooper, and Paul Munro proposed the BCM (Bienenstock-Cooper-Munro) rule, which introduced a crucial innovation: a sliding modification threshold θM that separates the LTP and LTD regions.
φ(y, θM) = y · (y − θM)
where:
y = postsynaptic activity (output firing rate)
xi = presynaptic input from neuron i
θM = modification threshold (slides dynamically)
The key feature is the sliding threshold: θM itself evolves as a superlinear function of the average postsynaptic activity (typically θM ∝ ⟨y²⟩). When the cell is chronically underactive, θM decreases, making LTP easier to induce. When the cell is hyperactive, θM rises, favouring LTD. This provides:
- Stability — the sliding threshold prevents runaway potentiation.
- Selectivity — only inputs correlated with high postsynaptic activity are potentiated; others are depressed.
- Competition — different synapses compete for a fixed postsynaptic activation budget.
The BCM rule successfully explained ocular dominance plasticity in the visual cortex and predicted that monocular deprivation would weaken the deprived-eye synapses while strengthening open-eye synapses — a prediction confirmed experimentally by Rittenhouse et al. (1999).
6. Homeostatic plasticity
Hebbian and STDP rules are Hebbian in nature — activity-dependent changes that can amplify differences and create instability without balanced checks. The brain solves this problem with a family of slower, negative-feedback mechanisms collectively called homeostatic plasticity, which operate to maintain neuron and circuit activity within a functional range.
Synaptic scaling
In seminal experiments, Turrigiano et al. (1998) blocked all action potentials in cultured cortical neurons for 48 hours and found that AMPA receptor currents uniformly increased (scaled up) at all synapses. Conversely, chronic overactivation caused a proportional downscaling. This synaptic scaling preserves the relative pattern of synaptic weights (the memory trace) while adjusting the absolute gain:
α adjusts so that ⟨y⟩ → ytarget
α raises when ⟨y⟩ < ytarget (too quiet → scale up)
α drops when ⟨y⟩ > ytarget (too active → scale down)
Intrinsic excitability plasticity
Beyond synaptic scaling, neurons also regulate their own intrinsic excitability — the conversion of synaptic input to firing output — by modulating voltage-gated ion channel densities and kinetics. This provides a second homeostatic dial independent of synaptic weight adjustment.
Together, Hebbian plasticity (fast, specific, instructive) and homeostatic plasticity (slow, global, permissive) create a two-timescale system that is simultaneously capable of learning specific patterns and maintaining stability.
| Mechanism | Timescale | Effect | Computational role |
|---|---|---|---|
| STDP | Milliseconds–seconds | Synapse-specific Δw | Temporal sequence learning |
| LTP/LTD | Minutes–hours | Synapse-specific Δw | Associative memory |
| BCM sliding θ | Hours–days | Threshold shifts | Selectivity, competition |
| Synaptic scaling | Hours–days | Global multiplicative | Stability, pattern preservation |
| Intrinsic plasticity | Hours–days | Excitability gain | Target firing rate maintenance |
7. Synaptic weight dynamics and stability
A complete model of synaptic plasticity must answer a fundamental question: do weights converge to stable values, or do they drift indefinitely? Stability analysis of weight dynamics connects plasticity rules to their long-term consequences.
Weight evolution under STDP
For a single synapse driven by uncorrelated Poisson spike trains at rates νpre and νpost, the mean weight change per unit time under STDP is:
Net potentiation/depression depends on whether A₊τ₊ > A₋τ₋ or not.
Typical parameters: A₋τ₋ slightly > A₊τ₊ → slight net depression.
This slight asymmetry (depression dominates for uncorrelated inputs) is functionally important: it means synapses weakly decay in the absence of correlated activity, preventing spurious potentiation from random coincidences. Only inputs with genuine temporal correlations produce sustained LTP.
Weight distributions and bimodality
Simulations and theoretical analyses of networks with STDP reveal that weights do not converge to a single stable value but rather evolve toward a bimodal distribution: weights cluster near 0 (silent synapses) or near some maximum wmax (saturated synapses). This binary segmentation is thought to maximise memory capacity and has been connected to the experimentally observed all-or-none property of synaptic potentiation at single dendritic spines.
Soft vs. hard weight bounds
STDP rules require weight bounds to prevent divergence. Two common implementations are:
- Hard bounds: w ∈ [0, wmax], weight is clipped to the boundary after each update. Simple but creates pile-up at the bounds.
- Soft bounds: the weight change is multiplied by (wmax − w) for LTP or w for LTD, reducing the update magnitude as the bound is approached. Produces more naturalistic unimodal or bimodal distributions depending on parameters.
8. JavaScript STDP simulation
The simulation below models two Poisson-spiking neurons connected by a single modifiable synapse. Pre- and postsynaptic spike times are generated stochastically, and the STDP rule with exponential learning windows updates the weight in real time. The weight evolution and the empirical STDP curve are drawn on separate canvases, allowing you to observe how the timing offset between the two neurons determines whether the synapse is potentiated or depressed.
The left panel traces the synaptic weight over simulated time. When the pre-spike consistently precedes the post-spike (positive Δt), the weight climbs toward wmax. For negative Δt (post before pre), it decays. Near Δt = 0 the competition between LTP and LTD determines a delicate equilibrium.
The STDP learning window (right panel) plots the measured weight change as a function of Δt for each spike pair, accumulating an empirical estimate of the kernel. With enough spike pairs (several seconds of simulation) the characteristic antisymmetric exponential shape emerges.
Core STDP update code
// STDP parameters
const A_plus = 0.005; // LTP amplitude
const A_minus = 0.00525; // LTD amplitude (slight depression bias)
const tau_p = 20; // LTP time constant (ms)
const tau_m = 20; // LTD time constant (ms)
const w_max = 1.0;
// Eligibility traces
let r_pre = 0; // pre-synaptic trace
let o_post = 0; // post-synaptic trace
let w = 0.5;
function onPreSpike(dt) {
// LTD: post fired recently (anti-causal)
w = Math.max(0, w - A_minus * o_post);
r_pre += 1; // boost pre-trace
}
function onPostSpike(dt) {
// LTP: pre fired recently (causal)
w = Math.min(w_max, w + A_plus * r_pre);
o_post += 1; // boost post-trace
}
function decayTraces(dt_ms) {
r_pre *= Math.exp(-dt_ms / tau_p);
o_post *= Math.exp(-dt_ms / tau_m);
}