Learning on SpiNNaker with NEF and Nengo

Interface SpiNNaker with Nengo and let SpiNNaker learn transfer functions.


The goal of this group is to import in SpiNNaker a learning rule that has been experimented in the Nengo framework, and then have the SpiNNaker simulator learn the desired transfer function. The output of this group is an implementation of a learning algorithm in the SpiNNaker simulator that receives from the host computer an input value and the desired output value. Training the network for several input values, the network reconstructs the desired transfer function. The network designed is depicted in the image:

The input value is generated on the host side and is directed both to the input population on SpiNNaker and to the "Output Generator" population on the host side.
This second population, on the basis of the value of the "function selector", applies the desired transfer function to the input value and injects this into the SpiNNaker simulator towards the population which perform the error evaluation.
The error evaluation population computes the difference between the current output and the desired output, propagating consequently a modulatory signal (projection in blue) to the output population. This modulatory signal does not contribute directly to the membrane potential of the post-synaptic neurons, but influences the weight of the synapse between the input and the output population as a "teaching" signal.
The input and the output populations are connected through synapses that have the ability to learn (projection in red) according to an error signal and a "learning rate" factor.

The formula that describes this learning rule is:


  • is the additive weight variation of the synapse between neuron i in the input population and neuron j in the output population;
  • is the learning rate;
  • is the modulatory error current for neuron j;
  • function takes value 1 when the neuron i emits an action potential;

Following this learning rule, only the synapses through which there is activity are modified following the modulatory error signal; in this environment the error signal provides a teaching signal to the learning synapses, so that the output value generated by the output population agrees with the training value.

Based on the value of the "function selector" (FS) slider, four are the possible selectable functions:

  • Y = X - communication channel - 0 < FS < 0.1;
  • Y = X2 - 0.1 < FS < 0.2;
  • Y = sin(X) - 0.2 < FS < 0.3;
  • Y = -X - inverse communication channel - 0.3 < FS < 0.4;

The output population then sends the decoded value to both the error-evaluating population and the Nengo interface. In this way it is possible both to visualize the decoded output and perform error correction of the transfer function. In summary, the set of trainee synapses is represented by the connection between the input and the output population, and the value for which the synapses are trained is injected from the host computer.

Following, an example of the Nengo interface with the signals generates by the relevant populations


  • "function control" represents the "Function selector" slider described before;
  • "input" represents the input value slider. The "input" graph represents the value in time of the desired input value;
  • "func" represents the "Output Generator": the signal generated by this population trains the network with the desired transfer function. The "func" graph represents the value in time of the desired output;
  • "function sender" and "value sender" are used to transfer the relevant values to the SpiNNaker system;
  • "uvr" is used to receive the output value from the SpiNNaker system and to visualize it (the "Output Visualizer" in the network image earlier);

In the image it is possible to see that the desired function is the squarer (0.1 < FS < 0.2); this is also presented by the "func" graph: for the input value going (quickly) between 1 and -1, the output takes only positive values. In addition, the Output Visualizer "uvr" shows that after few milliseconds the desired output is presented.