Understanding LIF Implementation (missing parameter?)

I’m trying to understand some implementation details about how LIF neurons are implemented in Nengo. So if we can describe the dynamics of a LIF neuron by (equation 1.5 here):

tau_rc * dv/dt = R*J - (v - v_rest)

There are two parameters here that change the dynamics: tau_rc and R (where tau_rc = R*C)

However, when we define LIF neurons in Nengo, we only can specify one parameter (tau_rc) and ignore R. Further, in the code that updates voltages, the update equation for a time step is:

v = v - (J - v) * expm1(-dt/tau_rc)

This equation is consistent with the other one if we set R=1 and v_rest = 0. I understand why we might assume v_rest==0 but my question is why are we removing “R” as a parameter for LIFs? Is it because it would get washed away by the weight of the incoming current anyways?

Thank you

Yes, exactly. It becomes redundant with the weights and gains that we have on the inputs to neurons. Thus we can fix R=1 without loss of generality. Similarly, v_rest is redundant with the bias that we have on the input (though note that if you’d like LIF neurons to have a resting voltage < 0, you’ll have to set the min_voltage parameter accordingly, as it defaults to zero).

For all our neurons, we have J = g*x + b where x is the neuron input, g is the neuron gain, and b is the neuron bias. If you want to equate our formulation to yours, you have g*x + b - v == R*x - v + v_rest. Thus if you set g = R and b = v_rest, you’ll get something equivalent to your formulation. You can set gains and biases with the gain and bias parameters on Ensemble.

And welcome to the forum! :wave:

1 Like