A problem about inhibitory neuron

45 views
Skip to first unread message

spike yang

unread,
Aug 30, 2017, 11:09:04 PM8/30/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi ,
    I want to add an inhibitory neuron to suppress the excitatory neuron ,but it has no effect .The synapse model i choose is CUBA model .My code is showed as follow:
   


 #include <carlsim.h>



int main(int argc, const char* argv[]) {

// ---------------- CONFIG STATE -------------------

CARLsim sim("test", CPU_MODE, USER);

int nNeur =1 ;

PoissonRate in(nNeur); // PoissonRate containter for SpikeGenerator group


// create groups

int gIn = sim.createSpikeGeneratorGroup("input", nNeur, EXCITATORY_NEURON);

int gInh = sim.createGroup("Inh", 1, INHIBITORY_NEURON);

int gExc = sim.createGroup("Exc", nNeur, EXCITATORY_NEURON);

sim.setNeuronParameters(gExc, 0.02f, 0.2f, -65.0f, 8.0f); // RS

sim.setNeuronParameters(gInh, 0.1f, 0.2f, -65.0f, 2.0f);  //FS


// gExc receives input from gIn

sim.connect(gIn, gExc, "one-to-one", RangeWeight(60.0f), 1.0f,RangeDelay(1), RadiusRF(-1), SYN_FIXED);

// gInh receives input from gExc

sim.connect(gExc, gInh, "one-to-one", RangeWeight(9999.0f), 1.0f,RangeDelay(1), RadiusRF(-1), SYN_FIXED);
// gInh suppress gExc
sim.connect(gInh, gExc, "one-to-one", RangeWeight(9999.0f), 1.0f,RangeDelay(1), RadiusRF(-1), SYN_FIXED);

// enable CUBA mode

sim.setConductances(false);


// ---------------- SETUP STATE -------------------

sim.setupNetwork();

sim.setSpikeMonitor(gIn, "DEFAULT");

sim.setSpikeMonitor(gExc, "DEFAULT");

sim.setSpikeMonitor(gInh, "DEFAULT");


// associate PoissonRate container with gIn

sim.setSpikeRate(gIn, &in);



// ---------------- RUN STATE -------------------

// run the network repeatedly for 50 second (5*10000 + 0 ms)

// with  Poisson input

for (int i=0; i<5; i++) {

float inputRateHz = 50.0f;

in.setRates(inputRateHz);



// run for 10 second

sim.runNetwork(10,0);

}



return 0;

}   


And here is the result of the network :

(t=10.000s) SpikeMonitor for group input(0) has 474 spikes in 10000ms (47.40 +/- 0.00 Hz)
(t=10.000s) SpikeMonitor for group Inh(1) has 375 spikes in 10000ms (37.50 +/- 0.00 Hz)
(t=10.000s) SpikeMonitor for group Exc(2) has 375 spikes in 10000ms (37.50 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group input(0) has 509 spikes in 10000ms (50.90 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group Inh(1) has 414 spikes in 10000ms (41.40 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group Exc(2) has 414 spikes in 10000ms (41.40 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group input(0) has 492 spikes in 10000ms (49.20 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group Inh(1) has 398 spikes in 10000ms (39.80 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group Exc(2) has 398 spikes in 10000ms (39.80 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group input(0) has 502 spikes in 10000ms (50.20 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group Inh(1) has 402 spikes in 10000ms (40.20 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group Exc(2) has 402 spikes in 10000ms (40.20 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group input(0) has 492 spikes in 10000ms (49.20 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group Inh(1) has 383 spikes in 10000ms (38.30 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group Exc(2) has 383 spikes in 10000ms (38.30 +/- 0.00 Hz)


In fact ,the excitotary neuron should not spike because of the effect of inhibitotary neuron in the latter seconds.There should be some problems about my understanding of the network.Would you mind explaining to me where is there a problem?


kashyaph

unread,
Sep 1, 2017, 11:26:38 AM9/1/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi Spike Yang,

It seems to me that the behavior arises from bidirectional coupling of Exc and Inh groups. The Inh group is indeed supressing the Exc group, however indirectly suppressing itself (Inh). You can think of it this way, when the spike rates of Exc goes down, it also reduces the spike rates of Inh, which will again increase the spike rates of Exc.

I made a modification to your network as follows:

gIn -> gExc
gIn -> gInh
gInh -> gExc

Here are the spike rates I obtained for this:


******************** Running the simulation on 0 GPU(s) and 1 CPU(s) ***************************

(t=10.000s) SpikeMonitor for group input(0) has 516 spikes in 10000ms (51.60 +/- 0.00 Hz)
(t=10.000s) SpikeMonitor for group Inh(1) has 516 spikes in 10000ms (51.60 +/- 0.00 Hz)
(t=10.000s) SpikeMonitor for group Exc(2) has 0 spikes in 10000ms (0.00 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group input(0) has 492 spikes in 10000ms (49.20 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group Inh(1) has 492 spikes in 10000ms (49.20 +/- 0.00 Hz)
(t=20.000s) SpikeMonitor for group Exc(2) has 0 spikes in 10000ms (0.00 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group input(0) has 530 spikes in 10000ms (53.00 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group Inh(1) has 530 spikes in 10000ms (53.00 +/- 0.00 Hz)
(t=30.000s) SpikeMonitor for group Exc(2) has 0 spikes in 10000ms (0.00 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group input(0) has 523 spikes in 10000ms (52.30 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group Inh(1) has 523 spikes in 10000ms (52.30 +/- 0.00 Hz)
(t=40.000s) SpikeMonitor for group Exc(2) has 0 spikes in 10000ms (0.00 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group input(0) has 481 spikes in 10000ms (48.10 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group Inh(1) has 481 spikes in 10000ms (48.10 +/- 0.00 Hz)
(t=50.000s) SpikeMonitor for group Exc(2) has 0 spikes in 10000ms (0.00 +/- 0.00 Hz)


Here, you can clearly see the suppression of Exc by the Inh group. Let me know if you still have questions.


The script I used is attached.

main_spike_yang.cpp

spike bush

unread,
Sep 3, 2017, 1:14:35 AM9/3/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Dear kashyaph,

Thank you very much for your answer.I study it for a well and re-run the network ,which really woks as you predict .Now  I am  aware of where my previous question is.But I still have two problems as follows:

The first one :How does the inhibitory neuron work?I make a modification  as follows:
gIn -> gExc
gExc -> gInh
gInh -> gExc
And I have two hypotheses:

1.the gInh makes the gExc difficult to spike,in other words, if the of the connection of the gIn and gExc is very strong (the synapses weight is very high) and  the spike rate of the gIn is high enough ,the gExc can spike very soon so the gInh fail to suppress the gExc.

2.the gInh can suppress the gExc a short time,for example,2ms.So the gExc shouldn't spike in this 2ms time,no matter how soon the gIn spike and how big the synapses between the gIn and gExc are . 

So which is the right answer or both of them are wrong?If the second one is right, is there some way for us to change the suppressing time to 20ms (more than 2ms) .


Here is my second question:

Is there some way for us to change the time of recording weight less than 1 second.I setup a simple modification as follow:
gIn -> gExc   (enable STDP )

I run the network for one second and we can see the weight increases:
(t=1.000s) SpikeMonitor for group input(0) has 53 spikes in 1000ms (53.00 +/- 0.00 Hz)
(t=1.000s) SpikeMonitor for group exc(1) has 45 spikes in 1000ms (45.00 +/- 0.00 Hz)
(t=1.000s) ConnectionMonitor ID=0 0(input) => 1(exc): [preId,postId] wt (+/-wtChange in 1000ms) show first 100
[0,0] 100.0000 (+40.0000) 

But if i run the network for 999ms however the weight doesn't change:
(t=0.999s) SpikeMonitor for group input(0) has 55 spikes in 999ms (55.06 +/- 0.00 Hz)
(t=0.999s) SpikeMonitor for group exc(1) has 44 spikes in 999ms (44.04 +/- 0.00 Hz)
(t=0.999s) ConnectionMonitor ID=0 0(input) => 1(exc): [preId,postId] wt (+/-wtChange in 999ms) show first 100
[0,0] 60.0000 (+0.0000)

Would you like to help me solve these problems?And the code of the second question  is attached.Thank you very much.

test for the second question .txt

kashyaph

unread,
Sep 5, 2017, 10:52:41 AM9/5/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi Spike Bush,

I think your new modification converts the network back to the original configuration. 

Regarding your first question, you may be able to generate both types of behaviors by finding an optimal set of open parameters. In case 1, may be simply setting a high weight for gIn -> gEx relative to gInh -> gEx would work. In case 2, I do not know what you are trying to achieve. You may want to find a set of parameters for the first 2 ms and a different set of parameters for rest of the simulation for achieving the firing statistics you want, but that does not sound very biologically realistic. 

In all cases though, you may be able to find a set of parameters that give the desired firing characteristics. You should look into the CARLsim ECJ interface, which finds an optimal set of parameters for a desired cost function, or behavior using evolutionary algorithms. 


This paper tunes the parameters for a network, which is similar to yours using CARLsim ECJ.


Regarding your second question, connection snapshots are taken after one second periodically. If you want sub-second weight values, you may disable the periodic snapshot and instead, run for some <1000 ms and take a manual connection snapshot and run again and reiterate.


Let me know if you have any questions.

Regards, Hirak


spike bush

unread,
Sep 6, 2017, 10:29:03 PM9/6/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Dear Hirak,
        I'm sorry that I haven't express my problem clearly,I have re-described my first question as follows :
        here is my modification to run: 
 
        gIn -> gExc
       gExc -> gInh
       gInh -> gExc
 
      and  I would like to discuss with you the results of the network:
       gExc spikes at   22ms and 23ms ,gInh spikes doesn't spike before 40ms ,
       gExc spikes at   44ms and gInh spikes at 41ms. If there isn't gInh to suppress gExc, gExc will  spikes at 42ms and 44ms,so we can see the gInh really have suppressed gExc,
       gExc spikes at  62ms and 65ms ,gInh spikes at 63ms ,If there isn't gInh to suppress gExc,gExc will spikes at 62ms and 65ms ,so we can can see the gInh doesn't suppress gExc at all .
     So I wonder how the inhibitory neuron works ,The gInh spikes at 41ms ,so it can suppress gExc ,which can't spike at 42ms .But at 44ms ,the influence of the Inh has disappeared ,the gExc spikes at 44ms.
     However,when gInh spikes at 63 ms ,gExc still spikes at 65ms,which seems that gInh doesn't work at all.So I think that the Inh only works for 1ms ,After 1ms ,the influence of the suppression disappear,which explains that the Inh spikes at 63ms and the gExc still spikes at 65ms.But it really contradicts the literature I have seen before.How can an inhibitory neuron works like that !
     So I really don't know where my problem is.Would you like to explain it or give me some links about the working principle of inhibitory neuron.Thank you very much !
Sincerely,
Spike Bush
        

kashyaph

unread,
Sep 8, 2017, 3:27:11 AM9/8/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hello Spike Bush,

You can think of it this way, your gExc neuron is receiving positive input from gIn and negative input current from gInh. These two currents are scaled by the synaptic weights. The total input current changes the membrane potential of the neuron or the neuron state. Keep in mind that membrane potential also decays over time. All these dynamics of membrane potential and inputs over time are expressed using, in our case, Izhikvich neuron model.


This model replicates the behaviors of many neuron types found in the brain. The parameters a, b, c, d you set determines how much membrane potential is affected by inputs or decays, among other things. I strongly suggest reading this and playing with the matlab scripts the author provides. You should plot the membrane potential at each time step and see how they are changing with the arrival of input spikes.

If you want, you should be able to do all these with new features in CARLsim4. Which can be cloned from github.

Once you can see the plots of spikes vs membrane potential, you can play the a, b, c, d paramters of Izhikevich model or the synaptic weights or the delays to generate desired firing behavior in different grousps.

spike bush

unread,
Sep 12, 2017, 3:33:45 AM9/12/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Dear Hirak,
       I have  understanded this problem .Thank you very much .
Sincerely,
Spike Bush
Reply all
Reply to author
Forward
0 new messages