"The value assigned to `areas_simulated` can be any sublist of complete_area_list.\n",
"The value assigned to `areas_simulated` can be any sublist of complete_area_list.\n",
"\n",
"\n",
"1. `replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br> `'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces them with a time-varying current input.\n",
"4. `replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br> `'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces them with a time-varying current input.\n",
"\n",
"\n",
"2. `g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation.\n",
"5. `g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation.\n",
"\n",
"\n",
"3. `rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2."
"6. `rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2."
The code in this notebook implements the downscaled version of spiking network model of macaque visual cortex developed at the Institute of Neuroscience and Medicine (INM-6), Research Center Jülich. The full-scale model has been documented in the following publications:
The code in this notebook implements the downscaled version of spiking network model of macaque visual cortex developed at the Institute of Neuroscience and Medicine (INM-6), Research Center Jülich. The full-scale model has been documented in the following publications:
1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ
1. Schmidt M, Bakker R, Hilgetag CC, Diesmann M & van Albada SJ
Multi-scale account of the network structure of macaque visual cortex
Multi-scale account of the network structure of macaque visual cortex
Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4)
Brain Structure and Function (2018), 223: 1409 [https://doi.org/10.1007/s00429-017-1554-4](https://doi.org/10.1007/s00429-017-1554-4)
2. Schuecker J, Schmidt M, van Albada SJ, Diesmann M & Helias M (2017)
2. Schuecker J, Schmidt M, van Albada SJ, Diesmann M & Helias M (2017)
Fundamental Activity Constraints Lead to Specific Interpretations of the Connectome.
Fundamental Activity Constraints Lead to Specific Interpretations of the Connectome.
The values assigned for the following parameters are kept the same as in the paper except for the `scale_down_to` which is set as 0.006 enabling to simulate a downscaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model.
The values assigned for the following parameters are kept the same as in the paper except for the `scale_down_to` which is set as 0.006 enabling to simulate a downscaled multi-area model with 2GB RAM. By default, it is set to 1.0 for simulating the full-scale model.
1.`scale_down_to` is the downscaling factor that defines the ratio by which the full-scale multi-area model is reduced to a model with fewer neurons and indegrees. This reduction is essential to enable simulation on machines with limited computational power, ensuring that simulation results can be obtained in a relatively shorter timeframe. <br> If the value is `scale_down_to = 1.`, the full-scale network will be simulated. <br> In the pre-set downscaled version, `scale_down_to = 0.006`. This setting reduces the number of neurons and indegrees to 0.6 % of their full-scale counterparts, facilitating simulation on a typical local machine. <br>**Warning**: This may not yield reasonable results for the network dynamics and is only meant to demonstrate the simulation workflow! <br>
1.`scale_down_to` is the downscaling factor that defines the ratio by which the full-scale multi-area model is reduced to a model with fewer neurons and indegrees. This reduction is essential to enable simulation on machines with limited computational power, ensuring that simulation results can be obtained in a relatively shorter timeframe. <br> If the value is `scale_down_to = 1.`, the full-scale network will be simulated. <br> In the pre-set downscaled version, `scale_down_to = 0.006`. This setting reduces the number of neurons and indegrees to 0.6 % of their full-scale counterparts, facilitating simulation on a typical local machine. <br>**Warning**: This may not yield reasonable results for the network dynamics and is only meant to demonstrate the simulation workflow! <br>
2.`cc_weights_factor` is the scaling factor that controls the cortico-cortical synaptic strength that targets excitatory neurons. <br> By default it is set to `1.9`, keeping the same value for producing the metastable state as in the original paper. <br>**Important**: This factor plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively. In the downscaled multi-area model, a similar metastable state may not be achieved or achieved with a different value. <br>
2.`cc_weights_factor` is the scaling factor that controls the cortico-cortical synaptic strength that targets excitatory neurons. <br> By default it is set to `1.9`, keeping the same value for producing the metastable state as in the original paper. <br>**Important**: This factor plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively. In the downscaled multi-area model, a similar metastable state may not be achieved or achieved with a different value. <br>
3.`areas_simulated` specifies the cortical areas to be included in the simulation process. Its default value is `complete_area_list` meaning all the areas in the complete_area_list will be simulated.
3.`areas_simulated` specifies the cortical areas to be included in the simulation process. Its default value is `complete_area_list` meaning all the areas in the complete_area_list will be simulated.
The value assigned to `areas_simulated` can be any sublist of complete_area_list.
The value assigned to `areas_simulated` can be any sublist of complete_area_list.
1.`replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br>`'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces them with a time-varying current input.
4.`replace_non_simulated_areas` defines how non-simulated areas will be replaced. <br> When all areas are included, it is set as `None` by default. <br> Other options are: `'hom_poisson_stat'`, `'het_poisson_stat'`, and `'het_current_nonstat'`.<br>`'hom_poisson_stat'` replaces the non-simulated areas by Poisson sources with the same global rate `rate_ext`. The `'het_poisson_stat'` and `'het_current_nonstat'` options use the loaded specific rates from `'replace_cc_input_source'`, which contains the area-specific firing rates of our full-scale simulation results. The difference is that `'het_poisson_stat'` replaces the non-simulated areas by Poisson spike trains and `'het_current_nonstat'` replaces them with a time-varying current input.
2.`g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation.
5.`g` defines the relative inhibitory synaptic strength (in relative units to the excitatory synaptic strength). By default: `-11.0`, as used in the full-scale network. `g = -1.0` means equal excitatory and inhibitory strengths, and `g < -1.0` results in stronger inhibition than excitation.
3.`rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2.
6.`rate_ext` defines the rate of the Poissonian spike generator (in spikes/s), by default: `10.0`. It also serves as one of the input parameters of the model. When a larger value is assigned to `rate_ext`, the excitatory background noise is increased. Note that the external Poisson indegree onto 5E and 6E is increased by a factor of 1.125 and 1.41666667 respectively, and the external Poisson indegree onto 23E and 5E in area TH is increased by a factor of 1.2.
%% Cell type:code id:60265d52 tags:
%% Cell type:code id:60265d52 tags:
``` python
``` python
# Downscaling factor
# Downscaling factor
# value range/options: (0, 1.], change it to 1. to simulate the full-scale network
# value range/options: (0, 1.], change it to 1. to simulate the full-scale network
scale_down_to=0.006
scale_down_to=0.006
# Scaling factor for cortico-cortical connections (Chi)
# Scaling factor for cortico-cortical connections (Chi)
# value range/options: [1., 2.5],
# value range/options: [1., 2.5],
# a weight factor of 1.0 produces Ground state activity.
# a weight factor of 1.0 produces Ground state activity.
# 1.9 was assigned to produce the metastable results in Schmidt et al. (2018).
# 1.9 was assigned to produce the metastable results in Schmidt et al. (2018).
cc_weights_factor=1.9
cc_weights_factor=1.9
# Cortical areas included in the simulation
# Cortical areas included in the simulation
# value range/options: any sublist of complete_area_list
# value range/options: any sublist of complete_area_list
The cell below assigns the parameters defined in the previous section. If you want to explore the model, you can alter network or simulation configuration parameters in the `network_params` and `sim_params` dictionaries below.
The cell below assigns the parameters defined in the previous section. If you want to explore the model, you can alter network or simulation configuration parameters in the `network_params` and `sim_params` dictionaries below.
raiseException("'hom_poisson_stat', 'het_poisson_stat', or 'het_current_nonstat' should be assigned to replace_non_simulated_areas when not all areas are simulated!")
raiseException("'hom_poisson_stat', 'het_poisson_stat', or 'het_current_nonstat' should be assigned to replace_non_simulated_areas when not all areas are simulated!")
# Determine cc_weights_I_factor from cc_weights_factor
# Determine cc_weights_I_factor from cc_weights_factor
# cc_weights_I_factor is the scaling factor that controls the cortico-cortical synaptic strength that targets inhibitory neurons.
# cc_weights_I_factor is the scaling factor that controls the cortico-cortical synaptic strength that targets inhibitory neurons.
# The conditions below are based on the results in Schmidt et al. (2018).
# The conditions below are based on the results in Schmidt et al. (2018).
ifcc_weights_factor==1.0:# For ground state with cc_weights_factor as 1.,
ifcc_weights_factor==1.0:# For ground state with cc_weights_factor as 1.,
cc_weights_I_factor=1.0# cc_weights_I_factor is set to 1.
cc_weights_I_factor=1.0# cc_weights_I_factor is set to 1.
elifcc_weights_factor>1.0:# For cc_weights_factor larger than 1.0,
elifcc_weights_factor>1.0:# For cc_weights_factor larger than 1.0,
cc_weights_I_factor=2.0# cc_weights_I_factor is set to 2.
cc_weights_I_factor=2.0# cc_weights_I_factor is set to 2.
else:# cc_weights_factor outside of (1., 2.5], raise error
else:# cc_weights_factor outside of (1., 2.5], raise error
raiseException("A value that is equal to or larger than 1.0 should be assigned to the parameter cc_weights_factor!")
raiseException("A value that is equal to or larger than 1.0 should be assigned to the parameter cc_weights_factor!")
# Connection parameters
# Connection parameters
conn_params={
conn_params={
'replace_non_simulated_areas':replace_non_simulated_areas,# Whether to replace non-simulated areas by Poisson sources
'replace_non_simulated_areas':replace_non_simulated_areas,# Whether to replace non-simulated areas by Poisson sources
'g':g,# It sets the relative inhibitory synaptic strength, by default: -11.
'g':g,# It sets the relative inhibitory synaptic strength, by default: -11.
'replace_cc_input_source':replace_cc_input_source,# Specify the data used to replace non-simulated areas
'replace_cc_input_source':replace_cc_input_source,# Specify the data used to replace non-simulated areas
'cc_weights_factor':cc_weights_factor,
'cc_weights_factor':cc_weights_factor,
'cc_weights_I_factor':cc_weights_I_factor
'cc_weights_I_factor':cc_weights_I_factor
}
}
# Input parameters
# Input parameters
input_params={
input_params={
'rate_ext':rate_ext# Rate of the Poissonian spike generator (in spikes/s), by default: 10.
'rate_ext':rate_ext# Rate of the Poissonian spike generator (in spikes/s), by default: 10.
}
}
# Network parameters
# Network parameters
network_params={
network_params={
'N_scaling':scale_down_to,# Scaling of population sizes, by default: 1. for full scale multi-area model
'N_scaling':scale_down_to,# Scaling of population sizes, by default: 1. for full scale multi-area model
'K_scaling':scale_down_to,# Scaling of indegrees, by default: 1. for full scale multi-area model
'K_scaling':scale_down_to,# Scaling of indegrees, by default: 1. for full scale multi-area model
'fullscale_rates':os.path.join(base_path,'tests/fullscale_rates.json'),# Absolute path to the file holding full-scale rates for scaling synaptic weights, by default: None
'fullscale_rates':os.path.join(base_path,'tests/fullscale_rates.json'),# Absolute path to the file holding full-scale rates for scaling synaptic weights, by default: None
The figure below shows the inter-areal connectivity of the model expressed as the relative indegrees of each target area. The relative indegree of a target area from a specific source area is calculated by dividing its indegree by the sum of indegrees that the target area receives from all sources.
The figure below shows the inter-areal connectivity of the model expressed as the relative indegrees of each target area. The relative indegree of a target area from a specific source area is calculated by dividing its indegree by the sum of indegrees that the target area receives from all sources.
The relative indegrees of the full-scale and downscaled models are the same apart from potential differences due to rounding.
The relative indegrees of the full-scale and downscaled models are the same apart from potential differences due to rounding.
**Note**: The spike trains of simulated results are saved to the folder with path `./simulations/<simulation_label>/recordings` where the `<simulation_label>` is displayed in the output of 2.2. All statistics describing network dynamics are computed from the saved spike trains.
**Note**: The spike trains of simulated results are saved to the folder with path `./simulations/<simulation_label>/recordings` where the `<simulation_label>` is displayed in the output of 2.2. All statistics describing network dynamics are computed from the saved spike trains.
%% Cell type:markdown id:fd6e3232 tags:
%% Cell type:markdown id:fd6e3232 tags:
Go back to [Notebook Outline](#toc)
Go back to [Notebook Outline](#toc)
%% Cell type:markdown id:bb71c922 tags:
%% Cell type:markdown id:bb71c922 tags:
## S3. Visualization of Network Dynamics <a class="anchor" id="section_3"></a>
## S3. Visualization of Network Dynamics <a class="anchor" id="section_3"></a>
**Important**: `cc_weights_factor` plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively.
**Important**: `cc_weights_factor` plays a crucial role in transitioning the network activity from the ground to the metastable state. In the full-scale network, the ground state and metastable state activities are achieved when this parameter is set to `1.0` and `1.9`, respectively.
An overview of time-averaged firing rate over simulated populations encoded in colors with areas along x-axis and populations along y-axis. The cells of population 4E and 4I in area TH are labeled with X as area TH does not have layer 4.
An overview of time-averaged firing rate over simulated populations encoded in colors with areas along x-axis and populations along y-axis. The cells of population 4E and 4I in area TH are labeled with X as area TH does not have layer 4.
Comparison of area-level functional connectivity (FC) between the downscaled MAM and macaque experimental data. (A) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents. (B) FC of macaque resting-state fMRI (see Materials and methods in Schmidt et al. 2018).
Comparison of area-level functional connectivity (FC) between the downscaled MAM and macaque experimental data. (A) Simulated FC measured by the zero-time-lag correlation coefficient of synaptic input currents. (B) FC of macaque resting-state fMRI (see Materials and methods in Schmidt et al. 2018).
The spike data of all simulated populations for all simulations are saved in `./simulations/<simulation_label>/recordings` where `<simulation_label>` can be accessed in the output of 2.2. Or users can see their latest simulation by checking the column "Last Modified" and find the folder with the latest change.
The spike data of all simulated populations for all simulations are saved in `./simulations/<simulation_label>/recordings` where `<simulation_label>` can be accessed in the output of 2.2. Or users can see their latest simulation by checking the column "Last Modified" and find the folder with the latest change.
2. Statistics <br>
2. Statistics <br>
The statistics of network dynamics computed from the spike trains can be found in `./simulations/<simulation_label>/Analysis`. You may also find more statistics defined in `./multiarea_model/analysis.py` to further explore the network dynamics.
The statistics of network dynamics computed from the spike trains can be found in `./simulations/<simulation_label>/Analysis`. You may also find more statistics defined in `./multiarea_model/analysis.py` to further explore the network dynamics.
3. Scripts for visualizing network dynamics <br>
3. Scripts for visualizing network dynamics <br>
The scripts for computing statistics and plotting the figures in S3 can be found in `./figures/MAM2EBRAINS`.
The scripts for computing statistics and plotting the figures in S3 can be found in `./figures/MAM2EBRAINS`.