History

Wiki » History » Version 11

Version 10 (Andrew Davison, 26 Jun 2014 15:13) → Version 11/23 (Ramon Martinez, 15 Aug 2014 04:34)

## Network models of V1

This project will be used to test implementations in PyNN (and eventually NeuroML) of published models of primary visual cortex (V1) based on spiking point neurons.

An initial focus will be on pubmed:14614078, but other models investigated will include pubmed:19477158 and pubmed:22681694.

This project is part of the [INCF participation in the Google Summer of Code 2014](http://incf.org/gsoc/2014).

### Troyer Model
Here I will describe briefly the implementation of pubmed:9671678.

In order to run this model is necessary to first install [git](http://git-scm.com/) and [PyNN](http://neuralensemble.org/PyNN/) and the appropriate simulator.

After that you can clone directly from git using:

~~~
git clone https://github.com/OpenSourceBrain/V1NetworkModels.git
~~~

As the project stands at this moment the workflow can be described in two steps: first steps. First there are two scripts is a script `produces_lgn_spikes.py` that implement creates the spatio-temporal filter in spike train for the retina and produce the spike-trains for each cell cells in the Lateral Geniculate Nucelus (LGN) and Nucleus (LGN). After the spikes are created they are stores them for further use. Second, there is a file that loads those spike-trains and runs the simulation of the cortical networks in PyNN using them. The first task is executed by two scripts `produce_lgn_spikes_on_cells.py` and ` produce_lgn_spikes_off_cells.py ` which generates pickled files in the folder './data' format along with the spike trains and their respective positions for a given contrast that is selected to identify them downstream in the parameters of the script. workflow. After we have run the spikes train the file `lgn.py` uses the **PyNN's** SpikeSourceArray to produce create an LGN array with the spikes with a given contrast (which can be adjusted in the scripts mentioned above) that we can run the main script `full_model.py` with the same contrast have produced in order to run the complete model. At other file. Using the beginning of this files stored positions we find can, in the following parameters controlling the simulation:

~~~
factor = 1.0
same file, # Reduction factor
Nside_exc = int(factor * Nside_exc)
Nside_inh = int(factor * Nside_inh)

Ncell_lgn = Nside_lgn * Nside_lgn
Ncell_exc = Nside_exc ** 2
Ncell_inh = Nside_inh ** 2

N_lgn_layers = 1

## Main connections
thalamo_cortical_connections = True # If True
create connections from the thalamus to the cortex
feed_forward_inhibition = True # If True add feed-forward inhibition ( i -> e )
cortical_excitatory_feedback = True # If True add cortical excitatory feedback (e -> e) and ( e -> i )
background_noise = True # If True add cortical noise
correlated_noise = False # Makes the noise coorelated

# Save
save_voltage_and_conductances = False
save_orientation_response = False

# Plot
plot_conductance_analysis = True
plot_spike_analysis = True
plot_orientation_analysis = True
~~~

thalamo-cortical connectivity using a Gabor-like sampling mechanism. The factor parameter allows us next step is to reduce create the overall size of the cortical network by a given percentage (the square of it). We can also choose to use between one and four layers of the LGN in case we want cortical-cortical connections with the parameter N_lgn_layers. Finally we can remove the connections and noise correlations between cortical cells' receptive fields.

Next I describe
the different networks with two first stages of the bolean parameters bellow. We also have workflow, that is, the settings here to plot relevant analysis creation of the data and save LGN spikes through the data produced by the simulation here.

After we have run the model with a couple
filtering of contrasts and save them in the 'output_data' we can run the script `compare_contrasts.py` in order to see if contrast invariant orientation tuning holds for our data.

As the model stands, spike-trains
stimuli and orientation curves are already given for four contrasts and the model can be tested right away.

Here bellow I describe in more detail all of the parts of the model
thalamo-cortical connectivity

#### LGN - spikes

In brief, the Retina and the Thalamus part of the model can be represented by a spatio-temporal filter that, when convolved with the stimuli, will produce the firing rate of a given LGN cell. After that, we can use a non-homogeneous Poisson process to produce the corresponding spikes for each cell. We describe this in detail bellow.

###### Spatio-Temporal Receptive Field (STRF)

The file `kernel_functions.py` contains the code for creating the STRF. The spatial part of the kernel possess a **center-surround** architecture which is model as a different of Gaussians. The temporal part of the receptive field has a **biphasic** structure, we use the implementation describe in Cai et al (1998). The details of the implementation are described in detail in the companion blog of this project [(link)](http://neuralensemble.blogspot.fr/2014/06/gsoc-open-source-brain-retinal-filter-i.html). Down here we present a kernel produce with this classes. The time here runs from left to right and from up to down as usual text, so we can see how the spatial components of the filter change in time with this series of two dimensional maps.

![STRF](http://www.opensourcebrain.org/attachments/download/205/kernel.png)

We also include a small script `center_surround_plot.py` that can be used to visualize the spatial component of the STRF and received immediate feedback on how the overall pattern changes when the parameters and resolutions are changed.

###### Stimuli
The file `stimuli_functions.py` contains the code for creating the stimuli. In particular we used the implementation of a **full field sinusoidal grating** with the parameters described in the paper. Down here we show an example of the stimuli at a particular point in time for illustration purposes:

![stimuli](http://www.opensourcebrain.org/attachments/download/206/sinus_grating.png)

Here we also included a small script `sine_grating_plot.py` to visualize the sine grating at a particular point in time.

###### Convolution

After we have the stimuli and the STRF we can use the **convolution** function defined in the file `analysis_functions.py` to calculate the response of LGN' neurons. The details of how the the convolution is implemented is described in the detail in the following entry of the blog [(link)](http://neuralensemble.blogspot.fr/2014/06/gsoc-open-source-brain-retinal-filter-ii.html). With this in our hand and using the parameters described in the paper we can already reproduce the first plot in Troyer's paper. The file `lgn_firing_rate_troyer_plot1.py` in the repository does this automatically for us and give us the next plot:

![troyer_plot](http://www.opensourcebrain.org/attachments/download/207/troyer_plot1a.png)

Here we can see the firing rate for an on and for an off cell subjected to the same stimuli. Note that they are off-phase and also the contrast dependent response. The responses are rectified after back ground noise was added.

###### Producing Spikes

After we have the firing rate of a neuron we can use the produce_spikes functions in the file `analysis_functions.py`. This functions takes the firing rate and using non-homogeneous Poisson process outputs an array with the spikes times. We provide one file `produce_lgn_spikes_one.py` for testing variations of parameters and as an example showcase.

![example](http://www.opensourcebrain.org/attachments/download/208/spikes_example.png)

###### Storing Spikes
Now we have the complete mechanism of spike creation. In the file `produce_lgn_spikes.py`. This file creates a grid of positions (This should correspond to the grid of LGN cells that we are going to use in PyNN) and produces the list of spikes associated with them as well as the positions. The particular stoage format that we are using is `cPickled`.

#### LGN - Network