Relation between max_rates and firing threshold


Is there any relation between max_rates and the maximum voltage threshold in Nengo? As per my understanding, the maximum voltage threshold is set as 1 in Nengo.

Hi @ayesha.mkzhh, and welcome to the Nengo forums! :smiley:

No, there isn’t. The max_rates parameter determines the firing rate of the neuron when the input current has a value of 1. The max_rates parameter will affect the “gain” of the neuron. The maximum voltage threshold is determined by the neuron type used, and is independent from the max_rates value (and typically static in nature).

That is correct. For the LIF neuron (the default neuron model in Nengo), the spiking voltage threshold for the neuron is 1.

How can we edit the voltage threshold in Nengo? I was wondering if the source code for nengo could be accessible for editing the voltage threshold value

You can’t edit the voltage threshold of the default LIF neuron in Nengo. However, you can create a custom LIF neuron type with an adjustable voltage threshold. In Nengo, the code for the LIF neuron can be found here, and here is an example of how to add / use a custom neuron type in your code.

Many thanks. I was wondering if the high voltage value needs to be changed in lines 628-631 [here] for changing the voltage threshold. (nengo/ at master · nengo/nengo · GitHub)

state = {
“voltage”: Uniform(low=0, high=1),
“refractory_time”: Choice([0]),

It depends on what you want to achieve with the neuron model. That bit of code you linked to specifies the initial state of the neuron when the Nengo simulator goes to build the ensemble. For the built-in LIF neuron, the Nengo simulation will initializes the neurons with:

  • A voltage value that is chosen from a uniform distribution from 0 to 1. Note that each neuron in the ensemble will receive a different value (chosen from the distribution).
  • A refactory_time from the choice distribution of [0] (i.e., the initial refactory_time for all neurons is 0).

So, if you are okay with leaving these values for your custom neuron, then they wouldn’t need to be changed. However, if you want to have the initial voltages set from 0 to <threshold_voltage>, then you would need need to change that value.