Izhikevich() Neurons saturation

Hello,

I’m working on creating a simple neural network which I would like to respond to an input being either on (1.0) or off (0.0) using Izhikevich() neurons. However when given an input that switches from 0 to 1 to 0 it seems to saturate and can’t stop spiking. What is causing this and how can I prevent it?

The code below shows the mentioned behaviour:

import nengo
import matplotlib.pyplot as plt

from nengo.dists import Choice
from nengo.processes import Piecewise

model = nengo.Network()
with model:
    neuronArgs = {"n_neurons": 1,
                  "dimensions": 1,
                  "encoders": Choice([[1]]),
                  "intercepts": [0],
                  "neuron_type": nengo.Izhikevich()
                  }

    stim = nengo.Node(Piecewise({0: 0, 0.25: 1.0, 0.75: 0.0}))

    ens = nengo.Ensemble(**neuronArgs)

    nengo.Connection(stim, ens)

    # Probes
    inputProbe = nengo.Probe(stim)
    ensProbe = nengo.Probe(ens)

# Simulation
with nengo.Simulator(model) as sim:
    # Run for 1 second
    sim.run(1)

# Plotting
plt.figure(1)
plt.plot(sim.trange(), sim.data[inputProbe], label="stim")
plt.figure(2)
plt.plot(sim.trange(), sim.data[ensProbe], label="ens")
plt.show()

I’ve created the neuronArgs dict as they are as I want the neurons to respond with a positive output to values in the range of [0, 1] (in reality only the values 0 and 1). All negative values should not be responded to.

Output:
Figure_1
Figure_2

Hi @Flowhill,

The Izhikevich neuron has some really weird dynamics, depending on the initialization parameters used. This Nengo example briefly demonstrates some of the weirdnesses you can get by playing around with the neuron parameters.

I’m not super familiar with the inner workings of the Izhikevich neuron, but for your question:

It looks like setting a non-default value for the reset_recovery parameter does enable it to behave somewhat like what you would expect. When I set reset_recovery=2, I get the plot below:

1 Like