Networks of spiking neurons: a review of tools and strategies (Brette et al. 2007)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:83319
This package provides a series of codes that simulate networks of spiking neurons (excitatory and inhibitory, integrate-and-fire or Hodgkin-Huxley type, current-based or conductance-based synapses; some of them are event-based). The same networks are implemented in different simulators (NEURON, GENESIS, NEST, NCS, CSIM, XPP, SPLIT, MVAspike; there is also a couple of implementations in SciLab and C++). The codes included in this package are benchmark simulations; see the associated review paper (Brette et al. 2007). The main goal is to provide a series of benchmark simulations of networks of spiking neurons, and demonstrate how these are implemented in the different simulators overviewed in the paper. See also details in the enclosed file Appendix2.pdf, which describes these different benchmarks. Some of these benchmarks were based on the Vogels-Abbott model (Vogels TP and Abbott LF 2005).
Reference:
1 . Vogels TP, Abbott LF (2005) Signal propagation and logic gating in networks of integrate-and-fire neurons. J Neurosci 25:10786-95 [PubMed]
2 . Brette R, Rudolph M, Carnevale T, Hines M, Beeman D, Bower JM, Diesmann M, Morrison A, Goodman PH, Harris FC, Zirpe M, Natschl├Ąger T, Pecevski D, Ermentrout B, Djurfeldt M, Lansner A, Rochel O, Vieville T, Muller E, Davison AP, El Boustani S, Destexhe A (2007) Simulation of networks of spiking neurons: a review of tools and strategies. J Comput Neurosci 23:349-98 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s): Abstract integrate-and-fire leaky neuron;
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEURON; GENESIS; NEST; C or C++ program; XPP; CSIM; NCS; SPLIT; MVASpike; SciLab; Brian; PyNN; Python;
Model Concept(s): Activity Patterns; Methods;
Implementer(s): Carnevale, Ted [Ted.Carnevale at Yale.edu]; Hines, Michael [Michael.Hines at Yale.edu]; Davison, Andrew [Andrew.Davison at iaf.cnrs-gif.fr]; Destexhe, Alain [Destexhe at iaf.cnrs-gif.fr]; Ermentrout, Bard [bard_at_pitt.edu]; Brette R; Bower, James; Beeman, Dave; Diesmann M; Morrison A ; Goodman PH; Harris Jr, FC; Zirpe M ; Natschlager T ; Pecevski D ; Djurfeldt M; Lansner, Anders [ala at kth.se]; Rochel O ; Vieville T ; Muller E ; El Boustani, Sami [elboustani at unic.cnrs-gif.fr]; Rudolph M ;
%================================================================================
%
%  CSIM implementation of a benchmark simulation described in the paper
%  "Simulation of networks of spiking neurons: A review of tools and strategies"
%
%  Benchmark 2: Current-based (CUBA) IF network. This benchmark consists of a 
%               network of intefrate-and-fire neurons connected with 
%               current-based synapses.
%
%  CSIM is freely available from www.lsm.tugraz.at/csim
%
%  Authors: Dejan Pecevski, dejan@igi.tugraz.at
%           Thomas Natschlaeger, thomas.natschlaeger@scch.at
%
%  Date: April 2006
%
%================================================================================

% bring Matlab into its initial state (note that this also clears CSIM)
close all
clear all
modelname = 'cuba';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Global parameter values
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

nNeurons        = 4000;   % number of neurons
ConnP           = 0.02;   % connectivity probability
Frac_EXC        = 0.8;    % fraction of excitatory neurons
Tsim            = 0.4;    % duration of the simulation [sec]
DTsim           = 0.1e-3; % simulation time step [sec]
nRecordNeurons  = 250;    % number of neurons to plot the spikes from
Tinp            = 50e-3;  % length of the initial stimulus [sec]
nInputNeurons   = 10 ;    % number of neurons which provide initial input (for a time span of Tinp)
inpConnP        = 0.01 ;  % connectivity from input neurons to network neurons
inputFiringRate = 80;     % firing rate of the input neurons during the initial input

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create the neurons and set their parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

neuronIdx = csim('create', 'LifNeuron', nNeurons);

csim('set', neuronIdx, ...
     'Cm', 2e-10, 'Rm', 1e8, 'Vthresh', -50e-3, 'Vresting', -49e-3, ...
     'Vreset', -60e-3, 'Trefract', 5e-3, 'Vinit', -60e-3 ) ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create synaptic connections
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tic; fprintf('Making synaptic connections: ');

% create connectivity matrix
c = rand( nNeurons, nNeurons ) < ConnP;

% set diagonal elements to zero to avoid self loops
c( find( eye(nNeurons) ) ) = 0;

% get to lists such that destIdx(i) and srcIdx(i) are the indices
% of the destination and source neuron of the i-th synapse respectively.
[dest_n src_n] = find( c );

destIdx = neuronIdx(dest_n);
srcIdx = neuronIdx(src_n);

% create synapse objects
nSyn = size(destIdx, 2);
synapses = csim('create', 'StaticSpikingSynapse', nSyn);

% connect the neurons via synapses
csim('connect', destIdx, srcIdx, synapses);

% Extract the inhibitory and excitatory synapse indices and set their parameters
% We assume that neurons with indices above Frac_EXC*nNeurons are inhibitory

Erev_exc = 0;
Erev_inh = -80e-3;
Vmean    = -60e-3;

excSynIdx  = synapses(find(src_n <  (Frac_EXC*nNeurons)));
csim('set', excSynIdx, 'W', (Erev_exc-Vmean)*0.27e-9, 'tau', 5e-3, 'delay', 0);

inhSynIdx  = synapses(find(src_n >= (Frac_EXC*nNeurons)));
csim('set', inhSynIdx, 'W', (Erev_inh-Vmean)*4.5e-9, 'tau', 10e-3, 'delay', 0);

fprintf('Created %i current based synapses in %g seconds\n', nSyn, toc );

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create input neurons for the initial stimulus
% and connect them to random neurons in circuit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% create input neurons
InpNeuronIdx = csim('create', 'SpikingInputNeuron', nInputNeurons);

% randomly select source and destination neurons
[src_n dest_n] = find( rand(nInputNeurons,nNeurons) < inpConnP );
destCircIdx = neuronIdx(dest_n);
srcInputIdx = InpNeuronIdx(src_n);

% create input synapses
nInputSyn = size(destCircIdx, 2);
inSynapsesIdx = csim('create', 'StaticSpikingSynapse', nInputSyn);
csim('set', inSynapsesIdx, 'W', (Erev_exc-Vmean)*2e-9, 'tau', 5e-3, 'delay', 0);

% connect input neurons to random neurons in circuit
csim('connect', destCircIdx, srcInputIdx, inSynapsesIdx);

% create spike trains for the input neurons
for i=1:nInputNeurons
  in_channels(i).data    = sort( rand(1,inputFiringRate*Tinp) * Tinp );
  in_channels(i).idx     = InpNeuronIdx(i);
  in_channels(i).spiking = 1;
  in_channels(i).dt      = -1;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create recorders to record spikes and voltage traces
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% create separate recorders for spikes and voltages
% Note that in principle this is not necessary but it is
% for convenience.
recVm        = csim('create', 'Recorder');
recSpikes    = csim('create', 'Recorder');
recAllSpikes = csim('create', 'Recorder');

% set the recording time step for the voltages equal to 
% the simulation time step
csim('set', recVm, 'dt', DTsim);

% randomly select nRecordNeurons neurons to record from
rp = randperm(nNeurons);
recNeuronIdx = neuronIdx( rp(1:nRecordNeurons) );

% we record the membrane voltages of some selected neurons
csim('connect', recVm, recNeuronIdx, 'Vm');

% we record the spikes of selected neurons
csim('connect', recSpikes, recNeuronIdx, 'spikes');

% we record the spikes of all neurons
csim('connect', recAllSpikes, neuronIdx, 'spikes');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simulate the circuit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

tic; fprintf('Running simulation: ');

% set time step of the simulation
csim('set','dt', DTsim);

% first set t = 0
csim('reset');

% run simulation for Tsim seconds
csim('simulate', Tsim, in_channels);

fprintf('Done. %gsec CPU time for %gms simulation time\n', round(toc), Tsim*1000 );

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Make some figures out of simulation results
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

make_figures