ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

A problem of making orientation preference map of V1 in Topographica project #605

Closed youngjt closed 9 years ago

youngjt commented 9 years ago

Now we are analyzing the code of Topographica project and want to know how to use the SOM/LISSOM neural network to generate the orientation preference map of V1. Through the analysis, we guess the orientation preference map is generating is in the below class. class measure_sine_pref(SinusoidalMeasureResponseCommand)(it appears in featuremapper.command)

The default value of “num_orientation” is 4 in the class SinusoidalMeasureResponseCommand and the value of this variable is not assigned a new value in the class measure_sine_pref. Why does the final orientation preference map have 12 different orientations, which is shown in Fig 1? Where is the variable “num_orientation” reassigned to 12? Thanks!

topo Fig 1

jbednar commented 9 years ago

That's a good question! In fact, it is never reassigned to 12; 4 is the correct value. It's true that there are 12 bars in the orientation color key, but those are just 12 examples -- there are actually infinitely many orientations in the measured maps (as you can see if you analyze the orientation map image in a paint program, which should show far greater than 12 distinct colors in the Orientation Preference map).

The number 4 controls how many different orientations are presented in the visual input, not how many are in the final map. The values in the final map are interpolated between the responses to these four values, based on the ratio between how much each neuron responds to each presented orientation. For instance, if for a given neuron when we present orientation 0 we get a response of 0.5, when we present orientation pi/4 we also get a response of 0.5, and then we get a response of zero for the other two orientations pi/2 and 3pi/4, the reported orientation preference will be pi/8 (the average between 0 and pi/4). The details of the calculation are in Appendix G of my book Computational Maps in the Visual Cortex, which follows the method proposed by Blasdel (Nature 1986), and it's implemented in featuremapper.distribution.DSF_WeightedAverage.

If you really did want only to have the specific orientations that were tested to show up in the response, then you can set measure_sine_pref.preference_fn=DSF_MaxValue(). After you see how blocky such a map looks, you'll indeed want to set measure_sine_pref.num_orientations=12 (or actually much higher, probably 48), if you want to get a smooth, accurate map. Presenting 48 different orientations will take 12 times longer than usual, though, and will still not be as smooth as doing the weighted average interpolation, but it's worth doing so that you can see whether you trust the results of the weighted averaging.