AdQuaIF

AdQuaIF#

class brainpy.dyn.AdQuaIF(size, sharding=None, keep_size=False, mode=None, name=None, spk_fun=InvSquareGrad(alpha=100.0), spk_dtype=None, spk_reset='soft', detach_spk=False, method='exp_auto', init_var=True, scaling=None, V_rest=-65.0, V_reset=-68.0, V_th=-30.0, V_c=-50.0, a=1.0, b=0.1, c=0.07, tau=10.0, tau_w=10.0, V_initializer=ZeroInit, w_initializer=ZeroInit, noise=None)[source]#

Adaptive quadratic integrate-and-fire neuron model.

Model Descriptions

The adaptive quadratic integrate-and-fire neuron model [1] is given by:

\[\begin{split}\begin{aligned} \tau_m \frac{d V}{d t}&=c(V-V_{rest})(V-V_c) - w + I(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}\]

References

Examples

There is an example usage:

import brainpy as bp

neu = bp.dyn.AdQuaIF(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 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_c

-50

mV

Critical voltage for spike initiation. Must be larger than \(V_{rest}\).

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.

c

.07

Coefficient describes membrane potential update. Larger than 0.

tau

10

ms

Membrane time constant.

tau_w

10

ms

Time constant of the adaptation current.

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.

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 (Optional[Sequence[str]]) – 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.

update(x=None)[source]#

The function to specify the updating rule.