engine.neuron.spiking.LIF

Leaky Integrate-and-Fire neuron model (LIF).

class engine.neuron.spiking.LIF.LIFNeuron(volt_thresh=-55.0, volt_rest=-75.0, leak_gl=5.0, tau_mem=5.0, tau_ref=1.0, **kwargs)

Base class for the leaky integrate-and-fire neuron model (LIF).

Extends SpikingNeuron by adding necessary parameters and implementing the LIF forward() method efficiently for 1D tensors of arbitrary size. User may implement subclasses to differentiate variants along additional dimensions.

LIF units own the following attributes in addition to those inherited from SpikingNeuron:

Parameters:
  • volt_thresh (float or Tensor) – Spike threshold (defaults to -55.0).

  • volt_rest (float or Tensor) – Resting potential (defaults to -75.0).

  • leak_gl (float or Tensor) – Leak conductance (defaults to 5.0).

  • tau_mem (float or Tensor) – Membrane time constant (e.g., 5.0).

  • tau_ref (float or Tensor) – Refractory period (e.g., 1.0).

  • cycle_length (int, optional) – Oscillatory cycle period, required to time optional resetting of the refractory period.

  • release_phase (int, optional) – Oscillation phase at which to release all neurons from refractory mode, if required.

References

LIF Tutorial

forward() implements the algorithm described in this tutorial.

_config_props_: tuple[str] = ('volt_thresh', 'volt_rest', 'leak_gl', 'tau_mem', 'tau_ref')

A list of configurable property names of the class that is set/read by the configuration API.

Each sub/super-class can define this and the properties are accumulated across all the sub/super-classes.

forward(data: Tensor) dict

LIF forward method, to be used by ensemble or singleton 1D tensors.

Parameters:

data (Tensor) – External input to be processed by this LIF unit.

Returns:

Dictionary containing the numeric state tensors voltage, spiked, and input.

Return type:

dict