Tutorials
Home
News
Downloads
Tutorials
User Manual
Reference Manual
Developer Manual
Forums
Team Members
Future Work
FAQ
Links

LISSOM Orientation Map

This tutorial shows how to use the Topographica software to explore a simple orientation map simulation using weight plots and test pattern images. This particular example uses a LISSOM model cortex, although Topographica supports other models and is easily extensible for models not yet supported.

This tutorial assumes that you have already followed the instructions for obtaining and installing Topographica. Also, you will need to generate a saved orientation map network, which can be done by changing to the examples/ directory and running "make lissom_or_20000.typ". Depending on the speed of your machine, you may want to go out for coffee at this point; on a 3GHz machine this training process currently takes about forty minutes.

Response of an orientation map

In this example, we will load a saved network and test its behavior by presenting different visual input patterns.

  1. First, change to your topographica directory, e.g.:
    cd ~/topographica/

  2. Next, start the Topographica GUI:
    ./topographica -g

    You should see a new window for the GUI:

    Console Window

    The window and button style will differ on different platforms, but similar buttons should be provided.

  3. Next, load the saved network by selecting selecting Load snapshot from the Simulation menu and selecting lissom_or_20000.typ in the examples/ directory. This simulation is a small orientation map, with a 24x24 retina and a 48x48 V1 with about two million synaptic weights. The architecture can be viewed in the Model Editor window (which can be selected from the Simulation menu), but is also shown below:

    LISSOM network.

  4. To see how this network responds to a simple visual image, select Test pattern from the Simulation menu to get the Test Pattern window, select a Line Input type, then hit Present:

    Test Pattern window

    This will present a horizontal line.

  5. To see the result, select Activity from the Plots menu on the Topographica Console to get:

    Response to a line

    This window shows the response for each neural area, Retina on the left and V1 on the right.

    In the Retina plot, each photoreceptor is represented as a pixel whose shade of grey codes the response level, increasing from black to white. These patterns are what was specified in the Test Pattern window. At this stage, in V1, the response level is also coded in shades of grey. Note that the response is patchy, as explained below.

  6. To help understand the response patterns in V1, we can look at the weights to V1 neurons. These weights were learned previously, by presenting 20000 inputs like the one we just saw but at random angles and positions. To plot a single neuron, select Unit weights from the Plots menu. This will plot the synaptic strengths of the neuron in the center of the cortex by default. On this particular map, this neuron is not clearly selective for a particular orientation. Instead, try for example the unit at x=0.2 and y=0.0 by changing Unit X: to 0.2:

    Weights of one
neuron

    The plot shows the afferent weights to V1 (i.e., connections from the retina), followed by the lateral excitatory and lateral inhibitory weights to that neuron from nearby neurons in V1. The afferent weights represent the retinal pattern that would most excite the neuron. For this particular neuron, the optimal retinal stimulus would be a bright line oriented at about -45 degrees (10 o'clock) to the right of the retina's center.

  7. If all neurons had the same weight pattern, the response would not be patchy -- it would just be a blurred version of the input (for inputs matching the weight pattern), or blank (for other inputs). To see what the other neurons look like, select Projection from the Plots menu:

    Afferent weights of many
neurons

    This plot shows the afferent weights for every seventh neuron in each direction. You can see that most of the other neurons are selective for orientation (not just a circular spot), and each has a slightly different preferred orientation. This suggests an explanation for why the response is patchy: neurons preferring orientations other than the one present on the retina do not respond. You can also look at the LateralInhibitory weights instead of Afferent0; those are patchy as well because the typical activity patterns are patchy.

  8. To visualize all the neurons at once in experimental animals, optical imaging experiments measure responses to a variety of patterns and record the one most effective at stimulating each neuron. A similar procedure can be performed in the model by selecting Orientation Preference from the Plots menu:

    Orientation map
    Orientation key


    (This will usually take about 30 seconds to complete.) The plot on the left is the orientation map for V1 in this network. Each neuron in the plot is color coded by its preferred orientation, according to the key beneath the image. (If viewing a monochrome printout, see web page for the colors).

    You can see that nearby neurons have similar orientation preferences, as found in primate visual cortex. The V1 plot on the right shows the relative selectivity of each neuron for orientation; you can see that there are patches of neurons near the borders that are not very orientation selective, and smaller patches in the center, but that most are selective. The V1 plot in the center shows the two previously mentioned plots combined -- each neuron is colored with its preferred orientation, and the stronger the selectivity, the brighter the color. From this plot it is clear that the unselective patches tend to lie between patches of different colors (i.e. different preferred orientations).

  9. Now that we have the orientation map, we can see more clearly why activation patterns are patchy by pressing Present on the Test pattern window and then looking at the refreshed image in the Activity window:

    Color-coded response to a line
    Orientation key


    (Alternatively, if you want to keep the old plot for comparison, you can make sure that Auto-refresh is not enabled in it, then generate a new plot by selecting Activity in the Plots menu of the Topographica Console window. This technique also applies to all of the other window types as well.)

    The V1 activity plots are colorized now that the orientation map has been measured. Each V1 neuron is now color coded by its orientation, with brighter colors indicating stronger activation. We can now see that the neurons responding are indeed those that prefer orientations similar to the input pattern, and that the response is patchy because other nearby neurons do not respond. To be sure of that, try rotating the image by adjusting the orientation, then present it again -- the colors should be different, and match the orientation chosen.

  10. If you now Refresh the Unit weights window, you can see that the neuron whose weights we plotted is located in a patch of neurons responding to similar orientations:

    Colorized weights of
one neuron
    Orientation key

    Look at the LateralInhibitory weights, which show that the neurons around the location to the right of the retina's center are primarily purple.

  11. Now that you have a feel for the various plots, you can try different input patterns, seeing how the cortex responds to each one. Just select an Input type, e.g. Gaussian, Disk, or SineGrating, and then hit Present.

    For each Input type, you can change various parameters that control its size, location, etc.:

    orientation
    controls the angle (try PI/4 or -PI/4)
    x and y
    control the position on the retina (try 0 or 0.5)
    width and height
    control the width and height of e.g. Gaussians and rings
    smoothing
    controls the amount of Gaussian falloff around the edges of patterns such as rings and lines
    scale
    controls the brightness (try 0.5 for a sine grating). Note that this relatively simple model is very sensitive to the scale, and scales higher than about 0.5 will result in a broad, orientation-unselective response. More complex models (and actual brains!) are less sensitive to the scale or contrast.
    offset
    is added to every pixel
    frequency
    controls frequency of a sine grating or Gabor
    phase
    controls phase of a sine grating or Gabor

    Learning (optional)

    The previous examples all used a network trained previously, without any plasticity enabled. Many researchers are interested in the processes of development and plasticity. These processes can be studied using the LISSOM model in Topographica as follows.

    1. First, quit from any existing simulation, and start with a fresh copy:
      ./topographica examples/lissom_or.ty -g

    2. Next, open an Activity window and make sure that it has Auto-refresh enabled. Unless your machine is very slow, also enable Auto-refresh in a Projection window. On a very fast machine you could even Auto-refresh an Orientation Preference window (highly optional).

    3. Now click the mouse into the Learning iterations field of the Topographica Console window, and press return a few times, each time looking at the random input(s) and the response to them in the Activity window. The effect on the network weights of learning this input can be seen in the Projection window.

    4. With each new input, you should be able to see small changes in the weights of a few neurons in the array (by peering closely). If the changes are too subtle for your taste, you can make each input have a obvious effect by speeding up learning to a highly implausible level. To do this, type:
      V1.projections()['Afferent0'].learning_rate
      in the Command box or at the Topographica terminal prompt. The current learning rate will be displayed in your terminal window. Next, type:
      V1.projections()['Afferent0'].learning_rate=0.1
      Now each new pattern generated in a training iteration will nearly wipe out any existing weights.

    5. For more control over the training inputs, open the Test Pattern window, select an Input type, e.g. Disk, and other parameters as desired. Then enable Network learning in that window, and hit Present. You should again see how this input changes the weights, and can experiment with different inputs.

    6. If you are really patient, you can change the number of units to something closer to real primate cortex, by quitting, editing the Python code file examples/lissom_or.ty to change the nominal_density of V1 from 48 to 150, and doing:
      ./topographica examples/lissom_or.ty -g

      You'll need a lot of memory and a lot of time, but you can then step through the simulation as above. The final result after 20000 iterations (requiring several hours, if not days) should be a much smoother map and neurons that are more orientation selective. Even so, the overall organization and function should be similar.

    Exploring further

    Topographica comes with additional examples, and more are currently being added. Any valid Python code can be used to control and extend Topographica; documentation for Python and existing Topographica commands can be accessed from the Help menu of the Topographica Console window.

    Please contact jbednar@inf.ed.ac.uk if you have questions or suggestions about the software or this tutorial.

Hosted by: SourceForge Logo James A. Bednar (jbednar@inf.ed.ac.uk) Last update: Thu Sep 4 0:54:24 BST 2008.