CNV: Tilt illusion project option for assignment 2

This page describes one of the possible project options for assignment 2; please read the general project description first before looking at this specific project option.

The tilt illusion (TI; see Carpenter and Blakemore 1973) consists of systematic misperception of oriented lines when presented near to each other in visual space. The TI is closely related to the TAE, which is discussed in CMVC chapter 7, where various methods also relevant to the TI are introduced. Options for simulating the TI with LISSOM/GCAL are described in CMVC section 17.2.5. Before starting on this project, it's useful to read the 1973 paper, and then look at other later work mentioned in CMVC or found by searching PubMed for "tilt illusion". Once you have a good idea about the basic phenomenon and the theories about its neural substrate, you can think about what aspect you'd like to investigate and/or replicate.

Once you're ready, you can follow these steps to get started. For this assignment you should again use the copy of Topographica installed in /group/teaching/cnv/topographica. This version is currently identical to the 0.9.7 released version, except for new options added to the decode_feature function; if you want to use a home or laptop installation, you'll need to apply the diffs.

  1. First, save a copy of the asst2.ty example file into one of your own directories, e.g. ~/topographica/asst2.ty, and launch it:

      cd ~/topographica
      ln -s /group/teaching/cnv/topographica/topographica .
      ./topographica -g asst2.ty
    

    The asst2.ty file is a slightly modified copy of examples/gcal.ty, changed as described in the comments at the top of the file. See the EDI-INF-RR-1404 report for a detailed description of GCAL. Compared to that description, the main changes are to speed it up to make it more practical and to use a larger area, longer input patterns, and longer lateral inhibitory connections, so that long-range interactions between simultaneous patterns can be investigated. For simplicity, natural image training pattern support has been removed from the file, but it can be restored if desired by copying the relevant code from gcal.ty. The precise changes are listed at the top of the asst2.ty file, and can be seen by comparing asst2.ty and gcal.ty using diff.

  2. You should run the network for a few iterations in the GUI and look at the various plots to see what it does, how it compares to GCAL from the first assignment, and generally make sure that it seems to be working ok.

  3. You can just keep running it for a few more thousand iterations in the GUI until it self-organizes, if you like, but it's usually easier to run asst2.ty in batch mode instead. Sample batch mode command for running to simulation time 2500 (which is usually sufficient to see how it will organize) and analysing the map at times 100, 1000, and 2500:

      ./topographica -a -c "run_batch('asst2.ty',times=[100,1000,2500])" -c "save_snapshot()"
    

    This command takes 10 minutes on my 3GHz Pentium 4 machine, but could be more if your machine is slower or heavily loaded.

    The output from the simulation will be in ~/topographica/Output/201203031631_asst2, where 201203031631 is the year, month, hour, and minute when the command was started (to provide a unique tag to keep track of results). When it's done, be sure to examine the .out file in that directory, so that you can detect any warnings that might be important (such as parameters that you thought you changed but the code warns you were not actually changed due to typos). You can use your favorite image viewer to see the .png images, such as orientation maps and weight plots.

    For instance, if you're using gthumb, you can do gthumb *.png. For gthumb, it works better if you go to the Preferences and set the Viewer options to have a Zoom quality of Low (to avoid smoothing) and After loading an image to Fit image to window (so that it's large enough to see).

    The main results can be compared with those in the GCAL paper; they should be broadly similar but with a larger area, lower density, and probably not as smooth because we increased the learning rates to get results quicker.

  4. If the images make it look like this might be a useful network, then you can then load the saved snapshot to explore what it does:

      ./topographica -g -c "load_snapshot('$HOME/topographica/Output/201203081631_asst2/201203081631_asst2_002500.00.typ')"
    
    (using the appropriate path to your copy of the simulation output).
  5. A good first step is to test how well you can decode the orientation of an input from the V1 response. E.g. this code should print some orientations (in radians) and their decoded value:

    from numpy import linspace
    from topo import pattern
    from topo.command import pattern_present
    from topo.command.analysis import decode_feature
    
    for t in linspace(0.0,pi,20,endpoint=False):
      pattern_present(inputs=pattern.Gaussian(x=0,y=0,orientation=t,size=0.088388,aspect_ratio=15),duration=1.0,plastic=False,overwrite_previous=False,apply_output_fns=True)
      d=decode_feature(topo.sim["V1"])
      print t,d*pi
    

    If the input and decoded values are reasonably close to each other (try graphing them!), this network is successfully representing the orientation of an input line.

  6. If one line works ok, then you can present multiple lines by making a Composite of two patterns or (to replicate some studies) using the OrientationContrast pattern to make inputs like these. Once you have multiple inputs, you can compare the response to the separate lines or gratings alone with the response to the patterns together. E.g. you could decode from half of the retina separately, either for individual lines or for two presented simultaneously:

      r,c = topo.sim["V1"].activity.shape
      lefthalf  = lambda(x): x[:,0:c/2]
      righthalf = lambda(x): x[:,c/2:]
    
      print decode_feature(topo.sim["V1"], cropfn=lefthalf)
      print decode_feature(topo.sim["V1"], cropfn=righthalf)
    

    This code sets up two temporary functions that crop to the left or the right half of V1, respectively, and then calls decode_feature for each half separately. If you do this once for the individual lines on each side, and once when both are presented together, you can take the difference on each side, and this will tell you how much the perception of the line on that side was changed by the other line. The sum of these two differences will be the change in perceived angle, which can be compared to the tilt illusion values reported for that angle in a human psychophysical study. If you do this for every angle, you'll be able to compare the resulting TI graph with human data.

  7. If the results are in general agreement with the human data, you can then try to replicate the procedure used with humans more closely, making the model be a more realistic or more appropriate model of some particular TI study. You can also start to collect some other data associated with the TI (testing other experimental conditions, other related visual illusions, etc.), test using a model trained on natural images, etc.

  8. Whether the results were as expected or not, you should think about your network, observe the patterns of activity and connectivity, and decide if you believe it is an appropriate model for this phenomenon -- does it have the right connections in the right places such that it should have exhibited the TI? E.g., are your patterns close enough together for your inhibitory connections to reach between their respective V1 representations? If not, make the connections (inh_radius) or the input patterns longer and retrain, or move the test patterns closer together. But of course, if they are too close, you'll have trouble figuring out how to decode the overlapping responses, and it will be hard to disentangle contributions from afferent and lateral connections. Basically, you're trying to (a) build a good model that includes the mechanisms that at least might generate the TI, (b) determine whether it does so, and (c) analyze what those results depend on -- why they occur.

  9. Whatever you end up investigating, in your report, you'll need to make it clear what question(s) you were addressing, demonstrate that the model was a reasonable approach to investigating those questions, explain how the model's mechanisms relate to processes in human V1, show how well the results match the human TI (or whatever data you're comparing against), and explain why the results you observe (whether they match human data or not) occur. Once you're ready, you can report and submit your results as described in the general project description.

Last update: assignment2ti.html,v 1.13 2012/03/14 22:14:45 jbednar Exp


Home : Teaching : Courses : Cnv : 2011-2012 : Coursework 

Informatics Forum, 10 Crichton Street, Edinburgh, EH8 9AB, Scotland, UK
Tel: +44 131 651 5661, Fax: +44 131 651 1426, E-mail: school-office@inf.ed.ac.uk
Please contact our webadmin with any comments or corrections. Logging and Cookies
Unless explicitly stated otherwise, all material is copyright © The University of Edinburgh