NDComponents

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

NDComponents

davidgr1995
Hello,

I have a few questions about different components and how they interact with
each other in the Neurokernel system.

Firstly, if I were to create an Axon component that extends the leakyIAF
component. Would I simply have to 'spike-state' set for both my access and
update parameters, and simply update the spike state to copy the input spike
state?

Secondly, for a plastic alpha synapse. In the antennal lobe package the
synapses are defined to have access to both the pre and post connections as
i am hoping to update my conductance based on whether or not the pre and
post spikes link up in a reasonable sequence.
Would this be easier to update in the LPU update sequence or the actual
synapse update sequence? Ideally in the synapse but if I access is not so
easy I can make something in the LPU update.

Third and finally, To create an inhibitory synapse, would it make sense in
the context of how the current Alpha synapse component works to simply
multiply the conductance value by a negative? I noticed in the antennal lobe
package that it just initialises the variables to be randomly be positive or
negative but has no update function.

Apologies for so many questions!

Best Regards,

David



--
Sent from: http://neurokernel.67426.x6.nabble.com/
_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev

Reply | Threaded
Open this post in threaded view
|

Re: NDComponents

davidgr1995
Or for the 1st question, If there was a "cable" component that simply copied
the information from the original cell to a "axon" copy of the cell thus
being able to integrate connections to that axon.



--
Sent from: http://neurokernel.67426.x6.nabble.com/
_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev

Reply | Threaded
Open this post in threaded view
|

Re: NDComponents

Yiyin Zhou
Hi David,

I am not quite sure if I catch the 1st question. Do you mean you just want to have a component to duplicate the output of the LeakyIAF neuron, or you would like to have a two-compartment model in which a LeakyIAF component is connected to another LeakyIAF (the axon) by a resistor?

For the second question, first of all, the antennal lobe package is somewhat out-of-date for the latest neurodriver, so look at it with some caution. To model a plastic synaptic rule that requires access to voltage of both pre- and post-synaptic neurons, I added some utility methods in BaseSynapseModel and an example component called exponential_with_stdp.py (that you can run directly) to help you go through this (both are under branch feature/same-access-inputs).

Let's denote instances of the synapse component as S_i, and presynaptic neuron as PreN_i, and postsynaptic neuron as PostN_i (I am considering here M pairs of neurons each with a synapse between them, to make the discussion more general than a single synapse, so here i = 1, 2, ..., M). 

# Add nodes to the graph representing neurons and synapses:
G = nx.MultiDiGraph()
for i in range(M):
G.add_node('PreN_{}'.format(i), ...) 
G.add_node('PostN_{}'.format(i), ...)
G.add_node('S_{}'.format(i), ...) 

# Add edges:
for i in range(M):
G.add_edge('PreN_{}'.format(i)', 'S_{}'.format(i), order = 0)
G.add_edge('PostN_{}'.format(i), 'S_{}'.format(i), order = 1)

Since S_i will access spike_state of both PreN_i and PostN_i, this creates some ambiguity about which one is presynaptic and which one is postsynaptic. Here the attribute "order" will be used in the new synapse component code to distinguish the two different inputs.

By calling retrieve_buffer_multi method in the component code, you can extract a 2x(num_components) array of which the first row is the spike state of presynaptic neurons, and second row is that of postsynaptic neurons, and each column is a pair of neurons associated with a synapse. Then you do pretty much any thing you want in the CUDA kernel.

For the third question, whether a synapse is excitatory or inhibitory is defined by the reversal potential, i.e., the parameter "reverse". That can be seen from the equation for synaptic current: I_syn = g(V - V_rev) where V_rev is the reversal potential. Note that there is a minus sign in front of I_syn in a differential equation for membrane potential, so for excitatory synapse, reversal potential is usually greater than the resting potential of the presynaptic neuron, and for inhibitory one, it should be smaller than the resting potential (typically -80 ~ -90 mV).

Best,
Yiyin

On Wed, Jul 25, 2018 at 6:41 AM davidgr1995 <[hidden email]> wrote:
Or for the 1st question, If there was a "cable" component that simply copied
the information from the original cell to a "axon" copy of the cell thus
being able to integrate connections to that axon.



--
Sent from: http://neurokernel.67426.x6.nabble.com/
_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev



--
Yiyin Zhou
Postdoctoral Research Scientist
Department of Electrical Engineering
Columbia University


_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev
Reply | Threaded
Open this post in threaded view
|

Re: NDComponents

davidgr1995
Hi Yiyin,

Thanks for helping me out!

For the first question, a component to duplicate the output would be great.
As of now I am currently using another LeakyIAF with a high conductance
synapse between the two. I have a connection to said axon from another
neuron, if i were to simply copy the output I believe I would need to still
access the other synapse thus I think my current implementation should be
okay.

I have made an attempt at implementing an alpha synapse with stdp using the
examples you have provided but have noticed that for some reason the synapse
does not seem to record input spikes? I am unsure of why this is, unless it
is related to that it is connected to the pre-synaptic neuron via a port.

Here is a copy of my alpha with stdp file. I have tried to build on the
exponential with stdp but cannot see where I am going wrong with respect to
the input from the other neuron.
alpha_with_stdp.py
<http://neurokernel.67426.x6.nabble.com/file/t24/alpha_with_stdp.py>  

I have been scratching my head for a few days trying to figure out where I
am going wrong so any help would be awesome!

Best Regards,

David



--
Sent from: http://neurokernel.67426.x6.nabble.com/
_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev

Reply | Threaded
Open this post in threaded view
|

Re: NDComponents

Yiyin Zhou
Hi David,

1. You can create a buffer component similar to the one attached for this purpose. What it does is simply copy states, and you just need to create an edge between a node with class LeakyIAF and another node with class BufferVoltage, in this case. If you need to duplicate spike_state, simply change the access and update variables and some of the 'V's down the code.

2. The problem in the code is that the order of the arguments in the CUDA __global__ function must be the exact same order as that defined in accesses, params, internals and updates. Therefore, g_Ar, g_Ad and g_Gmax should be moved before g_internal_g.

Best,
Yiyin

On Thu, Aug 2, 2018 at 6:43 AM davidgr1995 <[hidden email]> wrote:
Hi Yiyin,

Thanks for helping me out!

For the first question, a component to duplicate the output would be great.
As of now I am currently using another LeakyIAF with a high conductance
synapse between the two. I have a connection to said axon from another
neuron, if i were to simply copy the output I believe I would need to still
access the other synapse thus I think my current implementation should be
okay.

I have made an attempt at implementing an alpha synapse with stdp using the
examples you have provided but have noticed that for some reason the synapse
does not seem to record input spikes? I am unsure of why this is, unless it
is related to that it is connected to the pre-synaptic neuron via a port.

Here is a copy of my alpha with stdp file. I have tried to build on the
exponential with stdp but cannot see where I am going wrong with respect to
the input from the other neuron.
alpha_with_stdp.py
<http://neurokernel.67426.x6.nabble.com/file/t24/alpha_with_stdp.py

I have been scratching my head for a few days trying to figure out where I
am going wrong so any help would be awesome!

Best Regards,

David



--
Sent from: http://neurokernel.67426.x6.nabble.com/
_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev




_______________________________________________
neurokernel-dev mailing list
[hidden email]
https://lists.columbia.edu/mailman/listinfo/neurokernel-dev

BufferVoltage.py (2K) Download Attachment