norse.torch.functional.lif

norse.torch.functional.lif

A very popular neuron model that combines a norse.torch.functional.leaky_integrator with spike thresholds to produce events (spikes).

The model describes the change in a neuron membrane voltage (\(v\)) and inflow current (\(i\)). See the leaky_integrator module for more information.

\[\begin{split}\begin{align*} \dot{v} &= 1/\tau_{\text{mem}} (v_{\text{leak}} - v + i) \\ \dot{i} &= 1/\tau_{\text{syn}} i \end{align*}\end{split}\]

The F in LIF stands for the thresholded “firing” events that occur if the neuron voltage increases over a certain point or threshold (\(v_{\text{th}}\)).

\[z = \Theta(v - v_{\text{th}})\]

In regular artificial neural networks, this is referred to as the activation function. The behaviour can be controlled by setting the method field in the neuron parameters, but will default to the superspike synthetic gradient approach that uses the heaviside step function:

\[\begin{split}H[n]=\begin{cases} 0, & n <= 0 \\ 1, & n \gt 0 \end{cases}\end{split}\]

Functions

lif_current_encoder(input_current, voltage)

Computes a single euler-integration step of a leaky integrator.

lif_feed_forward_integral(input_tensor, state)

Computes multiple euler-integration steps of a LIF neuron-model.

lif_feed_forward_step(input_tensor, state[, ...])

Computes a single euler-integration step for a lif neuron-model.

lif_feed_forward_step_sparse(input_tensor, ...)

lif_step(input_tensor, state, input_weights, ...)

Computes a single euler-integration step of a LIF neuron-model.

lif_step_integral(input_tensor, state, ...)

Computes multiple euler-integration steps of a LIF neuron-model.

lif_step_sparse(input_tensor, state, ...[, ...])

Classes

LIFFeedForwardState(v, i)

State of a feed forward LIF neuron

LIFParameters([tau_syn_inv, tau_mem_inv, ...])

Parametrization of a LIF neuron

LIFParametersJIT(tau_syn_inv, tau_mem_inv, ...)

Parametrization of a LIF neuron

LIFState(z, v, i)

State of a LIF neuron