AdExIFRefLTC

AdExIFRefLTC#

class brainpy.dyn.AdExIFRefLTC(size, sharding=None, keep_size=False, mode=None, spk_fun=InvSquareGrad(alpha=100.0), spk_dtype=None, spk_reset='soft', detach_spk=False, method='exp_auto', name=None, init_var=True, scaling=None, V_rest=-65.0, V_reset=-68.0, V_th=-55.0, V_T=-59.9, delta_T=3.48, a=1.0, b=1.0, tau=10.0, tau_w=30.0, R=1.0, V_initializer=ZeroInit, w_initializer=ZeroInit, tau_ref=0.0, ref_var=False, noise=None)[source]#

Adaptive exponential integrate-and-fire neuron model with liquid time-constant.

Model Descriptions

The adaptive exponential integrate-and-fire model, also called AdEx, is a spiking neuron model with two variables [1] [2].

\[\begin{split}\begin{aligned} \tau_m\frac{d V}{d t} &= - (V-V_{rest}) + \Delta_T e^{\frac{V-V_T}{\Delta_T}} - Rw + RI(t), \\ \tau_w \frac{d w}{d t} &=a(V-V_{rest}) - w \end{aligned}\end{split}\]

once the membrane potential reaches the spike threshold,

\[\begin{split}V \rightarrow V_{reset}, \\ w \rightarrow w+b.\end{split}\]

The first equation describes the dynamics of the membrane potential and includes an activation term with an exponential voltage dependence. Voltage is coupled to a second equation which describes adaptation. Both variables are reset if an action potential has been triggered. The combination of adaptation and exponential voltage dependence gives rise to the name Adaptive Exponential Integrate-and-Fire model.

The adaptive exponential integrate-and-fire model is capable of describing known neuronal firing patterns, e.g., adapting, bursting, delayed spike initiation, initial bursting, fast spiking, and regular spiking.

References

Examples

An example usage:

import brainpy as bp

neu = bp.dyn.AdExIFRefLTC(2)

# section input with wiener process
inp1 = bp.inputs.wiener_process(500., n=1, t_start=100., t_end=400.).flatten()
inputs = bp.inputs.section_input([0., 22., 0.], [100., 300., 100.]) + inp1

runner = bp.DSRunner(neu, monitors=['V'])
runner.run(inputs=inputs)

bp.visualize.line_plot(runner.mon['ts'], runner.mon['V'], plot_ids=(0, 1), show=True)

Model Examples

Model Parameters

Parameter

Init Value

Unit

Explanation

V_rest

-65

mV

Resting potential.

V_reset

-68

mV

Reset potential after spike.

V_th

-30

mV

Threshold potential of spike and reset.

V_T

-59.9

mV

Threshold potential of generating action potential.

delta_T

3.48

Spike slope factor.

a

1

The sensitivity of the recovery variable \(u\) to the sub-threshold fluctuations of the membrane potential \(v\)

b

1

The increment of \(w\) produced by a spike.

R

1

Membrane resistance.

tau

10

ms

Membrane time constant. Compute by R * C.

tau_w

30

ms

Time constant of the adaptation current.

tau_ref

ms

Refractory time.

Model Variables

Variables name

Initial Value

Explanation

V

0

Membrane potential.

w

0

Adaptation current.

input

0

External and synaptic input current.

spike

False

Flag to mark whether the neuron is spiking.

refractory

False

Flag to mark whether the neuron is in refractory period.

t_last_spike

-1e7

Last spike time stamp.

Parameters:
  • size (TypeVar(Shape, int, Tuple[int, ...])) – int, or sequence of int. The neuronal population size.

  • sharding (Union[Sequence[str], Device, Sharding, None]) – The sharding strategy.

  • keep_size (bool) – bool. Keep the neuron group size.

  • mode (Optional[Mode]) – Mode. The computing mode.

  • name (Optional[str]) – str. The group name.

  • spk_fun (Callable) – callable. The spike activation function.

  • detach_spk (bool) – bool.

  • method (str) – str. The numerical integration method.

  • spk_type – The spike data type.

  • spk_reset (str) – The way to reset the membrane potential when the neuron generates spikes. This parameter only works when the computing mode is TrainingMode. It can be soft and hard. Default is soft.

  • tau_ref (Union[float, TypeVar(ArrayType, Array, Variable, TrainVar, Array, ndarray), Callable]) – float, ArrayType, callable. Refractory period length (ms).

  • has_ref_var – bool. Whether has the refractory variable. Default is False.

update(x=None)[source]#

The function to specify the updating rule.