ngclearn.components.synapses package
Subpackages
- ngclearn.components.synapses.convolution package
- Submodules
- ngclearn.components.synapses.convolution.convSynapse module
- ngclearn.components.synapses.convolution.deconvSynapse module
- ngclearn.components.synapses.convolution.hebbianConvSynapse module
- ngclearn.components.synapses.convolution.hebbianDeconvSynapse module
- ngclearn.components.synapses.convolution.ngcconv module
- ngclearn.components.synapses.convolution.staticConvSynapse module
- ngclearn.components.synapses.convolution.staticDeconvSynapse module
- ngclearn.components.synapses.convolution.traceSTDPConvSynapse module
- ngclearn.components.synapses.convolution.traceSTDPDeconvSynapse module
- Module contents
- ngclearn.components.synapses.hebbian package
- Submodules
- ngclearn.components.synapses.hebbian.BCMSynapse module
- ngclearn.components.synapses.hebbian.eventSTDPSynapse module
- ngclearn.components.synapses.hebbian.expSTDPSynapse module
- ngclearn.components.synapses.hebbian.hebbianSynapse module
- ngclearn.components.synapses.hebbian.traceSTDPSynapse module
- Module contents
- ngclearn.components.synapses.modulated package
- ngclearn.components.synapses.patched package
Submodules
ngclearn.components.synapses.STPDenseSynapse module
- class ngclearn.components.synapses.STPDenseSynapse.STPDenseSynapse(*args, **kwargs)[source]
Bases:
DenseSynapseA dynamic dense synaptic cable; this synapse evolves according to short-term plasticity (STP) dynamics.
— Synapse Compartments: —inputs - input (takes in external signals)outputs - output signalsweights - current value matrix of synaptic efficaciesbiases - current value vector of synaptic bias values— Short-Term Plasticity Compartments: —resources - fixed value matrix of synaptic resources (U)u - release probability; fraction of resources ready for usex - fraction of resources available after neurotransmitter depletionDynamics note:If tau_d >> tau_f and resources U are large, then synapse is STD-dominatedIf tau_d << tau_f and resources U are small, then synases is STF-dominated- Parameters:
name – the string name of this cell
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
bias_init – a kernel to drive initialization of biases for this synaptic cable (Default: None, which turns off/disables biases)
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * Rscale) * in)
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)
tau_f – short-term facilitation (STF) time constant (default: 750 ms); note that setting this to 0 ms will disable STF
tau_d – shoft-term depression time constant (default: 50 ms); note that setting this to 0 ms will disable STD
resources_int – initialization kernel for synaptic resources matrix
ngclearn.components.synapses.alphaSynapse module
- class ngclearn.components.synapses.alphaSynapse.AlphaSynapse(*args, **kwargs)[source]
Bases:
DenseSynapseA dynamic alpha synaptic cable; this synapse evolves according to alpha synaptic conductance dynamics. Specifically, the conductance dynamics are as follows:
dh/dt = -h/tau_decay + gBar sum_k (t - t_k) // h is an intermediate variabledg/dt = -g/tau_decay + h/tau_decayi_syn = g * (syn_rest - v) // g is g_syn and h is h_syn in this synapse implementationwhere: syn_rest is the post-synaptic reverse potential for this synapset_k marks time of -pre-synaptic k-th pulse received by post-synaptic unit— Synapse Compartments: —inputs - input (takes in external signals, e.g., pre-synaptic pulses/spikes)outputs - output signals (also equal to i_syn, total electrical current)v - coupled voltages from post-synaptic neurons this synaptic cable connects toweights - current value matrix of synaptic efficaciesbiases - current value vector of synaptic bias values— Dynamic / Short-term Plasticity Compartments: —g_syn - fixed value matrix of synaptic resources (U)i_syn - derived total electrical current variable- Parameters:
name – the string name of this synapse
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
tau_decay – synaptic decay time constant (ms)
g_syn_bar – maximum conductance elicited by each incoming spike (“synaptic weight”)
syn_rest – synaptic reversal potential; note, if this is set to None, then this synaptic conductance model will no longer be voltage-dependent (and will ignore the voltage compartment provided by an external spiking cell)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
bias_init – a kernel to drive initialization of biases for this synaptic cable (Default: None, which turns off/disables biases) <unused>
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * Rscale) * in)
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)
is_nonplastic – boolean indicating if this synapse permits plasticity adjustments (Default: True)
ngclearn.components.synapses.denseSynapse module
- class ngclearn.components.synapses.denseSynapse.DenseSynapse(*args, **kwargs)[source]
Bases:
JaxComponentA dense synaptic cable; no form of synaptic evolution/adaptation is in-built to this component.
— Synapse Compartments: —inputs - input (takes in external signals)outputs - output signalsweights - current value matrix of synaptic efficacies (strength values)biases - current value vector of synaptic bias values- Parameters:
name – the string name of this cell
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
bias_init – a kernel to drive initialization of biases for this synaptic cable (Default: None, which turns off/disables biases)
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * in) * resist_scale) + bias
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)
ngclearn.components.synapses.doubleExpSynapse module
- class ngclearn.components.synapses.doubleExpSynapse.DoubleExpSynapse(*args, **kwargs)[source]
Bases:
DenseSynapseA dynamic double-exponential synaptic cable; this synapse evolves according to difference of two exponentials synaptic conductance dynamics. Specifically, the conductance dynamics are as follows:
dh/dt = -h/tau_rise + gBar sum_k (t - t_k) * (1/tau_rise - 1/tau_decay) // h is an intermediate variabledg/dt = -g/tau_decay + hi_syn = g * (syn_rest - v) // g is g_syn and h is h_syn in this synapse implementationwhere: syn_rest is the post-synaptic reverse potential for this synapset_k marks time of -pre-synaptic k-th pulse received by post-synaptic unit— Synapse Compartments: —inputs - input (takes in external signals, e.g., pre-synaptic pulses/spikes)outputs - output signals (also equal to i_syn, total electrical current)v - coupled voltages from post-synaptic neurons this synaptic cable connects toweights - current value matrix of synaptic efficaciesbiases - current value vector of synaptic bias values— Dynamic / Short-term Plasticity Compartments: —g_syn - fixed value matrix of synaptic resources (U)i_syn - derived total electrical current variable- Parameters:
name – the string name of this synapse
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
tau_decay – synaptic decay time constant (ms)
tau_rise – synaptic increase/rise time constant (ms)
g_syn_bar – maximum conductance elicited by each incoming spike (“synaptic weight”)
syn_rest – synaptic reversal potential; note, if this is set to None, then this synaptic conductance model will no longer be voltage-dependent (and will ignore the voltage compartment provided by an external spiking cell)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
bias_init – a kernel to drive initialization of biases for this synaptic cable (Default: None, which turns off/disables biases) <unused>
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * Rscale) * in)
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)
is_nonplastic – boolean indicating if this synapse permits plasticity adjustments (Default: True)
ngclearn.components.synapses.exponentialSynapse module
- class ngclearn.components.synapses.exponentialSynapse.ExponentialSynapse(*args, **kwargs)[source]
Bases:
DenseSynapseA dynamic exponential synaptic cable; this synapse evolves according to exponential synaptic conductance dynamics. Specifically, the conductance dynamics are as follows:
dg/dt = -g/tau_decay + gBar sum_k (t - t_k)i_syn = g * (syn_rest - v) // g is g_syn in this synapse implementationwhere: syn_rest is the post-synaptic reverse potential for this synapset_k marks time of -pre-synaptic k-th pulse received by post-synaptic unit— Synapse Compartments: —inputs - input (takes in external signals, e.g., pre-synaptic pulses/spikes)outputs - output signals (also equal to i_syn, total electrical current)v - coupled voltages from post-synaptic neurons this synaptic cable connects toweights - current value matrix of synaptic efficaciesbiases - current value vector of synaptic bias values— Dynamic / Short-term Plasticity Compartments: —g_syn - fixed value matrix of synaptic resources (U)i_syn - derived total electrical current variable- Parameters:
name – the string name of this synapse
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
tau_decay – synaptic decay time constant (ms)
g_syn_bar – maximum conductance elicited by each incoming spike (“synaptic weight”)
syn_rest – synaptic reversal potential; note, if this is set to None, then this synaptic conductance model will no longer be voltage-dependent (and will ignore the voltage compartment provided by an external spiking cell)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
bias_init – a kernel to drive initialization of biases for this synaptic cable (Default: None, which turns off/disables biases) <unused>
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * Rscale) * in)
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)
is_nonplastic – boolean indicating if this synapse permits plasticity adjustments (Default: True)
ngclearn.components.synapses.staticSynapse module
- class ngclearn.components.synapses.staticSynapse.StaticSynapse(*args, **kwargs)[source]
Bases:
DenseSynapseA static dense synaptic cable; no form of synaptic evolution/adaptation is in-built to this component.
— Synapse Compartments: —inputs - input (takes in external signals)outputs - outputweights - current value matrix of synaptic efficacies- Parameters:
name – the string name of this cell
shape – tuple specifying shape of this synaptic cable (usually a 2-tuple with number of inputs by number of outputs)
weight_init – a kernel to drive initialization of this synaptic cable’s values; typically a tuple with 1st element as a string calling the name of initialization to use
resist_scale – a fixed (resistance) scaling factor to apply to synaptic transform (Default: 1.), i.e., yields: out = ((W * Rscale) * in)
p_conn – probability of a connection existing (default: 1.); setting this to < 1 and > 0. will result in a sparser synaptic structure (lower values yield sparse structure)