Skip to content

Simulation of memory consolidation in recurrent spiking neural networks based on synaptic tagging and capture

License

Notifications You must be signed in to change notification settings

andrewlehr/memory-consolidation-stc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Memory consolidation in recurrent spiking neural networks

Outline

This package serves to simulate recurrent spiking neural networks with calcium-based synaptic plasticity and synaptic tagging and capture. The generic C++ code and build scripts for specific simulations are located in the directory simulation-code/. Building will create binaries in the directory simulation-bin/, which contains scripts to run the specific simulations. Building has been tested with g++ 10.3.0 and boost 1.77.0 on Linux kernel 5.13.0. Besides that, pre-compiled binaries are available as part of the latest release.

The directory analysis/ contains Python scripts serving to analyze the data produced by the simulations.

The package that is provided here has been developed and used for the following studies:

  1. Luboeinski, J., Tetzlaff, C. Memory consolidation and improvement by synaptic tagging and capture in recurrent neural networks. Commun. Biol. 4, 275 (2021). https://doi.org/10.1038/s42003-021-01778-y --- original model underlying the simulation code, investigation of synaptic consolidation and improvement of a single memory representation

  2. Luboeinski, J., Tetzlaff, C. Organization and priming of long-term memory representations with two-phase plasticity. bioRxiv (2021). https://doi.org/10.1101/2021.04.15.439982 --- extension of the model, investigation of functional consequences of interactions between multiple memory representations in different paradigms

  3. Luboeinski, J. The Role of Synaptic Tagging and Capture for Memory Dynamics in Spiking Neural Networks [Dissertation]. University of Göttingen (2021). https://doi.org/10.53846/goediss-463 --- extension of the model, further investigation of multiple memory representations with attractor dynamics as well as characterization of plasticity regimes depending on pre- and post-synaptic firing rate

If you use parts of the package for your research, please cite accordingly (BibTeX code can be found here). Also note that the code provided here contains some features that have not been used in any publication yet. Please feel free to contact us for any questions.

Simulation code

Files

  • NetworkMain.cpp - contains the main function initializing network simulations
  • NetworkSimulation.cpp - class performing network simulations
  • Network.cpp - class describing the network
  • Neuron.cpp - class describing one neuron
  • Stimulus.cpp - class describing a stimulus
  • StimulusProtocols.cpp - class to define specific stimulus protocols
  • Definitions.hpp - general definitions
  • SpecialCases.hpp - definitions for special simulations (see this to reproduce results of the studies mentioned above)
  • Tools.cpp - collection of utility functions
  • Plots.cpp - collection of plotting functions employing gnuplot
  • plotFunctions.py - collection of plotting functions employing Matplotlib

Compiling and linking

The simulation code comes with shell scripts (in addition to the included Makefile) to build it for different purposes, related to the studies mentioned above. The subdirectories of simulation-code/ contain the following scripts:

  • build_scripts_paper1:

    • compile_2N1S - compiles the code for simulating the effect of basic plasticity induction protocols at a single synapse
    • compile_IRS - compiles the code for network simulations of learning, consolidation, recall, and the effect of intermediate stimulation on a memory representation
    • compile_sizes - compiles the code for network simulations of learning, consolidation, and recall of a memory representation of certain size
  • build_scripts_paper2:

    • compile_activation - compiles the code for network simulations to investigate the spontaneous activation of assemblies in the absence of plasticity and in the presence of background noise
    • compile_organization - compiles the code for network simulations of learning and consolidating three memory representations in different organizational paradigms
    • compile_organization_noLTD - compiles the code for network simulations of learning and consolidating three memory representations in different organizational paradigms, without LTD
    • compile_organization_randweight - compiles the code for network simulations of learning and consolidating three memory representations in different organizational paradigms, with randomly initialized weights
    • compile_priming_and_activation - compiles the code for network simulations of learning and consolidating three memory representations in different organizational paradigms, priming one assembly, and investigating the spontaneous activation of assemblies in the absence of plasticity and in the presence of background noise
    • compile_recall - compiles the code for network simulations to investigate in the absence of plasticity the recall of different assemblies
  • build_scripts_misc:

    • compile_2N1S_Li2016 - compiles the code for simulating the effect of basic plasticity induction protocols at a single synapse, with the same model as in Li, Kulvicius, Tetzlaff, PLOS ONE, 2016
    • compile_2N1S_minimal - compiles the code for a minimal example of the induction of early-phase plasticity by a few pre-defined spikes
    • compile_activation - compiles the code for network simulations to investigate the spontaneous activation of assemblies in the absence of plasticity and in the presence of background noise
    • compile_activation_osc_1Hz - compiles the code for network simulations to investigate the spontaneous activation of assemblies in the absence of plasticity and in the presence of 1 Hz oscillatory input to the inhibitory population
    • compile_activation_osc_5Hz - compiles the code for network simulations to investigate the spontaneous activation of assemblies in the absence of plasticity and in the presence of 5 Hz oscillatory input to the inhibitory population
    • compile_organization_attractors - compiles the code for network simulations of learning and consolidating three attractor memory representations in different organizational paradigms
    • compile_PFreq - compiles the code for network simulations to characterize plasticity regimes depending on pre- and post-synaptic firing rate

The simulation is run by executing the binary file with or without command line options (as defined in NetworkMain.cpp, e.g., via one of the following shell scripts). Please note that in addition there are preprocessor options that can be set before compiling (e.g., in NetworkSimulation.cpp) but cannot be changed during runtime.

The binaries and run scripts for the studies mentioned above are located in subdirectories of simulation-bin/. Please note that some of these scripts trigger a cascade of many simulations by using the screen command. This may cause less powerful machines to take very long or to run into memory issues. In those cases, you might consider to run simulations separately.

  • run_binary_paper1:

    • run_2N1S - reproduce single-synapse data resulting from basic induction protocols for synaptic plasticity (see, for example, Sajikumar et al., J Neurosci, 2005)
    • run_full - learn a memory representation, let it consolidate, and recall after 8 hours (no fast-forwarding, takes very long)
    • run_IRS - learn a memory representation, save the network state, and recall after 10 seconds; load the network state, apply intermediate stimulation, let the memory representation consolidate, and recall after 8 hours
    • run_sizes - learn a memory representation, save the network state, and recall after 10 seconds; load the network state, let the memory representation consolidate, and recall after 8 hours
    • connections.txt - the default connectivity matrix used in this study; if this file is absent, the simulation program will automatically generate a new network structure
  • run_binary_paper2:

    • run_activation* - simulate the activity in a previously consolidated network for 3 minutes without plasticity (it is required to run the according run_learn_cons* script beforehand)
    • run_learn_cons - subsequently learn 3 memory representations and let them consolidate for 8 hours
    • run_learn_cons_interleaved - learn 3 memory representations in an interleaved manner and let them consolidate for 8 hours
    • run_learn_cons_IC - subsequently learn 3 memory representations; consolidate for 8 hours after learning each assembly
    • run_learn_cons_noLTD - subsequently learn 3 memory representations and let them consolidate for 8 hours; without LTD
    • run_learn_cons_randweight - subsequently learn 3 memory representations and let them consolidate for 8 hours; with randomly initialized weights
    • run_priming_and_activation - prime one of the assemblies in a previously consolidated network at a certain time and then simulate the activity for 3 minutes without plasticity (it is required to run run_learn_cons_interleaved beforehand)
    • run_recall - apply recall stimuli to the assemblies in a previously consolidated network and in a control network (it is required to run run_learn_cons beforehand)
  • run_binary_misc:

    • run_2N1S_Li2016 - reproduce single-synapse data resulting from basic induction protocols for synaptic plasticity, with the same model as in Li, Kulvicius, Tetzlaff, PLOS ONE, 2016
    • run_2N1S_minimal - minimal example of the induction of early-phase plasticity by a few pre-defined spikes
    • run_activation_attractors - simulate the activity in a previously consolidated network for 3 minutes without plasticity (it is required to run run_learn_cons_attractors beforehand)
    • run_learn_cons_attractors - subsequently learn 3 attractor memory representations; consolidate for 8 hours after learning each assembly
    • run_PFreq - network simulations to characterize plasticity regimes depending on pre- and post-synaptic firing rate

Analysis scripts

The following scripts serve to process and analyze the data produced by the simulation code. They were tested to run with Python 3.7.3, NumPy 1.20.1, SciPy 1.6.0, and pandas 1.0.3. Please note that some of the script files are interdependent. Also note that not all script files and functions have to be used to reproduce the results of any single study mentioned above.

Files

  • adjacencyFunctions.py - functions to analyze the connectivity and weights in a network (used to compute mean and standard deviation of early- and late-phase weights)
  • analyzeWeights.py - routine that runs functions to investigate the synaptic weight structure of networks (reads from [timestamp]_net_[time].txt files produced by the simulation program)
  • assemblyAttractorStatistics.py - determines the statistics of the activation of attractor cell assemblies (considering exclusive activation and transitions between attractors)
  • assemblyAvalancheStatistics.py - determines the statistics of avalanche occurrence within cell assemblies
  • averageFileColumnsAdvanced.py - averages data columns across files (for example, average over multiple weight traces or probability distributions)
  • averageWeights-py - averages across multiple weight matrices
  • calculateMIa.py - calculates the mutual information from two firing rate distributions
  • calculateQ.py - calculates the pattern completion coefficient Q for an input-defined cell assembly from a firing rate distribution
  • computeRateFromSpikes.py - computes the firing rate over time via fixed time windows from spike raster data
  • extractParamsFiringRates.py - recursively extracts the mean firing rates of neuronal subpopulations along with the simulation parameters from directories containing simulation data (used to process many datasets for raster plots)
  • extractParamsMeanWeights.py - recursively extracts the mean weights across neuronal subpopulations along with the simulation parameters from directories containing simulation data (used to process many datasets for raster plots)
  • extractParamsProteins.py - recursively extracts the mean protein amount across core and non-core neurons along with the simulation parameters from directories containing simulation data (used to process many datasets for raster plots)
  • extractParamsQMI.py - recursively extracts the Q and MI measures along with the simulation parameters from directories containing simulation data (used to process many datasets for raster plots)
  • frequencyAnalysisSpikeRaster.py - computes the frequency spectrum of spike raster data
  • meanCorrelations.py - computes firing rate correlations for neuron pairs from spike raster data and averages over subpopulations of the network
  • numberOfSpikesInBins.py - computes the distribution of spikes per time bin from cell assembly time series data
  • overlapParadigms.py - defines paradigms of overlapping cell assemblies
  • utilityFunctions.py - diverse utility functions, e.g., to read firing rate, early- and late-phase weight data from [timestamp]_net_[time].txt files produced by the simulation program
  • valueDistributions.py - functions to analyze and plot weight and firing rate distributions

About

Simulation of memory consolidation in recurrent spiking neural networks based on synaptic tagging and capture

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 36.4%
  • C++ 34.2%
  • Python 29.3%
  • Makefile 0.1%