Page 1 of 1

STDP kernels

Posted: Tue Apr 14, 2015 12:51 am
by vmind
I'd like to test different STDP learning windows. What is the best way to implement these? e.g. for a box learning window.

I see the window is indirectly dictated by the pre and post traces. Do you recommend extending the Trace class?

Thanks.
E.

Re: STDP kernels

Posted: Tue Apr 14, 2015 3:09 am
by zenke
Hey,
if you want to do anything fancy which allows the (non)linear interaction of multiple spikes (e.g. Triplet STPD with all to all interaction) you will almost certainly want to try writing it in the trace framework. However, then the base set of functions to build your STDP kernels are basically exponential decays. So getting the box kernel that you want to implement is not trivial any more. If you do not care about "all-to-all" interactions of multiple spikes, but you are happy with nearest neighbour interactions, you can implement arbitrary window shapes more readily. I wrote the necessary code some time ago, but since it is missing a thorough documentation it is not part of the stable release yet. However, I just committed the PairInteractionConnection class to the develop branch on GitHub (https://github.com/fzenke/auryn/tree/develop). I did not check the details right now, but if I remember correctly the class reads in arbitrary STDP windows from an ASCII file. I guess you have to specify them in atomic AurynTime time steps (e.g. 1e-4s by default). However, the name PairInteraction connection hints exactly at the fact that only pairs of spikes can interact and you cannot get all-to-all interactions. However, you can still get triplet effects due to the non-linear character of some STDP kernels (Izhikevich has a paper on this I believe).

Sorry, don't have more time right now. I hope the code is self explanatory and it helps you. If you end up improving it \(and/or documenting it nicely with doxygen strings) send me pull request ;-)

Cheers,

Friedemann

Re: STDP kernels

Posted: Tue Apr 14, 2015 8:31 pm
by vmind
Nearest neighbor interactions might work fine. Anyway, I understand that all-to-all interactions would be much more computationally intensive.

Pair interactions used a different way to transmit the updates. In my case they weren't effective at all. I had to change

dst->tadd( *c , value , transmitter );
to
transmit( *c, value );

following the example in SparseConnection.

Otherwise I'm running pair Interactions and it just works fine. Thanks!



(moved the relevant portion back to this topic)

Re: STDP kernels

Posted: Tue Apr 14, 2015 9:00 pm
by zenke
Sweet! Yes, the code is relatively old and I just pulled it out yesterday. Good you found that it was still using the deprecated tadd mechanism. Send me a patch/pull request if you have time at some point. Cheers. F

Re: STDP kernels

Posted: Thu Apr 16, 2015 9:51 pm
by vmind
I'm happy to contribute with a pull/push request. However, I've never used it.

I branched, made changes there and merged locally to develop.
I have a number of changes, can you easily pick the one you're interested in and ignore the rest?

E.

Re: STDP kernels

Posted: Thu Apr 16, 2015 10:01 pm
by zenke
If you are working locally and do not have a fork of the repo on github you will have to send me a patch file (e.g. https://ariejan.net/2009/10/26/how-to-c ... -with-git/). Patch files can contain one commit or multiple commits (pull requests on GitHub are typically one commit). So if the changes you would like to contribute are encapsulated in one or multiple commits you should be good to go. I am looking forward to your improvements!