We study STDP with an example where one has two groups of inputs to a LIF-neuron.
The neuron gets a group of temporal precise inputs () and a group of temporal imprecise inputs (). Each input channel consists of one spike with a randomly chosen spike time according to a normal distribution with mean 50ms and standard deviation 3ms (for precise inputs) or 20ms (for imprecise inputs). The neuron has a very long refractory period to make sure that it emits a single action potential for each run of 150msec. For different thresholds, this setup will lead to different weight distributions with implications on the temporal precision of the neuron.
Use the files stdp.m, gen_input.m, and learn_stdp.m . You will have to stdp.m unzip the file csim.zip into the same directory as stdp.m (consisting of csim.dll for Windows and csim.mexglx for Linux).
The simulation proceeds as follows:
Modify the matlab function learn_stdp.m such that weights are updated the following way:
Please make sure that weights don't become negative. Note that learn_stdp is only called if there was a post spike.
You shall also set the threshold of the neuron in stdp.m. Try values between 0 und .
Parts of the code which should be modified are marked with
%-------------(as a guideline, you can also modify other code).
After the simulation, the mean weigth of synapses with precise/imprecise inputs are plotted and printed. Also, the precision of the neuron after learning is printed on the screen. It is computed by simulating the neuron 20 times after learning. Then, the time difference between the earliest and the latest post spike is computed. The precision is then . If the postsynaptic neuron did not fire, the precision is set to .
You shall investigate how the results depend on the threshold: