ELIF#
Introduction#
The Exponential Leaky Integrated-and-Fire (ELIF) neuron model expands on the LIF neuron model by incorporating an exponential function, resulting in more intricate dynamics and a broader array of behaviors. This model is utilized to examine neuron behavior in the brain and has been proven to precisely replicate various facets of actual neuron behavior.
How does it work?#
The ELIF neuron model is a variation of the LIF model that incorporates a subthreshold depolarizing current. ELIF neurons share similarities with LIF neurons in terms of having both a resting potential and a threshold potential, but their membrane potential dynamics differ slightly. Specifically, the membrane potential of an ELIF neuron can be expressed as:
$$ \begin{align*} \ &\tau_m\frac{du}{dt}\ = -[u(t) - u_{rest}] + \Delta_T exp(\frac{u(t) - \theta_{rh}}{\Delta_T}) + RI(t) &\text{if }\quad u(t) \leq u_{th}\ \end{align*} $$
$$ \begin{align*} &u(t) = u_{rest} &\text{otherwise}\ \ \end{align*} $$
If the membrane potential $u$ exceeds the threshold potential $u_{th}$, then the neuron fires a spike, and the membrane potential is reset to the resting potential $u_{rest}$. If $u(t) \leq u_{th}$, the neuron remains in a subthreshold regime, and the dynamics are governed by a subthreshold depolarizing current term $\Delta_T exp(\frac{u(t) - \theta_{rh}}{\Delta_T})$.
The ELIF model provides increased flexibility to the LIF model by enabling the generation of subthreshold depolarizations in response to input. It is also relatively easy to implement and is computationally efficient. However, like the LIF model, the ELIF model has limitations in its ability to accurately represent the intricate dynamics of biological neurons. Specifically, the model does not account for the impact of active membrane properties, such as ion channels, and the subthreshold dynamics are based solely on an exponential function.
Strengths:#
Weaknesses:#
Usage#
ELIF Population model can be used by the given code:
from synapticflow.network import neural_populations
model = neural_populations.ELIFPopulation(n=10)
Then you can stimulate each time step by calling the forward function:
model.forward(torch.tensor([10 for _ in range(model.n)]))
All available attributes like spike trace and membrane potential are available by model instance:
print(model.s) # Model spike trace
print(model.v) # Model membrane potential
And in the same way, you can use the visualization file to draw plots of the obtained answer:
Parameters:#
n (int, optional) - Number of neurons in this layer.
shape (Iterable[int], optional) - Shape of the input tensor to the layer.
spike_trace (bool, optional) - Indicates whether to use synaptic traces or not.
additive_spike_trace (bool, optional) - If true, uses additive spike traces instead of multiplicative ones.
tau_s (float or torch.Tensor, optional) - Decay time constant for spike trace. Default : 10
theta_rh (Union[float, torch.Tensor], optional) - A float or tensor representing the resting potential value for neuron model.
delta_T (Union[float, torch.Tensor], optional) - A float or tensor representing sharpness of the neuron’s voltage threshold.
threshold (float or torch.Tensor, optional) - The spike threshold of the neuron.
rest_pot (float or torch.Tensor, optional) - The resting potential of the neuron.
reset_pot (float or torch.Tensor, optional) - The reset potential of the neuron.
refrac_length (float or torch.Tensor, optional) - The refractory period length of the neuron in timesteps.
dt (float, optional) - The time step length.
lower_bound (float, optional) - Minimum value for the membrane potential of the neuron.
sum_input (bool, optional) - If true, sums input instead of averaging it.
trace_scale (float, optional) - Scaling factor for the synaptic traces.
is_inhibitory (bool, optional) - Indicates whether the neuron is inhibitory or not.
R (Union[float, torch.Tensor], optional) - The time constant of the neuron voltage decay.
learning (bool, optional) - Indicates whether the neuron should update its weights during training.