Other Operators

Other operators range from variable traces to kernels and hand-crafted transformations. An important and oft-used one, in the case of spiking neural systems, is the variable trace (or filter) – for instance, one might need to track a cumulative value based on spikes over time to trigger local updates to synaptic cable values and a compartment such as VarTrace.

Trace Operators

Variable Trace

This operator processes and tracks a particular value (dependent upon which external component’s compartment is wired into this one’s input compartment).
In general, a trace integrates a differential equation based on an external component’s compartment value, e.g., the spike s of a spiking neuronal cell, producing a real-valued cumulative representation of it across time. For instance, instead of directly tracking spike times of a particular spiking cell, a trace can be used to represent a soft, single approximation. Another way to view a variable trace is that it acts as a low-pass filter of another signal sequence.

class ngclearn.components.VarTrace(*args: Any, **kwargs: Any)[source]

A variable trace (filter) functional node.

Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • tau_tr – trace time constant (in milliseconds, or ms)

  • a_delta – value to increment a trace by in presence of a spike; note if set to a value <= 0, then a piecewise gated trace will be used instead

  • decay_type

    string indicating the decay type to be applied to ODE integration; low-pass filter configuration

    Note:

    string values that this can be (Default: “exp”) are: 1) ‘lin’ = linear trace filter, i.e., decay = x_tr + (-x_tr) * (dt/tau_tr); 2) ‘exp’ = exponential trace filter, i.e., decay = exp(-dt/tau_tr) * x_tr; 3) ‘step’ = step trace, i.e., decay = 0 (a pulse applied upon input value)

  • key – PRNG key to control determinism of any underlying random values associated with this cell

  • useVerboseDict – triggers slower, verbose dictionary mode (Default: False)

  • directory – string indicating directory on disk to save sLIF parameter values to (i.e., initial threshold values and any persistent adaptive threshold values)

advance_state(t, dt, **kwargs)[source]
verify_connections()[source]
reset(**kwargs)[source]

Kernels

Kernels are an important and useful building block for constructing what is known in computational neuroscience as spike-response models (SRMs). In ngc-learn, these generally involve the construction of nodes that apply a particular mathematical function (or set of them) to integrate over a window of collected values, generally discrete spikes or action potentials produced within a particular window of time.

Exponential Kernel

This kernel operator processes and tracks a window of values (generally spikes) to produce an excitatory postsynaptic potential (EPSP) pulse value via application of an exponential kernel.

class ngclearn.components.ExpKernel(*args: Any, **kwargs: Any)[source]

A spiking function based on an exponential kernel applied to a moving window of spike times.

Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • nu – (ms, spike time interval for window)

  • tau_w – spike window time constant (in micro-secs, or nano-s)

  • key – PRNG key to control determinism of any underlying random values associated with this cell

  • useVerboseDict – triggers slower, verbose dictionary mode (Default: False)

  • directory – string indicating directory on disk to save sLIF parameter values to (i.e., initial threshold values and any persistent adaptive threshold values)

advance_state(t, dt, **kwargs)[source]
verify_connections()[source]
reset(**kwargs)[source]