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 with 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, **kwargs)[source]

A variable trace (filter) functional node.

— Cell Input Compartments: —
inputs - input (takes in external signals)
— Cell State Compartments: —
trace - traced value signal
— Cell Output Compartments: —
outputs - output signal (same as “trace” compartment)
trace - traced value signal (can be treated as output compartment)
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

  • P_scale – if a_delta=0, then this scales the value that the trace snaps to upon receiving a pulse value

  • gamma_tr – an extra multiplier in front of the leak of the trace (Default: 1)

  • 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)

  • n_nearest_spikes – (k) if k > 0, this makes the trace act like a nearest-neighbor trace, i.e., k = 1 yields the 1-nearest (neighbor) trace (Default: 0)

  • batch_size – batch size dimension of this cell (Default: 1)

advance_state(dt)[source]
reset()[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, **kwargs)[source]

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

— Cell Input Compartments: —
inputs - input (takes in external signals)
— Cell State Compartments: —
tf - maintained local window of pulse signals
— Cell Output Compartments: —
epsp - excitatory postsynaptic potential/pulse
Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • dt – integration time constant (the kernel needs access to this value)

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

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

  • batch_size – batch size dimension of this cell (Default: 1)

advance_state(t)[source]
reset()[source]