Confusing "Maximum number of output synapses" error message

31 views
Skip to first unread message

Eric Morgan

unread,
Jan 25, 2017, 7:22:20 PM1/25/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
I'm playing around with some simple large networks to get a feel for how well my hardware handles them, and ran into a somewhat confusing error message.  If I take the hello_world example project and set the gin and gout groups to be 512x512 in size, I get the error "[ERROR carlsim/kernel/src/snn_cpu.cpp:187] ConnID 0 exceeded the maximum number of output synapses (10000), has 262144." when I run it.  If I instead make each layer 128x64 but set the RadiusRF of the gaussian connections to 30x30, it works fine, even though that network has millions of synapses (the summary says "numSynapses = 16563404").

Is the "maximum number of output synapses" actually the maximum number of neurons in a group?  if so, why does that limitation exist, and can it be safely changed (or what would need to happen to change it)?

Thanks
-Eric

Michael Beyeler

unread,
Jan 27, 2017, 7:42:46 PM1/27/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi Eric,

CARLsim 3 has a few technical limitations when it comes to number of allowed synapses, connections (as in number of calls to CARLsim::connect), and neurons. The reason for that is that data structures are re-organized during the call to CARLsim::setupNetwork in order to make the network run most efficiently on the GPU.

A neuron cannot have more than 4,096 incoming/outgoing synapses. This is because we reserve 12 bits to store the incoming/outgoing neuron ID.
A network cannot have more than 1,048,576 million neurons, because we have 20 bits to store all neuron IDs in the network.

That being said, I'm not sure why the number reads 10,000 in the error message. It should say 4,096...
In any case, this is why the second worked and the first one did not. RadiusRF limits the receptive field of a neuron and therefore the number of incoming synapses. In general, having millions of synapses is fine.

CARLsim 4 will mostly do away with these limitations (or, at least make the numbers orders of magnitude larger).

Best,
Michael

Eric Morgan

unread,
Jan 28, 2017, 2:04:46 AM1/28/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
In the first network, there are 262,144 neurons per group, but the connection is a 3x3 gaussian, so very few synapses per neuron, but it mentions the 262,144 number in the error message, so it appears to be complaining about the number of neurons in the group.  The 10,000 number appears to come from line 130 of carlsim/kernel/include/snn_definitions.h:

#define MAX_nPostSynapses 10000

Also in that same file are the following two lines:

#define MAX_NUMBER_OF_NEURONS_BITS (20)
#define MAX_NUMBER_OF_GROUPS_BITS (32 - MAX_NUMBER_OF_NEURONS_BITS)

If I increase MAX_NUMBER_OF_NEURONS_BITS, would that allow me to have more neurons in the network at the expense of lowering the maximum number of groups, or are these also hardcoded elsewhere in the code and are there merely to prevent people from trying to create too many neurons/groups?

Thanks
-Eric

tingshuc

unread,
Jan 31, 2017, 9:07:37 PM1/31/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi Eric, I have removed restrictions of MAX_nPostSynapses and MAX_nPreSynapses. Please check it out at (https://github.com/UCI-CARL/CARLsim3) As for MAX_NUMBER_OF_NEURON_BITS, I think yes. You can increase the maximum number of synapses per neuron at the cost of decreasing maximum number of neurons in a network.

Best, Ting-Shuo
Reply all
Reply to author
Forward
0 new messages