Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scale_firing_rates with Regular/Poisson/Stochastic spiking wrappers #206

Open
arvoelke opened this issue Feb 24, 2021 · 0 comments

Comments

@arvoelke
Copy link
Contributor

arvoelke commented Feb 24, 2021

According to the documentation:

scale_firing_rates: float or dict
Scales the inputs of neurons by ``x``, and the outputs by ``1/x``.
The idea is that this parameter can be used to increase the firing rates of
spiking neurons (by scaling the input), without affecting the overall output
(because the output spikes are being scaled back down). Note that this is only
strictly true for neuron types with linear activation functions (e.g. ReLU).
Nonlinear neuron types (e.g. LIF) will be skewed by this linear scaling on the
input/output. ``scale_firing_rates`` can be specified as a float, which will
be applied to all layers in the model, or as a dictionary mapping Keras model
layers to a scale factor, allowing different scale factors to be applied to
different layers.

Nonlinear neuron types (e.g. LIF) will be skewed by this linear scaling on the input/output.

But this does not need to be the case. For instance, when using any of the spiking wrappers in Nengo v3.1.0, e.g., RegularSpiking, StochasticSpiking, or PoissonSpiking, as a target for the conversion, the rate can be scaled correctly by multiplying dt by scale_firing_rates (https://arxiv.org/abs/2002.03553). It might make sense to have this as a configurable parameter on these NeuronType wrappers in core Nengo. Then this rescaling would be supported by any backends that support these particular wrappers.

More generally, this strategy of scaling dt works for any target neuron model, even nengo.LIF (see nengo/nengo#1427) but supporting this for the spiking wrappers would be the low-hanging fruit. It's also not obvious what backends would be able to support this more general kind of rescaling (e.g., SpiNNaker probably could, while Loihi could not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant