This is an old revision of the document!
Table of Contents
Tutorial: Multiple Synaptic State Variables
Let's assume you would like to write a plasticity model in which induced changes to a synapse require some time to percolate through. Consider that inserting for instance additional AMPA receptors into a postsynaptic density takes time…
Aims
Our aim is to introduce a meta-variable s
on which STDP acts, but the actual weight of the connection is w
a low-pass filtered version of s
. Doing so will require to store both variables for each synapse. Therefore, each synapse possesses two states that it will need to keep track of. Currently, Auryn does not provide matrix classes which implement this directly. Therefore, we need do things manually.
Overview and Steps
To achieve our aim we will base this tutorial on the TripletConnection which implements the minimal triplet model by Pfister and Gerstner (2006). In the following we will address these steps:
- We will copy and rename
TripletConnection
into a new class calledLPTripletConnection
- We will then insert a second SimpleMatrix matrix container into the class which will hold our meta-variable
s
- All plasticity related STDP call will then be refined to act on this new variables
s
- Finally we will implement an
evolve
function for the connection in which we implement the low pass filtering ofs
to yieldw
.
Walk-through
Copying TripletSTDPConnection source files
To prepare our new class we start by navigating to Auryn's src
directory. And then copying TripletConnection.h
and TripletConnection.cpp
to LPTripletConnection.h
and LPTripletConnection.cpp
respectively. Note, that you can name the class differently, but you will have to stick with then new name you choose throughout this walk-through. Here, I simply put LP for low-pass, but a shorter or different name might seem more appropriate for you.
zenke@cashew:~/auryn/src$ cp TripletConnection.h LPTripletConnection.h zenke@cashew:~/auryn/src$ cp TripletConnection.cpp LPTripletConnection.cpp
Once the files are copied, open them in your preferred browser and replace all occurrences of TripletConnection
with LPTripletConnection
. Make sure to also replace the include guards in the header file which are in all caps TRIPLETCONNECTION_H_
becomes LPTRIPLETCONNECTION_H_
. Congrats! At this point it should be possible to build Auryn with the new object. However, so far we have not really implemented any new functionality. The new class will therefore behave exactly the same way as the original TripletConnection.
Now is generally a good time to start updating the doxygen string in the header file just above the keyword class
. Add a short description of what you are planning to do with this connection, otherwise this is only forgotten later and you will have created ambiguous documentation which is only going to confuse you later.