ALIF#
Introduction#
The Adaptive Leaky Integrate-and-Fire (ALIF) model provides a more precise representation of real neurons, which often display intricate temporal dynamics that simpler models like LIF or nonlinear LIF cannot capture. The ALIF model’s adaptive mechanism allows it to replicate crucial neural behavior, including spike-frequency adaptation (SFA), making it a valuable tool for examining individual neurons and neural networks’ dynamics. The ALIF model has proven successful in numerous theoretical and experimental neuroscience investigations. Moreover, the Allen Institute’s experimental data reveals that a considerable proportion of excitatory neurons in the neocortex, ranging from 20% in the mouse visual cortex to 40% in the human frontal lobe, display SFA.
How does it work?#
The Adaptive Integrate-and-Fire (ALIF) neuron model is a biologically accurate spiking neuron model that expands on the LIF model by incorporating spike frequency adaptation. The ALIF model is described by the following equations:
$$ \begin{align*} \ \tau_m\frac{du}{dt}\ = -[u(t) - u_{rest}] - R\sum_{k} w_k + RI(t) \ \end{align*} $$
$$ \begin{align*} \tau_k\frac{dw_k}{dt}\ = a_k (u - u_{rest}) - w_k + b_k\tau_k \sum_{t^{(f)}} \delta (t - t^{(f)}) \ \ \end{align*} $$
where $u$ is the membrane potential, $u_{rest}$ is the resting potential, $\tau_m$ is the membrane time constant, $R$ is the membrane resistance, $w_k$ are the synaptic conductances, $a_k$ and $b_k$ are parameters that control the adaptation current, and $I(t)$ is the input current. When the membrane potential reaches a threshold value, the neuron emits a spike, and the membrane potential is reset to the resting potential. The ALIF model is computationally efficient and has been used in large-scale simulations of spiking neural networks.
Strengths:#
Weaknesses:#
Usage#
ALIF Population model can be used by the given code:
from synapticflow.network import neural_populations
model = neural_populations.ALIFPopulation(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 is 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
tau_w (Union[float, torch.Tensor], optional) - Adaptation time constant.
tau_v (Union[float, torch.Tensor], optional) - Membrane potential time constant.
a0 (Union[float, torch.Tensor], optional) - Parameter used in calculating adaptation current.
b (Union[float, torch.Tensor], optional) - Parameter used in calculating adaptation current.
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.