Models
Populations
Types
SNNModels.AbstractPopulation — TypeAbstractPopulationAn abstract type representing a population. Any struct inheriting from this type must implement:
Methods
integrate!(p::NeuronModel, param::NeuronModelParam, dt::Float32): Integrates the neuron model over a time stepdtusing the given parameters.
SNNModels.BallAndStick — TypeThis is a struct representing a spiking neural network model that include two dendrites and a soma based on the adaptive exponential integrate-and-fire model (AdEx)
Fields
t::VIT: tracker of simulation index [0]param::AdExSoma: Parameters for the AdEx model.N::Int32: The number of neurons in the network.d::VDT: Dendritic compartment parameters.v_s::VFT: Somatic membrane potential.w_s::VFT: Adaptation variables for each soma.v_d::VFT: Dendritic membrane potential for dendrite.g_s::MFT,g_d::MFT: Conductance of somatic and dendritic synapses.h_s::MFT,h_d::MFT: Synaptic gating variables.fire::VBT: Boolean array indicating which neurons have fired.after_spike::VFT: Post-spike timing.postspike::PST: Model for post-spike behavior.θ::VFT: Individual neuron firing thresholds.records::Dict: A dictionary to store simulation results.Δv::VFT,Δv_temp::VFT: Variables to hold temporary voltage changes.cs::VFT,is::VFT: Temporary variables for currents.
SNNModels.HH — TypeSNNModels.IF — Type[Integrate-And-Fire Neuron](https://neuronaldynamics.epfl.ch/online/Ch1.S3.html)SNNModels.IZ — TypeSNNModels.MorrisLecar — TypeSNNModels.Poisson — TypeSNNModels.Rate — TypeSNNModels.Tripod — TypeThis is a struct representing a spiking neural network model that include two dendrites and a soma based on the adaptive exponential integrate-and-fire model (DendNeuronParameter)
Fields
t::VIT: tracker of simulation index [0]param::AdExSoma: Parameters for the AdEx model.N::Int32: The number of neurons in the network.d1::VDT,d2::VDT: Dendrite structures.NMDA::NMDAT: Specifies the properties of NMDA (N-methyl-D-aspartate) receptors.gax1::VFT,gax2::VFT: Axial conductance (reciprocal of axial resistance) for dendrite 1 and 2 respectively.cd1::VFT,cd2::VFT: Capacitance for dendrite 1 and 2.gm1::VFT,gm2::VFT: Membrane conductance for dendrite 1 and 2.v_s::VFT: Somatic membrane potential.w_s::VFT: Adaptation variables for each soma.v_d1::VFT,v_d2::VFT: Dendritic membrane potential for dendrite 1 and 2.g_s::MFT,g_d1::MFT,g_d2::MFT: Conductance of somatic and dendritic synapses.h_s::MFT,h_d1::MFT,h_d2::MFT: Synaptic gating variables.fire::VBT: Boolean array indicating which neurons have fired.after_spike::VFT: Post-spike timing.postspike::PST: Model for post-spike behavior.θ::VFT: Individual neuron firing thresholds.records::Dict: A dictionary to store simulation results.Δv::VFT,Δv_temp::VFT: Variables to hold temporary voltage changes.cs::VFT,is::VFT: Temporary variables for currents.
Parameters
SNNModels.AbstractPopulationParameter — TypeAbstractPopulationParameter <: AbstractParameterAn abstract type representing a population parameter.
SNNModels.DendNeuronParameter — TypeDendNeuronParameter{FT, IT, DT, ST, NMDAT, PST, PT}A parameter struct for the Tripod neuron model, implementing an Adaptive Exponential Integrate-and-Fire (AdEx) model with dendritic compartments.
Fields
C::FT: Membrane capacitance (default: 281pF)gl::FT: Leak conductance (default: 40nS)R::FT: Total membrane resistance (default: nS/gl * GΩ)τm::FT: Membrane time constant (default: C/gl)Er::FT: Resting potential (default: -70.6mV)Vr::FT: Reset potential (default: -55.6mV)Vt::FT: Rheobase threshold (default: -50.4mV)ΔT::FT: Slope factor (default: 2mV)τw::FT: Adaptation current time constant (default: 144ms)a::FT: Subthreshold adaptation conductance (default: 4nS)b::FT: Spike-triggered adaptation increment (default: 80.5pA)AP_membrane::FT: After-potential membrane parameter (default: 10.0f0mV)BAP::FT: Backpropagating action potential parameter (default: 1.0f0mV)up::FT: Spike upstroke duration (default: 1ms)τabs::FT: Absolute refractory period (default: 2ms)postspike::PST: Post-spike dynamics (default: PostSpike(A=10, τA=30ms))ds::DT: Dendritic segment lengths (default: [200um, (200um, 400um)])physiology::PT: Dendritic physiology (default: human_dend)soma_syn::ST: Soma synapse type (default: TripodSomaSynapse)dend_syn::ST: Dendritic synapse type (default: TripodDendSynapse)NMDA::NMDAT: NMDA voltage dependency parameters (default: NMDAVoltageDependency(mg=MgmM, b=nmdab, k=nmda_k))
Type Parameters
FT: Floating-point type for membrane parameters (default: Float32)IT: Integer type for time-related parameters (default: Int64)DT: Type for dendritic segment lengths (default: Vector{DendLength})ST: Synapse type (default: Synapse)NMDAT: NMDA voltage dependency type (default: NMDAVoltageDependency{Float32})PST: Post-spike dynamics type (default: PostSpike{Float32})PT: Physiology type (default: Physiology)
Examples
julia> TripodParameter = DendNeuronParameter(ds = [200um, (200um, 400um)])
DendNeuronParameter{Float32, Int64, Vector{DendLength}, Synapse, NMDAVoltageDependency{Float32}, PostSpike{Float32}, Physiology}(281.0, 40.0, 25.0, 7.03125, -70.6, -55.6, -50.4, 2.0, 144.0, 4.0, 80.5, 10.0, 1.0, 1, 2, PostSpike{Float32}(10, 30.0), [200.0, (200.0, 400.0)], human_dend, TripodSomaSynapse, TripodDendSynapse, NMDAVoltageDependency{Float32}(0.001, 0.062, 3.57))
julia> BallAndStickParameter = DendNeuronParameter(ds = [(150um, 400um)])
DendNeuronParameter{Float32, Int64, Vector{DendLength}, Synapse, NMDAVoltageDependency{Float32}, PostSpike{Float32}, Physiology}(281.0, 40.0, 25.0, 7.03125, -70.6, -55.6, -50.4, 2.0, 144.0, 4.0, 80.5, 10.0, 1.0, 1, 2, PostSpike{Float32}(10, 30.0), [(150.0, 400.0)], human_dend, TripodSomaSynapse, TripodDendSynapse, NMDAVoltageDependency{Float32}(0.001, 0.062, 3.57))Synapses
SNNModels.AbstractConnection — TypeAbstractConnectionAn abstract type representing a connection. Any struct inheriting from this type must implement:
Methods
forward!(c::Synapse, param::SynapseParameter): Propagates the signal through the synapse.plasticity!(c::Synapse, param::SynapseParameter, dt::Float32, T::Time): Updates the synapse parameters based on plasticity rules.
SNNModels.AbstractNormalization — TypeAbstractNormalization <: AbstractConnectionAn abstract type representing a normalization connection.
SNNModels.AbstractSparseSynapse — TypeAbstractSparseSynapse <: AbstractConnectionAn abstract type representing a sparse synapse connection.
SNNModels.AggregateScaling — MethodSynapseNormalization(N; param, kwargs...)Constructor function for the SynapseNormalization struct.
- N: The number of synapses.
- param: Normalization parameter, can be either MultiplicativeNorm or AdditiveNorm.
- kwargs: Other optional parameters.
Returns a SynapseNormalization object with the specified parameters.
SNNModels.FLSparseSynapse — TypeSNNModels.FLSynapse — TypeSNNModels.PINningSparseSynapse — TypeSNNModels.PINningSynapse — TypeSNNModels.RateSynapse — TypeSNNModels.SpikeRateSynapse — TypeSNNModels.SpikingSynapse — TypeSpikingSynapse to connect neuronal populationsSNNModels.SynapseNormalization — TypeSynapseNormalization{VFT = Vector{Float32}, VIT = Vector{Int32}, MFT = Matrix{Float32}}A struct that holds parameters for synapse normalization, including:
- param: Normalization parameter, can be either MultiplicativeNorm or AdditiveNorm.
- t: A vector of integer values representing time points.
- W0: A vector of initial weights before simulation.
- W1: A vector of weights during the simulation.
- μ: A vector of mean synaptic weights.
- records: A dictionary for storing additional data.
SNNModels.SynapseNormalization — MethodSynapseNormalization(N; param, kwargs...)Constructor function for the SynapseNormalization struct.
- N: The number of synapses.
- param: Normalization parameter, can be either MultiplicativeNorm or AdditiveNorm.
- kwargs: Other optional parameters.
Returns a SynapseNormalization object with the specified parameters.
Plasticity
Stimuli
Types
SNNModels.AbstractStimulus — TypeAbstractStimulusAn abstract type representing a stimulus. Any struct inheriting from this type must implement:
Methods
stimulate!(p::Stimulus, param::StimulusParameter, time::Time, dt::Float32): Applies the stimulus to the population.
SNNModels.BalancedStimulus — MethodBalancedStimulus(post::T, sym::Symbol, r::Union{Function, Float32}, neurons=[]; N_pre::Int=50, p_post::R=0.05f0, μ::R=1.f0, param=BalancedParameter()) where {T <: AbstractPopulation, R <: Number}Constructs a BalancedStimulus object for a spiking neural network.
Arguments
post::T: The target population for the stimulus.sym::Symbol: The symbol representing the synaptic conductance or current.r::Union{Function, Float32}: The firing rate of the stimulus. Can be a constant value or a function of time.neurons=[]: The indices of the neuronsin the target population that receive the stimulus. If empty, neuronsare randomly selected based on the probabilityp_post.N::Int=200: The number of Balanced neurons neurons.N_pre::Int=5: The number of presynaptic connected.p_post::R=0.05f0: The probability of connection between presynaptic and postsynaptic neurons.μ::R=1.f0: The scaling factor for the synaptic weights.param=BalancedParameter(): The parameters for the Balanced distribution.
Returns
A BalancedStimulus object.
SNNModels.AbstractStimulusParameter — TypeAbstractStimulusParameter <: AbstractParameterAn abstract type representing a stimulus parameter.