Populations

After this page you can build a population, choose its neuron, synapse and spike models, and know where connections deliver their input. The equations of every model are in the Model catalogue.

A population is N units of one model; its state variables are vectors of length N.

using SpikingNeuralNetworks
SNN.@load_units
E = SNN.AdEx(N = 100, param = SNN.AdExParameter(b = 0pA),
             synapse = SNN.SingleExpSynapse(), spike = SNN.PostSpike(τabs = 2ms))
I = SNN.IF(N = 25, param = SNN.IFParameter(τm = 10ms, R = 0.06), name = "I")
E.v[1:5], I.N
(Float32[-54.134026, -56.962227, -63.385036, -59.933155, -55.45753], 25)

Every population has id, name, param, N and records; spiking populations have fire::Vector{Bool}, the spikes of the last step. Most neuron models have v (mV) and an external current I (pA). Any vector field can be recorded with monitor!.

Integrate-and-fire populations

IF, AdEx, Tripod and BallAndStick combine three independent objects:

  • param: the neuron model (IFParameter, AdExParameter, ...);
  • synapse: how input becomes a current, any synapse model (DoubleExpSynapse() by default);
  • spike: reset, refractory period and adaptive threshold (PostSpike).

A step integrates the synaptic variables, computes the synaptic current, then integrates the membrane, detects spikes and resets. For IF (forward Euler):

\[\tau_m \frac{dv}{dt} = -(v - E_l) + R\,(I - w) - R\, I_{syn}.\]

Population(param; kwargs...) builds the population that matches a parameter object, e.g. Population(AdExParameter(); synapse = DoubleExpSynapse(), N = 100) returns an AdEx.

Synaptic targets

Connections and spiking stimuli write into the variable named by their target symbol:

PopulationTarget symbols
IF, AdEx, Tripod, BallAndStick:ge, :glu, :he (excitatory); :gi, :gaba, :hi (inhibitory); receptor names of ReceptorSynapse
ExtendedIF:g_Exc, :g_PV, :g_SST
IZ, HH, MorrisLecar:ge, :gi
HetRec:glu, :gaba (dendrites)
Rate, WilsonCowan, Identityany symbol, mapped to g

Multicompartment models take the compartment as an extra argument (:s, :d, :d1, :d2; see Multicompartment neurons).

Choosing a model

NeedModelPage
fast point neuronIFIntegrate-and-fire neurons
spike initiation and adaptation, heterogeneous parametersAdExIntegrate-and-fire neurons
three conductances (E, PV, SST)ExtendedIFIntegrate-and-fire neurons
Izhikevich firing patternsIZIzhikevich, Hodgkin-Huxley, Morris-Lecar
conductance-based spike generationHH, MorrisLecarIzhikevich, Hodgkin-Huxley, Morris-Lecar
dendritic integration, NMDA spikesTripod, BallAndStickMulticompartment neurons
firing-rate unitsRate, WilsonCowanRate models
stochastic units with heterogeneous dendritic timescalesHetRecRate models
background or input spike trainsPoisson, VariablePoisson, InhomogeneousPoissonSpike sources
relaying spikesIdentitySpike sources

Populations are Float32 unless built with VFT = Vector{Float64} (see Running simulations). New models: Model extensions.