Spatial gaussian fields

34 views
Skip to first unread message

TC

unread,
May 20, 2016, 6:57:15 AM5/20/16
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hiya folks,

I was trying to set up Gaussian RFs which are centred at spatially non-corresponding neurons in the pre- and post- synaptic layers. Is there a way to do this using the standard classes provided by CARLsim? Michael said there will be a tutorial out on this in a few weeks, so I am happy to wait. Just wanted to get a discussion going. Heh. 

Cheers!
Tushar

Michael Beyeler

unread,
May 20, 2016, 5:17:49 PM5/20/16
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Hi Tushar,

Great question! Currently the "gaussian" connection primitive centers the peak of the Gaussian on the i-th neuron in both pre- and postsynaptic layers if you have two N-sized layers. Similarly, neurons arranged on a NxM grid in both pre and post will have the Gaussian peak centered on some (x,y). This is sufficient to implement simple mechanisms such as spatial pooling, elliptic or ellipsoid receptive fields (RFs), or difference of Gaussians (DOG).
Thus, it would be possible to implement an RF as shown in A, but not as shown in B and C.

If you wanted more complicated RFs, use a user-defined connection type. Within the connect method you can access CARLsim methods such as sim->getNeuronLocation3D(i), which will tell you the Grid3D location of a particular pre-neuron i (or post-neuron j). Then you can wire neurons according to your own distance rule.

I'm thinking about including a simple DOG tutorial in CARLsim 3.1.2, as you suggested. However, please note that DOG doesn't need "spatially non-corresponding" Gaussian centers. Instead, use:

// group size (assuming 2D "image" processing)
Grid3D imgSize(100, 100, 1);

// set up groups
int gIn = sim.createSpikeGeneratorGroup("input", imgSize, EXCITATORY_NEURON);
int gOut = sim.createGroup("output", imgSize, EXCITATORY_NEURON);
int gInh = sim.createGroup("inhib", imgSize, INHIBITORY_NEURON);
sim.setNeuronParameters(gOut, 0.02f, 0.2f, -65.0f, 8.0f); // RS
sim.setNeuronParameters(gInh, 0.02f, 0.2f, -65.0f, 8.0f); // RS

// difference of Gaussians (kernel size given by RadiusRF in x,y,z)
// excitatory center, where gIn and gOut are EXCITATORY_NEURON
sim.connect(gIn, gOut, "gaussian", RangeWeight(0.25f), 1.0f, RangeDelay(1), RadiusRF(1,1,1), SYN_FIXED);

// inhibitory surround, where gInh is INHIBITORY_NEURON
sim.connect(gIn, gInh, "gaussian", RangeWeight(0.03f), 1.0f, RangeDelay(1), RadiusRF(3,3,1), SYN_FIXED);
sim.connect(gInh, gOut, "one-to-one", RangeWeight(0.25f), 1.0f);

Let me know if you have more questions.

TC

unread,
May 25, 2016, 5:40:44 AM5/25/16
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
Thanks for the detailed response Michael, and for the note about the DOG filters. 

Since we are just starting out on our project, our model is evolving. We are now leaning towards starting directly with simple V1 Gabors and using CARLsim to model subsequent stages. I am sure it will involve spatially non-corresponding connections and I will have to code bespoke connection types. Will certainly be dropping by with more questions as the model progresses.

All the best to the team! :)

Michael Beyeler

unread,
Mar 11, 2017, 7:29:32 PM3/11/17
to CARLsim: A GPU-accelerated Spiking Neural Network (SNN) Simulator
I know it's been a while... But, I'm happy to report that there is now a Tutorial on how to set up spatial connectivity: https://uci-carl.github.io/CARLsim3/tut4_image_processing.html.
Reply all
Reply to author
Forward
0 new messages