AELIF#

Introduction#

The Adaptive Exponential Leaky Integrate-and-Fire (AELIF) model is an extension of the basic LIF model, incorporating additional features to represent the complex behavior of biological neurons better. The adaptive component allows the model to adjust the firing threshold in response to changes in input statistics, making it more biologically plausible and suitable for modeling neural systems that exhibit adaptive behavior. The AELIF model has been used to study a wide range of phenomena in neuroscience, including sensory processing, learning and memory, and the mechanisms underlying neurological disorders. Its flexibility and ability to capture the dynamics of biological neurons make it a valuable tool for understanding the intricate workings of the brain.


How does it work?#

The AELIF neuron is a modified version of the ELIF model that includes spike frequency adaptation (SFA). This adaptation mechanism allows the neuron to adjust its firing rate in response to changes in input. The membrane equation for the AELIF model 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}) - R\sum_{k} w_k + RI(t) \ \end{align*} $$

where the exponential term with time constant $\Delta_T$ is responsible for the adaptation of the neuron, $\theta_{rh}$ is the rheobase threshold, and $\Delta_T$ is the slope factor. The AELIF model also includes a set of adaptation currents $w_k$, which are controlled by the following 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 of the $k^{th}$ adaptation current, $a_k$ and $b_k$ control the amplitude and decay rate of the adaptation current, respectively, the adaptation current is incremented by $b_k$ every time an action potential is fired at time $t^{(f)}$.


Strengths:#

  • AELIF model provides a more realistic representation of biological neurons that can adapt their firing rates in response to changing input patterns, making it suitable for modeling neural plasticity and learning.
  • AELIF model has a low computational cost and can simulate large-scale neural networks efficiently.
  • Weaknesses:#

  • AELIF model is a simplification of biological neurons and, therefore, may only capture some of the complexities of neural dynamics.
  • AELIF model requires the tuning of several parameters to match experimental data, which can be time-consuming and difficult.
  • Usage#

    AELIF Population model can be used by the given code:

    from synapticflow.network import neural_populations
    model = neural_populations.AELIFPopulation(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:

    Voltage Plot Raster Plot


    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.

    a0 (Union[float, torch.Tensor], optional) - Parameter used in calculating adaptation current.

    b (Union[float, torch.Tensor], optional) - Parameter used in calculating adaptation current.

    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.

    Reference#

  • Gerstner, Wulfram, et al. Neuronal dynamics: From single neurons to networks and models of cognition. Cambridge University Press, 2014.