ANNarchy 4.8.2
  • ANNarchy
  • Installation
  • Tutorial
  • Manual
  • Notebooks
  • Reference

Adaptive Exponential IF neuron

  • List of notebooks
  • Rate-coded networks
    • Echo-state networks
    • Neural field
    • Bar Learning
    • Miconi network
    • Structural plasticity
  • Spiking networks
    • AdEx
    • PyNN/Brian
    • Izhikevich
    • Synaptic transmission
    • Gap junctions
    • Hodgkin-Huxley
    • COBA/CUBA
    • STP
    • STDP I
    • STDP II
    • Homeostatic STDP - Ramp
    • Homeostatic STDP - SORF
  • Advanced features
    • Hybrid networks
    • Parallel run
    • Bayesian optimization
  • Extensions
    • Image
    • Tensorboard
    • BOLD monitor I
    • BOLD monitor II
    • ANN to SNN I
    • ANN to SNN II

Adaptive Exponential IF neuron

Download JupyterNotebook Download JupyterNotebook

#!pip install ANNarchy

This notebook explores how the AdEx neuron model can reproduce various spiking patterns observed in vivo.

Code based on:

Naud, R., Marcille, N., Clopath, C., and Gerstner, W. (2008). Firing patterns in the adaptive exponential integrate-and-fire model. Biol Cybern 99, 335. doi:10.1007/s00422-008-0264-7.

import ANNarchy as ann
ann.clear()
ann.setup(dt=0.1)
ANNarchy 4.8 (4.8.2) on darwin (posix).

The AdEx neuron is defined by the following equations:

C \, \frac{dv}{dt} = -g_L \ (v - E_L) + g_L \, \Delta_T \, \exp(\frac{v - v_T}{\Delta_T}) + I - w

\tau_w \, \frac{dw}{dt} = a \, (v - E_L) - w

if v > v_\text{spike}:

  • v = v_R
  • w = w + b
AdEx = ann.Neuron(
    parameters="""
        C = 200.
        gL = 10. # not g_L! g_ is reserved for spike transmission
        E_L = -70.
        v_T = -50.
        delta_T = 2.0
        a = 2.0
        tau_w = 30.
        b = 0.
        v_r = -58.
        I = 500.
        v_spike = 0.0 
    """,
    equations="""
        C * dv/dt = - gL * (v - E_L) +  gL * delta_T * exp((v-v_T)/delta_T) + I - w : init=-70.0     
        tau_w * dw/dt = a * (v - E_L) - w  : init=0.0
    """,
    spike="""
        v >= v_spike
    """,
    reset="""
        v = v_r
        w += b
    """,
    refractory = 2.0
)

We create a population of 8 AdEx neurons which will get different parameter values.

pop = ann.Population(8, AdEx)
ann.compile()
Compiling ...  OK 

We add a monitor to track the membrane potential and the spike timings during the simulation.

m = ann.Monitor(pop, ['v', 'spike'])

As in the paper, we provide different parameters to each neuron and simulate the network for 500 ms with a fixed input current, and remove that current for an additional 50 ms.

# a) tonic spiking b) adaptation, c) initial burst, d) regular bursting, e) delayed accelerating, f) delayed regular bursting, g) transcient spiking, h) irregular spiking
pop.C =       [200, 200, 130, 200, 200, 200, 100, 100]
pop.gL =      [ 10,  12,  18,  10,  12,  12,  10,  12]
pop.E_L =     [-70, -70, -58, -58, -70, -70, -65, -60]
pop.v_T =     [-50, -50, -50, -50, -50, -50, -50, -50]
pop.delta_T = [  2,   2,   2,   2,   2,   2,   2,   2]
pop.a =       [  2,   2,   4,   2,-10., -6.,-10.,-11.]
pop.tau_w =   [ 30, 300, 150, 120, 300, 300,  90, 130]
pop.b =       [  0,  60, 120, 100,   0,   0,  30,  30]
pop.v_r =     [-58, -58, -50, -46, -58, -58, -47, -48]
pop.I =       [500, 500, 400, 210, 300, 110, 350, 160]

# Reset neuron
pop.v = pop.E_L
pop.w = 0.0

# Simulate
ann.simulate(500.)
pop.I = 0.0
ann.simulate(50.)

# Recordings
data = m.get('v')
spikes = m.get('spike')
for n, t in spikes.items(): # Normalize the spikes
    data[[x - m.times()['v']['start'][0] for x in t], n] = 0.0

We can now visualize the simulations:

import matplotlib.pyplot as plt

titles = [
    "a) tonic spiking", 
    "b) adaptation", 
    "c) initial burst", 
    "d) regular bursting", 
    "e) delayed accelerating", 
    "f) delayed regular bursting", 
    "g) transcient spiking", 
    "h) irregular spiking"
]

plt.figure(figsize=(12, 15))
plt.ylim((-70., 0.))
for i in range(8):
    plt.subplot(4, 2, i+1)
    plt.title(titles[i])
    plt.plot(data[:, i], lw=3)
    

plt.tight_layout()
plt.show()

Structural plasticity
PyNN/Brian
 

Copyright Julien Vitay, Helge Ülo Dinkelbach, Fred Hamker