class WeightUpdateModels::PiecewiseSTDP¶
Overview¶
This is a simple STDP rule including a time delay for the finite transmission speed of the synapse. More…
#include <weightUpdateModels.h> class PiecewiseSTDP: public WeightUpdateModels::Base { public: // methods DECLARE_WEIGHT_UPDATE_MODEL( PiecewiseSTDP, 10, 2, 0, 0 ); virtual StringVec getParamNames() const; virtual VarVec getVars() const; virtual std::string getSimCode() const; virtual std::string getLearnPostCode() const; virtual DerivedParamVec getDerivedParams() const; virtual bool isPreSpikeTimeRequired() const; virtual bool isPostSpikeTimeRequired() const; };
Inherited Members¶
public: // typedefs typedef std::vector<std::string> StringVec; typedef std::vector<EGP> EGPVec; typedef std::vector<ParamVal> ParamValVec; typedef std::vector<DerivedParam> DerivedParamVec; typedef std::vector<Var> VarVec; // structs struct DerivedParam; struct EGP; struct ParamVal; struct Var; // methods virtual ~Base(); virtual StringVec getParamNames() const; virtual DerivedParamVec getDerivedParams() const; virtual VarVec getVars() const; virtual EGPVec getExtraGlobalParams() const; size_t getVarIndex(const std::string& varName) const; size_t getExtraGlobalParamIndex(const std::string& paramName) const; virtual std::string getSimCode() const; virtual std::string getEventCode() const; virtual std::string getLearnPostCode() const; virtual std::string getSynapseDynamicsCode() const; virtual std::string getEventThresholdConditionCode() const; virtual std::string getSimSupportCode() const; virtual std::string getLearnPostSupportCode() const; virtual std::string getSynapseDynamicsSuppportCode() const; virtual std::string getPreSpikeCode() const; virtual std::string getPostSpikeCode() const; virtual VarVec getPreVars() const; virtual VarVec getPostVars() const; virtual bool isPreSpikeTimeRequired() const; virtual bool isPostSpikeTimeRequired() const; size_t getPreVarIndex(const std::string& varName) const; size_t getPostVarIndex(const std::string& varName) const;
Detailed Documentation¶
This is a simple STDP rule including a time delay for the finite transmission speed of the synapse.
The STDP window is defined as a piecewise function:
The STDP curve is applied to the raw synaptic conductance gRaw
, which is then filtered through the sugmoidal filter displayed above to obtain the value of g
.
The STDP curve implies that unpaired pre- and post-synaptic spikes incur a negative increment in gRaw
(and hence in g
).
The time of the last spike in each neuron, “sTXX”, where XX is the name of a neuron population is (somewhat arbitrarily) initialised to -10.0 ms. If neurons never spike, these spike times are used.
It is the raw synaptic conductance gRaw
that is subject to the STDP rule. The resulting synaptic conductance is a sigmoid filter of gRaw
. This implies that g
is initialised but not gRaw
, the synapse will revert to the value that corresponds to gRaw
.
An example how to use this synapse correctly is given in map_classol.cc
(MBody1 userproject):
for (int i= 0; i < model.neuronN[1]*model.neuronN[3]; i++) { if (gKCDN[i] < 2.0*SCALAR_MIN){ cnt++; fprintf(stdout, "Too low conductance value %e detected and set to 2*SCALAR_MIN= %e, at index %d \n", gKCDN[i], 2*SCALAR_MIN, i); gKCDN[i] = 2.0*SCALAR_MIN; //to avoid log(0)/0 below } scalar tmp = gKCDN[i] / myKCDN_p[5]*2.0 ; gRawKCDN[i]= 0.5 * log( tmp / (2.0 - tmp)) /myKCDN_p[7] + myKCDN_p[6]; } cerr << "Total number of low value corrections: " << cnt << endl;
One cannot set values of g
fully to 0
, as this leads to gRaw
= -infinity and this is not support. I.e., ‘g’ needs to be some nominal value > 0 (but can be extremely small so that it acts like it’s 0).
The model has 2 variables:
g:
conductance ofscalar
typegRaw:
raw conductance ofscalar
type
Parameters are (compare to the figure above):
tLrn:
Time scale of learning changestChng:
Width of learning windowtDecay:
Time scale of synaptic strength decaytPunish10:
Time window of suppression in response to 1/0tPunish01:
Time window of suppression in response to 0/1gMax:
Maximal conductance achievablegMid:
Midpoint of sigmoid g filter curvegSlope:
Slope of sigmoid g filter curvetauShift:
Shift of learning curvegSyn0:
Value of syn conductance g decays to
Methods¶
virtual StringVec getParamNames() const
Gets names of of (independent) model parameters.
virtual VarVec getVars() const
Gets names and types (as strings) of model variables.
virtual std::string getSimCode() const
Gets simulation code run when ‘true’ spikes are received.
virtual std::string getLearnPostCode() const
Gets code to include in the learnSynapsesPost kernel/function.
For examples when modelling STDP, this is where the effect of postsynaptic spikes which occur after presynaptic spikes are applied.
virtual DerivedParamVec getDerivedParams() const
Gets names of derived model parameters and the function objects to call to Calculate their value from a vector of model parameter values
virtual bool isPreSpikeTimeRequired() const
Whether presynaptic spike times are needed or not.
virtual bool isPostSpikeTimeRequired() const
Whether postsynaptic spike times are needed or not.