The classes below are only working with the
Consider using the newer
Synapses class as a replacement, it
allows you to flexibily express plasticity rules in a very similar way to
the classes below. A single
Synapses object can therefore
completely replace the combination of
STDP, for example. See Synapses for more details.
Spike timing dependent plasticity (STDP)¶
STDP(C, eqs, pre, post, wmin=0, wmax=inf, level=0, clock=None, delay_pre=None, delay_post=None)¶
Initialised with arguments:
- Connection object to apply STDP to.
- Differential equations (with units)
- Python code for presynaptic spikes, use the reserved symbol
wto refer to the synaptic weight.
- Python code for postsynaptic spikes, use the reserved symbol
wto refer to the synaptic weight.
- Minimum weight (default 0), weights are restricted to be within this value and wmax.
- Maximum weight (default unlimited), weights are restricted to be within wmin and this value.
- Presynaptic delay
- Postsynaptic delay (backward propagating spike)
The STDP object works by specifying a set of differential equations associated to each synapse (
eqs) and two rules to specify what should happen when a presynaptic neuron fires (
pre) and when a postsynaptic neuron fires (
post). The equations should be standard set of equations in the usual string format. The
postrules should be a sequence of statements to be executed triggered on pre- and post-synaptic spikes. The sequence of statements can be separated by a
;or by using a multiline string. The reserved symbol
wcan be used to refer to the synaptic weight of the associated synapse.
This framework allows you to implement most STDP rules. Specifying differential equations and pre- and post-synaptic event code allows for a much more efficient implementation than specifying, for example, the spike pair weight modification function, but does unfortunately require transforming the definition into this form.
There is one restriction on the equations that can be implemented in this system, they need to be separable into independent pre- and post-synaptic systems (this is done automatically). In this way, synaptic variables and updates can be stored per neuron rather than per synapse.
eqs_stdp = """ dA_pre/dt = -A_pre/tau_pre : 1 dA_post/dt = -A_post/tau_post : 1 """ stdp = STDP(C, eqs=eqs_stdp, pre='A_pre+=delta_A_pre; w+=A_post', post='A_post+=delta_A_post; w+=A_pre', wmax=gmax)
You can access the pre- and post-synaptic variables as follows:
stdp = STDP(...) print stdp.A_pre
Alternatively, you can access the group of pre/post-synaptic variables as:
These latter attributes can be passed to a
StateMonitorto record their activity, for example. However, note that in the case of STDP acting on a connection with heterogeneous delays, the recent values of these variables are automatically monitored and these can be accesses as follows:
The equations are split into two groups, pre and post. Two groups are created to carry these variables and to update them (these are implemented as
NeuronGroupobjects). As well as propagating spikes from the source and target of
C, spikes are also propagated to the respective groups created. At spike propagation time the weight values are updated.
ExponentialSTDP(C, taup, taum, Ap, Am, interactions='all', wmin=0, wmax=None, update='additive', delay_pre=None, delay_post=None, clock=None)¶
Initialised with the following arguments:
Synaptic weight change (relative to the maximum weight wmax):
f(s) = Ap*exp(-s/taup) if s >0 f(s) = Am*exp(s/taum) if s <0
- ‘all’: contributions from all pre-post pairs are added
- ‘nearest’: only nearest-neighbour pairs are considered
- ‘nearest_pre’: nearest presynaptic spike, all postsynaptic spikes
- ‘nearest_post’: nearest postsynaptic spike, all presynaptic spikes
- minimum synaptic weight
- maximum synaptic weight
- ‘additive’: modifications are additive (independent of synaptic weight) (or “hard bounds”)
- ‘multiplicative’: modifications are multiplicative (proportional to w) (or “soft bounds”)
- ‘mixed’: depression is multiplicative, potentiation is additive
See documentation for
STDPfor more details.
Short term plasticity (STP)¶
STP(C, taud, tauf, U)¶
Short-term synaptic plasticity, following the Tsodyks-Markram model.
Implements the short-term plasticity model described in Markram et al (1998). Differential signaling via the same axon of neocortical pyramidal neurons, PNAS. Synaptic dynamics is described by two variables x and u, which follow the following differential equations:
dx/dt=(1-x)/taud (depression) du/dt=(U-u)/tauf (facilitation)
where taud, tauf are time constants and U is a parameter in 0..1. Each presynaptic spike triggers modifications of the variables:
Synaptic weights are modulated by the product
u*x(in 0..1) (before update).
- Markram et al (1998). “Differential signaling via the same axon of neocortical pyramidal neurons”, PNAS.