Injecting random current noise into neurons

Questions concerning the use of Auryn classes. If you want to contribute a howto for a given example code please consider getting write access for the Dokuwiki.
Post Reply
david
Posts: 6
Joined: Wed Mar 09, 2016 3:52 pm

Injecting random current noise into neurons

Post by david »

I am trying to inject independent random current noise (that perhaps follows some Gaussian distribution) into all neurons in a neuron group. I might want to set some kind of seed so that the same random current is reproducible. Any thoughts on what's the best way to accomplish this in Auryn?

I have taken a look at CurrentInjector, NormalStimulator, PatternStimulator, PoissonStimulator, and also FileInputGroup, but not sure if those are the right ones. Could you give an example as to how to implement this? I don't mind importing the input from a file.

Thanks!
User avatar
zenke
Site Admin
Posts: 156
Joined: Tue Oct 14, 2014 11:34 am
Location: Basel, CH
Contact:

Re: Injecting random current noise into neurons

Post by zenke »

Hi,

so PoissonStimulator is your friend. It adds independent Poisson noise to a state vector of your choice for each neuron in a NeuronGroup. You can seed it to meet your needs to generate reproducible spikes. Make sure you have a different seed on different ranks if you run in parallel mode otherwise the noise between ranks will be correlated. Also note that the random number generator is shared between all PoissonStimulators so you only need to seed one of them.

If you want to seed them independently or if you want different current input, just write your own stimulator based on the example of PoissonStimulator. I am adding the example "sim_current_stim" to the current develop branch. It simulates two neurons receiving independent Poisson currents on their membrane potential variable. Here a plot of how that looks:
poisson_stim_current.png
poisson_stim_current.png (70.39 KiB) Viewed 8704 times
Top and bottom are two runs with the same seed -- as you can see the noise is identical.

Another Auryn user (vmind in his forum) wrote the NormalStimulator, which behaves similarly to PoissonStimulator. However, instead of adding a normal value to the target state it clamps the target value in each timestep to a random value from a normal distribution. So if you use it directly on the membrane it won't work. You will need to use a neuron model which implements a "noise current variable". If I remember correctly this was implement in SIFGroup -- if you are interested look for the state variable called "inj_current" there and see how this was implemented. You can also try contacting vmind directly via the forum.
david
Posts: 6
Joined: Wed Mar 09, 2016 3:52 pm

Re: Injecting random current noise into neurons

Post by david »

By the last part:
However, instead of adding a normal value to the target state it clamps the target value in each timestep to a random value from a normal distribution. So if you use it directly on the membrane it won't work. You will need to use a neuron model which implements a "noise current variable". If I remember correctly this was implement in SIFGroup -- if you are interested look for the state variable called "inj_current" there and see how this was implemented.
Do you mean that the group must have an "inj_current" state variable? So if I use SIFGroup, what is the difference between that and the TIFGroup?

Also, if I create a current injecting stimulator like NormalStimulator, what's the best way to test it? Is there some kind of state monitor that will allow me to plot the injected current?

Thanks!
User avatar
zenke
Site Admin
Posts: 156
Joined: Tue Oct 14, 2014 11:34 am
Location: Basel, CH
Contact:

Re: Injecting random current noise into neurons

Post by zenke »

Hey,

by clamping I mean that the target state variable you pass to the injector will be set to a value from the normal distribution instead of the value being added to the current value. I am not sure about SIFGroup, because I did not write it, vmind did, but inj_current seems to be the logic there. I am guessing by low-pass filtering inj_current you get an Ornstein Uhlenbeck process.

The best way to test what any state variable does is by using StateMonitor. You can monitor any state variable with it.

Cheers,

F
Post Reply