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

some questions and suggestions to gcal and topo #568

Closed kalok87 closed 10 years ago

kalok87 commented 10 years ago

Dear Developers,

Sorry for my interrupting. I have studied your fascinating GCAL model and topographica for three months and I am exploring your model right now. So I just have some thoughts and ideas. I would appreciate it if you could kindly read my this post.

Firstly I want to ask you a question:

Have you ever trained the GCAL model using natural images? I have used the GCAL notebook and train it with natural images you provided [ by setting param.ObjectSelector(default='Nature',..)]. I also used 6000 noisy disks or no noisy disks at beginning of simulations. By these setups, no maps can be obtained which means that I cannot get ring-shape in power spectra. Since the code I used is just the gcal.ty so I do not think there are mistake in my code. Indeed, I will get a pretty map by using simple Gaussian stimuli to train the model. I do not know where is wrong.

Secondly, here is my suggestion to topographica.

I highly suggest that periodic boundary condition shou in topographica and gcal.ty. The reason is based on the physics and pattern formation rather than biology. Of course Retina and V1 cannot wrap up and connections cannot jump form left bound to right bound. But it is already found that periodic boundary condition is necessary for small system ( for Kohonen model, the cortical maps smaller than 5_5 hyperculumns are considered to be "small". But I do not know the criterion for GCAL. ) because the final stable pattern in these system is strongly affected by the boundary value. The reason for that is as following: Consider a V1 map in size 3_3 pixels with open boundary condtion and each neuron in map has a coordinate (x,y) where x from 1 to 3 and y from 1 to 3. So the neuron in the center of map is (2,2). Let's consider the lateral connections of neuron (2,2). It is obvious that neuron (2,2) has connections with all other neurons because they all sit besides (2,2). But if we consider the neuron (2,1), we will find that this neuron has less connections than (2,2) because it does not have connection to its upper side. Because of this, this small map are strongly depending on the value of boundary neurons. The same effect is less significant once we use very large map because the neurons far away from bounds are not connected to boundary neurons. So we can only study the dynamics in large map with open boundary condition. For an illustration, I post a graph here. kalok

Here the author used periodic boundary condition and you can see the boundary condition matters for small system. But if periodic boundary conditions are applied into GCAL, we can study the dynamics of GCAL in smaller size because periodic condtion simplifies the result by reducing the total number of possible patterns. And finally the study of size coarsening is available.

Thank you for reading my post. And it is joyful to study GCAL model although it is the most complicated model I have seen in this field up til now.

Kalok

Tobias-Fischer commented 10 years ago

Dear Kalok,

we have been working on GCAL approximately the same time then :). It is a really interesting topic. I am glad you enjoy working on it too.

We regularly use GCAL with natural images. Which gcal.ty do you use? If you are particularly interested in development, then I can recommend looking at the notebook in models/stevens.jn13/gcal.ipynb. This is the published version of GCAL, and made to replicate the results in the paper (see models/stevens.jn13). What do you mean by no maps can be obtained? You should definitely get to see something! And how does your power spectrum look like?

I think Jim made clear why periodic boundary conditions do not exist in Topographica, see https://github.com/ioam/topographica/issues/566. We try to build biologically realistic models, therefore our sheets are bigger than the small systems you are talking about. However, Topographica is designed to implement new components such as periodic boundary conditions in a modular way. Jim outlined a proposal how you could implement these in https://github.com/ioam/topographica/issues/566.

Best, Tobias

kalok87 commented 10 years ago

Dear Tobias,

Thanks for your reply. I really cannot obtain a map via natural image. Here is the movie of map development, and I also used the gcal.ty in models/stevens.jn13/. I am just setting setting param.ObjectSelector(default='Nature',..)

https://drive.google.com/file/d/0BzFiKsLQXJ94R3A1azJtcEE1b1U/edit?usp=sharing https://drive.google.com/file/d/0BzFiKsLQXJ94WmtnVFFpNmJvQ0E/edit?usp=sharing

You can see that we do not have a ring-shape in power spectrum.

About the periodic boundary condition, it is okay if there is no such a choice in topographica, I will try to implement it. But is there any instruction that introduces how to modify the CFProjection?

kalok87 commented 10 years ago

By the way, I am confused about the Edge buffering. If I change the density of V1 in gcal.ty, should I also change the retinal_bounds? And what is actually the retinal_bounds?

jbednar commented 10 years ago

I'll first respond to your question about using natural images with GCAL (though that's strictly a scientific question, not about Topographica software support!). Sorry that it's fairly complicated to describe!

For natural images (or any other image dataset), GCAL does obtain a map, where the RFs reflect typical patterns seen in those images, and the global organization is by similarity of RF. But the model map is not a close match to animal V1 maps measured using optical imaging, and will not have a nice ring-shaped FFT, because a single-level GCAL network will only develop strongly spatial-phase-selective simple cells. Because of this phase selectivity, if multiple phases are present during the initial training (as they always will be for natural images), the map becomes organized strongly by phase preference, not just orientation. Specificially, it typically develops alternating bands of phase selective neurons (e.g. a patch of neurons with off-on-off RFs, followed by a patch with on-off-on RFs). This extra dimension around which the network organizes disrupts the orientation map pattern, reducing the FFT's ring shape. After measuring an orientation map, you can plot the Phase Preference to see this larger-scale organization that is dominating the orientation map. Orientation maps trained on Gaussians don't have this problem, because the Gaussians are always brighter than their surround, and thus result in only a single type of phase-selective RF (off-on-off). You can see the effect of training patterns with the related LISSOM model clearly at http://nn.cs.utexas.edu/computationalmaps/figures/5.13.php; even just using some bright and some dark Gaussians is enough to disrupt the map pattern and thus the FFT.

So, how does this relate to animal maps? Because of how light scatters in deeper tissue, animal maps are measured from the superficial layers, which in the species typically studied are primarily phase-insensitive complex cells. GCAL models layer 4 cells with direct connections from the LGN, developing only phase-selective simple cells. We have a separate two-layer model closely related to GCAL showing how complex cells can develop (http://dx.doi.org/10.3389/fncom.2011.00017), where the maps organize between complex cells and thus aren't dominated by spatial phase. You are welcome to use this model instead, but it's much more complicated and expensive to run. Another thing to keep in mind is that animal maps develop before the photoreceptors mature and thus are not driven by natural images in normal circumstances. Instead, they may be driven by spontaneous activity prenatally, which has different properties from visually evoked activity (e.g. with ON and OFF cells correlated).

In any case, it's fine to use GCAL with natural images, because it will organize into patterns that tell you about how those images vary, but you need to use a much more complex model (multiple layers, and multiple pre and postnatal phases) if you want to account for the actual process of development in a way that is comparable to animal data from superficial layers. Or if you want to stick with the simple GCAL model, you can use training patterns with only a single spatial phase so that the results will be comparable to the patterns measured in phase-insensitive cells.

jbednar commented 10 years ago

Second, regarding periodic boundary conditions, if you look at the periodic maps you posted (or any periodic maps), you'll see that the maps are organized (more or less by definition) in a way that one edge lines up with the opposite edge. That constraint will dominate the map shape just as much as open boundary conditions will (despite being less obvious at a first glance). Because the periodic topology doesn't match the biological organization, a periodic map with a small number of hypercolumns is going to be misleading for precisely the same reasons as in the open case. As I mentioned, you're welcome to implement the periodic case, but it seems like a big hassle to me and we won't be able to offer technical advice on your implementation due to having other much higher priority tasks.

For us, the solution is to study a large enough area that the boundaries are not very important, whether using periodic or open conditions, which is why we believe there's no point to spend the extra effort to implement the unrealistic periodic case. To study a large area with GCAL, just set area=2.0 or even area=4.0. You don't need to change any of the densities (those just change the number of neurons per hypercolumn, not the number of hypercolumns) and you don't need to change the retina bounds (which changes automatically when you change the area). You can reduce the cortex_density a bit to make the model run more quickly, but increasing the area will only make the model slower linearly in area (i.e. area=2.0 will be 4x slower, because it doubles the horizontal and vertical area of the model), so that's probably not necessary. In general, the retina_density, cortical_density, and area are all designed to be manipulated independently, so that you can decide on the receptors per unit area (retina_density), V1 neurons per unit area (cortex_density), and total number of hypercolumns (determined by the area), each independently of the other.

GCAL may be more complex than some models, e.g. those from Wolf et al., but it's vastly less complicated than the actual brain, and much less complicated than most of the other models we actually use in my group where we try to account for what actually goes on in the visual cortex!

kalok87 commented 10 years ago

Dear Prof. Bednar,

Sorry for interrupting you again, because I really want to understand your theory and your model.

After reading your reply, I cannot understand one sentence in your words: "Another thing to keep in mind is that animal maps develop before the photoreceptors mature and thus are not driven by natural images in normal circumstances. Instead, they may be driven by spontaneous activity prenatally, which has different properties from visually evoked activity (e.g. with ON and OFF cells correlated)."

I believe you are talking about the paper ' Development of Orientation Preference Maps in Ferret Primary Visual Cortex' by Chapman et al. In order to understand that, I read the paper and I still cannot understand your sentence. The neurons in cortex are measured after 30 days and all the Retinal cells ( Photoreceptor) should be mature at that point. But we can still observe that the OPM changes. Indeed, in the Fig. 5 of their paper, the map is 'disorganized' after P37. Maybe I am wrong, but can you please tell me which paper mentioned that the maps are not driven by normal visual experience?

Thank you for your replying last time and thank you for your helps.

jbednar commented 10 years ago

For evidence that "early patterned vision appears unimportant", see Crair et al. 1998:

http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2453000/