AQLIF#
Introduction#
The Adaptive Quadratic Leaky Integrate and Fire neuron model is a simplified spiking neuron model. It is a two-variable model that captures the basic dynamics of cortical neurons, while being computationally efficient. The model has gained significant attention in computational neuroscience due to its ability to accurately replicate the spiking patterns of various types of neurons in the brain. In this model, the spiking behavior of a neuron is determined by the interplay of two variables, the membrane potential and a recovery variable, which represents the activity of the potassium ion channels.
How does it work?#
The Adaptive Quadratic Leaky Integrate and Fire neuron model is a simplified spiking neuron model that aims to capture the essential features of biological neurons while still being computationally efficient. The model consists of two coupled differential equations that describe the membrane potential and the recovery variable of the neuron. The membrane potential is given by the equation:
$$ \begin{align*} \ \tau_m\frac{du}{dt}\ = (u(t) - u_{rest}) (u(t) - u_{critical}) - R\sum_{k} w_k + RI(t) \end{align*} $$
where $\tau_m$ is the membrane time constant, $u$ is the membrane potential, $u_{rest}$ is the resting potential, $u_{critical}$ is a threshold potential, $R$ is the membrane resistance, $w_k$ is the synaptic weight of the $k^{th}$ input synapse, $I(t)$ is the external current, and $t$ is time.
The recovery variable $w_k$ follows the equation:
$$ \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 $\tau_k$ is the time constant for the $k^{th}$ input synapse, $a_k$ and $b_k$ are parameters that determine the dynamics of the recovery variable, and $\sum_{t {(f)}} \delta (t - t^{(f)})$ is a sum over the spikes arriving at the synapse.
The Adaptive Quadratic Leaky Integrate and Fire model has been shown to be capable of reproducing a wide variety of spiking behaviors observed in real neurons, including regular spiking, bursting, and fast spiking, among others. However, the model is still a simplification of the complex dynamics of real neurons, and certain aspects of neural computation may not be captured by the model. Additionally, the model requires careful parameter tuning to reproduce specific spiking behaviors, which can be a time-consuming process.
Strengths:#
Weaknesses:#
Usage#
Adaptive Quadratic Leaky Integrate and Fire Population model can be used by the given code:
from synapticflow.network import neural_populations
model = neural_populations.AQLIFPopulation(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
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.
critical_pot (Union[float, torch.Tensor], optional) - A float or tensor representing the critical potential value for quadratic parameter.
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.