The network learns synaptic weights through an STDP-based learning rule. A, The learning rule determines how synaptic weights change based on the relative time between presynaptic (chain neuron) and postsynaptic (detector neuron) spikes (x-axis). Closely timed spikes cause excitatory synapse strengthening (green) through long-term potentiation (LTP), whereas less closely timed spikes cause synapse weakening (orange) through long term depression (LTD). The opposite rule occurs for inhibitory synapses. B, The probability of time-to-last spike (scaled to have unity height) given a Poisson input to the chain. C, The vertical offset for the learning rule, which determines the relative levels of potentiation and depression, is set such that the ratio of positive and negative areas under the product of the learning curve (A) and the timing probability (B) is equal to 0.6 to keep learning stable. D, Chain-to-detector synaptic weights (red, excitatory; blue, inhibitory) change as learning progresses for the example site from Figure 1, and the performance of the chain recognition network (E, recording sites in gray lines) plateaus after ∼30 learning iterations.