Skip to content

A fully-functional sparse-learning spike-based bio-inspired hippocampal memory model implemented with SNN technology in the SpiNNaker hardware

License

Notifications You must be signed in to change notification settings

dancasmor/A-bio-inspired-implementation-of-a-sparse-learning-spike-based-hippocampus-memory-model

Repository files navigation

A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model

Description

Code on which the paper entitled "A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model" is based, sent to a journal and awaiting review.

A fully functional hippocampal bio-inspired memory model implemented on the SpiNNaker hardware platform using the technology of the Spiking Neuronal Network (SNN) is presented. The code is written in Python and makes use of the PyNN library and their adaptation for SpiNNaker called sPyNNaker. In addition, the necessary scripts to replicate the tests and plots carried out in the paper are included, together with data and plots of the first tests.

Please go to section cite this work to learn how to properly reference the works cited here.

Table of contents

Article

Title: A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model

Abstract: The brain is capable of solving complex problems simply and efficiently, far surpassing modern computers. In this regard, neuromorphic engineering focuses on mimicking the basic principles that govern the brain in order to develop systems that achieve such computational capabilities. Within this field, bio-inspired learning and memory systems are still a challenge to be solved, and this is where the hippocampus is involved. It is the region of the brain that acts as a short-term memory, allowing the learning and storage of information from all the sensory nuclei of the cerebral cortex and its subsequent recall. In this work, we propose a novel bio-inspired hippocampal memory model with the ability to learn memories, recall them from a fragment of itself (cue) and even forget memories when trying to learn others with the same cue. This model has been implemented on SpiNNaker using Spiking Neural Networks, and a set of experiments were performed to demonstrate its correct operation. This work presents the first hardware implementation of a fully functional bio-inspired spike-based hippocampus memory model, paving the road for the development of future more complex neuromorphic systems.

Keywords: Hippocampus model, spiking neural networks, Neuromorphic engineering, CA3, DG, CA1, SpiNNaker, spike-based memory

Author: Daniel Casanueva-Morato

Contact: dcasanueva@us.es

Instalation

  1. Have or have access to the SpiNNaker hardware platform. In case of local use, follow the installation instructions available on the official website
  2. Python version 3.8.10
  3. Python libraries:
    • sPyNNaker8: last stable version compiled from source
    • numpy 1.21.4
    • matplotlib 3.5.0
    • xlsxWriter 3.0.2
    • sPyBlocks: 0.0.1

To run any script, follow the python nomenclature: python script.py

Repository content

  • DG_CA3_CA1_one_hot.py: script responsible for building and simulating the oscillating memory model, as well as storing the simulation data in a file in the data folder, according to the configuration specified in the selected config_files folder.

  • test_DG_CA3_CA1_one_hot.py: script in charge of carrying out the simulation of the memory model and the plotting of the necessary graphics of the simulation. The conditions of the simulation are as indicated in the configuration specified in the selected config_files folder and the generated graphics are stored in plot.

  • memory_testbench.py: script in charge of generating the file with the input spikes of the memory model (in tb folder) needed to perform the different tests.

  • tools.py,plot.py and excel_controller.py: set of functions used as a tool for data processing, graphical representation of the data and generation of excel files summarising the result of the experimentation respectively.

  • data and plot: folders where the data files from the network simulation are stored and where the plots of these data are stored respectively.

  • config_files folder: contains different folders, one for each desired configuration of the memory model. The configFileParameters.ini file indicates which of all the configurations are to be used. Within each configuration there are 4 files:

    • input_spikes.ini: input spikes to the memory model. For learning operations, spikes need to be held for 3 time units at the input of the memory and no further operation can be performed until 7 time units later. In the case of recall operations, spikes must be displayed for a single time unit and 6 time units must be waited until the next operation. For more information, read the paper.

    • memory_config.ini: parameters shaping the memory model.

    • network_config.json: construction parameters of the neuron and synapse models of the network (it is advisable not to modify them).

    • simulation_config.ini: all parameters related to the simulation and graphical representation of the results.

Usage

To perform memory tests, run test_DG_CA3_CA1_one_hot.py. This script is in charge of building the memory model, i.e. calling DG_CA3_CA1_one_hot.py, run the simulation and create the necessary visual resources on the simulation result.

In order to define the parameters of the memory model to be built and the conditions of the simulation to be run, it is necessary to create or modify a set of configuration files located in the folder config_files. You can have as many configurations of models and simulations as you want, each one must be contained in a different folder, and is the file configFileParameters.ini in which you indicate which of all the configurations you want to use. The configuration must consist of 4 files, the contents of which are specified in Repository content section.

In case you want to try some of the tests discussed in the paper such as the stress test or the random access test, you can use memory_testbench.py. It generates the input_spikes.ini necessary to carry out the test, as well as indicating the simulation time required and the number of operations performed.

Finally, in order to be able to use the memory model as a module within a larger SNN network, we have developed a python package that includes this memory model (among others): sPyMem. You can install sPyMem via pip thanks to its PyPi distribution: pip install sPyMem or download it from source on their github repository. In this package, the memory model presented in this paper would be called hippocampus_with_forgetting.

Cite this work

APA: Casanueva-Morato, D., Ayuso-Martinez, A., Dominguez-Morales, J. P., Jimenez-Fernandez, A., & Jimenez-Moreno, G. (2022). A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. arXiv preprint arXiv:2206.04924.

ISO 690: CASANUEVA-MORATO, Daniel, et al. A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model. arXiv preprint arXiv:2206.04924, 2022.

MLA: Casanueva-Morato, Daniel, et al. "A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model." arXiv preprint arXiv:2206.04924 (2022).

BIBTEX: @article{casanueva2022a, title={A bio-inspired implementation of a sparse-learning spike-based hippocampus memory model}, author={Casanueva-Morato, Daniel and Ayuso-Martinez, Alvaro and Dominguez-Morales, Juan P and Jimenez-Fernandez, Angel and Jimenez-Moreno, Gabriel}, journal={arXiv preprint arXiv:2206.04924}, year={2022}}

Credits

The author of the original idea is Daniel Casanueva-Morato while working on a research project of the RTC Group.

This research was partially supported by the Spanish grant MINDROB (PID2019-105556GB-C33/AEI/10.13039/501100011033).

D. C.-M. was supported by a "Formación de Profesor Universitario" Scholarship from the Spanish Ministry of Education, Culture and Sport.

License

This project is licensed under the GPL License - see the LICENSE.md file for details.

Copyright © 2022 Daniel Casanueva-Morato
dcasanueva@us.es

License: GPL v3

About

A fully-functional sparse-learning spike-based bio-inspired hippocampal memory model implemented with SNN technology in the SpiNNaker hardware

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages