Skip to content

Python implementation of the spiking network model presented in "Simulations of working memory spiking networks driven by short-term plasticity"

License

Notifications You must be signed in to change notification settings

gmtiddia/working_memory_spiking_network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

working_memory_spiking_network

Spiking network model and analysis scripts for the publication:

Tiddia, G., Golosio, B., Fanti, V., & Paolucci, P. S. (2022). Simulations of working memory spiking networks driven by short-term plasticity. Frontiers in Integrative Neuroscience, 16, 972055. https://doi.org/10.3389/fnint.2022.972055

If you use the code, cite us using the citation above.

Requirements

To run the model you need both NEST 3.X and NESTML installed. For installation instructions, follow the guides for NEST and NESTML.

Additionally, to run the model and analyze the data, Python and additional packages are required. To produce the data of the aforementioned publication, the following software was used:

  • Python 3.9.7
  • Pandas 1.3.3
  • Numpy 1.22.4
  • Matplotlib 3.3.4

Contents

  • The Python scripts in which the model is implemented are in the model directory. In particular:

    • default_params.py contains all the parameters of the model organized as Python dictionaries. This file should not be edited, the simulation parameters can be changed in the running script.
    • model_helpers.py contains two functions used in this model and are needed to properly compute the values of synaptic efficacy and input current. The derivation of the mathematical expressions is discussed in Sections 6 and 7 of the Supplementary Material of the publication.
    • model.py introduces the class WMModel which initializes the model. The script contains all the functions employed to build the model and configure its inputs.
  • The test_synapse_model directory contains the Python scripts needed to compare the different tsodyks_synapse implementations. In particular:

    • evaluate_tsodyks3_synapse.py is based on the NEST example evaluate_tsodyks2_synapse.py, which compares the postsynaptic potentials of two neurons connected to the presynaptic one using two different synaptic models: tsodyks_synapse and tsodyks2_synapse. In this script, an additional neuron connected using the STP synapse created through NESTML is simulated, and the postsynaptic potentials given by the three synaptic models are saved to a file.
    • plot_tsodyks3_evaluation.py takes in input the output file of the previous script to produce Figure S5 of the Supplementary Material.
  • run_model.py simulates the model. In lines 19 and 35, the custom network and the simulation parameters are defined. Not all the parameters should be reported at this stage. The parameters not indicated in these dictionaries that have to be used by the model are taken from default_params.py. In line 64 the model is initialized, and in the following lines, the input is added to the network to reproduce the data of different figures of the publication. After the simulation, a data directory is returned containing the spike times of the selective populations of the model.

  • analysis.py reproduces the plots shown in the publication. To reproduce the data edit line 509 of the script with the path in which the data is stored and edit lines 536 and 538 to specify which figure (2 and 3) and panel (A, B, or C) you want to reproduce from the publication.

Data reproducibility

The original implementation of the publication

Tiddia, G., Golosio, B., Fanti, V., & Paolucci, P. S. (2022). Simulations of working memory spiking networks driven by short-term plasticity. Frontiers in Integrative Neuroscience, 16, 972055. https://doi.org/10.3389/fnint.2022.972055

is available at the v_tiddia2022 tag. In order for this version of the model to be run, the NEST version of this repository is required. It is derived from the NEST 3.1 version, with the addition of the tsodyks3_synapse model, not present in the standard version of the library. For the installation instructions, follow this guide. We verified that the simulations employing the tsodyks3_synapse model and the NESTML model produce the sam eresults. You can use the scripts contained in test_synapse_model/comparison_tsodyks3_NESTML directory to compare the two implementations.

Contact

Gianmarco Tiddia, Istituto Nazionale di Fisica Nucleare, Sezione di Cagliari, Italy, [email protected]

License

GPL 3.0 license.

About

Python implementation of the spiking network model presented in "Simulations of working memory spiking networks driven by short-term plasticity"

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages