ngclearn.components.synapses package

Subpackages

Submodules

ngclearn.components.synapses.STPDenseSynapse module

class ngclearn.components.synapses.STPDenseSynapse.STPDenseSynapse(*args, **kwargs)[source]

Bases: DenseSynapse

A dynamic dense synaptic cable; this synapse evolves according to short-term plasticity (STP) dynamics.

— Synapse Compartments: —
inputs - input (takes in external signals)
outputs - output signals
weights - current value matrix of synaptic efficacies
biases - 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 use
x - fraction of resources available after neurotransmitter depletion
Dynamics note:
If tau_d >> tau_f and resources U are large, then synapse is STD-dominated
If 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

advance_state(t, dt)[source]
classmethod help()[source]
reset()[source]

ngclearn.components.synapses.alphaSynapse module

class ngclearn.components.synapses.alphaSynapse.AlphaSynapse(*args, **kwargs)[source]

Bases: DenseSynapse

A 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 variable
dg/dt = -g/tau_decay + h/tau_decay
i_syn = g * (syn_rest - v) // g is g_syn and h is h_syn in this synapse implementation
where: syn_rest is the post-synaptic reverse potential for this synapse
t_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 to
weights - current value matrix of synaptic efficacies
biases - 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)

advance_state(t, dt)[source]
classmethod help()[source]
reset()[source]

ngclearn.components.synapses.denseSynapse module

class ngclearn.components.synapses.denseSynapse.DenseSynapse(*args, **kwargs)[source]

Bases: JaxComponent

A 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 signals
weights - 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)

advance_state()[source]
classmethod help()[source]
reset()[source]

ngclearn.components.synapses.doubleExpSynapse module

class ngclearn.components.synapses.doubleExpSynapse.DoubleExpSynapse(*args, **kwargs)[source]

Bases: DenseSynapse

A 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 variable
dg/dt = -g/tau_decay + h
i_syn = g * (syn_rest - v) // g is g_syn and h is h_syn in this synapse implementation
where: syn_rest is the post-synaptic reverse potential for this synapse
t_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 to
weights - current value matrix of synaptic efficacies
biases - 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)

advance_state(t, dt)[source]
classmethod help()[source]
reset()[source]

ngclearn.components.synapses.exponentialSynapse module

class ngclearn.components.synapses.exponentialSynapse.ExponentialSynapse(*args, **kwargs)[source]

Bases: DenseSynapse

A 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 implementation
where: syn_rest is the post-synaptic reverse potential for this synapse
t_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 to
weights - current value matrix of synaptic efficacies
biases - 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)

advance_state(t, dt)[source]
classmethod help()[source]
reset()[source]

ngclearn.components.synapses.staticSynapse module

class ngclearn.components.synapses.staticSynapse.StaticSynapse(*args, **kwargs)[source]

Bases: DenseSynapse

A 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 - output
weights - 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)

Module contents